case 8: return LDKBolt12SemanticError_UnknownRequiredFeatures;
case 9: return LDKBolt12SemanticError_UnexpectedFeatures;
case 10: return LDKBolt12SemanticError_MissingDescription;
- case 11: return LDKBolt12SemanticError_MissingSigningPubkey;
- case 12: return LDKBolt12SemanticError_InvalidSigningPubkey;
- case 13: return LDKBolt12SemanticError_UnexpectedSigningPubkey;
- case 14: return LDKBolt12SemanticError_MissingQuantity;
- case 15: return LDKBolt12SemanticError_InvalidQuantity;
- case 16: return LDKBolt12SemanticError_UnexpectedQuantity;
- case 17: return LDKBolt12SemanticError_InvalidMetadata;
- case 18: return LDKBolt12SemanticError_UnexpectedMetadata;
- case 19: return LDKBolt12SemanticError_MissingPayerMetadata;
- case 20: return LDKBolt12SemanticError_MissingPayerId;
- case 21: return LDKBolt12SemanticError_DuplicatePaymentId;
- case 22: return LDKBolt12SemanticError_MissingPaths;
- case 23: return LDKBolt12SemanticError_UnexpectedPaths;
- case 24: return LDKBolt12SemanticError_InvalidPayInfo;
- case 25: return LDKBolt12SemanticError_MissingCreationTime;
- case 26: return LDKBolt12SemanticError_MissingPaymentHash;
- case 27: return LDKBolt12SemanticError_UnexpectedPaymentHash;
- case 28: return LDKBolt12SemanticError_MissingSignature;
+ case 11: return LDKBolt12SemanticError_MissingIssuerSigningPubkey;
+ case 12: return LDKBolt12SemanticError_UnexpectedIssuerSigningPubkey;
+ case 13: return LDKBolt12SemanticError_MissingQuantity;
+ case 14: return LDKBolt12SemanticError_InvalidQuantity;
+ case 15: return LDKBolt12SemanticError_UnexpectedQuantity;
+ case 16: return LDKBolt12SemanticError_InvalidMetadata;
+ case 17: return LDKBolt12SemanticError_UnexpectedMetadata;
+ case 18: return LDKBolt12SemanticError_MissingPayerMetadata;
+ case 19: return LDKBolt12SemanticError_MissingPayerSigningPubkey;
+ case 20: return LDKBolt12SemanticError_DuplicatePaymentId;
+ case 21: return LDKBolt12SemanticError_MissingPaths;
+ case 22: return LDKBolt12SemanticError_UnexpectedPaths;
+ case 23: return LDKBolt12SemanticError_InvalidPayInfo;
+ case 24: return LDKBolt12SemanticError_MissingCreationTime;
+ case 25: return LDKBolt12SemanticError_MissingPaymentHash;
+ case 26: return LDKBolt12SemanticError_UnexpectedPaymentHash;
+ case 27: return LDKBolt12SemanticError_MissingSigningPubkey;
+ case 28: return LDKBolt12SemanticError_InvalidSigningPubkey;
+ case 29: return LDKBolt12SemanticError_MissingSignature;
+ case 30: return LDKBolt12SemanticError_UnexpectedHumanReadableName;
default: abort();
}
}
case LDKBolt12SemanticError_UnknownRequiredFeatures: return 8;
case LDKBolt12SemanticError_UnexpectedFeatures: return 9;
case LDKBolt12SemanticError_MissingDescription: return 10;
- case LDKBolt12SemanticError_MissingSigningPubkey: return 11;
- case LDKBolt12SemanticError_InvalidSigningPubkey: return 12;
- case LDKBolt12SemanticError_UnexpectedSigningPubkey: return 13;
- case LDKBolt12SemanticError_MissingQuantity: return 14;
- case LDKBolt12SemanticError_InvalidQuantity: return 15;
- case LDKBolt12SemanticError_UnexpectedQuantity: return 16;
- case LDKBolt12SemanticError_InvalidMetadata: return 17;
- case LDKBolt12SemanticError_UnexpectedMetadata: return 18;
- case LDKBolt12SemanticError_MissingPayerMetadata: return 19;
- case LDKBolt12SemanticError_MissingPayerId: return 20;
- case LDKBolt12SemanticError_DuplicatePaymentId: return 21;
- case LDKBolt12SemanticError_MissingPaths: return 22;
- case LDKBolt12SemanticError_UnexpectedPaths: return 23;
- case LDKBolt12SemanticError_InvalidPayInfo: return 24;
- case LDKBolt12SemanticError_MissingCreationTime: return 25;
- case LDKBolt12SemanticError_MissingPaymentHash: return 26;
- case LDKBolt12SemanticError_UnexpectedPaymentHash: return 27;
- case LDKBolt12SemanticError_MissingSignature: return 28;
+ case LDKBolt12SemanticError_MissingIssuerSigningPubkey: return 11;
+ case LDKBolt12SemanticError_UnexpectedIssuerSigningPubkey: return 12;
+ case LDKBolt12SemanticError_MissingQuantity: return 13;
+ case LDKBolt12SemanticError_InvalidQuantity: return 14;
+ case LDKBolt12SemanticError_UnexpectedQuantity: return 15;
+ case LDKBolt12SemanticError_InvalidMetadata: return 16;
+ case LDKBolt12SemanticError_UnexpectedMetadata: return 17;
+ case LDKBolt12SemanticError_MissingPayerMetadata: return 18;
+ case LDKBolt12SemanticError_MissingPayerSigningPubkey: return 19;
+ case LDKBolt12SemanticError_DuplicatePaymentId: return 20;
+ case LDKBolt12SemanticError_MissingPaths: return 21;
+ case LDKBolt12SemanticError_UnexpectedPaths: return 22;
+ case LDKBolt12SemanticError_InvalidPayInfo: return 23;
+ case LDKBolt12SemanticError_MissingCreationTime: return 24;
+ case LDKBolt12SemanticError_MissingPaymentHash: return 25;
+ case LDKBolt12SemanticError_UnexpectedPaymentHash: return 26;
+ case LDKBolt12SemanticError_MissingSigningPubkey: return 27;
+ case LDKBolt12SemanticError_InvalidSigningPubkey: return 28;
+ case LDKBolt12SemanticError_MissingSignature: return 29;
+ case LDKBolt12SemanticError_UnexpectedHumanReadableName: return 30;
default: abort();
}
}
case 6: return LDKPaymentFailureReason_UnknownRequiredFeatures;
case 7: return LDKPaymentFailureReason_InvoiceRequestExpired;
case 8: return LDKPaymentFailureReason_InvoiceRequestRejected;
+ case 9: return LDKPaymentFailureReason_BlindedPathCreationFailed;
default: abort();
}
}
case LDKPaymentFailureReason_UnknownRequiredFeatures: return 6;
case LDKPaymentFailureReason_InvoiceRequestExpired: return 7;
case LDKPaymentFailureReason_InvoiceRequestRejected: return 8;
+ case LDKPaymentFailureReason_BlindedPathCreationFailed: return 9;
default: abort();
}
}
return ret_ref;
}
-uint32_t CS_LDK_LDKAPIError_ty_from_ptr(int64_t ptr) {
- LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKAPIError_APIMisuseError: return 0;
- case LDKAPIError_FeeRateTooHigh: return 1;
- case LDKAPIError_InvalidRoute: return 2;
- case LDKAPIError_ChannelUnavailable: return 3;
- case LDKAPIError_MonitorUpdateInProgress: return 4;
- case LDKAPIError_IncompatibleShutdownScript: return 5;
- default: abort();
- }
-}
-jstring CS_LDK_LDKAPIError_APIMisuseError_get_err(int64_t ptr) {
- LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKAPIError_APIMisuseError);
- LDKStr err_str = obj->api_misuse_error.err;
- jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len);
- return err_conv;
-}
-jstring CS_LDK_LDKAPIError_FeeRateTooHigh_get_err(int64_t ptr) {
- LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKAPIError_FeeRateTooHigh);
- LDKStr err_str = obj->fee_rate_too_high.err;
- jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len);
- return err_conv;
-}
-int32_t CS_LDK_LDKAPIError_FeeRateTooHigh_get_feerate(int64_t ptr) {
- LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKAPIError_FeeRateTooHigh);
- int32_t feerate_conv = obj->fee_rate_too_high.feerate;
- return feerate_conv;
-}
-jstring CS_LDK_LDKAPIError_InvalidRoute_get_err(int64_t ptr) {
- LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKAPIError_InvalidRoute);
- LDKStr err_str = obj->invalid_route.err;
- jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len);
- return err_conv;
-}
-jstring CS_LDK_LDKAPIError_ChannelUnavailable_get_err(int64_t ptr) {
- LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKAPIError_ChannelUnavailable);
- LDKStr err_str = obj->channel_unavailable.err;
- jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len);
- return err_conv;
-}
-int64_t CS_LDK_LDKAPIError_IncompatibleShutdownScript_get_script(int64_t ptr) {
- LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKAPIError_IncompatibleShutdownScript);
- LDKShutdownScript script_var = obj->incompatible_shutdown_script.script;
- int64_t script_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(script_var);
- script_ref = tag_ptr(script_var.inner, false);
- return script_ref;
-}
-static inline void CResult_NoneAPIErrorZ_get_ok(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return *owner->contents.result;
-}
-void CS_LDK_CResult_NoneAPIErrorZ_get_ok(int64_t owner) {
- LDKCResult_NoneAPIErrorZ* owner_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(owner);
- CResult_NoneAPIErrorZ_get_ok(owner_conv);
-}
-
-static inline struct LDKAPIError CResult_NoneAPIErrorZ_get_err(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return APIError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_NoneAPIErrorZ_get_err(int64_t owner) {
- LDKCResult_NoneAPIErrorZ* owner_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(owner);
- LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError");
- *ret_copy = CResult_NoneAPIErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline LDKCVec_CResult_NoneAPIErrorZZ CVec_CResult_NoneAPIErrorZZ_clone(const LDKCVec_CResult_NoneAPIErrorZZ *orig) {
- LDKCVec_CResult_NoneAPIErrorZZ ret = { .data = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ) * orig->datalen, "LDKCVec_CResult_NoneAPIErrorZZ clone bytes"), .datalen = orig->datalen };
- for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = CResult_NoneAPIErrorZ_clone(&orig->data[i]);
- }
- return ret;
-}
-static inline LDKCVec_APIErrorZ CVec_APIErrorZ_clone(const LDKCVec_APIErrorZ *orig) {
- LDKCVec_APIErrorZ ret = { .data = MALLOC(sizeof(LDKAPIError) * orig->datalen, "LDKCVec_APIErrorZ clone bytes"), .datalen = orig->datalen };
- for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = APIError_clone(&orig->data[i]);
- }
- return ret;
-}
uint32_t CS_LDK_LDKCOption_ThirtyTwoBytesZ_ty_from_ptr(int64_t ptr) {
LDKCOption_ThirtyTwoBytesZ *obj = (LDKCOption_ThirtyTwoBytesZ*)untag_ptr(ptr);
switch(obj->tag) {
CResult_RecipientOnionFieldsNoneZ_get_err(owner_conv);
}
+uint32_t CS_LDK_LDKDNSResolverMessage_ty_from_ptr(int64_t ptr) {
+ LDKDNSResolverMessage *obj = (LDKDNSResolverMessage*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKDNSResolverMessage_DNSSECQuery: return 0;
+ case LDKDNSResolverMessage_DNSSECProof: return 1;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKDNSResolverMessage_DNSSECQuery_get_dnssec_query(int64_t ptr) {
+ LDKDNSResolverMessage *obj = (LDKDNSResolverMessage*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKDNSResolverMessage_DNSSECQuery);
+ LDKDNSSECQuery dnssec_query_var = obj->dnssec_query;
+ int64_t dnssec_query_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(dnssec_query_var);
+ dnssec_query_ref = tag_ptr(dnssec_query_var.inner, false);
+ return dnssec_query_ref;
+}
+int64_t CS_LDK_LDKDNSResolverMessage_DNSSECProof_get_dnssec_proof(int64_t ptr) {
+ LDKDNSResolverMessage *obj = (LDKDNSResolverMessage*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKDNSResolverMessage_DNSSECProof);
+ LDKDNSSECProof dnssec_proof_var = obj->dnssec_proof;
+ int64_t dnssec_proof_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(dnssec_proof_var);
+ dnssec_proof_ref = tag_ptr(dnssec_proof_var.inner, false);
+ return dnssec_proof_ref;
+}
+static inline struct LDKDNSResolverMessage C2Tuple_DNSResolverMessageResponseInstructionZ_get_a(LDKC2Tuple_DNSResolverMessageResponseInstructionZ *NONNULL_PTR owner){
+ return DNSResolverMessage_clone(&owner->a);
+}
+int64_t CS_LDK_C2Tuple_DNSResolverMessageResponseInstructionZ_get_a(int64_t owner) {
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ* owner_conv = (LDKC2Tuple_DNSResolverMessageResponseInstructionZ*)untag_ptr(owner);
+ LDKDNSResolverMessage *ret_copy = MALLOC(sizeof(LDKDNSResolverMessage), "LDKDNSResolverMessage");
+ *ret_copy = C2Tuple_DNSResolverMessageResponseInstructionZ_get_a(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKResponseInstruction C2Tuple_DNSResolverMessageResponseInstructionZ_get_b(LDKC2Tuple_DNSResolverMessageResponseInstructionZ *NONNULL_PTR owner){
+ LDKResponseInstruction ret = owner->b;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_C2Tuple_DNSResolverMessageResponseInstructionZ_get_b(int64_t owner) {
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ* owner_conv = (LDKC2Tuple_DNSResolverMessageResponseInstructionZ*)untag_ptr(owner);
+ LDKResponseInstruction ret_var = C2Tuple_DNSResolverMessageResponseInstructionZ_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;
+}
+
+uint32_t CS_LDK_LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ_ty_from_ptr(int64_t ptr) {
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ *obj = (LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ_Some: return 0;
+ case LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ_None: return 1;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ_Some_get_some(int64_t ptr) {
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ *obj = (LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ_Some);
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ* some_conv = MALLOC(sizeof(LDKC2Tuple_DNSResolverMessageResponseInstructionZ), "LDKC2Tuple_DNSResolverMessageResponseInstructionZ");
+ *some_conv = obj->some;
+ *some_conv = C2Tuple_DNSResolverMessageResponseInstructionZ_clone(some_conv);
+ return tag_ptr(some_conv, true);
+}
+uint32_t CS_LDK_LDKDestination_ty_from_ptr(int64_t ptr) {
+ LDKDestination *obj = (LDKDestination*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKDestination_Node: return 0;
+ case LDKDestination_BlindedPath: return 1;
+ default: abort();
+ }
+}
+int8_tArray CS_LDK_LDKDestination_Node_get_node(int64_t ptr) {
+ LDKDestination *obj = (LDKDestination*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKDestination_Node);
+ int8_tArray node_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_arr->elems, obj->node.compressed_form, 33);
+ return node_arr;
+}
+int64_t CS_LDK_LDKDestination_BlindedPath_get_blinded_path(int64_t ptr) {
+ LDKDestination *obj = (LDKDestination*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKDestination_BlindedPath);
+ LDKBlindedMessagePath blinded_path_var = obj->blinded_path;
+ int64_t blinded_path_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(blinded_path_var);
+ blinded_path_ref = tag_ptr(blinded_path_var.inner, false);
+ return blinded_path_ref;
+}
+uint32_t CS_LDK_LDKOffersContext_ty_from_ptr(int64_t ptr) {
+ LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKOffersContext_InvoiceRequest: return 0;
+ case LDKOffersContext_OutboundPayment: return 1;
+ case LDKOffersContext_InboundPayment: return 2;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKOffersContext_InvoiceRequest_get_nonce(int64_t ptr) {
+ LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKOffersContext_InvoiceRequest);
+ LDKNonce nonce_var = obj->invoice_request.nonce;
+ int64_t nonce_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_var);
+ nonce_ref = tag_ptr(nonce_var.inner, false);
+ return nonce_ref;
+}
+int8_tArray CS_LDK_LDKOffersContext_OutboundPayment_get_payment_id(int64_t ptr) {
+ LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKOffersContext_OutboundPayment);
+ int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_id_arr->elems, obj->outbound_payment.payment_id.data, 32);
+ return payment_id_arr;
+}
+int64_t CS_LDK_LDKOffersContext_OutboundPayment_get_nonce(int64_t ptr) {
+ LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKOffersContext_OutboundPayment);
+ LDKNonce nonce_var = obj->outbound_payment.nonce;
+ int64_t nonce_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_var);
+ nonce_ref = tag_ptr(nonce_var.inner, false);
+ return nonce_ref;
+}
+int8_tArray CS_LDK_LDKOffersContext_OutboundPayment_get_hmac(int64_t ptr) {
+ LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKOffersContext_OutboundPayment);
+ int8_tArray hmac_arr = init_int8_tArray(32, __LINE__);
+ memcpy(hmac_arr->elems, obj->outbound_payment.hmac.data, 32);
+ return hmac_arr;
+}
+int8_tArray CS_LDK_LDKOffersContext_InboundPayment_get_payment_hash(int64_t ptr) {
+ LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKOffersContext_InboundPayment);
+ int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_hash_arr->elems, obj->inbound_payment.payment_hash.data, 32);
+ return payment_hash_arr;
+}
+int64_t CS_LDK_LDKOffersContext_InboundPayment_get_nonce(int64_t ptr) {
+ LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKOffersContext_InboundPayment);
+ LDKNonce nonce_var = obj->inbound_payment.nonce;
+ int64_t nonce_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_var);
+ nonce_ref = tag_ptr(nonce_var.inner, false);
+ return nonce_ref;
+}
+int8_tArray CS_LDK_LDKOffersContext_InboundPayment_get_hmac(int64_t ptr) {
+ LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKOffersContext_InboundPayment);
+ int8_tArray hmac_arr = init_int8_tArray(32, __LINE__);
+ memcpy(hmac_arr->elems, obj->inbound_payment.hmac.data, 32);
+ return hmac_arr;
+}
+uint32_t CS_LDK_LDKAsyncPaymentsContext_ty_from_ptr(int64_t ptr) {
+ LDKAsyncPaymentsContext *obj = (LDKAsyncPaymentsContext*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKAsyncPaymentsContext_OutboundPayment: return 0;
+ default: abort();
+ }
+}
+int8_tArray CS_LDK_LDKAsyncPaymentsContext_OutboundPayment_get_payment_id(int64_t ptr) {
+ LDKAsyncPaymentsContext *obj = (LDKAsyncPaymentsContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKAsyncPaymentsContext_OutboundPayment);
+ int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_id_arr->elems, obj->outbound_payment.payment_id.data, 32);
+ return payment_id_arr;
+}
+int64_t CS_LDK_LDKAsyncPaymentsContext_OutboundPayment_get_nonce(int64_t ptr) {
+ LDKAsyncPaymentsContext *obj = (LDKAsyncPaymentsContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKAsyncPaymentsContext_OutboundPayment);
+ LDKNonce nonce_var = obj->outbound_payment.nonce;
+ int64_t nonce_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_var);
+ nonce_ref = tag_ptr(nonce_var.inner, false);
+ return nonce_ref;
+}
+int8_tArray CS_LDK_LDKAsyncPaymentsContext_OutboundPayment_get_hmac(int64_t ptr) {
+ LDKAsyncPaymentsContext *obj = (LDKAsyncPaymentsContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKAsyncPaymentsContext_OutboundPayment);
+ int8_tArray hmac_arr = init_int8_tArray(32, __LINE__);
+ memcpy(hmac_arr->elems, obj->outbound_payment.hmac.data, 32);
+ return hmac_arr;
+}
+uint32_t CS_LDK_LDKMessageContext_ty_from_ptr(int64_t ptr) {
+ LDKMessageContext *obj = (LDKMessageContext*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKMessageContext_Offers: return 0;
+ case LDKMessageContext_AsyncPayments: return 1;
+ case LDKMessageContext_DNSResolver: return 2;
+ case LDKMessageContext_Custom: return 3;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKMessageContext_Offers_get_offers(int64_t ptr) {
+ LDKMessageContext *obj = (LDKMessageContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageContext_Offers);
+ int64_t offers_ref = tag_ptr(&obj->offers, false);
+ return offers_ref;
+}
+int64_t CS_LDK_LDKMessageContext_AsyncPayments_get_async_payments(int64_t ptr) {
+ LDKMessageContext *obj = (LDKMessageContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageContext_AsyncPayments);
+ int64_t async_payments_ref = tag_ptr(&obj->async_payments, false);
+ return async_payments_ref;
+}
+int64_t CS_LDK_LDKMessageContext_DNSResolver_get_dns_resolver(int64_t ptr) {
+ LDKMessageContext *obj = (LDKMessageContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageContext_DNSResolver);
+ LDKDNSResolverContext dns_resolver_var = obj->dns_resolver;
+ int64_t dns_resolver_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(dns_resolver_var);
+ dns_resolver_ref = tag_ptr(dns_resolver_var.inner, false);
+ return dns_resolver_ref;
+}
+int8_tArray CS_LDK_LDKMessageContext_Custom_get_custom(int64_t ptr) {
+ LDKMessageContext *obj = (LDKMessageContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageContext_Custom);
+ LDKCVec_u8Z custom_var = obj->custom;
+ int8_tArray custom_arr = init_int8_tArray(custom_var.datalen, __LINE__);
+ memcpy(custom_arr->elems, custom_var.data, custom_var.datalen);
+ return custom_arr;
+}
+uint32_t CS_LDK_LDKMessageSendInstructions_ty_from_ptr(int64_t ptr) {
+ LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKMessageSendInstructions_WithSpecifiedReplyPath: return 0;
+ case LDKMessageSendInstructions_WithReplyPath: return 1;
+ case LDKMessageSendInstructions_WithoutReplyPath: return 2;
+ case LDKMessageSendInstructions_ForReply: return 3;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKMessageSendInstructions_WithSpecifiedReplyPath_get_destination(int64_t ptr) {
+ LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageSendInstructions_WithSpecifiedReplyPath);
+ int64_t destination_ref = tag_ptr(&obj->with_specified_reply_path.destination, false);
+ return destination_ref;
+}
+int64_t CS_LDK_LDKMessageSendInstructions_WithSpecifiedReplyPath_get_reply_path(int64_t ptr) {
+ LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageSendInstructions_WithSpecifiedReplyPath);
+ LDKBlindedMessagePath reply_path_var = obj->with_specified_reply_path.reply_path;
+ int64_t reply_path_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_var);
+ reply_path_ref = tag_ptr(reply_path_var.inner, false);
+ return reply_path_ref;
+}
+int64_t CS_LDK_LDKMessageSendInstructions_WithReplyPath_get_destination(int64_t ptr) {
+ LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageSendInstructions_WithReplyPath);
+ int64_t destination_ref = tag_ptr(&obj->with_reply_path.destination, false);
+ return destination_ref;
+}
+int64_t CS_LDK_LDKMessageSendInstructions_WithReplyPath_get_context(int64_t ptr) {
+ LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageSendInstructions_WithReplyPath);
+ int64_t context_ref = tag_ptr(&obj->with_reply_path.context, false);
+ return context_ref;
+}
+int64_t CS_LDK_LDKMessageSendInstructions_WithoutReplyPath_get_destination(int64_t ptr) {
+ LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageSendInstructions_WithoutReplyPath);
+ int64_t destination_ref = tag_ptr(&obj->without_reply_path.destination, false);
+ return destination_ref;
+}
+int64_t CS_LDK_LDKMessageSendInstructions_ForReply_get_instructions(int64_t ptr) {
+ LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageSendInstructions_ForReply);
+ LDKResponseInstruction instructions_var = obj->for_reply.instructions;
+ int64_t instructions_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(instructions_var);
+ instructions_ref = tag_ptr(instructions_var.inner, false);
+ return instructions_ref;
+}
+static inline struct LDKDNSResolverMessage C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_a(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ *NONNULL_PTR owner){
+ return DNSResolverMessage_clone(&owner->a);
+}
+int64_t CS_LDK_C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_a(int64_t owner) {
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ* owner_conv = (LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ*)untag_ptr(owner);
+ LDKDNSResolverMessage *ret_copy = MALLOC(sizeof(LDKDNSResolverMessage), "LDKDNSResolverMessage");
+ *ret_copy = C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_a(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKMessageSendInstructions C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_b(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ *NONNULL_PTR owner){
+ return MessageSendInstructions_clone(&owner->b);
+}
+int64_t CS_LDK_C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_b(int64_t owner) {
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ* owner_conv = (LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ*)untag_ptr(owner);
+ LDKMessageSendInstructions *ret_copy = MALLOC(sizeof(LDKMessageSendInstructions), "LDKMessageSendInstructions");
+ *ret_copy = C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_b(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ CVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ_clone(const LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ *orig) {
+ LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ) * orig->datalen, "LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone(&orig->data[i]);
+ }
+ return ret;
+}
+static inline struct LDKDNSResolverMessage CResult_DNSResolverMessageDecodeErrorZ_get_ok(LDKCResult_DNSResolverMessageDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return DNSResolverMessage_clone(&*owner->contents.result);
+}
+int64_t CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_DNSResolverMessageDecodeErrorZ* owner_conv = (LDKCResult_DNSResolverMessageDecodeErrorZ*)untag_ptr(owner);
+ LDKDNSResolverMessage *ret_copy = MALLOC(sizeof(LDKDNSResolverMessage), "LDKDNSResolverMessage");
+ *ret_copy = CResult_DNSResolverMessageDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_DNSResolverMessageDecodeErrorZ_get_err(LDKCResult_DNSResolverMessageDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_DNSResolverMessageDecodeErrorZ* owner_conv = (LDKCResult_DNSResolverMessageDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_DNSResolverMessageDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKHumanReadableName CResult_HumanReadableNameNoneZ_get_ok(LDKCResult_HumanReadableNameNoneZ *NONNULL_PTR owner){
+ LDKHumanReadableName ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_HumanReadableNameNoneZ_get_ok(int64_t owner) {
+ LDKCResult_HumanReadableNameNoneZ* owner_conv = (LDKCResult_HumanReadableNameNoneZ*)untag_ptr(owner);
+ LDKHumanReadableName ret_var = CResult_HumanReadableNameNoneZ_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_HumanReadableNameNoneZ_get_err(LDKCResult_HumanReadableNameNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+void CS_LDK_CResult_HumanReadableNameNoneZ_get_err(int64_t owner) {
+ LDKCResult_HumanReadableNameNoneZ* owner_conv = (LDKCResult_HumanReadableNameNoneZ*)untag_ptr(owner);
+ CResult_HumanReadableNameNoneZ_get_err(owner_conv);
+}
+
+static inline struct LDKHumanReadableName CResult_HumanReadableNameDecodeErrorZ_get_ok(LDKCResult_HumanReadableNameDecodeErrorZ *NONNULL_PTR owner){
+ LDKHumanReadableName ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_HumanReadableNameDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_HumanReadableNameDecodeErrorZ* owner_conv = (LDKCResult_HumanReadableNameDecodeErrorZ*)untag_ptr(owner);
+ LDKHumanReadableName ret_var = CResult_HumanReadableNameDecodeErrorZ_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_HumanReadableNameDecodeErrorZ_get_err(LDKCResult_HumanReadableNameDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_HumanReadableNameDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_HumanReadableNameDecodeErrorZ* owner_conv = (LDKCResult_HumanReadableNameDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_HumanReadableNameDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKDNSSECQuery C2Tuple_DNSSECQueryDNSResolverContextZ_get_a(LDKC2Tuple_DNSSECQueryDNSResolverContextZ *NONNULL_PTR owner){
+ LDKDNSSECQuery ret = owner->a;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_C2Tuple_DNSSECQueryDNSResolverContextZ_get_a(int64_t owner) {
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ* owner_conv = (LDKC2Tuple_DNSSECQueryDNSResolverContextZ*)untag_ptr(owner);
+ LDKDNSSECQuery ret_var = C2Tuple_DNSSECQueryDNSResolverContextZ_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 LDKDNSResolverContext C2Tuple_DNSSECQueryDNSResolverContextZ_get_b(LDKC2Tuple_DNSSECQueryDNSResolverContextZ *NONNULL_PTR owner){
+ LDKDNSResolverContext ret = owner->b;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_C2Tuple_DNSSECQueryDNSResolverContextZ_get_b(int64_t owner) {
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ* owner_conv = (LDKC2Tuple_DNSSECQueryDNSResolverContextZ*)untag_ptr(owner);
+ LDKDNSResolverContext ret_var = C2Tuple_DNSSECQueryDNSResolverContextZ_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_DNSSECQueryDNSResolverContextZ CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_get_ok(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return C2Tuple_DNSSECQueryDNSResolverContextZ_clone(&*owner->contents.result);
+}
+int64_t CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_get_ok(int64_t owner) {
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* owner_conv = (LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ*)untag_ptr(owner);
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSSECQueryDNSResolverContextZ), "LDKC2Tuple_DNSSECQueryDNSResolverContextZ");
+ *ret_conv = CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_get_ok(owner_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+static inline void CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_get_err(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+void CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_get_err(int64_t owner) {
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* owner_conv = (LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ*)untag_ptr(owner);
+ CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_get_err(owner_conv);
+}
+
+static inline struct LDKHumanReadableName C2Tuple_HumanReadableNameThirtyTwoBytesZ_get_a(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ *NONNULL_PTR owner){
+ LDKHumanReadableName ret = owner->a;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_C2Tuple_HumanReadableNameThirtyTwoBytesZ_get_a(int64_t owner) {
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ* owner_conv = (LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)untag_ptr(owner);
+ LDKHumanReadableName ret_var = C2Tuple_HumanReadableNameThirtyTwoBytesZ_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 LDKThirtyTwoBytes C2Tuple_HumanReadableNameThirtyTwoBytesZ_get_b(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ *NONNULL_PTR owner){
+ return ThirtyTwoBytes_clone(&owner->b);
+}
+int8_tArray CS_LDK_C2Tuple_HumanReadableNameThirtyTwoBytesZ_get_b(int64_t owner) {
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ* owner_conv = (LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)untag_ptr(owner);
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, C2Tuple_HumanReadableNameThirtyTwoBytesZ_get_b(owner_conv).data, 32);
+ return ret_arr;
+}
+
+static inline LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ_clone(const LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ *orig) {
+ LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ) * orig->datalen, "LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone(&orig->data[i]);
+ }
+ return ret;
+}
+static inline struct LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_get_a(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ *NONNULL_PTR owner){
+ return CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ_clone(&owner->a);
+}
+int64_tArray CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_get_a(int64_t owner) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ* owner_conv = (LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ*)untag_ptr(owner);
+ LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ ret_var = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_get_a(owner_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t r = 0; r < ret_var.datalen; r++) {
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ* ret_conv_43_conv = MALLOC(sizeof(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ), "LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ");
+ *ret_conv_43_conv = ret_var.data[r];
+ ret_arr_ptr[r] = tag_ptr(ret_conv_43_conv, true);
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
+static inline struct LDKOffer C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_get_b(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ *NONNULL_PTR owner){
+ LDKOffer ret = owner->b;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_get_b(int64_t owner) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ* owner_conv = (LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ*)untag_ptr(owner);
+ LDKOffer ret_var = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_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;
+}
+
+uint32_t CS_LDK_LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_ty_from_ptr(int64_t ptr) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ *obj = (LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_Some: return 0;
+ case LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_None: return 1;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_Some_get_some(int64_t ptr) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ *obj = (LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_Some);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ* some_conv = MALLOC(sizeof(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ), "LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ");
+ *some_conv = obj->some;
+ *some_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone(some_conv);
+ return tag_ptr(some_conv, true);
+}
+static inline struct LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_a(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ *NONNULL_PTR owner){
+ return CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ_clone(&owner->a);
+}
+int64_tArray CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_a(int64_t owner) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ* owner_conv = (LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ*)untag_ptr(owner);
+ LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ ret_var = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_a(owner_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t r = 0; r < ret_var.datalen; r++) {
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ* ret_conv_43_conv = MALLOC(sizeof(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ), "LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ");
+ *ret_conv_43_conv = ret_var.data[r];
+ ret_arr_ptr[r] = tag_ptr(ret_conv_43_conv, true);
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
+static inline struct LDKStr C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_b(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ *NONNULL_PTR owner){
+ return owner->b;
+}
+jstring CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_b(int64_t owner) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ* owner_conv = (LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ*)untag_ptr(owner);
+ LDKStr ret_str = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_b(owner_conv);
+ jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
+ return ret_conv;
+}
+
+uint32_t CS_LDK_LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_ty_from_ptr(int64_t ptr) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ *obj = (LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_Some: return 0;
+ case LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_None: return 1;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_Some_get_some(int64_t ptr) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ *obj = (LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_Some);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ* some_conv = MALLOC(sizeof(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ), "LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ");
+ *some_conv = obj->some;
+ *some_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone(some_conv);
+ return tag_ptr(some_conv, true);
+}
static inline struct LDKUnsignedBolt12Invoice CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){
LDKUnsignedBolt12Invoice ret = *owner->contents.result;
ret.is_owned = false;
CResult_SchnorrSignatureNoneZ_get_err(owner_conv);
}
+static inline LDKCVec_BlindedPaymentPathZ CVec_BlindedPaymentPathZ_clone(const LDKCVec_BlindedPaymentPathZ *orig) {
+ LDKCVec_BlindedPaymentPathZ ret = { .data = MALLOC(sizeof(LDKBlindedPaymentPath) * orig->datalen, "LDKCVec_BlindedPaymentPathZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = BlindedPaymentPath_clone(&orig->data[i]);
+ }
+ return ret;
+}
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++) {
FREE(untag_ptr(ret));
return ret_conv;
}
+LDKCResult_ECDSASignatureNoneZ sign_splicing_funding_input_LDKEcdsaChannelSigner_jcall(const void* this_arg, LDKTransaction tx, uintptr_t input_index, uint64_t input_value) {
+ LDKEcdsaChannelSigner_JCalls *j_calls = (LDKEcdsaChannelSigner_JCalls*) this_arg;
+ LDKTransaction tx_var = tx;
+ int8_tArray tx_arr = init_int8_tArray(tx_var.datalen, __LINE__);
+ memcpy(tx_arr->elems, tx_var.data, tx_var.datalen);
+ Transaction_free(tx_var);
+ int64_t input_index_conv = input_index;
+ int64_t input_value_conv = input_value;
+ uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 15, (int64_t)tx_arr, input_index_conv, input_value_conv);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_ECDSASignatureNoneZ ret_conv = *(LDKCResult_ECDSASignatureNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
static void LDKEcdsaChannelSigner_JCalls_cloned(LDKEcdsaChannelSigner* new_obj) {
LDKEcdsaChannelSigner_JCalls *j_calls = (LDKEcdsaChannelSigner_JCalls*) new_obj->this_arg;
atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
.sign_closing_transaction = sign_closing_transaction_LDKEcdsaChannelSigner_jcall,
.sign_holder_anchor_input = sign_holder_anchor_input_LDKEcdsaChannelSigner_jcall,
.sign_channel_announcement_with_funding_key = sign_channel_announcement_with_funding_key_LDKEcdsaChannelSigner_jcall,
+ .sign_splicing_funding_input = sign_splicing_funding_input_LDKEcdsaChannelSigner_jcall,
.cloned = LDKEcdsaChannelSigner_JCalls_cloned,
.free = LDKEcdsaChannelSigner_JCalls_free,
.ChannelSigner = LDKChannelSigner_init(ChannelSigner, pubkeys),
return tag_ptr(ret_conv, true);
}
+int64_t CS_LDK_EcdsaChannelSigner_sign_splicing_funding_input(int64_t this_arg, int8_tArray tx, int64_t input_index, int64_t input_value) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKEcdsaChannelSigner* this_arg_conv = (LDKEcdsaChannelSigner*)this_arg_ptr;
+ LDKTransaction tx_ref;
+ tx_ref.datalen = tx->arr_len;
+ tx_ref.data = MALLOC(tx_ref.datalen, "LDKTransaction Bytes");
+ memcpy(tx_ref.data, tx->elems, tx_ref.datalen); FREE(tx);
+ tx_ref.data_is_owned = true;
+ LDKCResult_ECDSASignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_ECDSASignatureNoneZ), "LDKCResult_ECDSASignatureNoneZ");
+ *ret_conv = (this_arg_conv->sign_splicing_funding_input)(this_arg_conv->this_arg, tx_ref, input_index, input_value);
+ return tag_ptr(ret_conv, true);
+}
+
static inline struct LDKEcdsaChannelSigner CResult_EcdsaChannelSignerDecodeErrorZ_get_ok(LDKCResult_EcdsaChannelSignerDecodeErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return EcdsaChannelSigner_clone(&*owner->contents.result);
score_params_var = ProbabilisticScoringFeeParameters_clone(&score_params_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(score_params_var);
score_params_ref = tag_ptr(score_params_var.inner, score_params_var.is_owned);
- return js_invoke_function_l_lll(j_calls->instance_ptr, 15, ref_candidate, usage_ref, score_params_ref);
+ return js_invoke_function_l_lll(j_calls->instance_ptr, 16, ref_candidate, usage_ref, score_params_ref);
}
static void LDKScoreLookUp_JCalls_cloned(LDKScoreLookUp* new_obj) {
LDKScoreLookUp_JCalls *j_calls = (LDKScoreLookUp_JCalls*) new_obj->this_arg;
path_ref = tag_ptr(path_var.inner, path_var.is_owned);
int64_t short_channel_id_conv = short_channel_id;
int64_t duration_since_epoch_conv = duration_since_epoch;
- js_invoke_function_void_lll(j_calls->instance_ptr, 16, path_ref, short_channel_id_conv, duration_since_epoch_conv);
+ js_invoke_function_void_lll(j_calls->instance_ptr, 17, path_ref, short_channel_id_conv, duration_since_epoch_conv);
}
void payment_path_successful_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uint64_t duration_since_epoch) {
LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg;
CHECK_INNER_FIELD_ACCESS_OR_NULL(path_var);
path_ref = tag_ptr(path_var.inner, path_var.is_owned);
int64_t duration_since_epoch_conv = duration_since_epoch;
- js_invoke_function_void_ll(j_calls->instance_ptr, 17, path_ref, duration_since_epoch_conv);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 18, path_ref, duration_since_epoch_conv);
}
void probe_failed_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uint64_t short_channel_id, uint64_t duration_since_epoch) {
LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg;
path_ref = tag_ptr(path_var.inner, path_var.is_owned);
int64_t short_channel_id_conv = short_channel_id;
int64_t duration_since_epoch_conv = duration_since_epoch;
- js_invoke_function_void_lll(j_calls->instance_ptr, 18, path_ref, short_channel_id_conv, duration_since_epoch_conv);
+ js_invoke_function_void_lll(j_calls->instance_ptr, 19, path_ref, short_channel_id_conv, duration_since_epoch_conv);
}
void probe_successful_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uint64_t duration_since_epoch) {
LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg;
CHECK_INNER_FIELD_ACCESS_OR_NULL(path_var);
path_ref = tag_ptr(path_var.inner, path_var.is_owned);
int64_t duration_since_epoch_conv = duration_since_epoch;
- js_invoke_function_void_ll(j_calls->instance_ptr, 19, path_ref, duration_since_epoch_conv);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 20, path_ref, duration_since_epoch_conv);
}
void time_passed_LDKScoreUpdate_jcall(void* this_arg, uint64_t duration_since_epoch) {
LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg;
int64_t duration_since_epoch_conv = duration_since_epoch;
- js_invoke_function_void_l(j_calls->instance_ptr, 20, duration_since_epoch_conv);
+ js_invoke_function_void_l(j_calls->instance_ptr, 21, duration_since_epoch_conv);
}
static void LDKScoreUpdate_JCalls_cloned(LDKScoreUpdate* new_obj) {
LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) new_obj->this_arg;
}
LDKScoreLookUp read_lock_LDKLockableScore_jcall(const void* this_arg) {
LDKLockableScore_JCalls *j_calls = (LDKLockableScore_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 21);
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 22);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKScoreLookUp ret_conv = *(LDKScoreLookUp*)(ret_ptr);
}
LDKScoreUpdate write_lock_LDKLockableScore_jcall(const void* this_arg) {
LDKLockableScore_JCalls *j_calls = (LDKLockableScore_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 22);
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 23);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKScoreUpdate ret_conv = *(LDKScoreUpdate*)(ret_ptr);
}
LDKCVec_u8Z write_LDKWriteableScore_jcall(const void* this_arg) {
LDKWriteableScore_JCalls *j_calls = (LDKWriteableScore_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_l_(j_calls->instance_ptr, 23);
+ int8_tArray ret = (int8_tArray)js_invoke_function_l_(j_calls->instance_ptr, 24);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
return ret_ref;
}
-static inline LDKCVec_BlindedPaymentPathZ CVec_BlindedPaymentPathZ_clone(const LDKCVec_BlindedPaymentPathZ *orig) {
- LDKCVec_BlindedPaymentPathZ ret = { .data = MALLOC(sizeof(LDKBlindedPaymentPath) * orig->datalen, "LDKCVec_BlindedPaymentPathZ clone bytes"), .datalen = orig->datalen };
- for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = BlindedPaymentPath_clone(&orig->data[i]);
- }
- return ret;
-}
static inline struct LDKCVec_BlindedPaymentPathZ CResult_CVec_BlindedPaymentPathZNoneZ_get_ok(LDKCResult_CVec_BlindedPaymentPathZNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return CVec_BlindedPaymentPathZ_clone(&*owner->contents.result);
CResult_CVec_BlindedPaymentPathZNoneZ_get_err(owner_conv);
}
-static inline struct LDKOnionMessagePath CResult_OnionMessagePathNoneZ_get_ok(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR owner){
- LDKOnionMessagePath ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-int64_t CS_LDK_CResult_OnionMessagePathNoneZ_get_ok(int64_t owner) {
- LDKCResult_OnionMessagePathNoneZ* owner_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(owner);
- LDKOnionMessagePath ret_var = CResult_OnionMessagePathNoneZ_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_OnionMessagePathNoneZ_get_err(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return *owner->contents.err;
-}
-void CS_LDK_CResult_OnionMessagePathNoneZ_get_err(int64_t owner) {
- LDKCResult_OnionMessagePathNoneZ* owner_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(owner);
- CResult_OnionMessagePathNoneZ_get_err(owner_conv);
-}
-
-static inline struct LDKCVec_BlindedMessagePathZ CResult_CVec_BlindedMessagePathZNoneZ_get_ok(LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return CVec_BlindedMessagePathZ_clone(&*owner->contents.result);
-}
-int64_tArray CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_get_ok(int64_t owner) {
- LDKCResult_CVec_BlindedMessagePathZNoneZ* owner_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(owner);
- LDKCVec_BlindedMessagePathZ ret_var = CResult_CVec_BlindedMessagePathZNoneZ_get_ok(owner_conv);
- int64_tArray ret_arr = NULL;
- ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
- int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
- for (size_t u = 0; u < ret_var.datalen; u++) {
- LDKBlindedMessagePath ret_conv_20_var = ret_var.data[u];
- int64_t ret_conv_20_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_20_var);
- ret_conv_20_ref = tag_ptr(ret_conv_20_var.inner, ret_conv_20_var.is_owned);
- ret_arr_ptr[u] = ret_conv_20_ref;
- }
-
- FREE(ret_var.data);
- return ret_arr;
-}
-
-static inline void CResult_CVec_BlindedMessagePathZNoneZ_get_err(LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return *owner->contents.err;
-}
-void CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_get_err(int64_t owner) {
- LDKCResult_CVec_BlindedMessagePathZNoneZ* owner_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(owner);
- CResult_CVec_BlindedMessagePathZNoneZ_get_err(owner_conv);
-}
-
-static inline LDKCVec_MessageForwardNodeZ CVec_MessageForwardNodeZ_clone(const LDKCVec_MessageForwardNodeZ *orig) {
- LDKCVec_MessageForwardNodeZ ret = { .data = MALLOC(sizeof(LDKMessageForwardNode) * orig->datalen, "LDKCVec_MessageForwardNodeZ clone bytes"), .datalen = orig->datalen };
- for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = MessageForwardNode_clone(&orig->data[i]);
- }
- return ret;
-}
static inline struct LDKInFlightHtlcs CResult_InFlightHtlcsDecodeErrorZ_get_ok(LDKCResult_InFlightHtlcsDecodeErrorZ *NONNULL_PTR owner){
LDKInFlightHtlcs ret = *owner->contents.result;
ret.is_owned = false;
int64_t record_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(record_var);
record_ref = tag_ptr(record_var.inner, record_var.is_owned);
- js_invoke_function_void_l(j_calls->instance_ptr, 24, record_ref);
+ js_invoke_function_void_l(j_calls->instance_ptr, 25, record_ref);
}
static void LDKLogger_JCalls_cloned(LDKLogger* new_obj) {
LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) new_obj->this_arg;
}
return ret;
}
-static inline struct LDKInitFeatures CResult_InitFeaturesDecodeErrorZ_get_ok(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKInitFeatures ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_get_ok(int64_t owner) {
- LDKCResult_InitFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKInitFeatures ret_var = CResult_InitFeaturesDecodeErrorZ_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_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_get_err(int64_t owner) {
- LDKCResult_InitFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_InitFeaturesDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKChannelFeatures CResult_ChannelFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKChannelFeatures ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_get_ok(int64_t owner) {
- LDKCResult_ChannelFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKChannelFeatures ret_var = CResult_ChannelFeaturesDecodeErrorZ_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_ChannelFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_get_err(int64_t owner) {
- LDKCResult_ChannelFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_ChannelFeaturesDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKNodeFeatures CResult_NodeFeaturesDecodeErrorZ_get_ok(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKNodeFeatures ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_get_ok(int64_t owner) {
- LDKCResult_NodeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKNodeFeatures ret_var = CResult_NodeFeaturesDecodeErrorZ_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_NodeFeaturesDecodeErrorZ_get_err(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_get_err(int64_t owner) {
- LDKCResult_NodeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_NodeFeaturesDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKBolt11InvoiceFeatures CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_ok(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKBolt11InvoiceFeatures ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_ok(int64_t owner) {
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKBolt11InvoiceFeatures ret_var = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_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_Bolt11InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_err(int64_t owner) {
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKBolt12InvoiceFeatures CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_ok(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKBolt12InvoiceFeatures ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_ok(int64_t owner) {
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKBolt12InvoiceFeatures ret_var = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_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_Bolt12InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_err(int64_t owner) {
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKBlindedHopFeatures CResult_BlindedHopFeaturesDecodeErrorZ_get_ok(LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKBlindedHopFeatures ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_get_ok(int64_t owner) {
- LDKCResult_BlindedHopFeaturesDecodeErrorZ* owner_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKBlindedHopFeatures ret_var = CResult_BlindedHopFeaturesDecodeErrorZ_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_BlindedHopFeaturesDecodeErrorZ_get_err(LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_get_err(int64_t owner) {
- LDKCResult_BlindedHopFeaturesDecodeErrorZ* owner_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_BlindedHopFeaturesDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKChannelTypeFeatures CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKChannelTypeFeatures ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(int64_t owner) {
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKChannelTypeFeatures ret_var = CResult_ChannelTypeFeaturesDecodeErrorZ_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_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(int64_t owner) {
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- 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_conv;
}
-static inline struct LDKInvoiceRequestWithDerivedPayerIdBuilder CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
- LDKInvoiceRequestWithDerivedPayerIdBuilder ret = *owner->contents.result;
+static inline struct LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder ret = *owner->contents.result;
ret.is_owned = false;
return ret;
}
-int64_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(int64_t owner) {
- LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
- LDKInvoiceRequestWithDerivedPayerIdBuilder ret_var = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+int64_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(int64_t owner) {
+ LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder ret_var = CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_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){
+static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
return Bolt12SemanticError_clone(&*owner->contents.err);
}
-int32_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(int64_t owner) {
- LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
- int32_t ret_conv = LDKBolt12SemanticError_to_cs(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;
-}
-int64_t CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(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);
-}
-int32_t CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(int64_t owner) {
- LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
- int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+int32_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(int64_t owner) {
+ LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv));
return ret_conv;
}
int8_tArray chain_hash_arr = init_int8_tArray(32, __LINE__);
memcpy(chain_hash_arr->elems, *chain_hash, 32);
int64_t short_channel_id_conv = short_channel_id;
- uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 25, (int64_t)chain_hash_arr, short_channel_id_conv);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 26, (int64_t)chain_hash_arr, short_channel_id_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKUtxoResult ret_conv = *(LDKUtxoResult*)(ret_ptr);
uint32_t CS_LDK_LDKPaymentContext_ty_from_ptr(int64_t ptr) {
LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr);
switch(obj->tag) {
- case LDKPaymentContext_Unknown: return 0;
- case LDKPaymentContext_Bolt12Offer: return 1;
- case LDKPaymentContext_Bolt12Refund: return 2;
+ case LDKPaymentContext_Bolt12Offer: return 0;
+ case LDKPaymentContext_Bolt12Refund: return 1;
default: abort();
}
}
-int64_t CS_LDK_LDKPaymentContext_Unknown_get_unknown(int64_t ptr) {
- LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr);
- CHECK(obj->tag == 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 unknown_ref;
-}
int64_t CS_LDK_LDKPaymentContext_Bolt12Offer_get_bolt12_offer(int64_t ptr) {
LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr);
CHECK(obj->tag == LDKPaymentContext_Bolt12Offer);
*some_conv = C2Tuple_u64u16Z_clone(some_conv);
return tag_ptr(some_conv, true);
}
+uint32_t CS_LDK_LDKAPIError_ty_from_ptr(int64_t ptr) {
+ LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKAPIError_APIMisuseError: return 0;
+ case LDKAPIError_FeeRateTooHigh: return 1;
+ case LDKAPIError_InvalidRoute: return 2;
+ case LDKAPIError_ChannelUnavailable: return 3;
+ case LDKAPIError_MonitorUpdateInProgress: return 4;
+ case LDKAPIError_IncompatibleShutdownScript: return 5;
+ default: abort();
+ }
+}
+jstring CS_LDK_LDKAPIError_APIMisuseError_get_err(int64_t ptr) {
+ LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKAPIError_APIMisuseError);
+ LDKStr err_str = obj->api_misuse_error.err;
+ jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len);
+ return err_conv;
+}
+jstring CS_LDK_LDKAPIError_FeeRateTooHigh_get_err(int64_t ptr) {
+ LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKAPIError_FeeRateTooHigh);
+ LDKStr err_str = obj->fee_rate_too_high.err;
+ jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len);
+ return err_conv;
+}
+int32_t CS_LDK_LDKAPIError_FeeRateTooHigh_get_feerate(int64_t ptr) {
+ LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKAPIError_FeeRateTooHigh);
+ int32_t feerate_conv = obj->fee_rate_too_high.feerate;
+ return feerate_conv;
+}
+jstring CS_LDK_LDKAPIError_InvalidRoute_get_err(int64_t ptr) {
+ LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKAPIError_InvalidRoute);
+ LDKStr err_str = obj->invalid_route.err;
+ jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len);
+ return err_conv;
+}
+jstring CS_LDK_LDKAPIError_ChannelUnavailable_get_err(int64_t ptr) {
+ LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKAPIError_ChannelUnavailable);
+ LDKStr err_str = obj->channel_unavailable.err;
+ jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len);
+ return err_conv;
+}
+int64_t CS_LDK_LDKAPIError_IncompatibleShutdownScript_get_script(int64_t ptr) {
+ LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKAPIError_IncompatibleShutdownScript);
+ LDKShutdownScript script_var = obj->incompatible_shutdown_script.script;
+ int64_t script_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(script_var);
+ script_ref = tag_ptr(script_var.inner, false);
+ return script_ref;
+}
static inline struct LDKChannelId CResult_ChannelIdAPIErrorZ_get_ok(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){
LDKChannelId ret = *owner->contents.result;
ret.is_owned = false;
}
return ret;
}
-uint32_t CS_LDK_LDKPaymentSendFailure_ty_from_ptr(int64_t ptr) {
- LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKPaymentSendFailure_ParameterError: return 0;
- case LDKPaymentSendFailure_PathParameterError: return 1;
- case LDKPaymentSendFailure_AllFailedResendSafe: return 2;
- case LDKPaymentSendFailure_DuplicatePayment: return 3;
- case LDKPaymentSendFailure_PartialFailure: return 4;
- default: abort();
- }
-}
-int64_t CS_LDK_LDKPaymentSendFailure_ParameterError_get_parameter_error(int64_t ptr) {
- LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
- CHECK(obj->tag == LDKPaymentSendFailure_ParameterError);
- int64_t parameter_error_ref = tag_ptr(&obj->parameter_error, false);
- return parameter_error_ref;
-}
-int64_tArray CS_LDK_LDKPaymentSendFailure_PathParameterError_get_path_parameter_error(int64_t ptr) {
- LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
- CHECK(obj->tag == LDKPaymentSendFailure_PathParameterError);
- LDKCVec_CResult_NoneAPIErrorZZ path_parameter_error_var = obj->path_parameter_error;
- int64_tArray path_parameter_error_arr = NULL;
- path_parameter_error_arr = init_int64_tArray(path_parameter_error_var.datalen, __LINE__);
- int64_t *path_parameter_error_arr_ptr = (int64_t*)(((uint8_t*)path_parameter_error_arr) + 8);
- for (size_t w = 0; w < path_parameter_error_var.datalen; w++) {
- LDKCResult_NoneAPIErrorZ* path_parameter_error_conv_22_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *path_parameter_error_conv_22_conv = path_parameter_error_var.data[w];
- *path_parameter_error_conv_22_conv = CResult_NoneAPIErrorZ_clone(path_parameter_error_conv_22_conv);
- path_parameter_error_arr_ptr[w] = tag_ptr(path_parameter_error_conv_22_conv, true);
- }
-
- return path_parameter_error_arr;
-}
-int64_tArray CS_LDK_LDKPaymentSendFailure_AllFailedResendSafe_get_all_failed_resend_safe(int64_t ptr) {
- LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
- CHECK(obj->tag == LDKPaymentSendFailure_AllFailedResendSafe);
- LDKCVec_APIErrorZ all_failed_resend_safe_var = obj->all_failed_resend_safe;
- int64_tArray all_failed_resend_safe_arr = NULL;
- all_failed_resend_safe_arr = init_int64_tArray(all_failed_resend_safe_var.datalen, __LINE__);
- int64_t *all_failed_resend_safe_arr_ptr = (int64_t*)(((uint8_t*)all_failed_resend_safe_arr) + 8);
- for (size_t k = 0; k < all_failed_resend_safe_var.datalen; k++) {
- int64_t all_failed_resend_safe_conv_10_ref = tag_ptr(&all_failed_resend_safe_var.data[k], false);
- all_failed_resend_safe_arr_ptr[k] = all_failed_resend_safe_conv_10_ref;
- }
-
- return all_failed_resend_safe_arr;
-}
-int64_tArray CS_LDK_LDKPaymentSendFailure_PartialFailure_get_results(int64_t ptr) {
- LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
- CHECK(obj->tag == LDKPaymentSendFailure_PartialFailure);
- LDKCVec_CResult_NoneAPIErrorZZ results_var = obj->partial_failure.results;
- int64_tArray results_arr = NULL;
- results_arr = init_int64_tArray(results_var.datalen, __LINE__);
- int64_t *results_arr_ptr = (int64_t*)(((uint8_t*)results_arr) + 8);
- for (size_t w = 0; w < results_var.datalen; w++) {
- LDKCResult_NoneAPIErrorZ* results_conv_22_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *results_conv_22_conv = results_var.data[w];
- *results_conv_22_conv = CResult_NoneAPIErrorZ_clone(results_conv_22_conv);
- results_arr_ptr[w] = tag_ptr(results_conv_22_conv, true);
- }
-
- return results_arr;
-}
-int64_t CS_LDK_LDKPaymentSendFailure_PartialFailure_get_failed_paths_retry(int64_t ptr) {
- LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
- CHECK(obj->tag == LDKPaymentSendFailure_PartialFailure);
- LDKRouteParameters failed_paths_retry_var = obj->partial_failure.failed_paths_retry;
- int64_t failed_paths_retry_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(failed_paths_retry_var);
- failed_paths_retry_ref = tag_ptr(failed_paths_retry_var.inner, false);
- return failed_paths_retry_ref;
-}
-int8_tArray CS_LDK_LDKPaymentSendFailure_PartialFailure_get_payment_id(int64_t ptr) {
- LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
- CHECK(obj->tag == LDKPaymentSendFailure_PartialFailure);
- int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_id_arr->elems, obj->partial_failure.payment_id.data, 32);
- return payment_id_arr;
-}
-static inline void CResult_NonePaymentSendFailureZ_get_ok(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR owner){
+static inline void CResult_NoneAPIErrorZ_get_ok(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return *owner->contents.result;
}
-void CS_LDK_CResult_NonePaymentSendFailureZ_get_ok(int64_t owner) {
- LDKCResult_NonePaymentSendFailureZ* owner_conv = (LDKCResult_NonePaymentSendFailureZ*)untag_ptr(owner);
- CResult_NonePaymentSendFailureZ_get_ok(owner_conv);
+void CS_LDK_CResult_NoneAPIErrorZ_get_ok(int64_t owner) {
+ LDKCResult_NoneAPIErrorZ* owner_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(owner);
+ CResult_NoneAPIErrorZ_get_ok(owner_conv);
}
-static inline struct LDKPaymentSendFailure CResult_NonePaymentSendFailureZ_get_err(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR owner){
+static inline struct LDKAPIError CResult_NoneAPIErrorZ_get_err(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
- return PaymentSendFailure_clone(&*owner->contents.err);
+ return APIError_clone(&*owner->contents.err);
}
-int64_t CS_LDK_CResult_NonePaymentSendFailureZ_get_err(int64_t owner) {
- LDKCResult_NonePaymentSendFailureZ* owner_conv = (LDKCResult_NonePaymentSendFailureZ*)untag_ptr(owner);
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = CResult_NonePaymentSendFailureZ_get_err(owner_conv);
+int64_t CS_LDK_CResult_NoneAPIErrorZ_get_err(int64_t owner) {
+ LDKCResult_NoneAPIErrorZ* owner_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(owner);
+ LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError");
+ *ret_copy = CResult_NoneAPIErrorZ_get_err(owner_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_conv;
}
-static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesPaymentSendFailureZ_get_ok(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ *NONNULL_PTR owner){
+uint32_t CS_LDK_LDKCOption_OffersContextZ_ty_from_ptr(int64_t ptr) {
+ LDKCOption_OffersContextZ *obj = (LDKCOption_OffersContextZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_OffersContextZ_Some: return 0;
+ case LDKCOption_OffersContextZ_None: return 1;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKCOption_OffersContextZ_Some_get_some(int64_t ptr) {
+ LDKCOption_OffersContextZ *obj = (LDKCOption_OffersContextZ*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKCOption_OffersContextZ_Some);
+ int64_t some_ref = tag_ptr(&obj->some, false);
+ return some_ref;
+}
+uint32_t CS_LDK_LDKBolt12PaymentError_ty_from_ptr(int64_t ptr) {
+ LDKBolt12PaymentError *obj = (LDKBolt12PaymentError*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKBolt12PaymentError_UnexpectedInvoice: return 0;
+ case LDKBolt12PaymentError_DuplicateInvoice: return 1;
+ case LDKBolt12PaymentError_UnknownRequiredFeatures: return 2;
+ case LDKBolt12PaymentError_SendingFailed: return 3;
+ default: abort();
+ }
+}
+int32_t CS_LDK_LDKBolt12PaymentError_SendingFailed_get_sending_failed(int64_t ptr) {
+ LDKBolt12PaymentError *obj = (LDKBolt12PaymentError*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKBolt12PaymentError_SendingFailed);
+ int32_t sending_failed_conv = LDKRetryableSendFailure_to_cs(obj->sending_failed);
+ return sending_failed_conv;
+}
+static inline void CResult_NoneBolt12PaymentErrorZ_get_ok(LDKCResult_NoneBolt12PaymentErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
- return ThirtyTwoBytes_clone(&*owner->contents.result);
+ return *owner->contents.result;
}
-int8_tArray CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_get_ok(int64_t owner) {
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* owner_conv = (LDKCResult_ThirtyTwoBytesPaymentSendFailureZ*)untag_ptr(owner);
- int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, CResult_ThirtyTwoBytesPaymentSendFailureZ_get_ok(owner_conv).data, 32);
- return ret_arr;
+void CS_LDK_CResult_NoneBolt12PaymentErrorZ_get_ok(int64_t owner) {
+ LDKCResult_NoneBolt12PaymentErrorZ* owner_conv = (LDKCResult_NoneBolt12PaymentErrorZ*)untag_ptr(owner);
+ CResult_NoneBolt12PaymentErrorZ_get_ok(owner_conv);
}
-static inline struct LDKPaymentSendFailure CResult_ThirtyTwoBytesPaymentSendFailureZ_get_err(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ *NONNULL_PTR owner){
+static inline struct LDKBolt12PaymentError CResult_NoneBolt12PaymentErrorZ_get_err(LDKCResult_NoneBolt12PaymentErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
- return PaymentSendFailure_clone(&*owner->contents.err);
+ return Bolt12PaymentError_clone(&*owner->contents.err);
}
-int64_t CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_get_err(int64_t owner) {
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* owner_conv = (LDKCResult_ThirtyTwoBytesPaymentSendFailureZ*)untag_ptr(owner);
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = CResult_ThirtyTwoBytesPaymentSendFailureZ_get_err(owner_conv);
+int64_t CS_LDK_CResult_NoneBolt12PaymentErrorZ_get_err(int64_t owner) {
+ LDKCResult_NoneBolt12PaymentErrorZ* owner_conv = (LDKCResult_NoneBolt12PaymentErrorZ*)untag_ptr(owner);
+ LDKBolt12PaymentError *ret_copy = MALLOC(sizeof(LDKBolt12PaymentError), "LDKBolt12PaymentError");
+ *ret_copy = CResult_NoneBolt12PaymentErrorZ_get_err(owner_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_arr;
}
-static inline struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ *NONNULL_PTR owner){
+uint32_t CS_LDK_LDKProbeSendFailure_ty_from_ptr(int64_t ptr) {
+ LDKProbeSendFailure *obj = (LDKProbeSendFailure*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKProbeSendFailure_RouteNotFound: return 0;
+ case LDKProbeSendFailure_ParameterError: return 1;
+ case LDKProbeSendFailure_DuplicateProbe: return 2;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKProbeSendFailure_ParameterError_get_parameter_error(int64_t ptr) {
+ LDKProbeSendFailure *obj = (LDKProbeSendFailure*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKProbeSendFailure_ParameterError);
+ int64_t parameter_error_ref = tag_ptr(&obj->parameter_error, false);
+ return parameter_error_ref;
+}
+static inline struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_clone(&*owner->contents.result);
}
-int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_ok(int64_t owner) {
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* owner_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ*)untag_ptr(owner);
+int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_ok(int64_t owner) {
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* owner_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ*)untag_ptr(owner);
LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ), "LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ");
- *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_ok(owner_conv);
+ *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_ok(owner_conv);
return tag_ptr(ret_conv, true);
}
-static inline struct LDKPaymentSendFailure CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_err(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ *NONNULL_PTR owner){
+static inline struct LDKProbeSendFailure CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_err(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
- return PaymentSendFailure_clone(&*owner->contents.err);
+ return ProbeSendFailure_clone(&*owner->contents.err);
}
-int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_err(int64_t owner) {
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* owner_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ*)untag_ptr(owner);
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_err(owner_conv);
+int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_err(int64_t owner) {
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* owner_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ*)untag_ptr(owner);
+ LDKProbeSendFailure *ret_copy = MALLOC(sizeof(LDKProbeSendFailure), "LDKProbeSendFailure");
+ *ret_copy = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_err(owner_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
return ret;
}
-uint32_t CS_LDK_LDKProbeSendFailure_ty_from_ptr(int64_t ptr) {
- LDKProbeSendFailure *obj = (LDKProbeSendFailure*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKProbeSendFailure_RouteNotFound: return 0;
- case LDKProbeSendFailure_SendingFailed: return 1;
- default: abort();
- }
-}
-int64_t CS_LDK_LDKProbeSendFailure_SendingFailed_get_sending_failed(int64_t ptr) {
- LDKProbeSendFailure *obj = (LDKProbeSendFailure*)untag_ptr(ptr);
- CHECK(obj->tag == LDKProbeSendFailure_SendingFailed);
- int64_t sending_failed_ref = tag_ptr(&obj->sending_failed, false);
- return sending_failed_ref;
-}
static inline struct LDKCVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_ok(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ_clone(&*owner->contents.result);
}
return ret;
}
+static inline struct LDKPublicKey C2Tuple_PublicKeyChannelIdZ_get_a(LDKC2Tuple_PublicKeyChannelIdZ *NONNULL_PTR owner){
+ return owner->a;
+}
+int8_tArray CS_LDK_C2Tuple_PublicKeyChannelIdZ_get_a(int64_t owner) {
+ LDKC2Tuple_PublicKeyChannelIdZ* owner_conv = (LDKC2Tuple_PublicKeyChannelIdZ*)untag_ptr(owner);
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, C2Tuple_PublicKeyChannelIdZ_get_a(owner_conv).compressed_form, 33);
+ return ret_arr;
+}
+
+static inline struct LDKChannelId C2Tuple_PublicKeyChannelIdZ_get_b(LDKC2Tuple_PublicKeyChannelIdZ *NONNULL_PTR owner){
+ LDKChannelId ret = owner->b;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_C2Tuple_PublicKeyChannelIdZ_get_b(int64_t owner) {
+ LDKC2Tuple_PublicKeyChannelIdZ* owner_conv = (LDKC2Tuple_PublicKeyChannelIdZ*)untag_ptr(owner);
+ LDKChannelId ret_var = C2Tuple_PublicKeyChannelIdZ_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;
+}
+
+uint32_t CS_LDK_LDKCOption_C2Tuple_PublicKeyChannelIdZZ_ty_from_ptr(int64_t ptr) {
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ *obj = (LDKCOption_C2Tuple_PublicKeyChannelIdZZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_C2Tuple_PublicKeyChannelIdZZ_Some: return 0;
+ case LDKCOption_C2Tuple_PublicKeyChannelIdZZ_None: return 1;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKCOption_C2Tuple_PublicKeyChannelIdZZ_Some_get_some(int64_t ptr) {
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ *obj = (LDKCOption_C2Tuple_PublicKeyChannelIdZZ*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKCOption_C2Tuple_PublicKeyChannelIdZZ_Some);
+ LDKC2Tuple_PublicKeyChannelIdZ* some_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyChannelIdZ), "LDKC2Tuple_PublicKeyChannelIdZ");
+ *some_conv = obj->some;
+ *some_conv = C2Tuple_PublicKeyChannelIdZ_clone(some_conv);
+ return tag_ptr(some_conv, true);
+}
+uint32_t CS_LDK_LDKSignOrCreationError_ty_from_ptr(int64_t ptr) {
+ LDKSignOrCreationError *obj = (LDKSignOrCreationError*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKSignOrCreationError_SignError: return 0;
+ case LDKSignOrCreationError_CreationError: return 1;
+ default: abort();
+ }
+}
+int32_t CS_LDK_LDKSignOrCreationError_CreationError_get_creation_error(int64_t ptr) {
+ LDKSignOrCreationError *obj = (LDKSignOrCreationError*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKSignOrCreationError_CreationError);
+ int32_t creation_error_conv = LDKCreationError_to_cs(obj->creation_error);
+ return creation_error_conv;
+}
+static inline struct LDKBolt11Invoice CResult_Bolt11InvoiceSignOrCreationErrorZ_get_ok(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR owner){
+ LDKBolt11Invoice ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_get_ok(int64_t owner) {
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* owner_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(owner);
+ LDKBolt11Invoice ret_var = CResult_Bolt11InvoiceSignOrCreationErrorZ_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 LDKSignOrCreationError CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return SignOrCreationError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err(int64_t owner) {
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* owner_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(owner);
+ LDKSignOrCreationError *ret_copy = MALLOC(sizeof(LDKSignOrCreationError), "LDKSignOrCreationError");
+ *ret_copy = CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
static inline struct LDKOfferWithDerivedMetadataBuilder CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
LDKOfferWithDerivedMetadataBuilder ret = *owner->contents.result;
ret.is_owned = false;
jstring some_conv = str_ref_to_cs(some_str.chars, some_str.len);
return some_conv;
}
+static inline LDKCVec_DestinationZ CVec_DestinationZ_clone(const LDKCVec_DestinationZ *orig) {
+ LDKCVec_DestinationZ ret = { .data = MALLOC(sizeof(LDKDestination) * orig->datalen, "LDKCVec_DestinationZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = Destination_clone(&orig->data[i]);
+ }
+ return ret;
+}
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);
return ret_ref;
}
-uint32_t CS_LDK_LDKOffersContext_ty_from_ptr(int64_t ptr) {
- LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKOffersContext_InvoiceRequest: return 0;
- case LDKOffersContext_OutboundPayment: return 1;
- case LDKOffersContext_InboundPayment: return 2;
- default: abort();
- }
-}
-int64_t CS_LDK_LDKOffersContext_InvoiceRequest_get_nonce(int64_t ptr) {
- LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
- CHECK(obj->tag == LDKOffersContext_InvoiceRequest);
- LDKNonce nonce_var = obj->invoice_request.nonce;
- int64_t nonce_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_var);
- nonce_ref = tag_ptr(nonce_var.inner, false);
- return nonce_ref;
-}
-int8_tArray CS_LDK_LDKOffersContext_OutboundPayment_get_payment_id(int64_t ptr) {
- LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
- CHECK(obj->tag == LDKOffersContext_OutboundPayment);
- int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_id_arr->elems, obj->outbound_payment.payment_id.data, 32);
- return payment_id_arr;
-}
-int64_t CS_LDK_LDKOffersContext_OutboundPayment_get_nonce(int64_t ptr) {
- LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
- CHECK(obj->tag == LDKOffersContext_OutboundPayment);
- LDKNonce nonce_var = obj->outbound_payment.nonce;
- int64_t nonce_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_var);
- nonce_ref = tag_ptr(nonce_var.inner, false);
- return nonce_ref;
-}
-int8_tArray CS_LDK_LDKOffersContext_OutboundPayment_get_hmac(int64_t ptr) {
- LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
- CHECK(obj->tag == LDKOffersContext_OutboundPayment);
- int8_tArray hmac_arr = init_int8_tArray(32, __LINE__);
- memcpy(hmac_arr->elems, obj->outbound_payment.hmac.data, 32);
- return hmac_arr;
-}
-int8_tArray CS_LDK_LDKOffersContext_InboundPayment_get_payment_hash(int64_t ptr) {
- LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
- CHECK(obj->tag == LDKOffersContext_InboundPayment);
- int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_hash_arr->elems, obj->inbound_payment.payment_hash.data, 32);
- return payment_hash_arr;
-}
-uint32_t CS_LDK_LDKCOption_OffersContextZ_ty_from_ptr(int64_t ptr) {
- LDKCOption_OffersContextZ *obj = (LDKCOption_OffersContextZ*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKCOption_OffersContextZ_Some: return 0;
- case LDKCOption_OffersContextZ_None: return 1;
- default: abort();
- }
-}
-int64_t CS_LDK_LDKCOption_OffersContextZ_Some_get_some(int64_t ptr) {
- LDKCOption_OffersContextZ *obj = (LDKCOption_OffersContextZ*)untag_ptr(ptr);
- CHECK(obj->tag == LDKCOption_OffersContextZ_Some);
- int64_t some_ref = tag_ptr(&obj->some, false);
- return some_ref;
-}
uint32_t CS_LDK_LDKOffersMessage_ty_from_ptr(int64_t ptr) {
LDKOffersMessage *obj = (LDKOffersMessage*)untag_ptr(ptr);
switch(obj->tag) {
*some_conv = C2Tuple_OffersMessageResponseInstructionZ_clone(some_conv);
return tag_ptr(some_conv, true);
}
-uint32_t CS_LDK_LDKDestination_ty_from_ptr(int64_t ptr) {
- LDKDestination *obj = (LDKDestination*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKDestination_Node: return 0;
- case LDKDestination_BlindedPath: return 1;
- default: abort();
- }
-}
-int8_tArray CS_LDK_LDKDestination_Node_get_node(int64_t ptr) {
- LDKDestination *obj = (LDKDestination*)untag_ptr(ptr);
- CHECK(obj->tag == LDKDestination_Node);
- int8_tArray node_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_arr->elems, obj->node.compressed_form, 33);
- return node_arr;
-}
-int64_t CS_LDK_LDKDestination_BlindedPath_get_blinded_path(int64_t ptr) {
- LDKDestination *obj = (LDKDestination*)untag_ptr(ptr);
- CHECK(obj->tag == LDKDestination_BlindedPath);
- LDKBlindedMessagePath blinded_path_var = obj->blinded_path;
- int64_t blinded_path_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(blinded_path_var);
- blinded_path_ref = tag_ptr(blinded_path_var.inner, false);
- return blinded_path_ref;
-}
-uint32_t CS_LDK_LDKMessageContext_ty_from_ptr(int64_t ptr) {
- LDKMessageContext *obj = (LDKMessageContext*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKMessageContext_Offers: return 0;
- case LDKMessageContext_Custom: return 1;
- default: abort();
- }
-}
-int64_t CS_LDK_LDKMessageContext_Offers_get_offers(int64_t ptr) {
- LDKMessageContext *obj = (LDKMessageContext*)untag_ptr(ptr);
- CHECK(obj->tag == LDKMessageContext_Offers);
- int64_t offers_ref = tag_ptr(&obj->offers, false);
- return offers_ref;
-}
-int8_tArray CS_LDK_LDKMessageContext_Custom_get_custom(int64_t ptr) {
- LDKMessageContext *obj = (LDKMessageContext*)untag_ptr(ptr);
- CHECK(obj->tag == LDKMessageContext_Custom);
- LDKCVec_u8Z custom_var = obj->custom;
- int8_tArray custom_arr = init_int8_tArray(custom_var.datalen, __LINE__);
- memcpy(custom_arr->elems, custom_var.data, custom_var.datalen);
- return custom_arr;
-}
-uint32_t CS_LDK_LDKMessageSendInstructions_ty_from_ptr(int64_t ptr) {
- LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKMessageSendInstructions_WithSpecifiedReplyPath: return 0;
- case LDKMessageSendInstructions_WithReplyPath: return 1;
- case LDKMessageSendInstructions_WithoutReplyPath: return 2;
- case LDKMessageSendInstructions_ForReply: return 3;
- default: abort();
- }
-}
-int64_t CS_LDK_LDKMessageSendInstructions_WithSpecifiedReplyPath_get_destination(int64_t ptr) {
- LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
- CHECK(obj->tag == LDKMessageSendInstructions_WithSpecifiedReplyPath);
- int64_t destination_ref = tag_ptr(&obj->with_specified_reply_path.destination, false);
- return destination_ref;
-}
-int64_t CS_LDK_LDKMessageSendInstructions_WithSpecifiedReplyPath_get_reply_path(int64_t ptr) {
- LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
- CHECK(obj->tag == LDKMessageSendInstructions_WithSpecifiedReplyPath);
- LDKBlindedMessagePath reply_path_var = obj->with_specified_reply_path.reply_path;
- int64_t reply_path_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_var);
- reply_path_ref = tag_ptr(reply_path_var.inner, false);
- return reply_path_ref;
-}
-int64_t CS_LDK_LDKMessageSendInstructions_WithReplyPath_get_destination(int64_t ptr) {
- LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
- CHECK(obj->tag == LDKMessageSendInstructions_WithReplyPath);
- int64_t destination_ref = tag_ptr(&obj->with_reply_path.destination, false);
- return destination_ref;
-}
-int64_t CS_LDK_LDKMessageSendInstructions_WithReplyPath_get_context(int64_t ptr) {
- LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
- CHECK(obj->tag == LDKMessageSendInstructions_WithReplyPath);
- int64_t context_ref = tag_ptr(&obj->with_reply_path.context, false);
- return context_ref;
-}
-int64_t CS_LDK_LDKMessageSendInstructions_WithoutReplyPath_get_destination(int64_t ptr) {
- LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
- CHECK(obj->tag == LDKMessageSendInstructions_WithoutReplyPath);
- int64_t destination_ref = tag_ptr(&obj->without_reply_path.destination, false);
- return destination_ref;
-}
-int64_t CS_LDK_LDKMessageSendInstructions_ForReply_get_instructions(int64_t ptr) {
- LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
- CHECK(obj->tag == LDKMessageSendInstructions_ForReply);
- LDKResponseInstruction instructions_var = obj->for_reply.instructions;
- int64_t instructions_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(instructions_var);
- instructions_ref = tag_ptr(instructions_var.inner, false);
- return instructions_ref;
-}
static inline struct LDKOffersMessage C2Tuple_OffersMessageMessageSendInstructionsZ_get_a(LDKC2Tuple_OffersMessageMessageSendInstructionsZ *NONNULL_PTR owner){
return OffersMessage_clone(&owner->a);
}
jboolean requires_blinded_error_conv = obj->receive_keysend.requires_blinded_error;
return requires_blinded_error_conv;
}
+jboolean CS_LDK_LDKPendingHTLCRouting_ReceiveKeysend_get_has_recipient_created_payment_secret(int64_t ptr) {
+ LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKPendingHTLCRouting_ReceiveKeysend);
+ jboolean has_recipient_created_payment_secret_conv = obj->receive_keysend.has_recipient_created_payment_secret;
+ return has_recipient_created_payment_secret_conv;
+}
static inline struct LDKPendingHTLCRouting CResult_PendingHTLCRoutingDecodeErrorZ_get_ok(LDKCResult_PendingHTLCRoutingDecodeErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return PendingHTLCRouting_clone(&*owner->contents.result);
int64_t monitor_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_var);
monitor_ref = tag_ptr(monitor_var.inner, monitor_var.is_owned);
- uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 26, funding_txo_ref, monitor_ref);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 27, funding_txo_ref, monitor_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_ChannelMonitorUpdateStatusNoneZ ret_conv = *(LDKCResult_ChannelMonitorUpdateStatusNoneZ*)(ret_ptr);
update_var = ChannelMonitorUpdate_clone(&update_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var);
update_ref = tag_ptr(update_var.inner, update_var.is_owned);
- uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_ll(j_calls->instance_ptr, 27, funding_txo_ref, update_ref);
+ uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_ll(j_calls->instance_ptr, 28, funding_txo_ref, update_ref);
LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_cs(ret);
return ret_conv;
}
LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) {
LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
- int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 28);
+ int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 29);
LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
}
FREE(txs_var.data);
- js_invoke_function_void_l(j_calls->instance_ptr, 29, (int64_t)txs_arr);
+ js_invoke_function_void_l(j_calls->instance_ptr, 30, (int64_t)txs_arr);
}
static void LDKBroadcasterInterface_JCalls_cloned(LDKBroadcasterInterface* new_obj) {
LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) new_obj->this_arg;
}
LDKThirtyTwoBytes get_secure_random_bytes_LDKEntropySource_jcall(const void* this_arg) {
LDKEntropySource_JCalls *j_calls = (LDKEntropySource_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_l_(j_calls->instance_ptr, 30);
+ int8_tArray ret = (int8_tArray)js_invoke_function_l_(j_calls->instance_ptr, 31);
LDKThirtyTwoBytes ret_ref;
CHECK(ret->arr_len == 32);
memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
FREE(j_calls);
}
}
-LDKThirtyTwoBytes get_inbound_payment_key_material_LDKNodeSigner_jcall(const void* this_arg) {
+LDKExpandedKey get_inbound_payment_key_LDKNodeSigner_jcall(const void* this_arg) {
LDKNodeSigner_JCalls *j_calls = (LDKNodeSigner_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_l_(j_calls->instance_ptr, 31);
- LDKThirtyTwoBytes ret_ref;
- CHECK(ret->arr_len == 32);
- memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
- return ret_ref;
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 32);
+ LDKExpandedKey ret_conv;
+ ret_conv.inner = untag_ptr(ret);
+ ret_conv.is_owned = ptr_is_owned(ret);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv);
+ return ret_conv;
}
LDKCResult_PublicKeyNoneZ get_node_id_LDKNodeSigner_jcall(const void* this_arg, LDKRecipient recipient) {
LDKNodeSigner_JCalls *j_calls = (LDKNodeSigner_JCalls*) this_arg;
int32_t recipient_conv = LDKRecipient_to_cs(recipient);
- uint64_t ret = js_invoke_function_l_Recipient(j_calls->instance_ptr, 32, recipient_conv);
+ uint64_t ret = js_invoke_function_l_Recipient(j_calls->instance_ptr, 33, recipient_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_PublicKeyNoneZ ret_conv = *(LDKCResult_PublicKeyNoneZ*)(ret_ptr);
LDKCOption_BigEndianScalarZ *tweak_copy = MALLOC(sizeof(LDKCOption_BigEndianScalarZ), "LDKCOption_BigEndianScalarZ");
*tweak_copy = tweak;
int64_t tweak_ref = tag_ptr(tweak_copy, true);
- uint64_t ret = js_invoke_function_l_Recipientll(j_calls->instance_ptr, 33, recipient_conv, (int64_t)other_key_arr, tweak_ref);
+ uint64_t ret = js_invoke_function_l_Recipientll(j_calls->instance_ptr, 34, recipient_conv, (int64_t)other_key_arr, tweak_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_ThirtyTwoBytesNoneZ ret_conv = *(LDKCResult_ThirtyTwoBytesNoneZ*)(ret_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_var);
invoice_ref = tag_ptr(invoice_var.inner, invoice_var.is_owned);
int32_t recipient_conv = LDKRecipient_to_cs(recipient);
- uint64_t ret = js_invoke_function_l_lRecipient(j_calls->instance_ptr, 34, invoice_ref, recipient_conv);
+ uint64_t ret = js_invoke_function_l_lRecipient(j_calls->instance_ptr, 35, invoice_ref, recipient_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_RecoverableSignatureNoneZ ret_conv = *(LDKCResult_RecoverableSignatureNoneZ*)(ret_ptr);
FREE(untag_ptr(ret));
return ret_conv;
}
-LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_request_LDKNodeSigner_jcall(const void* this_arg, const LDKUnsignedInvoiceRequest * invoice_request) {
- LDKNodeSigner_JCalls *j_calls = (LDKNodeSigner_JCalls*) this_arg;
- LDKUnsignedInvoiceRequest invoice_request_var = *invoice_request;
- int64_t invoice_request_ref = 0;
- 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);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 35, invoice_request_ref);
- void* ret_ptr = untag_ptr(ret);
- CHECK_ACCESS(ret_ptr);
- LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr);
- FREE(untag_ptr(ret));
- return ret_conv;
-}
LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_LDKNodeSigner_jcall(const void* this_arg, const LDKUnsignedBolt12Invoice * invoice) {
LDKNodeSigner_JCalls *j_calls = (LDKNodeSigner_JCalls*) this_arg;
LDKUnsignedBolt12Invoice invoice_var = *invoice;
LDKNodeSigner ret = {
.this_arg = (void*) calls,
- .get_inbound_payment_key_material = get_inbound_payment_key_material_LDKNodeSigner_jcall,
+ .get_inbound_payment_key = get_inbound_payment_key_LDKNodeSigner_jcall,
.get_node_id = get_node_id_LDKNodeSigner_jcall,
.ecdh = ecdh_LDKNodeSigner_jcall,
.sign_invoice = sign_invoice_LDKNodeSigner_jcall,
- .sign_bolt12_invoice_request = sign_bolt12_invoice_request_LDKNodeSigner_jcall,
.sign_bolt12_invoice = sign_bolt12_invoice_LDKNodeSigner_jcall,
.sign_gossip_message = sign_gossip_message_LDKNodeSigner_jcall,
.free = LDKNodeSigner_JCalls_free,
*res_ptr = LDKNodeSigner_init(o);
return tag_ptr(res_ptr, true);
}
-int8_tArray CS_LDK_NodeSigner_get_inbound_payment_key_material(int64_t this_arg) {
+int64_t CS_LDK_NodeSigner_get_inbound_payment_key(int64_t this_arg) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKNodeSigner* this_arg_conv = (LDKNodeSigner*)this_arg_ptr;
- int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, (this_arg_conv->get_inbound_payment_key_material)(this_arg_conv->this_arg).data, 32);
- return ret_arr;
+ LDKExpandedKey ret_var = (this_arg_conv->get_inbound_payment_key)(this_arg_conv->this_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;
}
int64_t CS_LDK_NodeSigner_get_node_id(int64_t this_arg, int32_t recipient) {
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_NodeSigner_sign_bolt12_invoice_request(int64_t this_arg, int64_t invoice_request) {
- void* this_arg_ptr = untag_ptr(this_arg);
- if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKNodeSigner* this_arg_conv = (LDKNodeSigner*)this_arg_ptr;
- LDKUnsignedInvoiceRequest invoice_request_conv;
- invoice_request_conv.inner = untag_ptr(invoice_request);
- invoice_request_conv.is_owned = ptr_is_owned(invoice_request);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_conv);
- invoice_request_conv.is_owned = false;
- LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
- *ret_conv = (this_arg_conv->sign_bolt12_invoice_request)(this_arg_conv->this_arg, &invoice_request_conv);
- return tag_ptr(ret_conv, true);
-}
-
int64_t CS_LDK_NodeSigner_sign_bolt12_invoice(int64_t this_arg, int64_t invoice) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
return ret_conv;
}
-typedef struct LDKMessageRouter_JCalls {
- atomic_size_t refcnt;
- uint32_t instance_ptr;
-} LDKMessageRouter_JCalls;
-static void LDKMessageRouter_JCalls_free(void* this_arg) {
- LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
- if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
- FREE(j_calls);
- }
-}
-LDKCResult_OnionMessagePathNoneZ find_path_LDKMessageRouter_jcall(const void* this_arg, LDKPublicKey sender, LDKCVec_PublicKeyZ peers, LDKDestination destination) {
- LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
- int8_tArray sender_arr = init_int8_tArray(33, __LINE__);
- memcpy(sender_arr->elems, sender.compressed_form, 33);
- LDKCVec_PublicKeyZ peers_var = peers;
- ptrArray peers_arr = NULL;
- peers_arr = init_ptrArray(peers_var.datalen, __LINE__);
- int8_tArray *peers_arr_ptr = (int8_tArray*)(((uint8_t*)peers_arr) + 8);
- for (size_t i = 0; i < peers_var.datalen; i++) {
- int8_tArray peers_conv_8_arr = init_int8_tArray(33, __LINE__);
- memcpy(peers_conv_8_arr->elems, peers_var.data[i].compressed_form, 33);
- peers_arr_ptr[i] = peers_conv_8_arr;
- }
-
- FREE(peers_var.data);
- LDKDestination *destination_copy = MALLOC(sizeof(LDKDestination), "LDKDestination");
- *destination_copy = destination;
- int64_t destination_ref = tag_ptr(destination_copy, true);
- uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 44, (int64_t)sender_arr, (int64_t)peers_arr, destination_ref);
- void* ret_ptr = untag_ptr(ret);
- CHECK_ACCESS(ret_ptr);
- LDKCResult_OnionMessagePathNoneZ ret_conv = *(LDKCResult_OnionMessagePathNoneZ*)(ret_ptr);
- FREE(untag_ptr(ret));
- return ret_conv;
-}
-LDKCResult_CVec_BlindedMessagePathZNoneZ create_blinded_paths_LDKMessageRouter_jcall(const void* this_arg, LDKPublicKey recipient, LDKMessageContext context, LDKCVec_PublicKeyZ peers) {
- LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
- int8_tArray recipient_arr = init_int8_tArray(33, __LINE__);
- memcpy(recipient_arr->elems, recipient.compressed_form, 33);
- LDKMessageContext *context_copy = MALLOC(sizeof(LDKMessageContext), "LDKMessageContext");
- *context_copy = context;
- int64_t context_ref = tag_ptr(context_copy, true);
- LDKCVec_PublicKeyZ peers_var = peers;
- ptrArray peers_arr = NULL;
- peers_arr = init_ptrArray(peers_var.datalen, __LINE__);
- int8_tArray *peers_arr_ptr = (int8_tArray*)(((uint8_t*)peers_arr) + 8);
- for (size_t i = 0; i < peers_var.datalen; i++) {
- int8_tArray peers_conv_8_arr = init_int8_tArray(33, __LINE__);
- memcpy(peers_conv_8_arr->elems, peers_var.data[i].compressed_form, 33);
- peers_arr_ptr[i] = peers_conv_8_arr;
- }
-
- FREE(peers_var.data);
- uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 45, (int64_t)recipient_arr, context_ref, (int64_t)peers_arr);
- void* ret_ptr = untag_ptr(ret);
- CHECK_ACCESS(ret_ptr);
- LDKCResult_CVec_BlindedMessagePathZNoneZ ret_conv = *(LDKCResult_CVec_BlindedMessagePathZNoneZ*)(ret_ptr);
- FREE(untag_ptr(ret));
- return ret_conv;
-}
-LDKCResult_CVec_BlindedMessagePathZNoneZ create_compact_blinded_paths_LDKMessageRouter_jcall(const void* this_arg, LDKPublicKey recipient, LDKMessageContext context, LDKCVec_MessageForwardNodeZ peers) {
- LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
- int8_tArray recipient_arr = init_int8_tArray(33, __LINE__);
- memcpy(recipient_arr->elems, recipient.compressed_form, 33);
- LDKMessageContext *context_copy = MALLOC(sizeof(LDKMessageContext), "LDKMessageContext");
- *context_copy = context;
- int64_t context_ref = tag_ptr(context_copy, true);
- LDKCVec_MessageForwardNodeZ peers_var = peers;
- int64_tArray peers_arr = NULL;
- peers_arr = init_int64_tArray(peers_var.datalen, __LINE__);
- int64_t *peers_arr_ptr = (int64_t*)(((uint8_t*)peers_arr) + 8);
- for (size_t u = 0; u < peers_var.datalen; u++) {
- LDKMessageForwardNode peers_conv_20_var = peers_var.data[u];
- int64_t peers_conv_20_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(peers_conv_20_var);
- peers_conv_20_ref = tag_ptr(peers_conv_20_var.inner, peers_conv_20_var.is_owned);
- peers_arr_ptr[u] = peers_conv_20_ref;
- }
-
- FREE(peers_var.data);
- uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 46, (int64_t)recipient_arr, context_ref, (int64_t)peers_arr);
- void* ret_ptr = untag_ptr(ret);
- CHECK_ACCESS(ret_ptr);
- LDKCResult_CVec_BlindedMessagePathZNoneZ ret_conv = *(LDKCResult_CVec_BlindedMessagePathZNoneZ*)(ret_ptr);
- FREE(untag_ptr(ret));
- return ret_conv;
-}
-static void LDKMessageRouter_JCalls_cloned(LDKMessageRouter* new_obj) {
- LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) new_obj->this_arg;
- atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-}
-static inline LDKMessageRouter LDKMessageRouter_init (int64_t o) {
- LDKMessageRouter_JCalls *calls = MALLOC(sizeof(LDKMessageRouter_JCalls), "LDKMessageRouter_JCalls");
- atomic_init(&calls->refcnt, 1);
- calls->instance_ptr = o;
-
- LDKMessageRouter ret = {
- .this_arg = (void*) calls,
- .find_path = find_path_LDKMessageRouter_jcall,
- .create_blinded_paths = create_blinded_paths_LDKMessageRouter_jcall,
- .create_compact_blinded_paths = create_compact_blinded_paths_LDKMessageRouter_jcall,
- .free = LDKMessageRouter_JCalls_free,
- };
- return ret;
-}
-uint64_t CS_LDK_LDKMessageRouter_new(int32_t o) {
- LDKMessageRouter *res_ptr = MALLOC(sizeof(LDKMessageRouter), "LDKMessageRouter");
- *res_ptr = LDKMessageRouter_init(o);
- return tag_ptr(res_ptr, true);
-}
-int64_t CS_LDK_MessageRouter_find_path(int64_t this_arg, int8_tArray sender, ptrArray peers, int64_t destination) {
- void* this_arg_ptr = untag_ptr(this_arg);
- if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKMessageRouter* this_arg_conv = (LDKMessageRouter*)this_arg_ptr;
- LDKPublicKey sender_ref;
- CHECK(sender->arr_len == 33);
- memcpy(sender_ref.compressed_form, sender->elems, 33); FREE(sender);
- LDKCVec_PublicKeyZ peers_constr;
- peers_constr.datalen = peers->arr_len;
- if (peers_constr.datalen > 0)
- peers_constr.data = MALLOC(peers_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
- else
- peers_constr.data = NULL;
- int8_tArray* peers_vals = (void*) peers->elems;
- for (size_t i = 0; i < peers_constr.datalen; i++) {
- int8_tArray peers_conv_8 = peers_vals[i];
- LDKPublicKey peers_conv_8_ref;
- CHECK(peers_conv_8->arr_len == 33);
- memcpy(peers_conv_8_ref.compressed_form, peers_conv_8->elems, 33); FREE(peers_conv_8);
- peers_constr.data[i] = peers_conv_8_ref;
- }
- FREE(peers);
- void* destination_ptr = untag_ptr(destination);
- CHECK_ACCESS(destination_ptr);
- LDKDestination destination_conv = *(LDKDestination*)(destination_ptr);
- destination_conv = Destination_clone((LDKDestination*)untag_ptr(destination));
- LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
- *ret_conv = (this_arg_conv->find_path)(this_arg_conv->this_arg, sender_ref, peers_constr, destination_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_MessageRouter_create_blinded_paths(int64_t this_arg, int8_tArray recipient, int64_t context, ptrArray peers) {
- void* this_arg_ptr = untag_ptr(this_arg);
- if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKMessageRouter* this_arg_conv = (LDKMessageRouter*)this_arg_ptr;
- LDKPublicKey recipient_ref;
- CHECK(recipient->arr_len == 33);
- memcpy(recipient_ref.compressed_form, recipient->elems, 33); FREE(recipient);
- void* context_ptr = untag_ptr(context);
- CHECK_ACCESS(context_ptr);
- LDKMessageContext context_conv = *(LDKMessageContext*)(context_ptr);
- context_conv = MessageContext_clone((LDKMessageContext*)untag_ptr(context));
- LDKCVec_PublicKeyZ peers_constr;
- peers_constr.datalen = peers->arr_len;
- if (peers_constr.datalen > 0)
- peers_constr.data = MALLOC(peers_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
- else
- peers_constr.data = NULL;
- int8_tArray* peers_vals = (void*) peers->elems;
- for (size_t i = 0; i < peers_constr.datalen; i++) {
- int8_tArray peers_conv_8 = peers_vals[i];
- LDKPublicKey peers_conv_8_ref;
- CHECK(peers_conv_8->arr_len == 33);
- memcpy(peers_conv_8_ref.compressed_form, peers_conv_8->elems, 33); FREE(peers_conv_8);
- peers_constr.data[i] = peers_conv_8_ref;
- }
- FREE(peers);
- LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
- *ret_conv = (this_arg_conv->create_blinded_paths)(this_arg_conv->this_arg, recipient_ref, context_conv, peers_constr);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_MessageRouter_create_compact_blinded_paths(int64_t this_arg, int8_tArray recipient, int64_t context, int64_tArray peers) {
- void* this_arg_ptr = untag_ptr(this_arg);
- if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKMessageRouter* this_arg_conv = (LDKMessageRouter*)this_arg_ptr;
- LDKPublicKey recipient_ref;
- CHECK(recipient->arr_len == 33);
- memcpy(recipient_ref.compressed_form, recipient->elems, 33); FREE(recipient);
- void* context_ptr = untag_ptr(context);
- CHECK_ACCESS(context_ptr);
- LDKMessageContext context_conv = *(LDKMessageContext*)(context_ptr);
- context_conv = MessageContext_clone((LDKMessageContext*)untag_ptr(context));
- LDKCVec_MessageForwardNodeZ peers_constr;
- peers_constr.datalen = peers->arr_len;
- if (peers_constr.datalen > 0)
- peers_constr.data = MALLOC(peers_constr.datalen * sizeof(LDKMessageForwardNode), "LDKCVec_MessageForwardNodeZ Elements");
- else
- peers_constr.data = NULL;
- int64_t* peers_vals = peers->elems;
- for (size_t u = 0; u < peers_constr.datalen; u++) {
- int64_t peers_conv_20 = peers_vals[u];
- LDKMessageForwardNode peers_conv_20_conv;
- peers_conv_20_conv.inner = untag_ptr(peers_conv_20);
- peers_conv_20_conv.is_owned = ptr_is_owned(peers_conv_20);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(peers_conv_20_conv);
- peers_conv_20_conv = MessageForwardNode_clone(&peers_conv_20_conv);
- peers_constr.data[u] = peers_conv_20_conv;
- }
- FREE(peers);
- LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
- *ret_conv = (this_arg_conv->create_compact_blinded_paths)(this_arg_conv->this_arg, recipient_ref, context_conv, peers_constr);
- return tag_ptr(ret_conv, true);
-}
-
typedef struct LDKRouter_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
- LDKMessageRouter_JCalls* MessageRouter;
} LDKRouter_JCalls;
static void LDKRouter_JCalls_free(void* this_arg) {
LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) this_arg;
int64_t inflight_htlcs_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(inflight_htlcs_var);
inflight_htlcs_ref = tag_ptr(inflight_htlcs_var.inner, inflight_htlcs_var.is_owned);
- uint64_t ret = js_invoke_function_l_llll(j_calls->instance_ptr, 47, (int64_t)payer_arr, route_params_ref, (int64_t)first_hops_arr, inflight_htlcs_ref);
+ uint64_t ret = js_invoke_function_l_llll(j_calls->instance_ptr, 44, (int64_t)payer_arr, route_params_ref, (int64_t)first_hops_arr, inflight_htlcs_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_RouteLightningErrorZ ret_conv = *(LDKCResult_RouteLightningErrorZ*)(ret_ptr);
memcpy(_payment_hash_arr->elems, _payment_hash.data, 32);
int8_tArray _payment_id_arr = init_int8_tArray(32, __LINE__);
memcpy(_payment_id_arr->elems, _payment_id.data, 32);
- uint64_t ret = js_invoke_function_l_llllll(j_calls->instance_ptr, 48, (int64_t)payer_arr, route_params_ref, (int64_t)first_hops_arr, inflight_htlcs_ref, (int64_t)_payment_hash_arr, (int64_t)_payment_id_arr);
+ uint64_t ret = js_invoke_function_l_llllll(j_calls->instance_ptr, 45, (int64_t)payer_arr, route_params_ref, (int64_t)first_hops_arr, inflight_htlcs_ref, (int64_t)_payment_hash_arr, (int64_t)_payment_id_arr);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_RouteLightningErrorZ ret_conv = *(LDKCResult_RouteLightningErrorZ*)(ret_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(tlvs_var);
tlvs_ref = tag_ptr(tlvs_var.inner, tlvs_var.is_owned);
int64_t amount_msats_conv = amount_msats;
- uint64_t ret = js_invoke_function_l_llll(j_calls->instance_ptr, 49, (int64_t)recipient_arr, (int64_t)first_hops_arr, tlvs_ref, amount_msats_conv);
+ uint64_t ret = js_invoke_function_l_llll(j_calls->instance_ptr, 46, (int64_t)recipient_arr, (int64_t)first_hops_arr, tlvs_ref, amount_msats_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_CVec_BlindedPaymentPathZNoneZ ret_conv = *(LDKCResult_CVec_BlindedPaymentPathZNoneZ*)(ret_ptr);
static void LDKRouter_JCalls_cloned(LDKRouter* new_obj) {
LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) new_obj->this_arg;
atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
- atomic_fetch_add_explicit(&j_calls->MessageRouter->refcnt, 1, memory_order_release);
}
-static inline LDKRouter LDKRouter_init (int64_t o, int64_t MessageRouter) {
+static inline LDKRouter LDKRouter_init (int64_t o) {
LDKRouter_JCalls *calls = MALLOC(sizeof(LDKRouter_JCalls), "LDKRouter_JCalls");
atomic_init(&calls->refcnt, 1);
calls->instance_ptr = o;
.find_route_with_id = find_route_with_id_LDKRouter_jcall,
.create_blinded_payment_paths = create_blinded_payment_paths_LDKRouter_jcall,
.free = LDKRouter_JCalls_free,
- .MessageRouter = LDKMessageRouter_init(MessageRouter),
};
- calls->MessageRouter = ret.MessageRouter.this_arg;
return ret;
}
-uint64_t CS_LDK_LDKRouter_new(int32_t o, int32_t MessageRouter) {
+uint64_t CS_LDK_LDKRouter_new(int32_t o) {
LDKRouter *res_ptr = MALLOC(sizeof(LDKRouter), "LDKRouter");
- *res_ptr = LDKRouter_init(o, MessageRouter);
+ *res_ptr = LDKRouter_init(o);
return tag_ptr(res_ptr, true);
}
int64_t CS_LDK_Router_find_route(int64_t this_arg, int8_tArray payer, int64_t route_params, int64_tArray first_hops, int64_t inflight_htlcs) {
return tag_ptr(ret_conv, true);
}
+static inline struct LDKOnionMessagePath CResult_OnionMessagePathNoneZ_get_ok(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR owner){
+ LDKOnionMessagePath ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_OnionMessagePathNoneZ_get_ok(int64_t owner) {
+ LDKCResult_OnionMessagePathNoneZ* owner_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(owner);
+ LDKOnionMessagePath ret_var = CResult_OnionMessagePathNoneZ_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_OnionMessagePathNoneZ_get_err(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+void CS_LDK_CResult_OnionMessagePathNoneZ_get_err(int64_t owner) {
+ LDKCResult_OnionMessagePathNoneZ* owner_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(owner);
+ CResult_OnionMessagePathNoneZ_get_err(owner_conv);
+}
+
+static inline struct LDKCVec_BlindedMessagePathZ CResult_CVec_BlindedMessagePathZNoneZ_get_ok(LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return CVec_BlindedMessagePathZ_clone(&*owner->contents.result);
+}
+int64_tArray CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_get_ok(int64_t owner) {
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* owner_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(owner);
+ LDKCVec_BlindedMessagePathZ ret_var = CResult_CVec_BlindedMessagePathZNoneZ_get_ok(owner_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t u = 0; u < ret_var.datalen; u++) {
+ LDKBlindedMessagePath ret_conv_20_var = ret_var.data[u];
+ int64_t ret_conv_20_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_20_var);
+ ret_conv_20_ref = tag_ptr(ret_conv_20_var.inner, ret_conv_20_var.is_owned);
+ ret_arr_ptr[u] = ret_conv_20_ref;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
+static inline void CResult_CVec_BlindedMessagePathZNoneZ_get_err(LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+void CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_get_err(int64_t owner) {
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* owner_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(owner);
+ CResult_CVec_BlindedMessagePathZNoneZ_get_err(owner_conv);
+}
+
+static inline LDKCVec_MessageForwardNodeZ CVec_MessageForwardNodeZ_clone(const LDKCVec_MessageForwardNodeZ *orig) {
+ LDKCVec_MessageForwardNodeZ ret = { .data = MALLOC(sizeof(LDKMessageForwardNode) * orig->datalen, "LDKCVec_MessageForwardNodeZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = MessageForwardNode_clone(&orig->data[i]);
+ }
+ return ret;
+}
+typedef struct LDKMessageRouter_JCalls {
+ atomic_size_t refcnt;
+ uint32_t instance_ptr;
+} LDKMessageRouter_JCalls;
+static void LDKMessageRouter_JCalls_free(void* this_arg) {
+ LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ FREE(j_calls);
+ }
+}
+LDKCResult_OnionMessagePathNoneZ find_path_LDKMessageRouter_jcall(const void* this_arg, LDKPublicKey sender, LDKCVec_PublicKeyZ peers, LDKDestination destination) {
+ LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
+ int8_tArray sender_arr = init_int8_tArray(33, __LINE__);
+ memcpy(sender_arr->elems, sender.compressed_form, 33);
+ LDKCVec_PublicKeyZ peers_var = peers;
+ ptrArray peers_arr = NULL;
+ peers_arr = init_ptrArray(peers_var.datalen, __LINE__);
+ int8_tArray *peers_arr_ptr = (int8_tArray*)(((uint8_t*)peers_arr) + 8);
+ for (size_t i = 0; i < peers_var.datalen; i++) {
+ int8_tArray peers_conv_8_arr = init_int8_tArray(33, __LINE__);
+ memcpy(peers_conv_8_arr->elems, peers_var.data[i].compressed_form, 33);
+ peers_arr_ptr[i] = peers_conv_8_arr;
+ }
+
+ FREE(peers_var.data);
+ LDKDestination *destination_copy = MALLOC(sizeof(LDKDestination), "LDKDestination");
+ *destination_copy = destination;
+ int64_t destination_ref = tag_ptr(destination_copy, true);
+ uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 47, (int64_t)sender_arr, (int64_t)peers_arr, destination_ref);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_OnionMessagePathNoneZ ret_conv = *(LDKCResult_OnionMessagePathNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
+LDKCResult_CVec_BlindedMessagePathZNoneZ create_blinded_paths_LDKMessageRouter_jcall(const void* this_arg, LDKPublicKey recipient, LDKMessageContext context, LDKCVec_PublicKeyZ peers) {
+ LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
+ int8_tArray recipient_arr = init_int8_tArray(33, __LINE__);
+ memcpy(recipient_arr->elems, recipient.compressed_form, 33);
+ LDKMessageContext *context_copy = MALLOC(sizeof(LDKMessageContext), "LDKMessageContext");
+ *context_copy = context;
+ int64_t context_ref = tag_ptr(context_copy, true);
+ LDKCVec_PublicKeyZ peers_var = peers;
+ ptrArray peers_arr = NULL;
+ peers_arr = init_ptrArray(peers_var.datalen, __LINE__);
+ int8_tArray *peers_arr_ptr = (int8_tArray*)(((uint8_t*)peers_arr) + 8);
+ for (size_t i = 0; i < peers_var.datalen; i++) {
+ int8_tArray peers_conv_8_arr = init_int8_tArray(33, __LINE__);
+ memcpy(peers_conv_8_arr->elems, peers_var.data[i].compressed_form, 33);
+ peers_arr_ptr[i] = peers_conv_8_arr;
+ }
+
+ FREE(peers_var.data);
+ uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 48, (int64_t)recipient_arr, context_ref, (int64_t)peers_arr);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_CVec_BlindedMessagePathZNoneZ ret_conv = *(LDKCResult_CVec_BlindedMessagePathZNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
+LDKCResult_CVec_BlindedMessagePathZNoneZ create_compact_blinded_paths_LDKMessageRouter_jcall(const void* this_arg, LDKPublicKey recipient, LDKMessageContext context, LDKCVec_MessageForwardNodeZ peers) {
+ LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
+ int8_tArray recipient_arr = init_int8_tArray(33, __LINE__);
+ memcpy(recipient_arr->elems, recipient.compressed_form, 33);
+ LDKMessageContext *context_copy = MALLOC(sizeof(LDKMessageContext), "LDKMessageContext");
+ *context_copy = context;
+ int64_t context_ref = tag_ptr(context_copy, true);
+ LDKCVec_MessageForwardNodeZ peers_var = peers;
+ int64_tArray peers_arr = NULL;
+ peers_arr = init_int64_tArray(peers_var.datalen, __LINE__);
+ int64_t *peers_arr_ptr = (int64_t*)(((uint8_t*)peers_arr) + 8);
+ for (size_t u = 0; u < peers_var.datalen; u++) {
+ LDKMessageForwardNode peers_conv_20_var = peers_var.data[u];
+ int64_t peers_conv_20_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(peers_conv_20_var);
+ peers_conv_20_ref = tag_ptr(peers_conv_20_var.inner, peers_conv_20_var.is_owned);
+ peers_arr_ptr[u] = peers_conv_20_ref;
+ }
+
+ FREE(peers_var.data);
+ uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 49, (int64_t)recipient_arr, context_ref, (int64_t)peers_arr);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_CVec_BlindedMessagePathZNoneZ ret_conv = *(LDKCResult_CVec_BlindedMessagePathZNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
+static void LDKMessageRouter_JCalls_cloned(LDKMessageRouter* new_obj) {
+ LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKMessageRouter LDKMessageRouter_init (int64_t o) {
+ LDKMessageRouter_JCalls *calls = MALLOC(sizeof(LDKMessageRouter_JCalls), "LDKMessageRouter_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ calls->instance_ptr = o;
+
+ LDKMessageRouter ret = {
+ .this_arg = (void*) calls,
+ .find_path = find_path_LDKMessageRouter_jcall,
+ .create_blinded_paths = create_blinded_paths_LDKMessageRouter_jcall,
+ .create_compact_blinded_paths = create_compact_blinded_paths_LDKMessageRouter_jcall,
+ .free = LDKMessageRouter_JCalls_free,
+ };
+ return ret;
+}
+uint64_t CS_LDK_LDKMessageRouter_new(int32_t o) {
+ LDKMessageRouter *res_ptr = MALLOC(sizeof(LDKMessageRouter), "LDKMessageRouter");
+ *res_ptr = LDKMessageRouter_init(o);
+ return tag_ptr(res_ptr, true);
+}
+int64_t CS_LDK_MessageRouter_find_path(int64_t this_arg, int8_tArray sender, ptrArray peers, int64_t destination) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKMessageRouter* this_arg_conv = (LDKMessageRouter*)this_arg_ptr;
+ LDKPublicKey sender_ref;
+ CHECK(sender->arr_len == 33);
+ memcpy(sender_ref.compressed_form, sender->elems, 33); FREE(sender);
+ LDKCVec_PublicKeyZ peers_constr;
+ peers_constr.datalen = peers->arr_len;
+ if (peers_constr.datalen > 0)
+ peers_constr.data = MALLOC(peers_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
+ else
+ peers_constr.data = NULL;
+ int8_tArray* peers_vals = (void*) peers->elems;
+ for (size_t i = 0; i < peers_constr.datalen; i++) {
+ int8_tArray peers_conv_8 = peers_vals[i];
+ LDKPublicKey peers_conv_8_ref;
+ CHECK(peers_conv_8->arr_len == 33);
+ memcpy(peers_conv_8_ref.compressed_form, peers_conv_8->elems, 33); FREE(peers_conv_8);
+ peers_constr.data[i] = peers_conv_8_ref;
+ }
+ FREE(peers);
+ void* destination_ptr = untag_ptr(destination);
+ CHECK_ACCESS(destination_ptr);
+ LDKDestination destination_conv = *(LDKDestination*)(destination_ptr);
+ destination_conv = Destination_clone((LDKDestination*)untag_ptr(destination));
+ LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
+ *ret_conv = (this_arg_conv->find_path)(this_arg_conv->this_arg, sender_ref, peers_constr, destination_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_MessageRouter_create_blinded_paths(int64_t this_arg, int8_tArray recipient, int64_t context, ptrArray peers) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKMessageRouter* this_arg_conv = (LDKMessageRouter*)this_arg_ptr;
+ LDKPublicKey recipient_ref;
+ CHECK(recipient->arr_len == 33);
+ memcpy(recipient_ref.compressed_form, recipient->elems, 33); FREE(recipient);
+ void* context_ptr = untag_ptr(context);
+ CHECK_ACCESS(context_ptr);
+ LDKMessageContext context_conv = *(LDKMessageContext*)(context_ptr);
+ context_conv = MessageContext_clone((LDKMessageContext*)untag_ptr(context));
+ LDKCVec_PublicKeyZ peers_constr;
+ peers_constr.datalen = peers->arr_len;
+ if (peers_constr.datalen > 0)
+ peers_constr.data = MALLOC(peers_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
+ else
+ peers_constr.data = NULL;
+ int8_tArray* peers_vals = (void*) peers->elems;
+ for (size_t i = 0; i < peers_constr.datalen; i++) {
+ int8_tArray peers_conv_8 = peers_vals[i];
+ LDKPublicKey peers_conv_8_ref;
+ CHECK(peers_conv_8->arr_len == 33);
+ memcpy(peers_conv_8_ref.compressed_form, peers_conv_8->elems, 33); FREE(peers_conv_8);
+ peers_constr.data[i] = peers_conv_8_ref;
+ }
+ FREE(peers);
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
+ *ret_conv = (this_arg_conv->create_blinded_paths)(this_arg_conv->this_arg, recipient_ref, context_conv, peers_constr);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_MessageRouter_create_compact_blinded_paths(int64_t this_arg, int8_tArray recipient, int64_t context, int64_tArray peers) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKMessageRouter* this_arg_conv = (LDKMessageRouter*)this_arg_ptr;
+ LDKPublicKey recipient_ref;
+ CHECK(recipient->arr_len == 33);
+ memcpy(recipient_ref.compressed_form, recipient->elems, 33); FREE(recipient);
+ void* context_ptr = untag_ptr(context);
+ CHECK_ACCESS(context_ptr);
+ LDKMessageContext context_conv = *(LDKMessageContext*)(context_ptr);
+ context_conv = MessageContext_clone((LDKMessageContext*)untag_ptr(context));
+ LDKCVec_MessageForwardNodeZ peers_constr;
+ peers_constr.datalen = peers->arr_len;
+ if (peers_constr.datalen > 0)
+ peers_constr.data = MALLOC(peers_constr.datalen * sizeof(LDKMessageForwardNode), "LDKCVec_MessageForwardNodeZ Elements");
+ else
+ peers_constr.data = NULL;
+ int64_t* peers_vals = peers->elems;
+ for (size_t u = 0; u < peers_constr.datalen; u++) {
+ int64_t peers_conv_20 = peers_vals[u];
+ LDKMessageForwardNode peers_conv_20_conv;
+ peers_conv_20_conv.inner = untag_ptr(peers_conv_20);
+ peers_conv_20_conv.is_owned = ptr_is_owned(peers_conv_20);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(peers_conv_20_conv);
+ peers_conv_20_conv = MessageForwardNode_clone(&peers_conv_20_conv);
+ peers_constr.data[u] = peers_conv_20_conv;
+ }
+ FREE(peers);
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
+ *ret_conv = (this_arg_conv->create_compact_blinded_paths)(this_arg_conv->this_arg, recipient_ref, context_conv, peers_constr);
+ return tag_ptr(ret_conv, true);
+}
+
static inline struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesChannelManagerZ_get_a(LDKC2Tuple_ThirtyTwoBytesChannelManagerZ *NONNULL_PTR owner){
return ThirtyTwoBytes_clone(&owner->a);
}
}
return ret;
}
+static inline bool C2Tuple_boolboolZ_get_a(LDKC2Tuple_boolboolZ *NONNULL_PTR owner){
+ return owner->a;
+}
+jboolean CS_LDK_C2Tuple_boolboolZ_get_a(int64_t owner) {
+ LDKC2Tuple_boolboolZ* owner_conv = (LDKC2Tuple_boolboolZ*)untag_ptr(owner);
+ jboolean ret_conv = C2Tuple_boolboolZ_get_a(owner_conv);
+ return ret_conv;
+}
+
+static inline bool C2Tuple_boolboolZ_get_b(LDKC2Tuple_boolboolZ *NONNULL_PTR owner){
+ return owner->b;
+}
+jboolean CS_LDK_C2Tuple_boolboolZ_get_b(int64_t owner) {
+ LDKC2Tuple_boolboolZ* owner_conv = (LDKC2Tuple_boolboolZ*)untag_ptr(owner);
+ jboolean ret_conv = C2Tuple_boolboolZ_get_b(owner_conv);
+ return ret_conv;
+}
+
uint32_t CS_LDK_LDKBalance_ty_from_ptr(int64_t ptr) {
LDKBalance *obj = (LDKBalance*)untag_ptr(ptr);
switch(obj->tag) {
return ret_conv;
}
+static inline struct LDKStr C3Tuple_StrStrStrZ_get_a(LDKC3Tuple_StrStrStrZ *NONNULL_PTR owner){
+ return owner->a;
+}
+jstring CS_LDK_C3Tuple_StrStrStrZ_get_a(int64_t owner) {
+ LDKC3Tuple_StrStrStrZ* owner_conv = (LDKC3Tuple_StrStrStrZ*)untag_ptr(owner);
+ LDKStr ret_str = C3Tuple_StrStrStrZ_get_a(owner_conv);
+ jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
+ return ret_conv;
+}
+
+static inline struct LDKStr C3Tuple_StrStrStrZ_get_b(LDKC3Tuple_StrStrStrZ *NONNULL_PTR owner){
+ return owner->b;
+}
+jstring CS_LDK_C3Tuple_StrStrStrZ_get_b(int64_t owner) {
+ LDKC3Tuple_StrStrStrZ* owner_conv = (LDKC3Tuple_StrStrStrZ*)untag_ptr(owner);
+ LDKStr ret_str = C3Tuple_StrStrStrZ_get_b(owner_conv);
+ jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
+ return ret_conv;
+}
+
+static inline struct LDKStr C3Tuple_StrStrStrZ_get_c(LDKC3Tuple_StrStrStrZ *NONNULL_PTR owner){
+ return owner->c;
+}
+jstring CS_LDK_C3Tuple_StrStrStrZ_get_c(int64_t owner) {
+ LDKC3Tuple_StrStrStrZ* owner_conv = (LDKC3Tuple_StrStrStrZ*)untag_ptr(owner);
+ LDKStr ret_str = C3Tuple_StrStrStrZ_get_c(owner_conv);
+ jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
+ return ret_conv;
+}
+
+static inline LDKCVec_C3Tuple_StrStrStrZZ CVec_C3Tuple_StrStrStrZZ_clone(const LDKCVec_C3Tuple_StrStrStrZZ *orig) {
+ LDKCVec_C3Tuple_StrStrStrZZ ret = { .data = MALLOC(sizeof(LDKC3Tuple_StrStrStrZ) * orig->datalen, "LDKCVec_C3Tuple_StrStrStrZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C3Tuple_StrStrStrZ_clone(&orig->data[i]);
+ }
+ return ret;
+}
+static inline struct LDKCVec_C3Tuple_StrStrStrZZ CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_ok(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return CVec_C3Tuple_StrStrStrZZ_clone(&*owner->contents.result);
+}
+int64_tArray CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_ok(int64_t owner) {
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* owner_conv = (LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ*)untag_ptr(owner);
+ LDKCVec_C3Tuple_StrStrStrZZ ret_var = CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_ok(owner_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t x = 0; x < ret_var.datalen; x++) {
+ LDKC3Tuple_StrStrStrZ* ret_conv_23_conv = MALLOC(sizeof(LDKC3Tuple_StrStrStrZ), "LDKC3Tuple_StrStrStrZ");
+ *ret_conv_23_conv = ret_var.data[x];
+ ret_arr_ptr[x] = tag_ptr(ret_conv_23_conv, true);
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
+static inline enum LDKIOError CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_err(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+int32_t CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_err(int64_t owner) {
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* owner_conv = (LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ*)untag_ptr(owner);
+ int32_t ret_conv = LDKIOError_to_cs(CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
static inline LDKCVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ_clone(const LDKCVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ *orig) {
LDKCVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesChannelMonitorZ) * orig->datalen, "LDKCVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ clone bytes"), .datalen = orig->datalen };
for (size_t i = 0; i < ret.datalen; i++) {
return ret_conv;
}
-static inline struct LDKUnsignedInvoiceRequest CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){
- LDKUnsignedInvoiceRequest ret = *owner->contents.result;
+static inline struct LDKMonitorName CResult_MonitorNameIOErrorZ_get_ok(LDKCResult_MonitorNameIOErrorZ *NONNULL_PTR owner){
+ LDKMonitorName ret = *owner->contents.result;
ret.is_owned = false;
return ret;
}
-int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(int64_t owner) {
- LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
- LDKUnsignedInvoiceRequest ret_var = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv);
+int64_t CS_LDK_CResult_MonitorNameIOErrorZ_get_ok(int64_t owner) {
+ LDKCResult_MonitorNameIOErrorZ* owner_conv = (LDKCResult_MonitorNameIOErrorZ*)untag_ptr(owner);
+ LDKMonitorName ret_var = CResult_MonitorNameIOErrorZ_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){
+static inline enum LDKIOError CResult_MonitorNameIOErrorZ_get_err(LDKCResult_MonitorNameIOErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
- return Bolt12SemanticError_clone(&*owner->contents.err);
+ return *owner->contents.err;
+}
+int32_t CS_LDK_CResult_MonitorNameIOErrorZ_get_err(int64_t owner) {
+ LDKCResult_MonitorNameIOErrorZ* owner_conv = (LDKCResult_MonitorNameIOErrorZ*)untag_ptr(owner);
+ int32_t ret_conv = LDKIOError_to_cs(CResult_MonitorNameIOErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
+static inline struct LDKUpdateName CResult_UpdateNameIOErrorZ_get_ok(LDKCResult_UpdateNameIOErrorZ *NONNULL_PTR owner){
+ LDKUpdateName ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_UpdateNameIOErrorZ_get_ok(int64_t owner) {
+ LDKCResult_UpdateNameIOErrorZ* owner_conv = (LDKCResult_UpdateNameIOErrorZ*)untag_ptr(owner);
+ LDKUpdateName ret_var = CResult_UpdateNameIOErrorZ_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 LDKIOError CResult_UpdateNameIOErrorZ_get_err(LDKCResult_UpdateNameIOErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
}
-int32_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(int64_t owner) {
- LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
- int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv));
+int32_t CS_LDK_CResult_UpdateNameIOErrorZ_get_err(int64_t owner) {
+ LDKCResult_UpdateNameIOErrorZ* owner_conv = (LDKCResult_UpdateNameIOErrorZ*)untag_ptr(owner);
+ int32_t ret_conv = LDKIOError_to_cs(CResult_UpdateNameIOErrorZ_get_err(owner_conv));
return ret_conv;
}
return ret_conv;
}
+static inline struct LDKInvoiceRequest CResult_InvoiceRequestDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestDecodeErrorZ *NONNULL_PTR owner){
+ LDKInvoiceRequest ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_InvoiceRequestDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_InvoiceRequestDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestDecodeErrorZ*)untag_ptr(owner);
+ LDKInvoiceRequest ret_var = CResult_InvoiceRequestDecodeErrorZ_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_InvoiceRequestDecodeErrorZ_get_err(LDKCResult_InvoiceRequestDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_InvoiceRequestDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_InvoiceRequestDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_InvoiceRequestDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
static inline struct LDKInvoiceRequestFields CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){
LDKInvoiceRequestFields ret = *owner->contents.result;
ret.is_owned = false;
}
return ret;
}
+uint32_t CS_LDK_LDKInboundChannelFunds_ty_from_ptr(int64_t ptr) {
+ LDKInboundChannelFunds *obj = (LDKInboundChannelFunds*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKInboundChannelFunds_PushMsat: return 0;
+ case LDKInboundChannelFunds_DualFunded: return 1;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKInboundChannelFunds_PushMsat_get_push_msat(int64_t ptr) {
+ LDKInboundChannelFunds *obj = (LDKInboundChannelFunds*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKInboundChannelFunds_PushMsat);
+ int64_t push_msat_conv = obj->push_msat;
+ return push_msat_conv;
+}
uint32_t CS_LDK_LDKBumpTransactionEvent_ty_from_ptr(int64_t ptr) {
LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr);
switch(obj->tag) {
int64_t claim_deadline_ref = tag_ptr(&obj->payment_claimable.claim_deadline, false);
return claim_deadline_ref;
}
+int64_t CS_LDK_LDKEvent_PaymentClaimable_get_payment_id(int64_t ptr) {
+ LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKEvent_PaymentClaimable);
+ int64_t payment_id_ref = tag_ptr(&obj->payment_claimable.payment_id, false);
+ return payment_id_ref;
+}
int8_tArray CS_LDK_LDKEvent_PaymentClaimed_get_receiver_node_id(int64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
CHECK(obj->tag == LDKEvent_PaymentClaimed);
onion_fields_ref = tag_ptr(onion_fields_var.inner, false);
return onion_fields_ref;
}
+int64_t CS_LDK_LDKEvent_PaymentClaimed_get_payment_id(int64_t ptr) {
+ LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKEvent_PaymentClaimed);
+ int64_t payment_id_ref = tag_ptr(&obj->payment_claimed.payment_id, false);
+ return payment_id_ref;
+}
int8_tArray CS_LDK_LDKEvent_ConnectionNeeded_get_node_id(int64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
CHECK(obj->tag == LDKEvent_ConnectionNeeded);
int64_t next_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_user_channel_id, false);
return next_user_channel_id_ref;
}
+int8_tArray CS_LDK_LDKEvent_PaymentForwarded_get_prev_node_id(int64_t ptr) {
+ LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKEvent_PaymentForwarded);
+ int8_tArray prev_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(prev_node_id_arr->elems, obj->payment_forwarded.prev_node_id.compressed_form, 33);
+ return prev_node_id_arr;
+}
+int8_tArray CS_LDK_LDKEvent_PaymentForwarded_get_next_node_id(int64_t ptr) {
+ LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKEvent_PaymentForwarded);
+ int8_tArray next_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(next_node_id_arr->elems, obj->payment_forwarded.next_node_id.compressed_form, 33);
+ return next_node_id_arr;
+}
int64_t CS_LDK_LDKEvent_PaymentForwarded_get_total_fee_earned_msat(int64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
CHECK(obj->tag == LDKEvent_PaymentForwarded);
channel_funding_txo_ref = tag_ptr(channel_funding_txo_var.inner, false);
return channel_funding_txo_ref;
}
+int64_t CS_LDK_LDKEvent_ChannelClosed_get_last_local_balance_msat(int64_t ptr) {
+ LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKEvent_ChannelClosed);
+ int64_t last_local_balance_msat_ref = tag_ptr(&obj->channel_closed.last_local_balance_msat, false);
+ return last_local_balance_msat_ref;
+}
int64_t CS_LDK_LDKEvent_DiscardFunding_get_channel_id(int64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
CHECK(obj->tag == LDKEvent_DiscardFunding);
int64_t funding_satoshis_conv = obj->open_channel_request.funding_satoshis;
return funding_satoshis_conv;
}
-int64_t CS_LDK_LDKEvent_OpenChannelRequest_get_push_msat(int64_t ptr) {
+int64_t CS_LDK_LDKEvent_OpenChannelRequest_get_channel_negotiation_type(int64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
CHECK(obj->tag == LDKEvent_OpenChannelRequest);
- int64_t push_msat_conv = obj->open_channel_request.push_msat;
- return push_msat_conv;
+ int64_t channel_negotiation_type_ref = tag_ptr(&obj->open_channel_request.channel_negotiation_type, false);
+ return channel_negotiation_type_ref;
}
int64_t CS_LDK_LDKEvent_OpenChannelRequest_get_channel_type(int64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
}
return ret;
}
-uint32_t CS_LDK_LDKBolt11ParseError_ty_from_ptr(int64_t ptr) {
- LDKBolt11ParseError *obj = (LDKBolt11ParseError*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKBolt11ParseError_Bech32Error: return 0;
- case LDKBolt11ParseError_ParseAmountError: return 1;
- case LDKBolt11ParseError_MalformedSignature: return 2;
- case LDKBolt11ParseError_BadPrefix: return 3;
- case LDKBolt11ParseError_UnknownCurrency: return 4;
- case LDKBolt11ParseError_UnknownSiPrefix: return 5;
- case LDKBolt11ParseError_MalformedHRP: return 6;
- case LDKBolt11ParseError_TooShortDataPart: return 7;
- case LDKBolt11ParseError_UnexpectedEndOfTaggedFields: return 8;
- case LDKBolt11ParseError_DescriptionDecodeError: return 9;
- case LDKBolt11ParseError_PaddingError: return 10;
- case LDKBolt11ParseError_IntegerOverflowError: return 11;
- case LDKBolt11ParseError_InvalidSegWitProgramLength: return 12;
- case LDKBolt11ParseError_InvalidPubKeyHashLength: return 13;
- case LDKBolt11ParseError_InvalidScriptHashLength: return 14;
- case LDKBolt11ParseError_InvalidRecoveryId: return 15;
- case LDKBolt11ParseError_InvalidSliceLength: return 16;
- case LDKBolt11ParseError_Skip: return 17;
- default: abort();
- }
-}
-int64_t CS_LDK_LDKBolt11ParseError_Bech32Error_get_bech32_error(int64_t ptr) {
- LDKBolt11ParseError *obj = (LDKBolt11ParseError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKBolt11ParseError_Bech32Error);
- int64_t bech32_error_ref = tag_ptr(&obj->bech32_error, false);
- return bech32_error_ref;
-}
-int32_t CS_LDK_LDKBolt11ParseError_ParseAmountError_get_parse_amount_error(int64_t ptr) {
- LDKBolt11ParseError *obj = (LDKBolt11ParseError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKBolt11ParseError_ParseAmountError);
- /*obj->parse_amount_error*/
- return 0;
-}
-int32_t CS_LDK_LDKBolt11ParseError_MalformedSignature_get_malformed_signature(int64_t ptr) {
- LDKBolt11ParseError *obj = (LDKBolt11ParseError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKBolt11ParseError_MalformedSignature);
- int32_t malformed_signature_conv = LDKSecp256k1Error_to_cs(obj->malformed_signature);
- return malformed_signature_conv;
-}
-int32_t CS_LDK_LDKBolt11ParseError_DescriptionDecodeError_get_description_decode_error(int64_t ptr) {
- LDKBolt11ParseError *obj = (LDKBolt11ParseError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKBolt11ParseError_DescriptionDecodeError);
- /*obj->description_decode_error*/
- return 0;
-}
-jstring CS_LDK_LDKBolt11ParseError_InvalidSliceLength_get_invalid_slice_length(int64_t ptr) {
- LDKBolt11ParseError *obj = (LDKBolt11ParseError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKBolt11ParseError_InvalidSliceLength);
- LDKStr invalid_slice_length_str = obj->invalid_slice_length;
- jstring invalid_slice_length_conv = str_ref_to_cs(invalid_slice_length_str.chars, invalid_slice_length_str.len);
- return invalid_slice_length_conv;
-}
static inline enum LDKSiPrefix CResult_SiPrefixBolt11ParseErrorZ_get_ok(LDKCResult_SiPrefixBolt11ParseErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return SiPrefix_clone(&*owner->contents.result);
}
static inline struct LDKBolt11ParseError CResult_SiPrefixBolt11ParseErrorZ_get_err(LDKCResult_SiPrefixBolt11ParseErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return Bolt11ParseError_clone(&*owner->contents.err);
+ LDKBolt11ParseError ret = *owner->contents.err;
+ ret.is_owned = false;
+ return ret;
}
int64_t CS_LDK_CResult_SiPrefixBolt11ParseErrorZ_get_err(int64_t owner) {
LDKCResult_SiPrefixBolt11ParseErrorZ* owner_conv = (LDKCResult_SiPrefixBolt11ParseErrorZ*)untag_ptr(owner);
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = CResult_SiPrefixBolt11ParseErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
+ LDKBolt11ParseError ret_var = CResult_SiPrefixBolt11ParseErrorZ_get_err(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;
}
int64_t CS_LDK_LDKParseOrSemanticError_ParseError_get_parse_error(int64_t ptr) {
LDKParseOrSemanticError *obj = (LDKParseOrSemanticError*)untag_ptr(ptr);
CHECK(obj->tag == LDKParseOrSemanticError_ParseError);
- int64_t parse_error_ref = tag_ptr(&obj->parse_error, false);
+ LDKBolt11ParseError parse_error_var = obj->parse_error;
+ int64_t parse_error_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(parse_error_var);
+ parse_error_ref = tag_ptr(parse_error_var.inner, false);
return parse_error_ref;
}
int32_t CS_LDK_LDKParseOrSemanticError_SemanticError_get_semantic_error(int64_t ptr) {
}
static inline struct LDKBolt11ParseError CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_get_err(LDKCResult_SignedRawBolt11InvoiceBolt11ParseErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return Bolt11ParseError_clone(&*owner->contents.err);
+ LDKBolt11ParseError ret = *owner->contents.err;
+ ret.is_owned = false;
+ return ret;
}
int64_t CS_LDK_CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_get_err(int64_t owner) {
LDKCResult_SignedRawBolt11InvoiceBolt11ParseErrorZ* owner_conv = (LDKCResult_SignedRawBolt11InvoiceBolt11ParseErrorZ*)untag_ptr(owner);
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
+ LDKBolt11ParseError ret_var = CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_get_err(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;
}
return ret_ref;
}
+static inline struct LDKInitFeatures CResult_InitFeaturesDecodeErrorZ_get_ok(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner){
+ LDKInitFeatures ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_InitFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKInitFeatures ret_var = CResult_InitFeaturesDecodeErrorZ_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_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_InitFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_InitFeaturesDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKChannelFeatures CResult_ChannelFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner){
+ LDKChannelFeatures ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_ChannelFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKChannelFeatures ret_var = CResult_ChannelFeaturesDecodeErrorZ_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_ChannelFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_ChannelFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelFeaturesDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKNodeFeatures CResult_NodeFeaturesDecodeErrorZ_get_ok(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner){
+ LDKNodeFeatures ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_NodeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKNodeFeatures ret_var = CResult_NodeFeaturesDecodeErrorZ_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_NodeFeaturesDecodeErrorZ_get_err(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_NodeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_NodeFeaturesDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKBolt11InvoiceFeatures CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_ok(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
+ LDKBolt11InvoiceFeatures ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKBolt11InvoiceFeatures ret_var = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_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_Bolt11InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKBolt12InvoiceFeatures CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_ok(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
+ LDKBolt12InvoiceFeatures ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKBolt12InvoiceFeatures ret_var = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_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_Bolt12InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKBlindedHopFeatures CResult_BlindedHopFeaturesDecodeErrorZ_get_ok(LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR owner){
+ LDKBlindedHopFeatures ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ* owner_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKBlindedHopFeatures ret_var = CResult_BlindedHopFeaturesDecodeErrorZ_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_BlindedHopFeaturesDecodeErrorZ_get_err(LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ* owner_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_BlindedHopFeaturesDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKChannelTypeFeatures CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner){
+ LDKChannelTypeFeatures ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKChannelTypeFeatures ret_var = CResult_ChannelTypeFeaturesDecodeErrorZ_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_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelTypeFeaturesDecodeErrorZ_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);
}
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;
-}
-int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_get_ok(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 LDKDecodeError CResult_UnknownPaymentContextDecodeErrorZ_get_err(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_get_err(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;
LDKParsedOnionMessageContents *obj = (LDKParsedOnionMessageContents*)untag_ptr(ptr);
switch(obj->tag) {
case LDKParsedOnionMessageContents_Offers: return 0;
- case LDKParsedOnionMessageContents_Custom: return 1;
+ case LDKParsedOnionMessageContents_DNSResolver: return 1;
+ case LDKParsedOnionMessageContents_Custom: return 2;
default: abort();
}
}
int64_t offers_ref = tag_ptr(&obj->offers, false);
return offers_ref;
}
+int64_t CS_LDK_LDKParsedOnionMessageContents_DNSResolver_get_dns_resolver(int64_t ptr) {
+ LDKParsedOnionMessageContents *obj = (LDKParsedOnionMessageContents*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKParsedOnionMessageContents_DNSResolver);
+ int64_t dns_resolver_ref = tag_ptr(&obj->dns_resolver, false);
+ return dns_resolver_ref;
+}
int64_t CS_LDK_LDKParsedOnionMessageContents_Custom_get_custom(int64_t ptr) {
LDKParsedOnionMessageContents *obj = (LDKParsedOnionMessageContents*)untag_ptr(ptr);
CHECK(obj->tag == LDKParsedOnionMessageContents_Custom);
}
return ret;
}
-uint32_t CS_LDK_LDKSignOrCreationError_ty_from_ptr(int64_t ptr) {
- LDKSignOrCreationError *obj = (LDKSignOrCreationError*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKSignOrCreationError_SignError: return 0;
- case LDKSignOrCreationError_CreationError: return 1;
- default: abort();
- }
-}
-int32_t CS_LDK_LDKSignOrCreationError_CreationError_get_creation_error(int64_t ptr) {
- LDKSignOrCreationError *obj = (LDKSignOrCreationError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKSignOrCreationError_CreationError);
- int32_t creation_error_conv = LDKCreationError_to_cs(obj->creation_error);
- return creation_error_conv;
-}
-static inline struct LDKBolt11Invoice CResult_Bolt11InvoiceSignOrCreationErrorZ_get_ok(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR owner){
- LDKBolt11Invoice ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_get_ok(int64_t owner) {
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* owner_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(owner);
- LDKBolt11Invoice ret_var = CResult_Bolt11InvoiceSignOrCreationErrorZ_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 LDKSignOrCreationError CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return SignOrCreationError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err(int64_t owner) {
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* owner_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(owner);
- LDKSignOrCreationError *ret_copy = MALLOC(sizeof(LDKSignOrCreationError), "LDKSignOrCreationError");
- *ret_copy = CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
static inline struct LDKInvoiceError CResult_InvoiceErrorDecodeErrorZ_get_ok(LDKCResult_InvoiceErrorDecodeErrorZ *NONNULL_PTR owner){
LDKInvoiceError ret = *owner->contents.result;
ret.is_owned = false;
return ret_ref;
}
+static inline struct LDKAsyncPaymentsContext CResult_AsyncPaymentsContextDecodeErrorZ_get_ok(LDKCResult_AsyncPaymentsContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return AsyncPaymentsContext_clone(&*owner->contents.result);
+}
+int64_t CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ* owner_conv = (LDKCResult_AsyncPaymentsContextDecodeErrorZ*)untag_ptr(owner);
+ LDKAsyncPaymentsContext *ret_copy = MALLOC(sizeof(LDKAsyncPaymentsContext), "LDKAsyncPaymentsContext");
+ *ret_copy = CResult_AsyncPaymentsContextDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_AsyncPaymentsContextDecodeErrorZ_get_err(LDKCResult_AsyncPaymentsContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ* owner_conv = (LDKCResult_AsyncPaymentsContextDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_AsyncPaymentsContextDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKDNSResolverContext CResult_DNSResolverContextDecodeErrorZ_get_ok(LDKCResult_DNSResolverContextDecodeErrorZ *NONNULL_PTR owner){
+ LDKDNSResolverContext ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_DNSResolverContextDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_DNSResolverContextDecodeErrorZ* owner_conv = (LDKCResult_DNSResolverContextDecodeErrorZ*)untag_ptr(owner);
+ LDKDNSResolverContext ret_var = CResult_DNSResolverContextDecodeErrorZ_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_DNSResolverContextDecodeErrorZ_get_err(LDKCResult_DNSResolverContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_DNSResolverContextDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_DNSResolverContextDecodeErrorZ* owner_conv = (LDKCResult_DNSResolverContextDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_DNSResolverContextDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+typedef struct LDKMigratableKVStore_JCalls {
+ atomic_size_t refcnt;
+ uint32_t instance_ptr;
+ LDKKVStore_JCalls* KVStore;
+} LDKMigratableKVStore_JCalls;
+static void LDKMigratableKVStore_JCalls_free(void* this_arg) {
+ LDKMigratableKVStore_JCalls *j_calls = (LDKMigratableKVStore_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ FREE(j_calls);
+ }
+}
+LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ list_all_keys_LDKMigratableKVStore_jcall(const void* this_arg) {
+ LDKMigratableKVStore_JCalls *j_calls = (LDKMigratableKVStore_JCalls*) this_arg;
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 65);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ ret_conv = *(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
+static void LDKMigratableKVStore_JCalls_cloned(LDKMigratableKVStore* new_obj) {
+ LDKMigratableKVStore_JCalls *j_calls = (LDKMigratableKVStore_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+ atomic_fetch_add_explicit(&j_calls->KVStore->refcnt, 1, memory_order_release);
+}
+static inline LDKMigratableKVStore LDKMigratableKVStore_init (int64_t o, int64_t KVStore) {
+ LDKMigratableKVStore_JCalls *calls = MALLOC(sizeof(LDKMigratableKVStore_JCalls), "LDKMigratableKVStore_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ calls->instance_ptr = o;
+
+ LDKMigratableKVStore ret = {
+ .this_arg = (void*) calls,
+ .list_all_keys = list_all_keys_LDKMigratableKVStore_jcall,
+ .free = LDKMigratableKVStore_JCalls_free,
+ .KVStore = LDKKVStore_init(KVStore),
+ };
+ calls->KVStore = ret.KVStore.this_arg;
+ return ret;
+}
+uint64_t CS_LDK_LDKMigratableKVStore_new(int32_t o, int32_t KVStore) {
+ LDKMigratableKVStore *res_ptr = MALLOC(sizeof(LDKMigratableKVStore), "LDKMigratableKVStore");
+ *res_ptr = LDKMigratableKVStore_init(o, KVStore);
+ return tag_ptr(res_ptr, true);
+}
+int64_t CS_LDK_MigratableKVStore_list_all_keys(int64_t this_arg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKMigratableKVStore* this_arg_conv = (LDKMigratableKVStore*)this_arg_ptr;
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ), "LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ");
+ *ret_conv = (this_arg_conv->list_all_keys)(this_arg_conv->this_arg);
+ return tag_ptr(ret_conv, true);
+}
+
typedef struct LDKPersister_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
// WARNING: we may need a move here but no clone is available for LDKChannelManager
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_manager_var);
channel_manager_ref = tag_ptr(channel_manager_var.inner, channel_manager_var.is_owned);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 65, channel_manager_ref);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 66, channel_manager_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr);
// WARNING: we may need a move here but no clone is available for LDKNetworkGraph
CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_var);
network_graph_ref = tag_ptr(network_graph_var.inner, network_graph_var.is_owned);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 66, network_graph_ref);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 67, network_graph_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr);
LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg;
// WARNING: This object doesn't live past this scope, needs clone!
int64_t ret_scorer = tag_ptr(scorer, false);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 67, ret_scorer);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 68, ret_scorer);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr);
monitor_var = ChannelMonitor_clone(&monitor_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_var);
monitor_ref = tag_ptr(monitor_var.inner, monitor_var.is_owned);
- uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_ll(j_calls->instance_ptr, 68, channel_funding_outpoint_ref, monitor_ref);
+ uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_ll(j_calls->instance_ptr, 69, channel_funding_outpoint_ref, monitor_ref);
LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_cs(ret);
return ret_conv;
}
monitor_var = ChannelMonitor_clone(&monitor_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_var);
monitor_ref = tag_ptr(monitor_var.inner, monitor_var.is_owned);
- uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_lll(j_calls->instance_ptr, 69, channel_funding_outpoint_ref, monitor_update_ref, monitor_ref);
+ uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_lll(j_calls->instance_ptr, 70, channel_funding_outpoint_ref, monitor_update_ref, monitor_ref);
LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_cs(ret);
return ret_conv;
}
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);
- js_invoke_function_void_l(j_calls->instance_ptr, 70, channel_funding_outpoint_ref);
+ js_invoke_function_void_l(j_calls->instance_ptr, 71, channel_funding_outpoint_ref);
}
static void LDKPersist_JCalls_cloned(LDKPersist* new_obj) {
LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) new_obj->this_arg;
FREE(txdata_var.data);
int32_t height_conv = height;
- js_invoke_function_void_lli(j_calls->instance_ptr, 71, (int64_t)header_arr, (int64_t)txdata_arr, height_conv);
+ js_invoke_function_void_lli(j_calls->instance_ptr, 72, (int64_t)header_arr, (int64_t)txdata_arr, height_conv);
}
void block_connected_LDKListen_jcall(const void* this_arg, LDKu8slice block, uint32_t height) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
int8_tArray block_arr = init_int8_tArray(block_var.datalen, __LINE__);
memcpy(block_arr->elems, block_var.data, block_var.datalen);
int32_t height_conv = height;
- js_invoke_function_void_li(j_calls->instance_ptr, 72, (int64_t)block_arr, height_conv);
+ js_invoke_function_void_li(j_calls->instance_ptr, 73, (int64_t)block_arr, height_conv);
}
void block_disconnected_LDKListen_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
int8_tArray header_arr = init_int8_tArray(80, __LINE__);
memcpy(header_arr->elems, *header, 80);
int32_t height_conv = height;
- js_invoke_function_void_li(j_calls->instance_ptr, 73, (int64_t)header_arr, height_conv);
+ js_invoke_function_void_li(j_calls->instance_ptr, 74, (int64_t)header_arr, height_conv);
}
static void LDKListen_JCalls_cloned(LDKListen* new_obj) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) new_obj->this_arg;
FREE(txdata_var.data);
int32_t height_conv = height;
- js_invoke_function_void_lli(j_calls->instance_ptr, 74, (int64_t)header_arr, (int64_t)txdata_arr, height_conv);
+ js_invoke_function_void_lli(j_calls->instance_ptr, 75, (int64_t)header_arr, (int64_t)txdata_arr, height_conv);
}
void transaction_unconfirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t (* txid)[32]) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
int8_tArray txid_arr = init_int8_tArray(32, __LINE__);
memcpy(txid_arr->elems, *txid, 32);
- js_invoke_function_void_l(j_calls->instance_ptr, 75, (int64_t)txid_arr);
+ js_invoke_function_void_l(j_calls->instance_ptr, 76, (int64_t)txid_arr);
}
void best_block_updated_LDKConfirm_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
int8_tArray header_arr = init_int8_tArray(80, __LINE__);
memcpy(header_arr->elems, *header, 80);
int32_t height_conv = height;
- js_invoke_function_void_li(j_calls->instance_ptr, 76, (int64_t)header_arr, height_conv);
+ js_invoke_function_void_li(j_calls->instance_ptr, 77, (int64_t)header_arr, height_conv);
}
LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ get_relevant_txids_LDKConfirm_jcall(const void* this_arg) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
- int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 77);
+ int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 78);
LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
}
void call_LDKFutureCallback_jcall(const void* this_arg) {
LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
- js_invoke_function_void_(j_calls->instance_ptr, 78);
+ js_invoke_function_void_(j_calls->instance_ptr, 79);
}
static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) {
LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg;
LDKEvent *event_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
*event_copy = event;
int64_t event_ref = tag_ptr(event_copy, true);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 79, event_ref);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 80, event_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneReplayEventZ ret_conv = *(LDKCResult_NoneReplayEventZ*)(ret_ptr);
LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
LDKEventHandler* handler_ret = MALLOC(sizeof(LDKEventHandler), "LDKEventHandler");
*handler_ret = handler;
- js_invoke_function_void_l(j_calls->instance_ptr, 80, tag_ptr(handler_ret, true));
+ js_invoke_function_void_l(j_calls->instance_ptr, 81, tag_ptr(handler_ret, true));
}
static void LDKEventsProvider_JCalls_cloned(LDKEventsProvider* new_obj) {
LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) new_obj->this_arg;
(this_arg_conv->process_pending_events)(this_arg_conv->this_arg, handler_conv);
}
+typedef struct LDKVerification_JCalls {
+ atomic_size_t refcnt;
+ uint32_t instance_ptr;
+} LDKVerification_JCalls;
+static void LDKVerification_JCalls_free(void* this_arg) {
+ LDKVerification_JCalls *j_calls = (LDKVerification_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ FREE(j_calls);
+ }
+}
+LDKThirtyTwoBytes hmac_for_offer_payment_LDKVerification_jcall(const void* this_arg, LDKNonce nonce, const LDKExpandedKey * expanded_key) {
+ LDKVerification_JCalls *j_calls = (LDKVerification_JCalls*) this_arg;
+ LDKNonce nonce_var = nonce;
+ int64_t nonce_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_var);
+ nonce_ref = tag_ptr(nonce_var.inner, nonce_var.is_owned);
+ LDKExpandedKey expanded_key_var = *expanded_key;
+ int64_t expanded_key_ref = 0;
+ expanded_key_var = ExpandedKey_clone(&expanded_key_var);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_var);
+ expanded_key_ref = tag_ptr(expanded_key_var.inner, expanded_key_var.is_owned);
+ int8_tArray ret = (int8_tArray)js_invoke_function_l_ll(j_calls->instance_ptr, 82, nonce_ref, expanded_key_ref);
+ LDKThirtyTwoBytes ret_ref;
+ CHECK(ret->arr_len == 32);
+ memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
+ return ret_ref;
+}
+LDKCResult_NoneNoneZ verify_for_offer_payment_LDKVerification_jcall(const void* this_arg, LDKThirtyTwoBytes hmac, LDKNonce nonce, const LDKExpandedKey * expanded_key) {
+ LDKVerification_JCalls *j_calls = (LDKVerification_JCalls*) this_arg;
+ int8_tArray hmac_arr = init_int8_tArray(32, __LINE__);
+ memcpy(hmac_arr->elems, hmac.data, 32);
+ LDKNonce nonce_var = nonce;
+ int64_t nonce_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_var);
+ nonce_ref = tag_ptr(nonce_var.inner, nonce_var.is_owned);
+ LDKExpandedKey expanded_key_var = *expanded_key;
+ int64_t expanded_key_ref = 0;
+ expanded_key_var = ExpandedKey_clone(&expanded_key_var);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_var);
+ expanded_key_ref = tag_ptr(expanded_key_var.inner, expanded_key_var.is_owned);
+ uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 83, (int64_t)hmac_arr, nonce_ref, expanded_key_ref);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
+static void LDKVerification_JCalls_cloned(LDKVerification* new_obj) {
+ LDKVerification_JCalls *j_calls = (LDKVerification_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKVerification LDKVerification_init (int64_t o) {
+ LDKVerification_JCalls *calls = MALLOC(sizeof(LDKVerification_JCalls), "LDKVerification_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ calls->instance_ptr = o;
+
+ LDKVerification ret = {
+ .this_arg = (void*) calls,
+ .hmac_for_offer_payment = hmac_for_offer_payment_LDKVerification_jcall,
+ .verify_for_offer_payment = verify_for_offer_payment_LDKVerification_jcall,
+ .free = LDKVerification_JCalls_free,
+ };
+ return ret;
+}
+uint64_t CS_LDK_LDKVerification_new(int32_t o) {
+ LDKVerification *res_ptr = MALLOC(sizeof(LDKVerification), "LDKVerification");
+ *res_ptr = LDKVerification_init(o);
+ return tag_ptr(res_ptr, true);
+}
+int8_tArray CS_LDK_Verification_hmac_for_offer_payment(int64_t this_arg, int64_t nonce, int64_t expanded_key) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKVerification* this_arg_conv = (LDKVerification*)this_arg_ptr;
+ LDKNonce nonce_conv;
+ nonce_conv.inner = untag_ptr(nonce);
+ nonce_conv.is_owned = ptr_is_owned(nonce);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_conv);
+ nonce_conv = Nonce_clone(&nonce_conv);
+ 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;
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, (this_arg_conv->hmac_for_offer_payment)(this_arg_conv->this_arg, nonce_conv, &expanded_key_conv).data, 32);
+ return ret_arr;
+}
+
+int64_t CS_LDK_Verification_verify_for_offer_payment(int64_t this_arg, int8_tArray hmac, int64_t nonce, int64_t expanded_key) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKVerification* this_arg_conv = (LDKVerification*)this_arg_ptr;
+ LDKThirtyTwoBytes hmac_ref;
+ CHECK(hmac->arr_len == 32);
+ memcpy(hmac_ref.data, hmac->elems, 32); FREE(hmac);
+ LDKNonce nonce_conv;
+ nonce_conv.inner = untag_ptr(nonce);
+ nonce_conv.is_owned = ptr_is_owned(nonce);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_conv);
+ nonce_conv = Nonce_clone(&nonce_conv);
+ 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;
+ LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+ *ret_conv = (this_arg_conv->verify_for_offer_payment)(this_arg_conv->this_arg, hmac_ref, nonce_conv, &expanded_key_conv);
+ return tag_ptr(ret_conv, true);
+}
+
uint32_t CS_LDK_LDKFailureCode_ty_from_ptr(int64_t ptr) {
LDKFailureCode *obj = (LDKFailureCode*)untag_ptr(ptr);
switch(obj->tag) {
int64_t invalid_onion_payload_ref = tag_ptr(&obj->invalid_onion_payload, false);
return invalid_onion_payload_ref;
}
+uint32_t CS_LDK_LDKBolt11InvoiceDescription_ty_from_ptr(int64_t ptr) {
+ LDKBolt11InvoiceDescription *obj = (LDKBolt11InvoiceDescription*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKBolt11InvoiceDescription_Direct: return 0;
+ case LDKBolt11InvoiceDescription_Hash: return 1;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKBolt11InvoiceDescription_Direct_get_direct(int64_t ptr) {
+ LDKBolt11InvoiceDescription *obj = (LDKBolt11InvoiceDescription*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKBolt11InvoiceDescription_Direct);
+ LDKDescription direct_var = obj->direct;
+ int64_t direct_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(direct_var);
+ direct_ref = tag_ptr(direct_var.inner, false);
+ return direct_ref;
+}
+int64_t CS_LDK_LDKBolt11InvoiceDescription_Hash_get_hash(int64_t ptr) {
+ LDKBolt11InvoiceDescription *obj = (LDKBolt11InvoiceDescription*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKBolt11InvoiceDescription_Hash);
+ LDKSha256 hash_var = obj->hash;
+ int64_t hash_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(hash_var);
+ hash_ref = tag_ptr(hash_var.inner, false);
+ return hash_ref;
+}
typedef struct LDKMessageSendEventsProvider_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
}
LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_LDKMessageSendEventsProvider_jcall(const void* this_arg) {
LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
- int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 81);
+ int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 84);
LDKCVec_MessageSendEventZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
msg_var = OpenChannel_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 82, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 85, (int64_t)their_node_id_arr, msg_ref);
}
void handle_open_channel_v2_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKOpenChannelV2 * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = OpenChannelV2_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 83, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 86, (int64_t)their_node_id_arr, msg_ref);
}
void handle_accept_channel_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAcceptChannel * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = AcceptChannel_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 84, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 87, (int64_t)their_node_id_arr, msg_ref);
}
void handle_accept_channel_v2_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAcceptChannelV2 * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = AcceptChannelV2_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 85, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 88, (int64_t)their_node_id_arr, msg_ref);
}
void handle_funding_created_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = FundingCreated_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 86, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 89, (int64_t)their_node_id_arr, msg_ref);
}
void handle_funding_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = FundingSigned_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 87, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 90, (int64_t)their_node_id_arr, msg_ref);
}
void handle_channel_ready_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReady * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ChannelReady_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 88, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 91, (int64_t)their_node_id_arr, msg_ref);
}
void handle_shutdown_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKShutdown * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = Shutdown_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 89, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 92, (int64_t)their_node_id_arr, msg_ref);
}
void handle_closing_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ClosingSigned_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 90, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 93, (int64_t)their_node_id_arr, msg_ref);
}
void handle_stfu_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKStfu * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = Stfu_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 91, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 94, (int64_t)their_node_id_arr, msg_ref);
}
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;
msg_var = TxAddInput_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 92, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 95, (int64_t)their_node_id_arr, msg_ref);
}
void handle_tx_add_output_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAddOutput * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxAddOutput_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 93, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 96, (int64_t)their_node_id_arr, msg_ref);
}
void handle_tx_remove_input_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxRemoveInput * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxRemoveInput_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 94, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 97, (int64_t)their_node_id_arr, msg_ref);
}
void handle_tx_remove_output_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxRemoveOutput * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxRemoveOutput_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 95, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 98, (int64_t)their_node_id_arr, msg_ref);
}
void handle_tx_complete_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxComplete * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxComplete_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 96, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 99, (int64_t)their_node_id_arr, msg_ref);
}
void handle_tx_signatures_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxSignatures * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxSignatures_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 97, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 100, (int64_t)their_node_id_arr, msg_ref);
}
void handle_tx_init_rbf_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxInitRbf * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxInitRbf_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 98, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 101, (int64_t)their_node_id_arr, msg_ref);
}
void handle_tx_ack_rbf_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAckRbf * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxAckRbf_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 99, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 102, (int64_t)their_node_id_arr, msg_ref);
}
void handle_tx_abort_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAbort * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxAbort_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 100, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 103, (int64_t)their_node_id_arr, msg_ref);
}
void handle_update_add_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateAddHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 101, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 104, (int64_t)their_node_id_arr, msg_ref);
}
void handle_update_fulfill_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFulfillHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 102, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 105, (int64_t)their_node_id_arr, msg_ref);
}
void handle_update_fail_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFailHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 103, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 106, (int64_t)their_node_id_arr, msg_ref);
}
void handle_update_fail_malformed_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFailMalformedHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 104, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 107, (int64_t)their_node_id_arr, msg_ref);
}
void handle_commitment_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = CommitmentSigned_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 105, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 108, (int64_t)their_node_id_arr, msg_ref);
}
void handle_revoke_and_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = RevokeAndACK_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 106, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 109, (int64_t)their_node_id_arr, msg_ref);
}
void handle_update_fee_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFee_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 107, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 110, (int64_t)their_node_id_arr, msg_ref);
}
void handle_announcement_signatures_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = AnnouncementSignatures_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 108, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 111, (int64_t)their_node_id_arr, msg_ref);
}
void peer_disconnected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- js_invoke_function_void_l(j_calls->instance_ptr, 109, (int64_t)their_node_id_arr);
+ js_invoke_function_void_l(j_calls->instance_ptr, 112, (int64_t)their_node_id_arr);
}
LDKCResult_NoneNoneZ peer_connected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg, bool inbound) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
jboolean inbound_conv = inbound;
- uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 110, (int64_t)their_node_id_arr, msg_ref, inbound_conv);
+ uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 113, (int64_t)their_node_id_arr, msg_ref, inbound_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
msg_var = ChannelReestablish_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 111, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 114, (int64_t)their_node_id_arr, msg_ref);
}
void handle_channel_update_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelUpdate * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ChannelUpdate_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 112, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 115, (int64_t)their_node_id_arr, msg_ref);
}
void handle_error_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ErrorMessage_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 113, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 116, (int64_t)their_node_id_arr, msg_ref);
}
LDKNodeFeatures provided_node_features_LDKChannelMessageHandler_jcall(const void* this_arg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 114);
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 117);
LDKNodeFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 115, (int64_t)their_node_id_arr);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 118, (int64_t)their_node_id_arr);
LDKInitFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
}
LDKCOption_CVec_ThirtyTwoBytesZZ get_chain_hashes_LDKChannelMessageHandler_jcall(const void* this_arg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 116);
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 119);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCOption_CVec_ThirtyTwoBytesZZ ret_conv = *(LDKCOption_CVec_ThirtyTwoBytesZZ*)(ret_ptr);
FREE(untag_ptr(ret));
return ret_conv;
}
+void message_received_LDKChannelMessageHandler_jcall(const void* this_arg) {
+ LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+ js_invoke_function_void_(j_calls->instance_ptr, 120);
+}
static void LDKChannelMessageHandler_JCalls_cloned(LDKChannelMessageHandler* new_obj) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) new_obj->this_arg;
atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
.provided_node_features = provided_node_features_LDKChannelMessageHandler_jcall,
.provided_init_features = provided_init_features_LDKChannelMessageHandler_jcall,
.get_chain_hashes = get_chain_hashes_LDKChannelMessageHandler_jcall,
+ .message_received = message_received_LDKChannelMessageHandler_jcall,
.free = LDKChannelMessageHandler_JCalls_free,
.MessageSendEventsProvider = LDKMessageSendEventsProvider_init(MessageSendEventsProvider),
};
return ret_ref;
}
+void CS_LDK_ChannelMessageHandler_message_received(int64_t this_arg) {
+ 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;
+ (this_arg_conv->message_received)(this_arg_conv->this_arg);
+}
+
typedef struct LDKOffersMessageHandler_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
int64_t responder_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(responder_var);
responder_ref = tag_ptr(responder_var.inner, responder_var.is_owned);
- uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 117, message_ref, context_ref, responder_ref);
+ uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 121, message_ref, context_ref, responder_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCOption_C2Tuple_OffersMessageResponseInstructionZZ ret_conv = *(LDKCOption_C2Tuple_OffersMessageResponseInstructionZZ*)(ret_ptr);
}
LDKCVec_C2Tuple_OffersMessageMessageSendInstructionsZZ release_pending_messages_LDKOffersMessageHandler_jcall(const void* this_arg) {
LDKOffersMessageHandler_JCalls *j_calls = (LDKOffersMessageHandler_JCalls*) this_arg;
- int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 118);
+ int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 122);
LDKCVec_C2Tuple_OffersMessageMessageSendInstructionsZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
FREE(j_calls);
}
}
-LDKCOption_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ held_htlc_available_LDKAsyncPaymentsMessageHandler_jcall(const void* this_arg, LDKHeldHtlcAvailable message, LDKResponder responder) {
+LDKCOption_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ handle_held_htlc_available_LDKAsyncPaymentsMessageHandler_jcall(const void* this_arg, LDKHeldHtlcAvailable message, LDKResponder responder) {
LDKAsyncPaymentsMessageHandler_JCalls *j_calls = (LDKAsyncPaymentsMessageHandler_JCalls*) this_arg;
LDKHeldHtlcAvailable message_var = message;
int64_t message_ref = 0;
int64_t responder_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(responder_var);
responder_ref = tag_ptr(responder_var.inner, responder_var.is_owned);
- uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 119, message_ref, responder_ref);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 123, message_ref, responder_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCOption_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ ret_conv = *(LDKCOption_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ*)(ret_ptr);
FREE(untag_ptr(ret));
return ret_conv;
}
-void release_held_htlc_LDKAsyncPaymentsMessageHandler_jcall(const void* this_arg, LDKReleaseHeldHtlc message) {
+void handle_release_held_htlc_LDKAsyncPaymentsMessageHandler_jcall(const void* this_arg, LDKReleaseHeldHtlc message, LDKAsyncPaymentsContext context) {
LDKAsyncPaymentsMessageHandler_JCalls *j_calls = (LDKAsyncPaymentsMessageHandler_JCalls*) this_arg;
LDKReleaseHeldHtlc message_var = message;
int64_t message_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var);
message_ref = tag_ptr(message_var.inner, message_var.is_owned);
- js_invoke_function_void_l(j_calls->instance_ptr, 120, message_ref);
+ LDKAsyncPaymentsContext *context_copy = MALLOC(sizeof(LDKAsyncPaymentsContext), "LDKAsyncPaymentsContext");
+ *context_copy = context;
+ int64_t context_ref = tag_ptr(context_copy, true);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 124, message_ref, context_ref);
}
LDKCVec_C2Tuple_AsyncPaymentsMessageMessageSendInstructionsZZ release_pending_messages_LDKAsyncPaymentsMessageHandler_jcall(const void* this_arg) {
LDKAsyncPaymentsMessageHandler_JCalls *j_calls = (LDKAsyncPaymentsMessageHandler_JCalls*) this_arg;
- int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 121);
+ int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 125);
LDKCVec_C2Tuple_AsyncPaymentsMessageMessageSendInstructionsZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
LDKAsyncPaymentsMessageHandler ret = {
.this_arg = (void*) calls,
- .held_htlc_available = held_htlc_available_LDKAsyncPaymentsMessageHandler_jcall,
- .release_held_htlc = release_held_htlc_LDKAsyncPaymentsMessageHandler_jcall,
+ .handle_held_htlc_available = handle_held_htlc_available_LDKAsyncPaymentsMessageHandler_jcall,
+ .handle_release_held_htlc = handle_release_held_htlc_LDKAsyncPaymentsMessageHandler_jcall,
.release_pending_messages = release_pending_messages_LDKAsyncPaymentsMessageHandler_jcall,
.free = LDKAsyncPaymentsMessageHandler_JCalls_free,
};
*res_ptr = LDKAsyncPaymentsMessageHandler_init(o);
return tag_ptr(res_ptr, true);
}
-int64_t CS_LDK_AsyncPaymentsMessageHandler_held_htlc_available(int64_t this_arg, int64_t message, int64_t responder) {
+int64_t CS_LDK_AsyncPaymentsMessageHandler_handle_held_htlc_available(int64_t this_arg, int64_t message, int64_t responder) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKAsyncPaymentsMessageHandler* this_arg_conv = (LDKAsyncPaymentsMessageHandler*)this_arg_ptr;
CHECK_INNER_FIELD_ACCESS_OR_NULL(responder_conv);
responder_conv = Responder_clone(&responder_conv);
LDKCOption_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ), "LDKCOption_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ");
- *ret_copy = (this_arg_conv->held_htlc_available)(this_arg_conv->this_arg, message_conv, responder_conv);
+ *ret_copy = (this_arg_conv->handle_held_htlc_available)(this_arg_conv->this_arg, message_conv, responder_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-void CS_LDK_AsyncPaymentsMessageHandler_release_held_htlc(int64_t this_arg, int64_t message) {
+void CS_LDK_AsyncPaymentsMessageHandler_handle_release_held_htlc(int64_t this_arg, int64_t message, int64_t context) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKAsyncPaymentsMessageHandler* this_arg_conv = (LDKAsyncPaymentsMessageHandler*)this_arg_ptr;
message_conv.is_owned = ptr_is_owned(message);
CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv);
message_conv = ReleaseHeldHtlc_clone(&message_conv);
- (this_arg_conv->release_held_htlc)(this_arg_conv->this_arg, message_conv);
+ void* context_ptr = untag_ptr(context);
+ CHECK_ACCESS(context_ptr);
+ LDKAsyncPaymentsContext context_conv = *(LDKAsyncPaymentsContext*)(context_ptr);
+ context_conv = AsyncPaymentsContext_clone((LDKAsyncPaymentsContext*)untag_ptr(context));
+ (this_arg_conv->handle_release_held_htlc)(this_arg_conv->this_arg, message_conv, context_conv);
}
int64_tArray CS_LDK_AsyncPaymentsMessageHandler_release_pending_messages(int64_t this_arg) {
return ret_arr;
}
+typedef struct LDKDNSResolverMessageHandler_JCalls {
+ atomic_size_t refcnt;
+ uint32_t instance_ptr;
+} LDKDNSResolverMessageHandler_JCalls;
+static void LDKDNSResolverMessageHandler_JCalls_free(void* this_arg) {
+ LDKDNSResolverMessageHandler_JCalls *j_calls = (LDKDNSResolverMessageHandler_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ FREE(j_calls);
+ }
+}
+LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ handle_dnssec_query_LDKDNSResolverMessageHandler_jcall(const void* this_arg, LDKDNSSECQuery message, LDKResponder responder) {
+ LDKDNSResolverMessageHandler_JCalls *j_calls = (LDKDNSResolverMessageHandler_JCalls*) this_arg;
+ LDKDNSSECQuery message_var = message;
+ int64_t message_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var);
+ message_ref = tag_ptr(message_var.inner, message_var.is_owned);
+ LDKResponder responder_var = responder;
+ int64_t responder_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(responder_var);
+ responder_ref = tag_ptr(responder_var.inner, responder_var.is_owned);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 126, message_ref, responder_ref);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ ret_conv = *(LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
+void handle_dnssec_proof_LDKDNSResolverMessageHandler_jcall(const void* this_arg, LDKDNSSECProof message, LDKDNSResolverContext context) {
+ LDKDNSResolverMessageHandler_JCalls *j_calls = (LDKDNSResolverMessageHandler_JCalls*) this_arg;
+ LDKDNSSECProof message_var = message;
+ int64_t message_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var);
+ message_ref = tag_ptr(message_var.inner, message_var.is_owned);
+ LDKDNSResolverContext context_var = context;
+ int64_t context_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(context_var);
+ context_ref = tag_ptr(context_var.inner, context_var.is_owned);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 127, message_ref, context_ref);
+}
+LDKNodeFeatures provided_node_features_LDKDNSResolverMessageHandler_jcall(const void* this_arg) {
+ LDKDNSResolverMessageHandler_JCalls *j_calls = (LDKDNSResolverMessageHandler_JCalls*) this_arg;
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 128);
+ LDKNodeFeatures ret_conv;
+ ret_conv.inner = untag_ptr(ret);
+ ret_conv.is_owned = ptr_is_owned(ret);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv);
+ return ret_conv;
+}
+LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ release_pending_messages_LDKDNSResolverMessageHandler_jcall(const void* this_arg) {
+ LDKDNSResolverMessageHandler_JCalls *j_calls = (LDKDNSResolverMessageHandler_JCalls*) this_arg;
+ int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 129);
+ LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ ret_constr;
+ ret_constr.datalen = ret->arr_len;
+ if (ret_constr.datalen > 0)
+ ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ), "LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ Elements");
+ else
+ ret_constr.data = NULL;
+ int64_t* ret_vals = ret->elems;
+ for (size_t b = 0; b < ret_constr.datalen; b++) {
+ int64_t ret_conv_53 = ret_vals[b];
+ void* ret_conv_53_ptr = untag_ptr(ret_conv_53);
+ CHECK_ACCESS(ret_conv_53_ptr);
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ ret_conv_53_conv = *(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ*)(ret_conv_53_ptr);
+ FREE(untag_ptr(ret_conv_53));
+ ret_constr.data[b] = ret_conv_53_conv;
+ }
+ FREE(ret);
+ return ret_constr;
+}
+static void LDKDNSResolverMessageHandler_JCalls_cloned(LDKDNSResolverMessageHandler* new_obj) {
+ LDKDNSResolverMessageHandler_JCalls *j_calls = (LDKDNSResolverMessageHandler_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKDNSResolverMessageHandler LDKDNSResolverMessageHandler_init (int64_t o) {
+ LDKDNSResolverMessageHandler_JCalls *calls = MALLOC(sizeof(LDKDNSResolverMessageHandler_JCalls), "LDKDNSResolverMessageHandler_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ calls->instance_ptr = o;
+
+ LDKDNSResolverMessageHandler ret = {
+ .this_arg = (void*) calls,
+ .handle_dnssec_query = handle_dnssec_query_LDKDNSResolverMessageHandler_jcall,
+ .handle_dnssec_proof = handle_dnssec_proof_LDKDNSResolverMessageHandler_jcall,
+ .provided_node_features = provided_node_features_LDKDNSResolverMessageHandler_jcall,
+ .release_pending_messages = release_pending_messages_LDKDNSResolverMessageHandler_jcall,
+ .free = LDKDNSResolverMessageHandler_JCalls_free,
+ };
+ return ret;
+}
+uint64_t CS_LDK_LDKDNSResolverMessageHandler_new(int32_t o) {
+ LDKDNSResolverMessageHandler *res_ptr = MALLOC(sizeof(LDKDNSResolverMessageHandler), "LDKDNSResolverMessageHandler");
+ *res_ptr = LDKDNSResolverMessageHandler_init(o);
+ return tag_ptr(res_ptr, true);
+}
+int64_t CS_LDK_DNSResolverMessageHandler_handle_dnssec_query(int64_t this_arg, int64_t message, int64_t responder) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKDNSResolverMessageHandler* this_arg_conv = (LDKDNSResolverMessageHandler*)this_arg_ptr;
+ LDKDNSSECQuery 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 = DNSSECQuery_clone(&message_conv);
+ LDKResponder responder_conv;
+ responder_conv.inner = untag_ptr(responder);
+ responder_conv.is_owned = ptr_is_owned(responder);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(responder_conv);
+ responder_conv = Responder_clone(&responder_conv);
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ), "LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ");
+ *ret_copy = (this_arg_conv->handle_dnssec_query)(this_arg_conv->this_arg, message_conv, responder_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_DNSResolverMessageHandler_handle_dnssec_proof(int64_t this_arg, int64_t message, int64_t context) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKDNSResolverMessageHandler* this_arg_conv = (LDKDNSResolverMessageHandler*)this_arg_ptr;
+ LDKDNSSECProof 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 = DNSSECProof_clone(&message_conv);
+ LDKDNSResolverContext context_conv;
+ context_conv.inner = untag_ptr(context);
+ context_conv.is_owned = ptr_is_owned(context);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(context_conv);
+ context_conv = DNSResolverContext_clone(&context_conv);
+ (this_arg_conv->handle_dnssec_proof)(this_arg_conv->this_arg, message_conv, context_conv);
+}
+
+int64_t CS_LDK_DNSResolverMessageHandler_provided_node_features(int64_t this_arg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKDNSResolverMessageHandler* this_arg_conv = (LDKDNSResolverMessageHandler*)this_arg_ptr;
+ LDKNodeFeatures ret_var = (this_arg_conv->provided_node_features)(this_arg_conv->this_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;
+}
+
+int64_tArray CS_LDK_DNSResolverMessageHandler_release_pending_messages(int64_t this_arg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKDNSResolverMessageHandler* this_arg_conv = (LDKDNSResolverMessageHandler*)this_arg_ptr;
+ LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ ret_var = (this_arg_conv->release_pending_messages)(this_arg_conv->this_arg);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t b = 0; b < ret_var.datalen; b++) {
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ* ret_conv_53_conv = MALLOC(sizeof(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ), "LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ");
+ *ret_conv_53_conv = ret_var.data[b];
+ ret_arr_ptr[b] = tag_ptr(ret_conv_53_conv, true);
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
typedef struct LDKNodeIdLookUp_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
LDKPublicKey next_node_id_LDKNodeIdLookUp_jcall(const void* this_arg, uint64_t short_channel_id) {
LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg;
int64_t short_channel_id_conv = short_channel_id;
- int8_tArray ret = (int8_tArray)js_invoke_function_l_l(j_calls->instance_ptr, 122, short_channel_id_conv);
+ int8_tArray ret = (int8_tArray)js_invoke_function_l_l(j_calls->instance_ptr, 130, short_channel_id_conv);
LDKPublicKey ret_ref;
CHECK(ret->arr_len == 33);
memcpy(ret_ref.compressed_form, ret->elems, 33); FREE(ret);
FREE(j_calls);
}
}
-LDKCResult_boolLightningErrorZ handle_node_announcement_LDKRoutingMessageHandler_jcall(const void* this_arg, const LDKNodeAnnouncement * msg) {
+LDKCResult_boolLightningErrorZ handle_node_announcement_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKNodeAnnouncement * msg) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+ int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
LDKNodeAnnouncement msg_var = *msg;
int64_t msg_ref = 0;
msg_var = NodeAnnouncement_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 123, msg_ref);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 131, (int64_t)their_node_id_arr, msg_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
FREE(untag_ptr(ret));
return ret_conv;
}
-LDKCResult_boolLightningErrorZ handle_channel_announcement_LDKRoutingMessageHandler_jcall(const void* this_arg, const LDKChannelAnnouncement * msg) {
+LDKCResult_boolLightningErrorZ handle_channel_announcement_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelAnnouncement * msg) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+ int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
LDKChannelAnnouncement msg_var = *msg;
int64_t msg_ref = 0;
msg_var = ChannelAnnouncement_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 124, msg_ref);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 132, (int64_t)their_node_id_arr, msg_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
FREE(untag_ptr(ret));
return ret_conv;
}
-LDKCResult_boolLightningErrorZ handle_channel_update_LDKRoutingMessageHandler_jcall(const void* this_arg, const LDKChannelUpdate * msg) {
+LDKCResult_boolLightningErrorZ handle_channel_update_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelUpdate * msg) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+ int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
LDKChannelUpdate msg_var = *msg;
int64_t msg_ref = 0;
msg_var = ChannelUpdate_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 125, msg_ref);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 133, (int64_t)their_node_id_arr, msg_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcement_LDKRoutingMessageHandler_jcall(const void* this_arg, uint64_t starting_point) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
int64_t starting_point_conv = starting_point;
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 126, starting_point_conv);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 134, starting_point_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_conv = *(LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)(ret_ptr);
int64_t starting_point_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(starting_point_var);
starting_point_ref = tag_ptr(starting_point_var.inner, starting_point_var.is_owned);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 127, starting_point_ref);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 135, starting_point_ref);
LDKNodeAnnouncement ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var);
init_ref = tag_ptr(init_var.inner, init_var.is_owned);
jboolean inbound_conv = inbound;
- uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 128, (int64_t)their_node_id_arr, init_ref, inbound_conv);
+ uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 136, (int64_t)their_node_id_arr, init_ref, inbound_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
int64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 129, (int64_t)their_node_id_arr, msg_ref);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 137, (int64_t)their_node_id_arr, msg_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
int64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 130, (int64_t)their_node_id_arr, msg_ref);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 138, (int64_t)their_node_id_arr, msg_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
int64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 131, (int64_t)their_node_id_arr, msg_ref);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 139, (int64_t)their_node_id_arr, msg_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
int64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 132, (int64_t)their_node_id_arr, msg_ref);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 140, (int64_t)their_node_id_arr, msg_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
}
bool processing_queue_high_LDKRoutingMessageHandler_jcall(const void* this_arg) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
- return js_invoke_function_b_(j_calls->instance_ptr, 133);
+ return js_invoke_function_b_(j_calls->instance_ptr, 141);
}
LDKNodeFeatures provided_node_features_LDKRoutingMessageHandler_jcall(const void* this_arg) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 134);
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 142);
LDKNodeFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 135, (int64_t)their_node_id_arr);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 143, (int64_t)their_node_id_arr);
LDKInitFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
*res_ptr = LDKRoutingMessageHandler_init(o, MessageSendEventsProvider);
return tag_ptr(res_ptr, true);
}
-int64_t CS_LDK_RoutingMessageHandler_handle_node_announcement(int64_t this_arg, int64_t msg) {
+int64_t CS_LDK_RoutingMessageHandler_handle_node_announcement(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); }
LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg_ptr;
+ LDKPublicKey their_node_id_ref;
+ CHECK(their_node_id->arr_len == 33);
+ memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id);
LDKNodeAnnouncement 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;
LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
- *ret_conv = (this_arg_conv->handle_node_announcement)(this_arg_conv->this_arg, &msg_conv);
+ *ret_conv = (this_arg_conv->handle_node_announcement)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_RoutingMessageHandler_handle_channel_announcement(int64_t this_arg, int64_t msg) {
+int64_t CS_LDK_RoutingMessageHandler_handle_channel_announcement(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); }
LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg_ptr;
+ LDKPublicKey their_node_id_ref;
+ CHECK(their_node_id->arr_len == 33);
+ memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id);
LDKChannelAnnouncement 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;
LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
- *ret_conv = (this_arg_conv->handle_channel_announcement)(this_arg_conv->this_arg, &msg_conv);
+ *ret_conv = (this_arg_conv->handle_channel_announcement)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_RoutingMessageHandler_handle_channel_update(int64_t this_arg, int64_t msg) {
+int64_t CS_LDK_RoutingMessageHandler_handle_channel_update(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); }
LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg_ptr;
+ LDKPublicKey their_node_id_ref;
+ CHECK(their_node_id->arr_len == 33);
+ memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id);
LDKChannelUpdate 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;
LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
- *ret_conv = (this_arg_conv->handle_channel_update)(this_arg_conv->this_arg, &msg_conv);
+ *ret_conv = (this_arg_conv->handle_channel_update)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
return tag_ptr(ret_conv, true);
}
msg_var = OnionMessage_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 136, (int64_t)peer_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 144, (int64_t)peer_node_id_arr, msg_ref);
}
LDKOnionMessage next_onion_message_for_peer_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey peer_node_id) {
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
int8_tArray peer_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(peer_node_id_arr->elems, peer_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 137, (int64_t)peer_node_id_arr);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 145, (int64_t)peer_node_id_arr);
LDKOnionMessage ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var);
init_ref = tag_ptr(init_var.inner, init_var.is_owned);
jboolean inbound_conv = inbound;
- uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 138, (int64_t)their_node_id_arr, init_ref, inbound_conv);
+ uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 146, (int64_t)their_node_id_arr, init_ref, inbound_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- js_invoke_function_void_l(j_calls->instance_ptr, 139, (int64_t)their_node_id_arr);
+ js_invoke_function_void_l(j_calls->instance_ptr, 147, (int64_t)their_node_id_arr);
}
void timer_tick_occurred_LDKOnionMessageHandler_jcall(const void* this_arg) {
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
- js_invoke_function_void_(j_calls->instance_ptr, 140);
+ js_invoke_function_void_(j_calls->instance_ptr, 148);
}
LDKNodeFeatures provided_node_features_LDKOnionMessageHandler_jcall(const void* this_arg) {
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 141);
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 149);
LDKNodeFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 142, (int64_t)their_node_id_arr);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 150, (int64_t)their_node_id_arr);
LDKInitFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKu8slice buffer_var = buffer;
int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__);
memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen);
- uint64_t ret = js_invoke_function_l_sl(j_calls->instance_ptr, 143, message_type_conv, (int64_t)buffer_arr);
+ uint64_t ret = js_invoke_function_l_sl(j_calls->instance_ptr, 151, message_type_conv, (int64_t)buffer_arr);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_COption_TypeZDecodeErrorZ ret_conv = *(LDKCResult_COption_TypeZDecodeErrorZ*)(ret_ptr);
*msg_ret = msg;
int8_tArray sender_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(sender_node_id_arr->elems, sender_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 144, tag_ptr(msg_ret, true), (int64_t)sender_node_id_arr);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 152, tag_ptr(msg_ret, true), (int64_t)sender_node_id_arr);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
}
LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandler_jcall(const void* this_arg) {
LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg;
- int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 145);
+ int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 153);
LDKCVec_C2Tuple_PublicKeyTypeZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- js_invoke_function_void_l(j_calls->instance_ptr, 146, (int64_t)their_node_id_arr);
+ js_invoke_function_void_l(j_calls->instance_ptr, 154, (int64_t)their_node_id_arr);
}
LDKCResult_NoneNoneZ peer_connected_LDKCustomMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg, bool inbound) {
LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
jboolean inbound_conv = inbound;
- uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 147, (int64_t)their_node_id_arr, msg_ref, inbound_conv);
+ uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 155, (int64_t)their_node_id_arr, msg_ref, inbound_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
}
LDKNodeFeatures provided_node_features_LDKCustomMessageHandler_jcall(const void* this_arg) {
LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 148);
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 156);
LDKNodeFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 149, (int64_t)their_node_id_arr);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 157, (int64_t)their_node_id_arr);
LDKInitFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
int64_t responder_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(responder_var);
responder_ref = tag_ptr(responder_var.inner, responder_var.is_owned);
- uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 150, tag_ptr(message_ret, true), context_ref, responder_ref);
+ uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 158, tag_ptr(message_ret, true), context_ref, responder_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCOption_C2Tuple_OnionMessageContentsResponseInstructionZZ ret_conv = *(LDKCOption_C2Tuple_OnionMessageContentsResponseInstructionZZ*)(ret_ptr);
LDKu8slice buffer_var = buffer;
int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__);
memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen);
- uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 151, message_type_conv, (int64_t)buffer_arr);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 159, message_type_conv, (int64_t)buffer_arr);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_COption_OnionMessageContentsZDecodeErrorZ ret_conv = *(LDKCResult_COption_OnionMessageContentsZDecodeErrorZ*)(ret_ptr);
}
LDKCVec_C2Tuple_OnionMessageContentsMessageSendInstructionsZZ release_pending_custom_messages_LDKCustomOnionMessageHandler_jcall(const void* this_arg) {
LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
- int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 152);
+ int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 160);
LDKCVec_C2Tuple_OnionMessageContentsMessageSendInstructionsZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
int8_tArray data_arr = init_int8_tArray(data_var.datalen, __LINE__);
memcpy(data_arr->elems, data_var.data, data_var.datalen);
jboolean resume_read_conv = resume_read;
- return js_invoke_function_l_lb(j_calls->instance_ptr, 153, (int64_t)data_arr, resume_read_conv);
+ return js_invoke_function_l_lb(j_calls->instance_ptr, 161, (int64_t)data_arr, resume_read_conv);
}
void disconnect_socket_LDKSocketDescriptor_jcall(void* this_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
- js_invoke_function_void_(j_calls->instance_ptr, 154);
+ js_invoke_function_void_(j_calls->instance_ptr, 162);
}
bool eq_LDKSocketDescriptor_jcall(const void* this_arg, const LDKSocketDescriptor * other_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
LDKSocketDescriptor *other_arg_clone = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
*other_arg_clone = SocketDescriptor_clone(other_arg);
- return js_invoke_function_b_l(j_calls->instance_ptr, 155, tag_ptr(other_arg_clone, true));
+ return js_invoke_function_b_l(j_calls->instance_ptr, 163, tag_ptr(other_arg_clone, true));
}
uint64_t hash_LDKSocketDescriptor_jcall(const void* this_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
- return js_invoke_function_l_(j_calls->instance_ptr, 156);
+ return js_invoke_function_l_(j_calls->instance_ptr, 164);
}
static void LDKSocketDescriptor_JCalls_cloned(LDKSocketDescriptor* new_obj) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) new_obj->this_arg;
return ret_conv;
}
-uint32_t CS_LDK_LDKBolt12PaymentError_ty_from_ptr(int64_t ptr) {
- LDKBolt12PaymentError *obj = (LDKBolt12PaymentError*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKBolt12PaymentError_UnexpectedInvoice: return 0;
- case LDKBolt12PaymentError_DuplicateInvoice: return 1;
- case LDKBolt12PaymentError_UnknownRequiredFeatures: return 2;
- case LDKBolt12PaymentError_SendingFailed: return 3;
- default: abort();
- }
-}
-int32_t CS_LDK_LDKBolt12PaymentError_SendingFailed_get_sending_failed(int64_t ptr) {
- LDKBolt12PaymentError *obj = (LDKBolt12PaymentError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKBolt12PaymentError_SendingFailed);
- int32_t sending_failed_conv = LDKRetryableSendFailure_to_cs(obj->sending_failed);
- return sending_failed_conv;
-}
typedef struct LDKSignBolt12InvoiceFn_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
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);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 157, message_ref);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 165, message_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr);
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);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 158, message_ref);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 166, message_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr);
}
LDKCVec_u8Z write_LDKScore_jcall(const void* this_arg) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_l_(j_calls->instance_ptr, 159);
+ int8_tArray ret = (int8_tArray)js_invoke_function_l_(j_calls->instance_ptr, 167);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
FREE(must_pay_to_var.data);
int32_t target_feerate_sat_per_1000_weight_conv = target_feerate_sat_per_1000_weight;
- uint64_t ret = js_invoke_function_l_llli(j_calls->instance_ptr, 160, (int64_t)claim_id_arr, (int64_t)must_spend_arr, (int64_t)must_pay_to_arr, target_feerate_sat_per_1000_weight_conv);
+ uint64_t ret = js_invoke_function_l_llli(j_calls->instance_ptr, 168, (int64_t)claim_id_arr, (int64_t)must_spend_arr, (int64_t)must_pay_to_arr, target_feerate_sat_per_1000_weight_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_CoinSelectionNoneZ ret_conv = *(LDKCResult_CoinSelectionNoneZ*)(ret_ptr);
int8_tArray psbt_arr = init_int8_tArray(psbt_var.datalen, __LINE__);
memcpy(psbt_arr->elems, psbt_var.data, psbt_var.datalen);
CVec_u8Z_free(psbt_var);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 161, (int64_t)psbt_arr);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 169, (int64_t)psbt_arr);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr);
}
LDKCResult_CVec_UtxoZNoneZ list_confirmed_utxos_LDKWalletSource_jcall(const void* this_arg) {
LDKWalletSource_JCalls *j_calls = (LDKWalletSource_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 162);
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 170);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_CVec_UtxoZNoneZ ret_conv = *(LDKCResult_CVec_UtxoZNoneZ*)(ret_ptr);
}
LDKCResult_CVec_u8ZNoneZ get_change_script_LDKWalletSource_jcall(const void* this_arg) {
LDKWalletSource_JCalls *j_calls = (LDKWalletSource_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 163);
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 171);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_CVec_u8ZNoneZ ret_conv = *(LDKCResult_CVec_u8ZNoneZ*)(ret_ptr);
int8_tArray psbt_arr = init_int8_tArray(psbt_var.datalen, __LINE__);
memcpy(psbt_arr->elems, psbt_var.data, psbt_var.datalen);
CVec_u8Z_free(psbt_var);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 164, (int64_t)psbt_arr);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 172, (int64_t)psbt_arr);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_NoneAPIErrorZ_ok() {
- LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = CResult_NoneAPIErrorZ_ok();
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_NoneAPIErrorZ_err(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_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = CResult_NoneAPIErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_NoneAPIErrorZ_is_ok(int64_t o) {
- LDKCResult_NoneAPIErrorZ* o_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_NoneAPIErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_NoneAPIErrorZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_NoneAPIErrorZ _res_conv = *(LDKCResult_NoneAPIErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_NoneAPIErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_NoneAPIErrorZ_clone_ptr(LDKCResult_NoneAPIErrorZ *NONNULL_PTR arg) {
- LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = CResult_NoneAPIErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_NoneAPIErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_NoneAPIErrorZ* arg_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_NoneAPIErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_NoneAPIErrorZ_clone(int64_t orig) {
- LDKCResult_NoneAPIErrorZ* orig_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(orig);
- LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = CResult_NoneAPIErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-void CS_LDK_CVec_CResult_NoneAPIErrorZZ_free(int64_tArray _res) {
- LDKCVec_CResult_NoneAPIErrorZZ _res_constr;
- _res_constr.datalen = _res->arr_len;
- if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKCResult_NoneAPIErrorZ), "LDKCVec_CResult_NoneAPIErrorZZ Elements");
- else
- _res_constr.data = NULL;
- int64_t* _res_vals = _res->elems;
- for (size_t w = 0; w < _res_constr.datalen; w++) {
- int64_t _res_conv_22 = _res_vals[w];
- void* _res_conv_22_ptr = untag_ptr(_res_conv_22);
- CHECK_ACCESS(_res_conv_22_ptr);
- LDKCResult_NoneAPIErrorZ _res_conv_22_conv = *(LDKCResult_NoneAPIErrorZ*)(_res_conv_22_ptr);
- FREE(untag_ptr(_res_conv_22));
- _res_constr.data[w] = _res_conv_22_conv;
- }
- FREE(_res);
- CVec_CResult_NoneAPIErrorZZ_free(_res_constr);
-}
-
-void CS_LDK_CVec_APIErrorZ_free(int64_tArray _res) {
- LDKCVec_APIErrorZ _res_constr;
- _res_constr.datalen = _res->arr_len;
- if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKAPIError), "LDKCVec_APIErrorZ Elements");
- else
- _res_constr.data = NULL;
- int64_t* _res_vals = _res->elems;
- for (size_t k = 0; k < _res_constr.datalen; k++) {
- int64_t _res_conv_10 = _res_vals[k];
- void* _res_conv_10_ptr = untag_ptr(_res_conv_10);
- CHECK_ACCESS(_res_conv_10_ptr);
- LDKAPIError _res_conv_10_conv = *(LDKAPIError*)(_res_conv_10_ptr);
- FREE(untag_ptr(_res_conv_10));
- _res_constr.data[k] = _res_conv_10_conv;
- }
- FREE(_res);
- CVec_APIErrorZ_free(_res_constr);
-}
-
int64_t CS_LDK_COption_ThirtyTwoBytesZ_some(int8_tArray o) {
LDKThirtyTwoBytes o_ref;
CHECK(o->arr_len == 32);
return tag_ptr(ret_conv, true);
}
+static inline uint64_t C2Tuple_DNSResolverMessageResponseInstructionZ_clone_ptr(LDKC2Tuple_DNSResolverMessageResponseInstructionZ *NONNULL_PTR arg) {
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSResolverMessageResponseInstructionZ), "LDKC2Tuple_DNSResolverMessageResponseInstructionZ");
+ *ret_conv = C2Tuple_DNSResolverMessageResponseInstructionZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_C2Tuple_DNSResolverMessageResponseInstructionZ_clone_ptr(int64_t arg) {
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ* arg_conv = (LDKC2Tuple_DNSResolverMessageResponseInstructionZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_DNSResolverMessageResponseInstructionZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_C2Tuple_DNSResolverMessageResponseInstructionZ_clone(int64_t orig) {
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ* orig_conv = (LDKC2Tuple_DNSResolverMessageResponseInstructionZ*)untag_ptr(orig);
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSResolverMessageResponseInstructionZ), "LDKC2Tuple_DNSResolverMessageResponseInstructionZ");
+ *ret_conv = C2Tuple_DNSResolverMessageResponseInstructionZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_C2Tuple_DNSResolverMessageResponseInstructionZ_new(int64_t a, int64_t b) {
+ void* a_ptr = untag_ptr(a);
+ CHECK_ACCESS(a_ptr);
+ LDKDNSResolverMessage a_conv = *(LDKDNSResolverMessage*)(a_ptr);
+ a_conv = DNSResolverMessage_clone((LDKDNSResolverMessage*)untag_ptr(a));
+ LDKResponseInstruction 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 = ResponseInstruction_clone(&b_conv);
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSResolverMessageResponseInstructionZ), "LDKC2Tuple_DNSResolverMessageResponseInstructionZ");
+ *ret_conv = C2Tuple_DNSResolverMessageResponseInstructionZ_new(a_conv, b_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_C2Tuple_DNSResolverMessageResponseInstructionZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ _res_conv = *(LDKC2Tuple_DNSResolverMessageResponseInstructionZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_DNSResolverMessageResponseInstructionZ_free(_res_conv);
+}
+
+int64_t CS_LDK_COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_some(int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ o_conv = *(LDKC2Tuple_DNSResolverMessageResponseInstructionZ*)(o_ptr);
+ o_conv = C2Tuple_DNSResolverMessageResponseInstructionZ_clone((LDKC2Tuple_DNSResolverMessageResponseInstructionZ*)untag_ptr(o));
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ), "LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ");
+ *ret_copy = COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_some(o_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_none() {
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ), "LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ");
+ *ret_copy = COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ _res_conv = *(LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_free(_res_conv);
+}
+
+static inline uint64_t COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone_ptr(LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ *NONNULL_PTR arg) {
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ), "LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ");
+ *ret_copy = COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t CS_LDK_COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone_ptr(int64_t arg) {
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ* arg_conv = (LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone(int64_t orig) {
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ* orig_conv = (LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ*)untag_ptr(orig);
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ), "LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ");
+ *ret_copy = COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline uint64_t C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone_ptr(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ *NONNULL_PTR arg) {
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ), "LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ");
+ *ret_conv = C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone_ptr(int64_t arg) {
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ* arg_conv = (LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone(int64_t orig) {
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ* orig_conv = (LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ*)untag_ptr(orig);
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ), "LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ");
+ *ret_conv = C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_C2Tuple_DNSResolverMessageMessageSendInstructionsZ_new(int64_t a, int64_t b) {
+ void* a_ptr = untag_ptr(a);
+ CHECK_ACCESS(a_ptr);
+ LDKDNSResolverMessage a_conv = *(LDKDNSResolverMessage*)(a_ptr);
+ a_conv = DNSResolverMessage_clone((LDKDNSResolverMessage*)untag_ptr(a));
+ void* b_ptr = untag_ptr(b);
+ CHECK_ACCESS(b_ptr);
+ LDKMessageSendInstructions b_conv = *(LDKMessageSendInstructions*)(b_ptr);
+ b_conv = MessageSendInstructions_clone((LDKMessageSendInstructions*)untag_ptr(b));
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ), "LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ");
+ *ret_conv = C2Tuple_DNSResolverMessageMessageSendInstructionsZ_new(a_conv, b_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_C2Tuple_DNSResolverMessageMessageSendInstructionsZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ _res_conv = *(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_DNSResolverMessageMessageSendInstructionsZ_free(_res_conv);
+}
+
+void CS_LDK_CVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ_free(int64_tArray _res) {
+ LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ), "LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ Elements");
+ else
+ _res_constr.data = NULL;
+ int64_t* _res_vals = _res->elems;
+ for (size_t b = 0; b < _res_constr.datalen; b++) {
+ int64_t _res_conv_53 = _res_vals[b];
+ void* _res_conv_53_ptr = untag_ptr(_res_conv_53);
+ CHECK_ACCESS(_res_conv_53_ptr);
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ _res_conv_53_conv = *(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ*)(_res_conv_53_ptr);
+ FREE(untag_ptr(_res_conv_53));
+ _res_constr.data[b] = _res_conv_53_conv;
+ }
+ FREE(_res);
+ CVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ_free(_res_constr);
+}
+
+int64_t CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_ok(int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKDNSResolverMessage o_conv = *(LDKDNSResolverMessage*)(o_ptr);
+ o_conv = DNSResolverMessage_clone((LDKDNSResolverMessage*)untag_ptr(o));
+ LDKCResult_DNSResolverMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverMessageDecodeErrorZ), "LDKCResult_DNSResolverMessageDecodeErrorZ");
+ *ret_conv = CResult_DNSResolverMessageDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_err(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_DNSResolverMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverMessageDecodeErrorZ), "LDKCResult_DNSResolverMessageDecodeErrorZ");
+ *ret_conv = CResult_DNSResolverMessageDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_DNSResolverMessageDecodeErrorZ* o_conv = (LDKCResult_DNSResolverMessageDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_DNSResolverMessageDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_DNSResolverMessageDecodeErrorZ _res_conv = *(LDKCResult_DNSResolverMessageDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_DNSResolverMessageDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_DNSResolverMessageDecodeErrorZ_clone_ptr(LDKCResult_DNSResolverMessageDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_DNSResolverMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverMessageDecodeErrorZ), "LDKCResult_DNSResolverMessageDecodeErrorZ");
+ *ret_conv = CResult_DNSResolverMessageDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_DNSResolverMessageDecodeErrorZ* arg_conv = (LDKCResult_DNSResolverMessageDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_DNSResolverMessageDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_DNSResolverMessageDecodeErrorZ* orig_conv = (LDKCResult_DNSResolverMessageDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_DNSResolverMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverMessageDecodeErrorZ), "LDKCResult_DNSResolverMessageDecodeErrorZ");
+ *ret_conv = CResult_DNSResolverMessageDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_HumanReadableNameNoneZ_ok(int64_t o) {
+ LDKHumanReadableName 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 = HumanReadableName_clone(&o_conv);
+ LDKCResult_HumanReadableNameNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameNoneZ), "LDKCResult_HumanReadableNameNoneZ");
+ *ret_conv = CResult_HumanReadableNameNoneZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_HumanReadableNameNoneZ_err() {
+ LDKCResult_HumanReadableNameNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameNoneZ), "LDKCResult_HumanReadableNameNoneZ");
+ *ret_conv = CResult_HumanReadableNameNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_HumanReadableNameNoneZ_is_ok(int64_t o) {
+ LDKCResult_HumanReadableNameNoneZ* o_conv = (LDKCResult_HumanReadableNameNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_HumanReadableNameNoneZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_HumanReadableNameNoneZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_HumanReadableNameNoneZ _res_conv = *(LDKCResult_HumanReadableNameNoneZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_HumanReadableNameNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_HumanReadableNameNoneZ_clone_ptr(LDKCResult_HumanReadableNameNoneZ *NONNULL_PTR arg) {
+ LDKCResult_HumanReadableNameNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameNoneZ), "LDKCResult_HumanReadableNameNoneZ");
+ *ret_conv = CResult_HumanReadableNameNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_HumanReadableNameNoneZ_clone_ptr(int64_t arg) {
+ LDKCResult_HumanReadableNameNoneZ* arg_conv = (LDKCResult_HumanReadableNameNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_HumanReadableNameNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_HumanReadableNameNoneZ_clone(int64_t orig) {
+ LDKCResult_HumanReadableNameNoneZ* orig_conv = (LDKCResult_HumanReadableNameNoneZ*)untag_ptr(orig);
+ LDKCResult_HumanReadableNameNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameNoneZ), "LDKCResult_HumanReadableNameNoneZ");
+ *ret_conv = CResult_HumanReadableNameNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_HumanReadableNameDecodeErrorZ_ok(int64_t o) {
+ LDKHumanReadableName 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 = HumanReadableName_clone(&o_conv);
+ LDKCResult_HumanReadableNameDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameDecodeErrorZ), "LDKCResult_HumanReadableNameDecodeErrorZ");
+ *ret_conv = CResult_HumanReadableNameDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_HumanReadableNameDecodeErrorZ_err(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_HumanReadableNameDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameDecodeErrorZ), "LDKCResult_HumanReadableNameDecodeErrorZ");
+ *ret_conv = CResult_HumanReadableNameDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_HumanReadableNameDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_HumanReadableNameDecodeErrorZ* o_conv = (LDKCResult_HumanReadableNameDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_HumanReadableNameDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_HumanReadableNameDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_HumanReadableNameDecodeErrorZ _res_conv = *(LDKCResult_HumanReadableNameDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_HumanReadableNameDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_HumanReadableNameDecodeErrorZ_clone_ptr(LDKCResult_HumanReadableNameDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_HumanReadableNameDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameDecodeErrorZ), "LDKCResult_HumanReadableNameDecodeErrorZ");
+ *ret_conv = CResult_HumanReadableNameDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_HumanReadableNameDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_HumanReadableNameDecodeErrorZ* arg_conv = (LDKCResult_HumanReadableNameDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_HumanReadableNameDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_HumanReadableNameDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_HumanReadableNameDecodeErrorZ* orig_conv = (LDKCResult_HumanReadableNameDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_HumanReadableNameDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameDecodeErrorZ), "LDKCResult_HumanReadableNameDecodeErrorZ");
+ *ret_conv = CResult_HumanReadableNameDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+static inline uint64_t C2Tuple_DNSSECQueryDNSResolverContextZ_clone_ptr(LDKC2Tuple_DNSSECQueryDNSResolverContextZ *NONNULL_PTR arg) {
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSSECQueryDNSResolverContextZ), "LDKC2Tuple_DNSSECQueryDNSResolverContextZ");
+ *ret_conv = C2Tuple_DNSSECQueryDNSResolverContextZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_C2Tuple_DNSSECQueryDNSResolverContextZ_clone_ptr(int64_t arg) {
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ* arg_conv = (LDKC2Tuple_DNSSECQueryDNSResolverContextZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_DNSSECQueryDNSResolverContextZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_C2Tuple_DNSSECQueryDNSResolverContextZ_clone(int64_t orig) {
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ* orig_conv = (LDKC2Tuple_DNSSECQueryDNSResolverContextZ*)untag_ptr(orig);
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSSECQueryDNSResolverContextZ), "LDKC2Tuple_DNSSECQueryDNSResolverContextZ");
+ *ret_conv = C2Tuple_DNSSECQueryDNSResolverContextZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_C2Tuple_DNSSECQueryDNSResolverContextZ_new(int64_t a, int64_t b) {
+ LDKDNSSECQuery 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 = DNSSECQuery_clone(&a_conv);
+ LDKDNSResolverContext 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 = DNSResolverContext_clone(&b_conv);
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSSECQueryDNSResolverContextZ), "LDKC2Tuple_DNSSECQueryDNSResolverContextZ");
+ *ret_conv = C2Tuple_DNSSECQueryDNSResolverContextZ_new(a_conv, b_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_C2Tuple_DNSSECQueryDNSResolverContextZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ _res_conv = *(LDKC2Tuple_DNSSECQueryDNSResolverContextZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_DNSSECQueryDNSResolverContextZ_free(_res_conv);
+}
+
+int64_t CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_ok(int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ o_conv = *(LDKC2Tuple_DNSSECQueryDNSResolverContextZ*)(o_ptr);
+ o_conv = C2Tuple_DNSSECQueryDNSResolverContextZ_clone((LDKC2Tuple_DNSSECQueryDNSResolverContextZ*)untag_ptr(o));
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ), "LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ");
+ *ret_conv = CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_err() {
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ), "LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ");
+ *ret_conv = CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_is_ok(int64_t o) {
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* o_conv = (LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ _res_conv = *(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone_ptr(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ *NONNULL_PTR arg) {
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ), "LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ");
+ *ret_conv = CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone_ptr(int64_t arg) {
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* arg_conv = (LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone(int64_t orig) {
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* orig_conv = (LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ*)untag_ptr(orig);
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ), "LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ");
+ *ret_conv = CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+static inline uint64_t C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone_ptr(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ *NONNULL_PTR arg) {
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ), "LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ");
+ *ret_conv = C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone_ptr(int64_t arg) {
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ* arg_conv = (LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone(int64_t orig) {
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ* orig_conv = (LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)untag_ptr(orig);
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ), "LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ");
+ *ret_conv = C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_C2Tuple_HumanReadableNameThirtyTwoBytesZ_new(int64_t a, int8_tArray b) {
+ LDKHumanReadableName 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 = HumanReadableName_clone(&a_conv);
+ LDKThirtyTwoBytes b_ref;
+ CHECK(b->arr_len == 32);
+ memcpy(b_ref.data, b->elems, 32); FREE(b);
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ), "LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ");
+ *ret_conv = C2Tuple_HumanReadableNameThirtyTwoBytesZ_new(a_conv, b_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_C2Tuple_HumanReadableNameThirtyTwoBytesZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ _res_conv = *(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_HumanReadableNameThirtyTwoBytesZ_free(_res_conv);
+}
+
+void CS_LDK_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ_free(int64_tArray _res) {
+ LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ), "LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ Elements");
+ else
+ _res_constr.data = NULL;
+ int64_t* _res_vals = _res->elems;
+ 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_HumanReadableNameThirtyTwoBytesZ _res_conv_43_conv = *(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)(_res_conv_43_ptr);
+ FREE(untag_ptr(_res_conv_43));
+ _res_constr.data[r] = _res_conv_43_conv;
+ }
+ FREE(_res);
+ CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ_free(_res_constr);
+}
+
+static inline uint64_t C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone_ptr(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ *NONNULL_PTR arg) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ), "LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ");
+ *ret_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone_ptr(int64_t arg) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ* arg_conv = (LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone(int64_t orig) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ* orig_conv = (LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ*)untag_ptr(orig);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ), "LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ");
+ *ret_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_new(int64_tArray a, int64_t b) {
+ LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ a_constr;
+ a_constr.datalen = a->arr_len;
+ if (a_constr.datalen > 0)
+ a_constr.data = MALLOC(a_constr.datalen * sizeof(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ), "LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ Elements");
+ else
+ a_constr.data = NULL;
+ int64_t* a_vals = a->elems;
+ for (size_t r = 0; r < a_constr.datalen; r++) {
+ int64_t a_conv_43 = a_vals[r];
+ void* a_conv_43_ptr = untag_ptr(a_conv_43);
+ CHECK_ACCESS(a_conv_43_ptr);
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ a_conv_43_conv = *(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)(a_conv_43_ptr);
+ a_conv_43_conv = C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone((LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)untag_ptr(a_conv_43));
+ a_constr.data[r] = a_conv_43_conv;
+ }
+ FREE(a);
+ LDKOffer 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 = Offer_clone(&b_conv);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ), "LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ");
+ *ret_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_new(a_constr, b_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ _res_conv = *(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_free(_res_conv);
+}
+
+int64_t CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_some(int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ o_conv = *(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ*)(o_ptr);
+ o_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone((LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ*)untag_ptr(o));
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ");
+ *ret_copy = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_some(o_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_none() {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ");
+ *ret_copy = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ _res_conv = *(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_free(_res_conv);
+}
+
+static inline uint64_t COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone_ptr(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ *NONNULL_PTR arg) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ");
+ *ret_copy = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone_ptr(int64_t arg) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ* arg_conv = (LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone(int64_t orig) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ* orig_conv = (LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ*)untag_ptr(orig);
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ");
+ *ret_copy = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline uint64_t C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone_ptr(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ *NONNULL_PTR arg) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ), "LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ");
+ *ret_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone_ptr(int64_t arg) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ* arg_conv = (LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone(int64_t orig) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ* orig_conv = (LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ*)untag_ptr(orig);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ), "LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ");
+ *ret_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_new(int64_tArray a, jstring b) {
+ LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ a_constr;
+ a_constr.datalen = a->arr_len;
+ if (a_constr.datalen > 0)
+ a_constr.data = MALLOC(a_constr.datalen * sizeof(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ), "LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ Elements");
+ else
+ a_constr.data = NULL;
+ int64_t* a_vals = a->elems;
+ for (size_t r = 0; r < a_constr.datalen; r++) {
+ int64_t a_conv_43 = a_vals[r];
+ void* a_conv_43_ptr = untag_ptr(a_conv_43);
+ CHECK_ACCESS(a_conv_43_ptr);
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ a_conv_43_conv = *(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)(a_conv_43_ptr);
+ a_conv_43_conv = C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone((LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)untag_ptr(a_conv_43));
+ a_constr.data[r] = a_conv_43_conv;
+ }
+ FREE(a);
+ LDKStr b_conv = str_ref_to_owned_c(b);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ), "LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ");
+ *ret_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_new(a_constr, b_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ _res_conv = *(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_free(_res_conv);
+}
+
+int64_t CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_some(int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ o_conv = *(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ*)(o_ptr);
+ o_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone((LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ*)untag_ptr(o));
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ");
+ *ret_copy = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_some(o_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_none() {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ");
+ *ret_copy = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ _res_conv = *(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_free(_res_conv);
+}
+
+static inline uint64_t COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone_ptr(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ *NONNULL_PTR arg) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ");
+ *ret_copy = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone_ptr(int64_t arg) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ* arg_conv = (LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone(int64_t orig) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ* orig_conv = (LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ*)untag_ptr(orig);
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ");
+ *ret_copy = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
int64_t CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(int64_t o) {
LDKUnsignedBolt12Invoice o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
+void CS_LDK_CVec_BlindedPaymentPathZ_free(int64_tArray _res) {
+ LDKCVec_BlindedPaymentPathZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKBlindedPaymentPath), "LDKCVec_BlindedPaymentPathZ Elements");
+ else
+ _res_constr.data = NULL;
+ int64_t* _res_vals = _res->elems;
+ for (size_t u = 0; u < _res_constr.datalen; u++) {
+ int64_t _res_conv_20 = _res_vals[u];
+ LDKBlindedPaymentPath _res_conv_20_conv;
+ _res_conv_20_conv.inner = untag_ptr(_res_conv_20);
+ _res_conv_20_conv.is_owned = ptr_is_owned(_res_conv_20);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_20_conv);
+ _res_constr.data[u] = _res_conv_20_conv;
+ }
+ FREE(_res);
+ CVec_BlindedPaymentPathZ_free(_res_constr);
+}
+
void CS_LDK_CVec_StrZ_free(ptrArray _res) {
LDKCVec_StrZ _res_constr;
_res_constr.datalen = _res->arr_len;
return tag_ptr(ret_conv, true);
}
-void CS_LDK_CVec_BlindedPaymentPathZ_free(int64_tArray _res) {
- LDKCVec_BlindedPaymentPathZ _res_constr;
- _res_constr.datalen = _res->arr_len;
- if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKBlindedPaymentPath), "LDKCVec_BlindedPaymentPathZ Elements");
- else
- _res_constr.data = NULL;
- int64_t* _res_vals = _res->elems;
- for (size_t u = 0; u < _res_constr.datalen; u++) {
- int64_t _res_conv_20 = _res_vals[u];
- LDKBlindedPaymentPath _res_conv_20_conv;
- _res_conv_20_conv.inner = untag_ptr(_res_conv_20);
- _res_conv_20_conv.is_owned = ptr_is_owned(_res_conv_20);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_20_conv);
- _res_constr.data[u] = _res_conv_20_conv;
- }
- FREE(_res);
- CVec_BlindedPaymentPathZ_free(_res_constr);
-}
-
int64_t CS_LDK_CResult_CVec_BlindedPaymentPathZNoneZ_ok(int64_tArray o) {
LDKCVec_BlindedPaymentPathZ o_constr;
o_constr.datalen = o->arr_len;
return tag_ptr(ret_conv, true);
}
-void CS_LDK_CVec_PublicKeyZ_free(ptrArray _res) {
- LDKCVec_PublicKeyZ _res_constr;
- _res_constr.datalen = _res->arr_len;
- if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
- else
- _res_constr.data = NULL;
- int8_tArray* _res_vals = (void*) _res->elems;
- for (size_t i = 0; i < _res_constr.datalen; i++) {
- int8_tArray _res_conv_8 = _res_vals[i];
- LDKPublicKey _res_conv_8_ref;
- CHECK(_res_conv_8->arr_len == 33);
- memcpy(_res_conv_8_ref.compressed_form, _res_conv_8->elems, 33); FREE(_res_conv_8);
- _res_constr.data[i] = _res_conv_8_ref;
- }
- FREE(_res);
- CVec_PublicKeyZ_free(_res_constr);
-}
-
-int64_t CS_LDK_CResult_OnionMessagePathNoneZ_ok(int64_t o) {
- LDKOnionMessagePath 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 = OnionMessagePath_clone(&o_conv);
- LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
- *ret_conv = CResult_OnionMessagePathNoneZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_OnionMessagePathNoneZ_err() {
- LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
- *ret_conv = CResult_OnionMessagePathNoneZ_err();
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_OnionMessagePathNoneZ_is_ok(int64_t o) {
- LDKCResult_OnionMessagePathNoneZ* o_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(o);
- jboolean ret_conv = CResult_OnionMessagePathNoneZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_OnionMessagePathNoneZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_OnionMessagePathNoneZ _res_conv = *(LDKCResult_OnionMessagePathNoneZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_OnionMessagePathNoneZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_OnionMessagePathNoneZ_clone_ptr(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR arg) {
- LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
- *ret_conv = CResult_OnionMessagePathNoneZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_OnionMessagePathNoneZ_clone_ptr(int64_t arg) {
- LDKCResult_OnionMessagePathNoneZ* arg_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_OnionMessagePathNoneZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_OnionMessagePathNoneZ_clone(int64_t orig) {
- LDKCResult_OnionMessagePathNoneZ* orig_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(orig);
- LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
- *ret_conv = CResult_OnionMessagePathNoneZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_ok(int64_tArray o) {
- LDKCVec_BlindedMessagePathZ o_constr;
- o_constr.datalen = o->arr_len;
- if (o_constr.datalen > 0)
- o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKBlindedMessagePath), "LDKCVec_BlindedMessagePathZ Elements");
- else
- o_constr.data = NULL;
- int64_t* o_vals = o->elems;
- for (size_t u = 0; u < o_constr.datalen; u++) {
- int64_t o_conv_20 = o_vals[u];
- LDKBlindedMessagePath o_conv_20_conv;
- o_conv_20_conv.inner = untag_ptr(o_conv_20);
- o_conv_20_conv.is_owned = ptr_is_owned(o_conv_20);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv_20_conv);
- o_conv_20_conv = BlindedMessagePath_clone(&o_conv_20_conv);
- o_constr.data[u] = o_conv_20_conv;
- }
- FREE(o);
- LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
- *ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_ok(o_constr);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_err() {
- LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
- *ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_err();
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_is_ok(int64_t o) {
- LDKCResult_CVec_BlindedMessagePathZNoneZ* o_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(o);
- jboolean ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_CVec_BlindedMessagePathZNoneZ _res_conv = *(LDKCResult_CVec_BlindedMessagePathZNoneZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_CVec_BlindedMessagePathZNoneZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_CVec_BlindedMessagePathZNoneZ_clone_ptr(LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR arg) {
- LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
- *ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_clone_ptr(int64_t arg) {
- LDKCResult_CVec_BlindedMessagePathZNoneZ* arg_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_clone(int64_t orig) {
- LDKCResult_CVec_BlindedMessagePathZNoneZ* orig_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(orig);
- LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
- *ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-void CS_LDK_CVec_MessageForwardNodeZ_free(int64_tArray _res) {
- LDKCVec_MessageForwardNodeZ _res_constr;
- _res_constr.datalen = _res->arr_len;
- if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKMessageForwardNode), "LDKCVec_MessageForwardNodeZ Elements");
- else
- _res_constr.data = NULL;
- int64_t* _res_vals = _res->elems;
- for (size_t u = 0; u < _res_constr.datalen; u++) {
- int64_t _res_conv_20 = _res_vals[u];
- LDKMessageForwardNode _res_conv_20_conv;
- _res_conv_20_conv.inner = untag_ptr(_res_conv_20);
- _res_conv_20_conv.is_owned = ptr_is_owned(_res_conv_20);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_20_conv);
- _res_constr.data[u] = _res_conv_20_conv;
- }
- FREE(_res);
- CVec_MessageForwardNodeZ_free(_res_constr);
-}
-
int64_t CS_LDK_CResult_InFlightHtlcsDecodeErrorZ_ok(int64_t o) {
LDKInFlightHtlcs o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
+void CS_LDK_CVec_PublicKeyZ_free(ptrArray _res) {
+ LDKCVec_PublicKeyZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
+ else
+ _res_constr.data = NULL;
+ int8_tArray* _res_vals = (void*) _res->elems;
+ for (size_t i = 0; i < _res_constr.datalen; i++) {
+ int8_tArray _res_conv_8 = _res_vals[i];
+ LDKPublicKey _res_conv_8_ref;
+ CHECK(_res_conv_8->arr_len == 33);
+ memcpy(_res_conv_8_ref.compressed_form, _res_conv_8->elems, 33); FREE(_res_conv_8);
+ _res_constr.data[i] = _res_conv_8_ref;
+ }
+ FREE(_res);
+ CVec_PublicKeyZ_free(_res_constr);
+}
+
int64_t CS_LDK_CResult_FixedPenaltyScorerDecodeErrorZ_ok(int64_t o) {
LDKFixedPenaltyScorer o_conv;
o_conv.inner = untag_ptr(o);
CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(_res_constr);
}
-int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_ok(int64_t o) {
- LDKInitFeatures 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 = InitFeatures_clone(&o_conv);
- LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
- *ret_conv = CResult_InitFeaturesDecodeErrorZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_err(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_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
- *ret_conv = CResult_InitFeaturesDecodeErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_InitFeaturesDecodeErrorZ_is_ok(int64_t o) {
- LDKCResult_InitFeaturesDecodeErrorZ* o_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_InitFeaturesDecodeErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_InitFeaturesDecodeErrorZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_InitFeaturesDecodeErrorZ _res_conv = *(LDKCResult_InitFeaturesDecodeErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_InitFeaturesDecodeErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_InitFeaturesDecodeErrorZ_clone_ptr(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR arg) {
- LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
- *ret_conv = CResult_InitFeaturesDecodeErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_InitFeaturesDecodeErrorZ* arg_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_InitFeaturesDecodeErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_clone(int64_t orig) {
- LDKCResult_InitFeaturesDecodeErrorZ* orig_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(orig);
- LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
- *ret_conv = CResult_InitFeaturesDecodeErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_ok(int64_t o) {
- LDKChannelFeatures 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 = ChannelFeatures_clone(&o_conv);
- LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
- *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_err(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_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
- *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_is_ok(int64_t o) {
- LDKCResult_ChannelFeaturesDecodeErrorZ* o_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_ChannelFeaturesDecodeErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_ChannelFeaturesDecodeErrorZ _res_conv = *(LDKCResult_ChannelFeaturesDecodeErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_ChannelFeaturesDecodeErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_ChannelFeaturesDecodeErrorZ_clone_ptr(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR arg) {
- LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
- *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_ChannelFeaturesDecodeErrorZ* arg_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_ChannelFeaturesDecodeErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_clone(int64_t orig) {
- LDKCResult_ChannelFeaturesDecodeErrorZ* orig_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(orig);
- LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
- *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_ok(int64_t o) {
- LDKNodeFeatures 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 = NodeFeatures_clone(&o_conv);
- LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
- *ret_conv = CResult_NodeFeaturesDecodeErrorZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_err(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_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
- *ret_conv = CResult_NodeFeaturesDecodeErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_NodeFeaturesDecodeErrorZ_is_ok(int64_t o) {
- LDKCResult_NodeFeaturesDecodeErrorZ* o_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_NodeFeaturesDecodeErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_NodeFeaturesDecodeErrorZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_NodeFeaturesDecodeErrorZ _res_conv = *(LDKCResult_NodeFeaturesDecodeErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_NodeFeaturesDecodeErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_NodeFeaturesDecodeErrorZ_clone_ptr(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR arg) {
- LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
- *ret_conv = CResult_NodeFeaturesDecodeErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_NodeFeaturesDecodeErrorZ* arg_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_NodeFeaturesDecodeErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_clone(int64_t orig) {
- LDKCResult_NodeFeaturesDecodeErrorZ* orig_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(orig);
- LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
- *ret_conv = CResult_NodeFeaturesDecodeErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(int64_t o) {
- LDKBolt11InvoiceFeatures 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 = Bolt11InvoiceFeatures_clone(&o_conv);
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
- *ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_err(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_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
- *ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_is_ok(int64_t o) {
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* o_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ _res_conv = *(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone_ptr(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR arg) {
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
- *ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* arg_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone(int64_t orig) {
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* orig_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(orig);
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
- *ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(int64_t o) {
- LDKBolt12InvoiceFeatures 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 = Bolt12InvoiceFeatures_clone(&o_conv);
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
- *ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_err(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_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
- *ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_is_ok(int64_t o) {
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* o_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ _res_conv = *(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR arg) {
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
- *ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* arg_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone(int64_t orig) {
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* orig_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(orig);
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
- *ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_ok(int64_t o) {
- LDKBlindedHopFeatures 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 = BlindedHopFeatures_clone(&o_conv);
- LDKCResult_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
- *ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_err(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_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
- *ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_is_ok(int64_t o) {
- LDKCResult_BlindedHopFeaturesDecodeErrorZ* o_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_BlindedHopFeaturesDecodeErrorZ _res_conv = *(LDKCResult_BlindedHopFeaturesDecodeErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_BlindedHopFeaturesDecodeErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_BlindedHopFeaturesDecodeErrorZ_clone_ptr(LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR arg) {
- LDKCResult_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
- *ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_BlindedHopFeaturesDecodeErrorZ* arg_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_clone(int64_t orig) {
- LDKCResult_BlindedHopFeaturesDecodeErrorZ* orig_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(orig);
- LDKCResult_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
- *ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_ok(int64_t o) {
- LDKChannelTypeFeatures 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 = ChannelTypeFeatures_clone(&o_conv);
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
- *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_err(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_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
- *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(int64_t o) {
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ* o_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ _res_conv = *(LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_ChannelTypeFeaturesDecodeErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR arg) {
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
- *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ* arg_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_clone(int64_t orig) {
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ* orig_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(orig);
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
- *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
int64_t CS_LDK_CResult_OfferIdDecodeErrorZ_ok(int64_t o) {
LDKOfferId o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(int64_t o) {
- LDKInvoiceRequestWithDerivedPayerIdBuilder o_conv;
+int64_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_ok(int64_t o) {
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder 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
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder
- LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ");
- *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv);
+ LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(int32_t e) {
+int64_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_err(int32_t e) {
LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e);
- LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ");
- *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e_conv);
+ LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
-jboolean CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(int64_t o) {
- LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+jboolean CS_LDK_CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(int64_t o) {
+ LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv);
return ret_conv;
}
-void CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(int64_t _res) {
+void CS_LDK_CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_free(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);
+ LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv);
-}
-
-int64_t CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(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);
-}
-
-int64_t CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(int32_t e) {
- LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e);
- LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
- *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(int64_t o) {
- LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(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);
+ CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv);
}
int64_t CS_LDK_CResult_OfferDecodeErrorZ_ok(int64_t o) {
CVec_RecentPaymentDetailsZ_free(_res_constr);
}
-int64_t CS_LDK_CResult_NonePaymentSendFailureZ_ok() {
- LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
- *ret_conv = CResult_NonePaymentSendFailureZ_ok();
+int64_t CS_LDK_CResult_NoneAPIErrorZ_ok() {
+ LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+ *ret_conv = CResult_NoneAPIErrorZ_ok();
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_NonePaymentSendFailureZ_err(int64_t e) {
+int64_t CS_LDK_CResult_NoneAPIErrorZ_err(int64_t e) {
void* e_ptr = untag_ptr(e);
CHECK_ACCESS(e_ptr);
- LDKPaymentSendFailure e_conv = *(LDKPaymentSendFailure*)(e_ptr);
- e_conv = PaymentSendFailure_clone((LDKPaymentSendFailure*)untag_ptr(e));
- LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
- *ret_conv = CResult_NonePaymentSendFailureZ_err(e_conv);
+ LDKAPIError e_conv = *(LDKAPIError*)(e_ptr);
+ e_conv = APIError_clone((LDKAPIError*)untag_ptr(e));
+ LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+ *ret_conv = CResult_NoneAPIErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
-jboolean CS_LDK_CResult_NonePaymentSendFailureZ_is_ok(int64_t o) {
- LDKCResult_NonePaymentSendFailureZ* o_conv = (LDKCResult_NonePaymentSendFailureZ*)untag_ptr(o);
- jboolean ret_conv = CResult_NonePaymentSendFailureZ_is_ok(o_conv);
+jboolean CS_LDK_CResult_NoneAPIErrorZ_is_ok(int64_t o) {
+ LDKCResult_NoneAPIErrorZ* o_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_NoneAPIErrorZ_is_ok(o_conv);
return ret_conv;
}
-void CS_LDK_CResult_NonePaymentSendFailureZ_free(int64_t _res) {
+void CS_LDK_CResult_NoneAPIErrorZ_free(int64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKCResult_NonePaymentSendFailureZ _res_conv = *(LDKCResult_NonePaymentSendFailureZ*)(_res_ptr);
+ LDKCResult_NoneAPIErrorZ _res_conv = *(LDKCResult_NoneAPIErrorZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_NonePaymentSendFailureZ_free(_res_conv);
+ CResult_NoneAPIErrorZ_free(_res_conv);
}
-static inline uint64_t CResult_NonePaymentSendFailureZ_clone_ptr(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR arg) {
- LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
- *ret_conv = CResult_NonePaymentSendFailureZ_clone(arg);
+static inline uint64_t CResult_NoneAPIErrorZ_clone_ptr(LDKCResult_NoneAPIErrorZ *NONNULL_PTR arg) {
+ LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+ *ret_conv = CResult_NoneAPIErrorZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_NonePaymentSendFailureZ_clone_ptr(int64_t arg) {
- LDKCResult_NonePaymentSendFailureZ* arg_conv = (LDKCResult_NonePaymentSendFailureZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_NonePaymentSendFailureZ_clone_ptr(arg_conv);
+int64_t CS_LDK_CResult_NoneAPIErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_NoneAPIErrorZ* arg_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_NoneAPIErrorZ_clone_ptr(arg_conv);
return ret_conv;
}
-int64_t CS_LDK_CResult_NonePaymentSendFailureZ_clone(int64_t orig) {
- LDKCResult_NonePaymentSendFailureZ* orig_conv = (LDKCResult_NonePaymentSendFailureZ*)untag_ptr(orig);
- LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
- *ret_conv = CResult_NonePaymentSendFailureZ_clone(orig_conv);
+int64_t CS_LDK_CResult_NoneAPIErrorZ_clone(int64_t orig) {
+ LDKCResult_NoneAPIErrorZ* orig_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(orig);
+ LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+ *ret_conv = CResult_NoneAPIErrorZ_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_ok(int8_tArray o) {
- LDKThirtyTwoBytes o_ref;
- CHECK(o->arr_len == 32);
- memcpy(o_ref.data, o->elems, 32); FREE(o);
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ), "LDKCResult_ThirtyTwoBytesPaymentSendFailureZ");
- *ret_conv = CResult_ThirtyTwoBytesPaymentSendFailureZ_ok(o_ref);
+int64_t CS_LDK_COption_OffersContextZ_some(int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKOffersContext o_conv = *(LDKOffersContext*)(o_ptr);
+ o_conv = OffersContext_clone((LDKOffersContext*)untag_ptr(o));
+ LDKCOption_OffersContextZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersContextZ), "LDKCOption_OffersContextZ");
+ *ret_copy = COption_OffersContextZ_some(o_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_COption_OffersContextZ_none() {
+ LDKCOption_OffersContextZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersContextZ), "LDKCOption_OffersContextZ");
+ *ret_copy = COption_OffersContextZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_COption_OffersContextZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_OffersContextZ _res_conv = *(LDKCOption_OffersContextZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_OffersContextZ_free(_res_conv);
+}
+
+static inline uint64_t COption_OffersContextZ_clone_ptr(LDKCOption_OffersContextZ *NONNULL_PTR arg) {
+ LDKCOption_OffersContextZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersContextZ), "LDKCOption_OffersContextZ");
+ *ret_copy = COption_OffersContextZ_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t CS_LDK_COption_OffersContextZ_clone_ptr(int64_t arg) {
+ LDKCOption_OffersContextZ* arg_conv = (LDKCOption_OffersContextZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_OffersContextZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_COption_OffersContextZ_clone(int64_t orig) {
+ LDKCOption_OffersContextZ* orig_conv = (LDKCOption_OffersContextZ*)untag_ptr(orig);
+ LDKCOption_OffersContextZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersContextZ), "LDKCOption_OffersContextZ");
+ *ret_copy = COption_OffersContextZ_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_CResult_NoneBolt12PaymentErrorZ_ok() {
+ LDKCResult_NoneBolt12PaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12PaymentErrorZ), "LDKCResult_NoneBolt12PaymentErrorZ");
+ *ret_conv = CResult_NoneBolt12PaymentErrorZ_ok();
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_err(int64_t e) {
+int64_t CS_LDK_CResult_NoneBolt12PaymentErrorZ_err(int64_t e) {
void* e_ptr = untag_ptr(e);
CHECK_ACCESS(e_ptr);
- LDKPaymentSendFailure e_conv = *(LDKPaymentSendFailure*)(e_ptr);
- e_conv = PaymentSendFailure_clone((LDKPaymentSendFailure*)untag_ptr(e));
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ), "LDKCResult_ThirtyTwoBytesPaymentSendFailureZ");
- *ret_conv = CResult_ThirtyTwoBytesPaymentSendFailureZ_err(e_conv);
+ LDKBolt12PaymentError e_conv = *(LDKBolt12PaymentError*)(e_ptr);
+ e_conv = Bolt12PaymentError_clone((LDKBolt12PaymentError*)untag_ptr(e));
+ LDKCResult_NoneBolt12PaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12PaymentErrorZ), "LDKCResult_NoneBolt12PaymentErrorZ");
+ *ret_conv = CResult_NoneBolt12PaymentErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
-jboolean CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_is_ok(int64_t o) {
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* o_conv = (LDKCResult_ThirtyTwoBytesPaymentSendFailureZ*)untag_ptr(o);
- jboolean ret_conv = CResult_ThirtyTwoBytesPaymentSendFailureZ_is_ok(o_conv);
+jboolean CS_LDK_CResult_NoneBolt12PaymentErrorZ_is_ok(int64_t o) {
+ LDKCResult_NoneBolt12PaymentErrorZ* o_conv = (LDKCResult_NoneBolt12PaymentErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_NoneBolt12PaymentErrorZ_is_ok(o_conv);
return ret_conv;
}
-void CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_free(int64_t _res) {
+void CS_LDK_CResult_NoneBolt12PaymentErrorZ_free(int64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ _res_conv = *(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ*)(_res_ptr);
+ LDKCResult_NoneBolt12PaymentErrorZ _res_conv = *(LDKCResult_NoneBolt12PaymentErrorZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_ThirtyTwoBytesPaymentSendFailureZ_free(_res_conv);
+ CResult_NoneBolt12PaymentErrorZ_free(_res_conv);
}
-static inline uint64_t CResult_ThirtyTwoBytesPaymentSendFailureZ_clone_ptr(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ *NONNULL_PTR arg) {
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ), "LDKCResult_ThirtyTwoBytesPaymentSendFailureZ");
- *ret_conv = CResult_ThirtyTwoBytesPaymentSendFailureZ_clone(arg);
+static inline uint64_t CResult_NoneBolt12PaymentErrorZ_clone_ptr(LDKCResult_NoneBolt12PaymentErrorZ *NONNULL_PTR arg) {
+ LDKCResult_NoneBolt12PaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12PaymentErrorZ), "LDKCResult_NoneBolt12PaymentErrorZ");
+ *ret_conv = CResult_NoneBolt12PaymentErrorZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_clone_ptr(int64_t arg) {
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* arg_conv = (LDKCResult_ThirtyTwoBytesPaymentSendFailureZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_ThirtyTwoBytesPaymentSendFailureZ_clone_ptr(arg_conv);
+int64_t CS_LDK_CResult_NoneBolt12PaymentErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_NoneBolt12PaymentErrorZ* arg_conv = (LDKCResult_NoneBolt12PaymentErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_NoneBolt12PaymentErrorZ_clone_ptr(arg_conv);
return ret_conv;
}
-int64_t CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_clone(int64_t orig) {
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* orig_conv = (LDKCResult_ThirtyTwoBytesPaymentSendFailureZ*)untag_ptr(orig);
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ), "LDKCResult_ThirtyTwoBytesPaymentSendFailureZ");
- *ret_conv = CResult_ThirtyTwoBytesPaymentSendFailureZ_clone(orig_conv);
+int64_t CS_LDK_CResult_NoneBolt12PaymentErrorZ_clone(int64_t orig) {
+ LDKCResult_NoneBolt12PaymentErrorZ* orig_conv = (LDKCResult_NoneBolt12PaymentErrorZ*)untag_ptr(orig);
+ LDKCResult_NoneBolt12PaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12PaymentErrorZ), "LDKCResult_NoneBolt12PaymentErrorZ");
+ *ret_conv = CResult_NoneBolt12PaymentErrorZ_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_free(_res_conv);
}
-int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_ok(int64_t o) {
+int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_ok(int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ o_conv = *(LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ*)(o_ptr);
o_conv = C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_clone((LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ*)untag_ptr(o));
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ");
- *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_ok(o_conv);
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ");
+ *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_ok(o_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_err(int64_t e) {
+int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_err(int64_t e) {
void* e_ptr = untag_ptr(e);
CHECK_ACCESS(e_ptr);
- LDKPaymentSendFailure e_conv = *(LDKPaymentSendFailure*)(e_ptr);
- e_conv = PaymentSendFailure_clone((LDKPaymentSendFailure*)untag_ptr(e));
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ");
- *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_err(e_conv);
+ LDKProbeSendFailure e_conv = *(LDKProbeSendFailure*)(e_ptr);
+ e_conv = ProbeSendFailure_clone((LDKProbeSendFailure*)untag_ptr(e));
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ");
+ *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
-jboolean CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_is_ok(int64_t o) {
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* o_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ*)untag_ptr(o);
- jboolean ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_is_ok(o_conv);
+jboolean CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_is_ok(int64_t o) {
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* o_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_is_ok(o_conv);
return ret_conv;
}
-void CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_free(int64_t _res) {
+void CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_free(int64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ _res_conv = *(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ*)(_res_ptr);
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ _res_conv = *(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_free(_res_conv);
+ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_free(_res_conv);
}
-static inline uint64_t CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone_ptr(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ *NONNULL_PTR arg) {
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ");
- *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone(arg);
+static inline uint64_t CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone_ptr(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ *NONNULL_PTR arg) {
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ");
+ *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone_ptr(int64_t arg) {
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* arg_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone_ptr(arg_conv);
+int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone_ptr(int64_t arg) {
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* arg_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone_ptr(arg_conv);
return ret_conv;
}
-int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone(int64_t orig) {
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* orig_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ*)untag_ptr(orig);
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ");
- *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone(orig_conv);
+int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone(int64_t orig) {
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* orig_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ*)untag_ptr(orig);
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ");
+ *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
CVec_ChannelIdZ_free(_res_constr);
}
+static inline uint64_t C2Tuple_PublicKeyChannelIdZ_clone_ptr(LDKC2Tuple_PublicKeyChannelIdZ *NONNULL_PTR arg) {
+ LDKC2Tuple_PublicKeyChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyChannelIdZ), "LDKC2Tuple_PublicKeyChannelIdZ");
+ *ret_conv = C2Tuple_PublicKeyChannelIdZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_C2Tuple_PublicKeyChannelIdZ_clone_ptr(int64_t arg) {
+ LDKC2Tuple_PublicKeyChannelIdZ* arg_conv = (LDKC2Tuple_PublicKeyChannelIdZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_PublicKeyChannelIdZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_C2Tuple_PublicKeyChannelIdZ_clone(int64_t orig) {
+ LDKC2Tuple_PublicKeyChannelIdZ* orig_conv = (LDKC2Tuple_PublicKeyChannelIdZ*)untag_ptr(orig);
+ LDKC2Tuple_PublicKeyChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyChannelIdZ), "LDKC2Tuple_PublicKeyChannelIdZ");
+ *ret_conv = C2Tuple_PublicKeyChannelIdZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_C2Tuple_PublicKeyChannelIdZ_new(int8_tArray a, int64_t b) {
+ LDKPublicKey a_ref;
+ CHECK(a->arr_len == 33);
+ memcpy(a_ref.compressed_form, a->elems, 33); FREE(a);
+ 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_PublicKeyChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyChannelIdZ), "LDKC2Tuple_PublicKeyChannelIdZ");
+ *ret_conv = C2Tuple_PublicKeyChannelIdZ_new(a_ref, b_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_C2Tuple_PublicKeyChannelIdZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_PublicKeyChannelIdZ _res_conv = *(LDKC2Tuple_PublicKeyChannelIdZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_PublicKeyChannelIdZ_free(_res_conv);
+}
+
+int64_t CS_LDK_COption_C2Tuple_PublicKeyChannelIdZZ_some(int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKC2Tuple_PublicKeyChannelIdZ o_conv = *(LDKC2Tuple_PublicKeyChannelIdZ*)(o_ptr);
+ o_conv = C2Tuple_PublicKeyChannelIdZ_clone((LDKC2Tuple_PublicKeyChannelIdZ*)untag_ptr(o));
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_PublicKeyChannelIdZZ), "LDKCOption_C2Tuple_PublicKeyChannelIdZZ");
+ *ret_copy = COption_C2Tuple_PublicKeyChannelIdZZ_some(o_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_COption_C2Tuple_PublicKeyChannelIdZZ_none() {
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_PublicKeyChannelIdZZ), "LDKCOption_C2Tuple_PublicKeyChannelIdZZ");
+ *ret_copy = COption_C2Tuple_PublicKeyChannelIdZZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_COption_C2Tuple_PublicKeyChannelIdZZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ _res_conv = *(LDKCOption_C2Tuple_PublicKeyChannelIdZZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_C2Tuple_PublicKeyChannelIdZZ_free(_res_conv);
+}
+
+static inline uint64_t COption_C2Tuple_PublicKeyChannelIdZZ_clone_ptr(LDKCOption_C2Tuple_PublicKeyChannelIdZZ *NONNULL_PTR arg) {
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_PublicKeyChannelIdZZ), "LDKCOption_C2Tuple_PublicKeyChannelIdZZ");
+ *ret_copy = COption_C2Tuple_PublicKeyChannelIdZZ_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t CS_LDK_COption_C2Tuple_PublicKeyChannelIdZZ_clone_ptr(int64_t arg) {
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ* arg_conv = (LDKCOption_C2Tuple_PublicKeyChannelIdZZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_C2Tuple_PublicKeyChannelIdZZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_COption_C2Tuple_PublicKeyChannelIdZZ_clone(int64_t orig) {
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ* orig_conv = (LDKCOption_C2Tuple_PublicKeyChannelIdZZ*)untag_ptr(orig);
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_PublicKeyChannelIdZZ), "LDKCOption_C2Tuple_PublicKeyChannelIdZZ");
+ *ret_copy = COption_C2Tuple_PublicKeyChannelIdZZ_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(int64_t o) {
+ LDKBolt11Invoice 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 = Bolt11Invoice_clone(&o_conv);
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
+ *ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_err(int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKSignOrCreationError e_conv = *(LDKSignOrCreationError*)(e_ptr);
+ e_conv = SignOrCreationError_clone((LDKSignOrCreationError*)untag_ptr(e));
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
+ *ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_is_ok(int64_t o) {
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* o_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ _res_conv = *(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_Bolt11InvoiceSignOrCreationErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_Bolt11InvoiceSignOrCreationErrorZ_clone_ptr(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR arg) {
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
+ *ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* arg_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_clone(int64_t orig) {
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* orig_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(orig);
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
+ *ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
int64_t CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(int64_t o) {
LDKOfferWithDerivedMetadataBuilder o_conv;
o_conv.inner = untag_ptr(o);
return ret_ref;
}
+void CS_LDK_CVec_DestinationZ_free(int64_tArray _res) {
+ LDKCVec_DestinationZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKDestination), "LDKCVec_DestinationZ Elements");
+ else
+ _res_constr.data = NULL;
+ int64_t* _res_vals = _res->elems;
+ for (size_t n = 0; n < _res_constr.datalen; n++) {
+ int64_t _res_conv_13 = _res_vals[n];
+ void* _res_conv_13_ptr = untag_ptr(_res_conv_13);
+ CHECK_ACCESS(_res_conv_13_ptr);
+ LDKDestination _res_conv_13_conv = *(LDKDestination*)(_res_conv_13_ptr);
+ FREE(untag_ptr(_res_conv_13));
+ _res_constr.data[n] = _res_conv_13_conv;
+ }
+ FREE(_res);
+ CVec_DestinationZ_free(_res_constr);
+}
+
int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_COption_OffersContextZ_some(int64_t o) {
- void* o_ptr = untag_ptr(o);
- CHECK_ACCESS(o_ptr);
- LDKOffersContext o_conv = *(LDKOffersContext*)(o_ptr);
- o_conv = OffersContext_clone((LDKOffersContext*)untag_ptr(o));
- LDKCOption_OffersContextZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersContextZ), "LDKCOption_OffersContextZ");
- *ret_copy = COption_OffersContextZ_some(o_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_COption_OffersContextZ_none() {
- LDKCOption_OffersContextZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersContextZ), "LDKCOption_OffersContextZ");
- *ret_copy = COption_OffersContextZ_none();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-void CS_LDK_COption_OffersContextZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCOption_OffersContextZ _res_conv = *(LDKCOption_OffersContextZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- COption_OffersContextZ_free(_res_conv);
-}
-
-static inline uint64_t COption_OffersContextZ_clone_ptr(LDKCOption_OffersContextZ *NONNULL_PTR arg) {
- LDKCOption_OffersContextZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersContextZ), "LDKCOption_OffersContextZ");
- *ret_copy = COption_OffersContextZ_clone(arg);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-int64_t CS_LDK_COption_OffersContextZ_clone_ptr(int64_t arg) {
- LDKCOption_OffersContextZ* arg_conv = (LDKCOption_OffersContextZ*)untag_ptr(arg);
- int64_t ret_conv = COption_OffersContextZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_COption_OffersContextZ_clone(int64_t orig) {
- LDKCOption_OffersContextZ* orig_conv = (LDKCOption_OffersContextZ*)untag_ptr(orig);
- LDKCOption_OffersContextZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersContextZ), "LDKCOption_OffersContextZ");
- *ret_copy = COption_OffersContextZ_clone(orig_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
static inline uint64_t C2Tuple_OffersMessageResponseInstructionZ_clone_ptr(LDKC2Tuple_OffersMessageResponseInstructionZ *NONNULL_PTR arg) {
LDKC2Tuple_OffersMessageResponseInstructionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OffersMessageResponseInstructionZ), "LDKC2Tuple_OffersMessageResponseInstructionZ");
*ret_conv = C2Tuple_OffersMessageResponseInstructionZ_clone(arg);
CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZZ_free(_res_constr);
}
+static inline uint64_t C2Tuple_boolboolZ_clone_ptr(LDKC2Tuple_boolboolZ *NONNULL_PTR arg) {
+ LDKC2Tuple_boolboolZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_boolboolZ), "LDKC2Tuple_boolboolZ");
+ *ret_conv = C2Tuple_boolboolZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_C2Tuple_boolboolZ_clone_ptr(int64_t arg) {
+ LDKC2Tuple_boolboolZ* arg_conv = (LDKC2Tuple_boolboolZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_boolboolZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_C2Tuple_boolboolZ_clone(int64_t orig) {
+ LDKC2Tuple_boolboolZ* orig_conv = (LDKC2Tuple_boolboolZ*)untag_ptr(orig);
+ LDKC2Tuple_boolboolZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_boolboolZ), "LDKC2Tuple_boolboolZ");
+ *ret_conv = C2Tuple_boolboolZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_C2Tuple_boolboolZ_new(jboolean a, jboolean b) {
+ LDKC2Tuple_boolboolZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_boolboolZ), "LDKC2Tuple_boolboolZ");
+ *ret_conv = C2Tuple_boolboolZ_new(a, b);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_C2Tuple_boolboolZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_boolboolZ _res_conv = *(LDKC2Tuple_boolboolZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_boolboolZ_free(_res_conv);
+}
+
void CS_LDK_CVec_BalanceZ_free(int64_tArray _res) {
LDKCVec_BalanceZ _res_constr;
_res_constr.datalen = _res->arr_len;
return tag_ptr(ret_conv, true);
}
+static inline uint64_t C3Tuple_StrStrStrZ_clone_ptr(LDKC3Tuple_StrStrStrZ *NONNULL_PTR arg) {
+ LDKC3Tuple_StrStrStrZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_StrStrStrZ), "LDKC3Tuple_StrStrStrZ");
+ *ret_conv = C3Tuple_StrStrStrZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_C3Tuple_StrStrStrZ_clone_ptr(int64_t arg) {
+ LDKC3Tuple_StrStrStrZ* arg_conv = (LDKC3Tuple_StrStrStrZ*)untag_ptr(arg);
+ int64_t ret_conv = C3Tuple_StrStrStrZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_C3Tuple_StrStrStrZ_clone(int64_t orig) {
+ LDKC3Tuple_StrStrStrZ* orig_conv = (LDKC3Tuple_StrStrStrZ*)untag_ptr(orig);
+ LDKC3Tuple_StrStrStrZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_StrStrStrZ), "LDKC3Tuple_StrStrStrZ");
+ *ret_conv = C3Tuple_StrStrStrZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_C3Tuple_StrStrStrZ_new(jstring a, jstring b, jstring c) {
+ LDKStr a_conv = str_ref_to_owned_c(a);
+ LDKStr b_conv = str_ref_to_owned_c(b);
+ LDKStr c_conv = str_ref_to_owned_c(c);
+ LDKC3Tuple_StrStrStrZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_StrStrStrZ), "LDKC3Tuple_StrStrStrZ");
+ *ret_conv = C3Tuple_StrStrStrZ_new(a_conv, b_conv, c_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_C3Tuple_StrStrStrZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC3Tuple_StrStrStrZ _res_conv = *(LDKC3Tuple_StrStrStrZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C3Tuple_StrStrStrZ_free(_res_conv);
+}
+
+void CS_LDK_CVec_C3Tuple_StrStrStrZZ_free(int64_tArray _res) {
+ LDKCVec_C3Tuple_StrStrStrZZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_StrStrStrZ), "LDKCVec_C3Tuple_StrStrStrZZ Elements");
+ else
+ _res_constr.data = NULL;
+ int64_t* _res_vals = _res->elems;
+ for (size_t x = 0; x < _res_constr.datalen; x++) {
+ int64_t _res_conv_23 = _res_vals[x];
+ void* _res_conv_23_ptr = untag_ptr(_res_conv_23);
+ CHECK_ACCESS(_res_conv_23_ptr);
+ LDKC3Tuple_StrStrStrZ _res_conv_23_conv = *(LDKC3Tuple_StrStrStrZ*)(_res_conv_23_ptr);
+ FREE(untag_ptr(_res_conv_23));
+ _res_constr.data[x] = _res_conv_23_conv;
+ }
+ FREE(_res);
+ CVec_C3Tuple_StrStrStrZZ_free(_res_constr);
+}
+
+int64_t CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_ok(int64_tArray o) {
+ LDKCVec_C3Tuple_StrStrStrZZ o_constr;
+ o_constr.datalen = o->arr_len;
+ if (o_constr.datalen > 0)
+ o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKC3Tuple_StrStrStrZ), "LDKCVec_C3Tuple_StrStrStrZZ Elements");
+ else
+ o_constr.data = NULL;
+ int64_t* o_vals = o->elems;
+ for (size_t x = 0; x < o_constr.datalen; x++) {
+ int64_t o_conv_23 = o_vals[x];
+ void* o_conv_23_ptr = untag_ptr(o_conv_23);
+ CHECK_ACCESS(o_conv_23_ptr);
+ LDKC3Tuple_StrStrStrZ o_conv_23_conv = *(LDKC3Tuple_StrStrStrZ*)(o_conv_23_ptr);
+ o_conv_23_conv = C3Tuple_StrStrStrZ_clone((LDKC3Tuple_StrStrStrZ*)untag_ptr(o_conv_23));
+ o_constr.data[x] = o_conv_23_conv;
+ }
+ FREE(o);
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ), "LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ");
+ *ret_conv = CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_ok(o_constr);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_err(int32_t e) {
+ LDKIOError e_conv = LDKIOError_from_cs(e);
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ), "LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ");
+ *ret_conv = CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_is_ok(int64_t o) {
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* o_conv = (LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ _res_conv = *(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone_ptr(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ *NONNULL_PTR arg) {
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ), "LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ");
+ *ret_conv = CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* arg_conv = (LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone(int64_t orig) {
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* orig_conv = (LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ*)untag_ptr(orig);
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ), "LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ");
+ *ret_conv = CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
void CS_LDK_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ_free(int64_tArray _res) {
LDKCVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ _res_constr;
_res_constr.datalen = _res->arr_len;
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(int64_t o) {
- LDKUnsignedInvoiceRequest o_conv;
+int64_t CS_LDK_CResult_MonitorNameIOErrorZ_ok(int64_t o) {
+ LDKMonitorName 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);
+ // WARNING: we need a move here but no clone is available for LDKMonitorName
+
+ LDKCResult_MonitorNameIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_MonitorNameIOErrorZ), "LDKCResult_MonitorNameIOErrorZ");
+ *ret_conv = CResult_MonitorNameIOErrorZ_ok(o_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(int32_t e) {
- LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e);
- LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
- *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e_conv);
+int64_t CS_LDK_CResult_MonitorNameIOErrorZ_err(int32_t e) {
+ LDKIOError e_conv = LDKIOError_from_cs(e);
+ LDKCResult_MonitorNameIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_MonitorNameIOErrorZ), "LDKCResult_MonitorNameIOErrorZ");
+ *ret_conv = CResult_MonitorNameIOErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
-jboolean CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(int64_t o) {
- LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv);
+jboolean CS_LDK_CResult_MonitorNameIOErrorZ_is_ok(int64_t o) {
+ LDKCResult_MonitorNameIOErrorZ* o_conv = (LDKCResult_MonitorNameIOErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_MonitorNameIOErrorZ_is_ok(o_conv);
return ret_conv;
}
-void CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(int64_t _res) {
+void CS_LDK_CResult_MonitorNameIOErrorZ_free(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);
+ LDKCResult_MonitorNameIOErrorZ _res_conv = *(LDKCResult_MonitorNameIOErrorZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(_res_conv);
+ CResult_MonitorNameIOErrorZ_free(_res_conv);
+}
+
+int64_t CS_LDK_CResult_UpdateNameIOErrorZ_ok(int64_t o) {
+ LDKUpdateName 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 LDKUpdateName
+
+ LDKCResult_UpdateNameIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateNameIOErrorZ), "LDKCResult_UpdateNameIOErrorZ");
+ *ret_conv = CResult_UpdateNameIOErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
}
-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);
+int64_t CS_LDK_CResult_UpdateNameIOErrorZ_err(int32_t e) {
+ LDKIOError e_conv = LDKIOError_from_cs(e);
+ LDKCResult_UpdateNameIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateNameIOErrorZ), "LDKCResult_UpdateNameIOErrorZ");
+ *ret_conv = CResult_UpdateNameIOErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv);
+
+jboolean CS_LDK_CResult_UpdateNameIOErrorZ_is_ok(int64_t o) {
+ LDKCResult_UpdateNameIOErrorZ* o_conv = (LDKCResult_UpdateNameIOErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_UpdateNameIOErrorZ_is_ok(o_conv);
return ret_conv;
}
-int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(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);
+void CS_LDK_CResult_UpdateNameIOErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_UpdateNameIOErrorZ _res_conv = *(LDKCResult_UpdateNameIOErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_UpdateNameIOErrorZ_free(_res_conv);
}
int64_t CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_ok(int64_t o) {
CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv);
}
+int64_t CS_LDK_CResult_InvoiceRequestDecodeErrorZ_ok(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_InvoiceRequestDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestDecodeErrorZ), "LDKCResult_InvoiceRequestDecodeErrorZ");
+ *ret_conv = CResult_InvoiceRequestDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_InvoiceRequestDecodeErrorZ_err(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_InvoiceRequestDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestDecodeErrorZ), "LDKCResult_InvoiceRequestDecodeErrorZ");
+ *ret_conv = CResult_InvoiceRequestDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_InvoiceRequestDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_InvoiceRequestDecodeErrorZ* o_conv = (LDKCResult_InvoiceRequestDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_InvoiceRequestDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_InvoiceRequestDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_InvoiceRequestDecodeErrorZ _res_conv = *(LDKCResult_InvoiceRequestDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_InvoiceRequestDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_InvoiceRequestDecodeErrorZ_clone_ptr(LDKCResult_InvoiceRequestDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_InvoiceRequestDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestDecodeErrorZ), "LDKCResult_InvoiceRequestDecodeErrorZ");
+ *ret_conv = CResult_InvoiceRequestDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_InvoiceRequestDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_InvoiceRequestDecodeErrorZ* arg_conv = (LDKCResult_InvoiceRequestDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_InvoiceRequestDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_InvoiceRequestDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_InvoiceRequestDecodeErrorZ* orig_conv = (LDKCResult_InvoiceRequestDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_InvoiceRequestDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestDecodeErrorZ), "LDKCResult_InvoiceRequestDecodeErrorZ");
+ *ret_conv = CResult_InvoiceRequestDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
int64_t CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_ok(int64_t o) {
LDKInvoiceRequestFields o_conv;
o_conv.inner = untag_ptr(o);
}
int64_t CS_LDK_CResult_SiPrefixBolt11ParseErrorZ_err(int64_t e) {
- void* e_ptr = untag_ptr(e);
- CHECK_ACCESS(e_ptr);
- LDKBolt11ParseError e_conv = *(LDKBolt11ParseError*)(e_ptr);
- e_conv = Bolt11ParseError_clone((LDKBolt11ParseError*)untag_ptr(e));
+ LDKBolt11ParseError e_conv;
+ e_conv.inner = untag_ptr(e);
+ e_conv.is_owned = ptr_is_owned(e);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
+ e_conv = Bolt11ParseError_clone(&e_conv);
LDKCResult_SiPrefixBolt11ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SiPrefixBolt11ParseErrorZ), "LDKCResult_SiPrefixBolt11ParseErrorZ");
*ret_conv = CResult_SiPrefixBolt11ParseErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
int64_t CS_LDK_CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_err(int64_t e) {
- void* e_ptr = untag_ptr(e);
- CHECK_ACCESS(e_ptr);
- LDKBolt11ParseError e_conv = *(LDKBolt11ParseError*)(e_ptr);
- e_conv = Bolt11ParseError_clone((LDKBolt11ParseError*)untag_ptr(e));
+ LDKBolt11ParseError e_conv;
+ e_conv.inner = untag_ptr(e);
+ e_conv.is_owned = ptr_is_owned(e);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
+ e_conv = Bolt11ParseError_clone(&e_conv);
LDKCResult_SignedRawBolt11InvoiceBolt11ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SignedRawBolt11InvoiceBolt11ParseErrorZ), "LDKCResult_SignedRawBolt11InvoiceBolt11ParseErrorZ");
*ret_conv = CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
return tag_ptr(ret_conv, true);
}
+int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_ok(int64_t o) {
+ LDKInitFeatures 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 = InitFeatures_clone(&o_conv);
+ LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+ *ret_conv = CResult_InitFeaturesDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_err(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_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+ *ret_conv = CResult_InitFeaturesDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_InitFeaturesDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_InitFeaturesDecodeErrorZ* o_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_InitFeaturesDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_InitFeaturesDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_InitFeaturesDecodeErrorZ _res_conv = *(LDKCResult_InitFeaturesDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_InitFeaturesDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_InitFeaturesDecodeErrorZ_clone_ptr(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+ *ret_conv = CResult_InitFeaturesDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_InitFeaturesDecodeErrorZ* arg_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_InitFeaturesDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_InitFeaturesDecodeErrorZ* orig_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+ *ret_conv = CResult_InitFeaturesDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_ok(int64_t o) {
+ LDKChannelFeatures 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 = ChannelFeatures_clone(&o_conv);
+ LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+ *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_err(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_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+ *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_ChannelFeaturesDecodeErrorZ* o_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_ChannelFeaturesDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_ChannelFeaturesDecodeErrorZ _res_conv = *(LDKCResult_ChannelFeaturesDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_ChannelFeaturesDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_ChannelFeaturesDecodeErrorZ_clone_ptr(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+ *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_ChannelFeaturesDecodeErrorZ* arg_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_ChannelFeaturesDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_ChannelFeaturesDecodeErrorZ* orig_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+ *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_ok(int64_t o) {
+ LDKNodeFeatures 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 = NodeFeatures_clone(&o_conv);
+ LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+ *ret_conv = CResult_NodeFeaturesDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_err(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_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+ *ret_conv = CResult_NodeFeaturesDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_NodeFeaturesDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_NodeFeaturesDecodeErrorZ* o_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_NodeFeaturesDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_NodeFeaturesDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_NodeFeaturesDecodeErrorZ _res_conv = *(LDKCResult_NodeFeaturesDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_NodeFeaturesDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_NodeFeaturesDecodeErrorZ_clone_ptr(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+ *ret_conv = CResult_NodeFeaturesDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_NodeFeaturesDecodeErrorZ* arg_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_NodeFeaturesDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_NodeFeaturesDecodeErrorZ* orig_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+ *ret_conv = CResult_NodeFeaturesDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(int64_t o) {
+ LDKBolt11InvoiceFeatures 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 = Bolt11InvoiceFeatures_clone(&o_conv);
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_err(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_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* o_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ _res_conv = *(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone_ptr(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* arg_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* orig_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(int64_t o) {
+ LDKBolt12InvoiceFeatures 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 = Bolt12InvoiceFeatures_clone(&o_conv);
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_err(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_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* o_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ _res_conv = *(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* arg_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* orig_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_ok(int64_t o) {
+ LDKBlindedHopFeatures 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 = BlindedHopFeatures_clone(&o_conv);
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
+ *ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_err(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_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
+ *ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ* o_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ _res_conv = *(LDKCResult_BlindedHopFeaturesDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_BlindedHopFeaturesDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_BlindedHopFeaturesDecodeErrorZ_clone_ptr(LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
+ *ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ* arg_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ* orig_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
+ *ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_ok(int64_t o) {
+ LDKChannelTypeFeatures 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 = ChannelTypeFeatures_clone(&o_conv);
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
+ *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_err(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_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
+ *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ* o_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ _res_conv = *(LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_ChannelTypeFeaturesDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
+ *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ* arg_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ* orig_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
+ *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_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);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_ok(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);
-}
-
-int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_err(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);
-}
-
-jboolean CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_is_ok(int64_t o) {
- LDKCResult_UnknownPaymentContextDecodeErrorZ* o_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_free(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);
-}
-int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(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;
-}
-
-int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_clone(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);
-}
-
int64_t CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_ok(int64_t o) {
LDKBolt12OfferContext o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
+int64_t CS_LDK_CResult_OnionMessagePathNoneZ_ok(int64_t o) {
+ LDKOnionMessagePath 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 = OnionMessagePath_clone(&o_conv);
+ LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
+ *ret_conv = CResult_OnionMessagePathNoneZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_OnionMessagePathNoneZ_err() {
+ LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
+ *ret_conv = CResult_OnionMessagePathNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_OnionMessagePathNoneZ_is_ok(int64_t o) {
+ LDKCResult_OnionMessagePathNoneZ* o_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_OnionMessagePathNoneZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_OnionMessagePathNoneZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_OnionMessagePathNoneZ _res_conv = *(LDKCResult_OnionMessagePathNoneZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_OnionMessagePathNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OnionMessagePathNoneZ_clone_ptr(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR arg) {
+ LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
+ *ret_conv = CResult_OnionMessagePathNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_OnionMessagePathNoneZ_clone_ptr(int64_t arg) {
+ LDKCResult_OnionMessagePathNoneZ* arg_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_OnionMessagePathNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_OnionMessagePathNoneZ_clone(int64_t orig) {
+ LDKCResult_OnionMessagePathNoneZ* orig_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(orig);
+ LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
+ *ret_conv = CResult_OnionMessagePathNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_ok(int64_tArray o) {
+ LDKCVec_BlindedMessagePathZ o_constr;
+ o_constr.datalen = o->arr_len;
+ if (o_constr.datalen > 0)
+ o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKBlindedMessagePath), "LDKCVec_BlindedMessagePathZ Elements");
+ else
+ o_constr.data = NULL;
+ int64_t* o_vals = o->elems;
+ for (size_t u = 0; u < o_constr.datalen; u++) {
+ int64_t o_conv_20 = o_vals[u];
+ LDKBlindedMessagePath o_conv_20_conv;
+ o_conv_20_conv.inner = untag_ptr(o_conv_20);
+ o_conv_20_conv.is_owned = ptr_is_owned(o_conv_20);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv_20_conv);
+ o_conv_20_conv = BlindedMessagePath_clone(&o_conv_20_conv);
+ o_constr.data[u] = o_conv_20_conv;
+ }
+ FREE(o);
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
+ *ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_ok(o_constr);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_err() {
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
+ *ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_is_ok(int64_t o) {
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* o_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_CVec_BlindedMessagePathZNoneZ _res_conv = *(LDKCResult_CVec_BlindedMessagePathZNoneZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_CVec_BlindedMessagePathZNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_CVec_BlindedMessagePathZNoneZ_clone_ptr(LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR arg) {
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
+ *ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_clone_ptr(int64_t arg) {
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* arg_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_clone(int64_t orig) {
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* orig_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(orig);
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
+ *ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_CVec_MessageForwardNodeZ_free(int64_tArray _res) {
+ LDKCVec_MessageForwardNodeZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKMessageForwardNode), "LDKCVec_MessageForwardNodeZ Elements");
+ else
+ _res_constr.data = NULL;
+ int64_t* _res_vals = _res->elems;
+ for (size_t u = 0; u < _res_constr.datalen; u++) {
+ int64_t _res_conv_20 = _res_vals[u];
+ LDKMessageForwardNode _res_conv_20_conv;
+ _res_conv_20_conv.inner = untag_ptr(_res_conv_20);
+ _res_conv_20_conv.is_owned = ptr_is_owned(_res_conv_20);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_20_conv);
+ _res_constr.data[u] = _res_conv_20_conv;
+ }
+ FREE(_res);
+ CVec_MessageForwardNodeZ_free(_res_constr);
+}
+
int64_t CS_LDK_COption_MessageContextZ_some(int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
CVec_PhantomRouteHintsZ_free(_res_constr);
}
-int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(int64_t o) {
- LDKBolt11Invoice 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 = Bolt11Invoice_clone(&o_conv);
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
- *ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_err(int64_t e) {
- void* e_ptr = untag_ptr(e);
- CHECK_ACCESS(e_ptr);
- LDKSignOrCreationError e_conv = *(LDKSignOrCreationError*)(e_ptr);
- e_conv = SignOrCreationError_clone((LDKSignOrCreationError*)untag_ptr(e));
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
- *ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_is_ok(int64_t o) {
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* o_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ _res_conv = *(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_Bolt11InvoiceSignOrCreationErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_Bolt11InvoiceSignOrCreationErrorZ_clone_ptr(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR arg) {
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
- *ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* arg_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_clone(int64_t orig) {
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* orig_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(orig);
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
- *ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
int64_t CS_LDK_CResult_InvoiceErrorDecodeErrorZ_ok(int64_t o) {
LDKInvoiceError o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
+int64_t CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_ok(int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKAsyncPaymentsContext o_conv = *(LDKAsyncPaymentsContext*)(o_ptr);
+ o_conv = AsyncPaymentsContext_clone((LDKAsyncPaymentsContext*)untag_ptr(o));
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AsyncPaymentsContextDecodeErrorZ), "LDKCResult_AsyncPaymentsContextDecodeErrorZ");
+ *ret_conv = CResult_AsyncPaymentsContextDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_err(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_AsyncPaymentsContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AsyncPaymentsContextDecodeErrorZ), "LDKCResult_AsyncPaymentsContextDecodeErrorZ");
+ *ret_conv = CResult_AsyncPaymentsContextDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ* o_conv = (LDKCResult_AsyncPaymentsContextDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_AsyncPaymentsContextDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ _res_conv = *(LDKCResult_AsyncPaymentsContextDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_AsyncPaymentsContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_AsyncPaymentsContextDecodeErrorZ_clone_ptr(LDKCResult_AsyncPaymentsContextDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AsyncPaymentsContextDecodeErrorZ), "LDKCResult_AsyncPaymentsContextDecodeErrorZ");
+ *ret_conv = CResult_AsyncPaymentsContextDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ* arg_conv = (LDKCResult_AsyncPaymentsContextDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_AsyncPaymentsContextDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ* orig_conv = (LDKCResult_AsyncPaymentsContextDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AsyncPaymentsContextDecodeErrorZ), "LDKCResult_AsyncPaymentsContextDecodeErrorZ");
+ *ret_conv = CResult_AsyncPaymentsContextDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_DNSResolverContextDecodeErrorZ_ok(int64_t o) {
+ LDKDNSResolverContext 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 = DNSResolverContext_clone(&o_conv);
+ LDKCResult_DNSResolverContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverContextDecodeErrorZ), "LDKCResult_DNSResolverContextDecodeErrorZ");
+ *ret_conv = CResult_DNSResolverContextDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_DNSResolverContextDecodeErrorZ_err(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_DNSResolverContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverContextDecodeErrorZ), "LDKCResult_DNSResolverContextDecodeErrorZ");
+ *ret_conv = CResult_DNSResolverContextDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_DNSResolverContextDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_DNSResolverContextDecodeErrorZ* o_conv = (LDKCResult_DNSResolverContextDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_DNSResolverContextDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_DNSResolverContextDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_DNSResolverContextDecodeErrorZ _res_conv = *(LDKCResult_DNSResolverContextDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_DNSResolverContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_DNSResolverContextDecodeErrorZ_clone_ptr(LDKCResult_DNSResolverContextDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_DNSResolverContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverContextDecodeErrorZ), "LDKCResult_DNSResolverContextDecodeErrorZ");
+ *ret_conv = CResult_DNSResolverContextDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_DNSResolverContextDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_DNSResolverContextDecodeErrorZ* arg_conv = (LDKCResult_DNSResolverContextDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_DNSResolverContextDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_DNSResolverContextDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_DNSResolverContextDecodeErrorZ* orig_conv = (LDKCResult_DNSResolverContextDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_DNSResolverContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverContextDecodeErrorZ), "LDKCResult_DNSResolverContextDecodeErrorZ");
+ *ret_conv = CResult_DNSResolverContextDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
void CS_LDK_APIError_free(int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
KVStore_free(this_ptr_conv);
}
+void CS_LDK_MigratableKVStore_free(int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKMigratableKVStore this_ptr_conv = *(LDKMigratableKVStore*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ MigratableKVStore_free(this_ptr_conv);
+}
+
+int64_t CS_LDK_migrate_kv_store_data(int64_t source_store, int64_t target_store) {
+ void* source_store_ptr = untag_ptr(source_store);
+ if (ptr_is_owned(source_store)) { CHECK_ACCESS(source_store_ptr); }
+ LDKMigratableKVStore* source_store_conv = (LDKMigratableKVStore*)source_store_ptr;
+ void* target_store_ptr = untag_ptr(target_store);
+ if (ptr_is_owned(target_store)) { CHECK_ACCESS(target_store_ptr); }
+ LDKMigratableKVStore* target_store_conv = (LDKMigratableKVStore*)target_store_ptr;
+ LDKCResult_NoneIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneIOErrorZ), "LDKCResult_NoneIOErrorZ");
+ *ret_conv = migrate_kv_store_data(source_store_conv, target_store_conv);
+ return tag_ptr(ret_conv, true);
+}
+
void CS_LDK_Persister_free(int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return tag_ptr(ret_ret, true);
}
+void CS_LDK_MonitorName_free(int64_t this_obj) {
+ LDKMonitorName 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);
+ MonitorName_free(this_obj_conv);
+}
+
+int64_t CS_LDK_MonitorName_new(jstring name) {
+ LDKStr name_conv = str_ref_to_owned_c(name);
+ LDKCResult_MonitorNameIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_MonitorNameIOErrorZ), "LDKCResult_MonitorNameIOErrorZ");
+ *ret_conv = MonitorName_new(name_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jstring CS_LDK_MonitorName_as_str(int64_t this_arg) {
+ LDKMonitorName 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;
+ LDKStr ret_str = MonitorName_as_str(&this_arg_conv);
+ jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
+ Str_free(ret_str);
+ return ret_conv;
+}
+
+void CS_LDK_UpdateName_free(int64_t this_obj) {
+ LDKUpdateName 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);
+ UpdateName_free(this_obj_conv);
+}
+
+int64_t CS_LDK_UpdateName_get_a(int64_t this_ptr) {
+ LDKUpdateName this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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 = UpdateName_get_a(&this_ptr_conv);
+ return ret_conv;
+}
+
+void CS_LDK_UpdateName_set_a(int64_t this_ptr, int64_t val) {
+ LDKUpdateName this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ UpdateName_set_a(&this_ptr_conv, val);
+}
+
+int64_t CS_LDK_UpdateName_new(jstring name) {
+ LDKStr name_conv = str_ref_to_owned_c(name);
+ LDKCResult_UpdateNameIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateNameIOErrorZ), "LDKCResult_UpdateNameIOErrorZ");
+ *ret_conv = UpdateName_new(name_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jstring CS_LDK_UpdateName_as_str(int64_t this_arg) {
+ LDKUpdateName 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;
+ LDKStr ret_str = UpdateName_as_str(&this_arg_conv);
+ jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
+ Str_free(ret_str);
+ return ret_conv;
+}
+
int32_t CS_LDK_ShortChannelIdError_clone(int64_t orig) {
LDKShortChannelIdError* orig_conv = (LDKShortChannelIdError*)untag_ptr(orig);
int32_t ret_conv = LDKShortChannelIdError_to_cs(ShortChannelIdError_clone(orig_conv));
UserConfig_set_accept_intercept_htlcs(&this_ptr_conv, val);
}
-jboolean CS_LDK_UserConfig_get_accept_mpp_keysend(int64_t this_ptr) {
- LDKUserConfig this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_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 = UserConfig_get_accept_mpp_keysend(&this_ptr_conv);
- return ret_conv;
-}
-
-void CS_LDK_UserConfig_set_accept_mpp_keysend(int64_t this_ptr, jboolean val) {
- LDKUserConfig this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- UserConfig_set_accept_mpp_keysend(&this_ptr_conv, val);
-}
-
jboolean CS_LDK_UserConfig_get_manually_handle_bolt12_invoices(int64_t this_ptr) {
LDKUserConfig this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
UserConfig_set_manually_handle_bolt12_invoices(&this_ptr_conv, val);
}
-int64_t CS_LDK_UserConfig_new(int64_t channel_handshake_config_arg, int64_t channel_handshake_limits_arg, int64_t channel_config_arg, jboolean accept_forwards_to_priv_channels_arg, jboolean accept_inbound_channels_arg, jboolean manually_accept_inbound_channels_arg, jboolean accept_intercept_htlcs_arg, jboolean accept_mpp_keysend_arg, jboolean manually_handle_bolt12_invoices_arg) {
+int64_t CS_LDK_UserConfig_new(int64_t channel_handshake_config_arg, int64_t channel_handshake_limits_arg, int64_t channel_config_arg, jboolean accept_forwards_to_priv_channels_arg, jboolean accept_inbound_channels_arg, jboolean manually_accept_inbound_channels_arg, jboolean accept_intercept_htlcs_arg, jboolean manually_handle_bolt12_invoices_arg) {
LDKChannelHandshakeConfig channel_handshake_config_arg_conv;
channel_handshake_config_arg_conv.inner = untag_ptr(channel_handshake_config_arg);
channel_handshake_config_arg_conv.is_owned = ptr_is_owned(channel_handshake_config_arg);
channel_config_arg_conv.is_owned = ptr_is_owned(channel_config_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_config_arg_conv);
channel_config_arg_conv = ChannelConfig_clone(&channel_config_arg_conv);
- LDKUserConfig ret_var = UserConfig_new(channel_handshake_config_arg_conv, channel_handshake_limits_arg_conv, channel_config_arg_conv, accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg, manually_accept_inbound_channels_arg, accept_intercept_htlcs_arg, accept_mpp_keysend_arg, manually_handle_bolt12_invoices_arg);
+ LDKUserConfig ret_var = UserConfig_new(channel_handshake_config_arg_conv, channel_handshake_limits_arg_conv, channel_config_arg_conv, accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg, manually_accept_inbound_channels_arg, accept_intercept_htlcs_arg, manually_handle_bolt12_invoices_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_arr;
}
-int64_t CS_LDK_ChannelMonitor_process_pending_events(int64_t this_arg, int64_t handler) {
+int64_t CS_LDK_ChannelMonitor_process_pending_events(int64_t this_arg, int64_t handler, 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);
void* handler_ptr = untag_ptr(handler);
if (ptr_is_owned(handler)) { CHECK_ACCESS(handler_ptr); }
LDKEventHandler* handler_conv = (LDKEventHandler*)handler_ptr;
+ void* logger_ptr = untag_ptr(logger);
+ if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
+ LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
LDKCResult_NoneReplayEventZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneReplayEventZ), "LDKCResult_NoneReplayEventZ");
- *ret_conv = ChannelMonitor_process_pending_events(&this_arg_conv, handler_conv);
+ *ret_conv = ChannelMonitor_process_pending_events(&this_arg_conv, handler_conv, logger_conv);
return tag_ptr(ret_conv, true);
}
return ret_arr;
}
-jboolean CS_LDK_ChannelMonitor_is_fully_resolved(int64_t this_arg, int64_t logger) {
+int64_t CS_LDK_ChannelMonitor_check_and_update_full_resolution_status(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);
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;
+ LDKC2Tuple_boolboolZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_boolboolZ), "LDKC2Tuple_boolboolZ");
+ *ret_conv = ChannelMonitor_check_and_update_full_resolution_status(&this_arg_conv, logger_conv);
+ return tag_ptr(ret_conv, true);
}
int64_tArray CS_LDK_ChannelMonitor_get_claimable_balances(int64_t this_arg) {
return ret_conv;
}
-int64_t CS_LDK_peel_payment_onion(int64_t msg, int64_t node_signer, int64_t logger, int32_t cur_height, jboolean accept_mpp_keysend, jboolean allow_skimmed_fees) {
+int64_t CS_LDK_peel_payment_onion(int64_t msg, int64_t node_signer, int64_t logger, int32_t cur_height, jboolean allow_skimmed_fees) {
LDKUpdateAddHTLC msg_conv;
msg_conv.inner = untag_ptr(msg);
msg_conv.is_owned = ptr_is_owned(msg);
LDKLogger_JCalls_cloned(&logger_conv);
}
LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ");
- *ret_conv = peel_payment_onion(&msg_conv, node_signer_conv, logger_conv, cur_height, accept_mpp_keysend, allow_skimmed_fees);
+ *ret_conv = peel_payment_onion(&msg_conv, node_signer_conv, logger_conv, cur_height, allow_skimmed_fees);
return tag_ptr(ret_conv, true);
}
return ret_ref;
}
-int64_t CS_LDK_PendingHTLCRouting_receive_keysend(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) {
+int64_t CS_LDK_PendingHTLCRouting_receive_keysend(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, jboolean has_recipient_created_payment_secret) {
LDKFinalOnionHopData payment_data_conv;
payment_data_conv.inner = untag_ptr(payment_data);
payment_data_conv.is_owned = ptr_is_owned(payment_data);
}
FREE(custom_tlvs);
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, requires_blinded_error);
+ *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr, requires_blinded_error, has_recipient_created_payment_secret);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_conv;
}
+void CS_LDK_Verification_free(int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKVerification this_ptr_conv = *(LDKVerification*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ Verification_free(this_ptr_conv);
+}
+
+int64_t CS_LDK_UnauthenticatedReceiveTlvs_as_Verification(int64_t this_arg) {
+ LDKUnauthenticatedReceiveTlvs 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;
+ LDKVerification* ret_ret = MALLOC(sizeof(LDKVerification), "LDKVerification");
+ *ret_ret = UnauthenticatedReceiveTlvs_as_Verification(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
void CS_LDK_FailureCode_free(int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
-int64_t CS_LDK_ChannelManager_new(int64_t fee_est, int64_t chain_monitor, int64_t tx_broadcaster, int64_t router, int64_t logger, int64_t entropy_source, int64_t node_signer, int64_t signer_provider, int64_t config, int64_t params, int32_t current_timestamp) {
+int64_t CS_LDK_ChannelManager_new(int64_t fee_est, int64_t chain_monitor, int64_t tx_broadcaster, int64_t router, int64_t message_router, int64_t logger, int64_t entropy_source, int64_t node_signer, int64_t signer_provider, int64_t config, int64_t params, int32_t current_timestamp) {
void* fee_est_ptr = untag_ptr(fee_est);
CHECK_ACCESS(fee_est_ptr);
LDKFeeEstimator fee_est_conv = *(LDKFeeEstimator*)(fee_est_ptr);
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKRouter_JCalls_cloned(&router_conv);
}
+ void* message_router_ptr = untag_ptr(message_router);
+ CHECK_ACCESS(message_router_ptr);
+ LDKMessageRouter message_router_conv = *(LDKMessageRouter*)(message_router_ptr);
+ if (message_router_conv.free == LDKMessageRouter_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKMessageRouter_JCalls_cloned(&message_router_conv);
+ }
void* logger_ptr = untag_ptr(logger);
CHECK_ACCESS(logger_ptr);
LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
params_conv.is_owned = ptr_is_owned(params);
CHECK_INNER_FIELD_ACCESS_OR_NULL(params_conv);
params_conv = ChainParameters_clone(¶ms_conv);
- LDKChannelManager ret_var = ChannelManager_new(fee_est_conv, chain_monitor_conv, tx_broadcaster_conv, router_conv, logger_conv, entropy_source_conv, node_signer_conv, signer_provider_conv, config_conv, params_conv, current_timestamp);
+ LDKChannelManager ret_var = ChannelManager_new(fee_est_conv, chain_monitor_conv, tx_broadcaster_conv, router_conv, message_router_conv, logger_conv, entropy_source_conv, node_signer_conv, signer_provider_conv, config_conv, params_conv, current_timestamp);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
ChannelManager_force_close_all_channels_without_broadcasting_txn(&this_arg_conv, error_message_conv);
}
-int64_t CS_LDK_ChannelManager_send_payment_with_route(int64_t this_arg, int64_t route, int8_tArray payment_hash, int64_t recipient_onion, int8_tArray payment_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;
- LDKRoute route_conv;
- route_conv.inner = untag_ptr(route);
- route_conv.is_owned = ptr_is_owned(route);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(route_conv);
- route_conv = Route_clone(&route_conv);
- LDKThirtyTwoBytes payment_hash_ref;
- CHECK(payment_hash->arr_len == 32);
- memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash);
- LDKRecipientOnionFields recipient_onion_conv;
- recipient_onion_conv.inner = untag_ptr(recipient_onion);
- recipient_onion_conv.is_owned = ptr_is_owned(recipient_onion);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(recipient_onion_conv);
- recipient_onion_conv = RecipientOnionFields_clone(&recipient_onion_conv);
- LDKThirtyTwoBytes payment_id_ref;
- CHECK(payment_id->arr_len == 32);
- memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
- LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
- *ret_conv = ChannelManager_send_payment_with_route(&this_arg_conv, route_conv, payment_hash_ref, recipient_onion_conv, payment_id_ref);
- return tag_ptr(ret_conv, true);
-}
-
int64_t CS_LDK_ChannelManager_send_payment(int64_t this_arg, int8_tArray payment_hash, int64_t recipient_onion, int8_tArray payment_id, int64_t route_params, int64_t retry_strategy) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return tag_ptr(ret_conv, true);
}
-void CS_LDK_ChannelManager_abandon_payment(int64_t this_arg, int8_tArray payment_id) {
+int64_t CS_LDK_ChannelManager_send_payment_for_bolt12_invoice(int64_t this_arg, int64_t invoice, int64_t context) {
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(payment_id->arr_len == 32);
- memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
- ChannelManager_abandon_payment(&this_arg_conv, payment_id_ref);
+ LDKBolt12Invoice invoice_conv;
+ invoice_conv.inner = untag_ptr(invoice);
+ invoice_conv.is_owned = ptr_is_owned(invoice);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_conv);
+ invoice_conv.is_owned = false;
+ void* context_ptr = untag_ptr(context);
+ CHECK_ACCESS(context_ptr);
+ LDKCOption_OffersContextZ context_conv = *(LDKCOption_OffersContextZ*)(context_ptr);
+ context_conv = COption_OffersContextZ_clone((LDKCOption_OffersContextZ*)untag_ptr(context));
+ LDKCResult_NoneBolt12PaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12PaymentErrorZ), "LDKCResult_NoneBolt12PaymentErrorZ");
+ *ret_conv = ChannelManager_send_payment_for_bolt12_invoice(&this_arg_conv, &invoice_conv, context_conv);
+ return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_ChannelManager_send_spontaneous_payment(int64_t this_arg, int64_t route, int64_t payment_preimage, int64_t recipient_onion, int8_tArray payment_id) {
+void CS_LDK_ChannelManager_abandon_payment(int64_t this_arg, int8_tArray payment_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;
- LDKRoute route_conv;
- route_conv.inner = untag_ptr(route);
- route_conv.is_owned = ptr_is_owned(route);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(route_conv);
- route_conv.is_owned = false;
- 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));
- LDKRecipientOnionFields recipient_onion_conv;
- recipient_onion_conv.inner = untag_ptr(recipient_onion);
- recipient_onion_conv.is_owned = ptr_is_owned(recipient_onion);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(recipient_onion_conv);
- recipient_onion_conv = RecipientOnionFields_clone(&recipient_onion_conv);
LDKThirtyTwoBytes payment_id_ref;
CHECK(payment_id->arr_len == 32);
memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ), "LDKCResult_ThirtyTwoBytesPaymentSendFailureZ");
- *ret_conv = ChannelManager_send_spontaneous_payment(&this_arg_conv, &route_conv, payment_preimage_conv, recipient_onion_conv, payment_id_ref);
- return tag_ptr(ret_conv, true);
+ ChannelManager_abandon_payment(&this_arg_conv, payment_id_ref);
}
-int64_t CS_LDK_ChannelManager_send_spontaneous_payment_with_retry(int64_t this_arg, int64_t payment_preimage, int64_t recipient_onion, int8_tArray payment_id, int64_t route_params, int64_t retry_strategy) {
+int64_t CS_LDK_ChannelManager_send_spontaneous_payment(int64_t this_arg, int64_t payment_preimage, int64_t recipient_onion, int8_tArray payment_id, int64_t route_params, int64_t retry_strategy) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
LDKRetry retry_strategy_conv = *(LDKRetry*)(retry_strategy_ptr);
retry_strategy_conv = Retry_clone((LDKRetry*)untag_ptr(retry_strategy));
LDKCResult_ThirtyTwoBytesRetryableSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesRetryableSendFailureZ), "LDKCResult_ThirtyTwoBytesRetryableSendFailureZ");
- *ret_conv = ChannelManager_send_spontaneous_payment_with_retry(&this_arg_conv, payment_preimage_conv, recipient_onion_conv, payment_id_ref, route_params_conv, retry_strategy_conv);
+ *ret_conv = ChannelManager_send_spontaneous_payment(&this_arg_conv, payment_preimage_conv, recipient_onion_conv, payment_id_ref, route_params_conv, retry_strategy_conv);
return tag_ptr(ret_conv, true);
}
path_conv.is_owned = ptr_is_owned(path);
CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
path_conv = Path_clone(&path_conv);
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ");
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ");
*ret_conv = ChannelManager_send_probe(&this_arg_conv, path_conv);
return tag_ptr(ret_conv, true);
}
return tag_ptr(ret_conv, true);
}
+void CS_LDK_ChannelManager_signer_unblocked(int64_t this_arg, int64_t channel_opt) {
+ 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;
+ void* channel_opt_ptr = untag_ptr(channel_opt);
+ CHECK_ACCESS(channel_opt_ptr);
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ channel_opt_conv = *(LDKCOption_C2Tuple_PublicKeyChannelIdZZ*)(channel_opt_ptr);
+ channel_opt_conv = COption_C2Tuple_PublicKeyChannelIdZZ_clone((LDKCOption_C2Tuple_PublicKeyChannelIdZZ*)untag_ptr(channel_opt));
+ ChannelManager_signer_unblocked(&this_arg_conv, channel_opt_conv);
+}
+
+int64_t CS_LDK_ChannelManager_create_bolt11_invoice(int64_t this_arg, int64_t params) {
+ 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;
+ LDKBolt11InvoiceParameters params_conv;
+ params_conv.inner = untag_ptr(params);
+ params_conv.is_owned = ptr_is_owned(params);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(params_conv);
+ // WARNING: we need a move here but no clone is available for LDKBolt11InvoiceParameters
+
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
+ *ret_conv = ChannelManager_create_bolt11_invoice(&this_arg_conv, params_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_Bolt11InvoiceParameters_free(int64_t this_obj) {
+ LDKBolt11InvoiceParameters 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);
+ Bolt11InvoiceParameters_free(this_obj_conv);
+}
+
+int64_t CS_LDK_Bolt11InvoiceParameters_get_amount_msats(int64_t this_ptr) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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 = Bolt11InvoiceParameters_get_amount_msats(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_Bolt11InvoiceParameters_set_amount_msats(int64_t this_ptr, int64_t val) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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));
+ Bolt11InvoiceParameters_set_amount_msats(&this_ptr_conv, val_conv);
+}
+
+int64_t CS_LDK_Bolt11InvoiceParameters_get_description(int64_t this_ptr) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKBolt11InvoiceDescription *ret_copy = MALLOC(sizeof(LDKBolt11InvoiceDescription), "LDKBolt11InvoiceDescription");
+ *ret_copy = Bolt11InvoiceParameters_get_description(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_Bolt11InvoiceParameters_set_description(int64_t this_ptr, int64_t val) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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);
+ LDKBolt11InvoiceDescription val_conv = *(LDKBolt11InvoiceDescription*)(val_ptr);
+ val_conv = Bolt11InvoiceDescription_clone((LDKBolt11InvoiceDescription*)untag_ptr(val));
+ Bolt11InvoiceParameters_set_description(&this_ptr_conv, val_conv);
+}
+
+int64_t CS_LDK_Bolt11InvoiceParameters_get_invoice_expiry_delta_secs(int64_t this_ptr) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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_u32Z *ret_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+ *ret_copy = Bolt11InvoiceParameters_get_invoice_expiry_delta_secs(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_Bolt11InvoiceParameters_set_invoice_expiry_delta_secs(int64_t this_ptr, int64_t val) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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_u32Z val_conv = *(LDKCOption_u32Z*)(val_ptr);
+ val_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(val));
+ Bolt11InvoiceParameters_set_invoice_expiry_delta_secs(&this_ptr_conv, val_conv);
+}
+
+int64_t CS_LDK_Bolt11InvoiceParameters_get_min_final_cltv_expiry_delta(int64_t this_ptr) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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_u16Z *ret_copy = MALLOC(sizeof(LDKCOption_u16Z), "LDKCOption_u16Z");
+ *ret_copy = Bolt11InvoiceParameters_get_min_final_cltv_expiry_delta(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_Bolt11InvoiceParameters_set_min_final_cltv_expiry_delta(int64_t this_ptr, int64_t val) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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_u16Z val_conv = *(LDKCOption_u16Z*)(val_ptr);
+ val_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(val));
+ Bolt11InvoiceParameters_set_min_final_cltv_expiry_delta(&this_ptr_conv, val_conv);
+}
+
+int64_t CS_LDK_Bolt11InvoiceParameters_get_payment_hash(int64_t this_ptr) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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 = Bolt11InvoiceParameters_get_payment_hash(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_Bolt11InvoiceParameters_set_payment_hash(int64_t this_ptr, int64_t val) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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));
+ Bolt11InvoiceParameters_set_payment_hash(&this_ptr_conv, val_conv);
+}
+
+int64_t CS_LDK_Bolt11InvoiceParameters_new(int64_t amount_msats_arg, int64_t description_arg, int64_t invoice_expiry_delta_secs_arg, int64_t min_final_cltv_expiry_delta_arg, int64_t payment_hash_arg) {
+ void* amount_msats_arg_ptr = untag_ptr(amount_msats_arg);
+ CHECK_ACCESS(amount_msats_arg_ptr);
+ LDKCOption_u64Z amount_msats_arg_conv = *(LDKCOption_u64Z*)(amount_msats_arg_ptr);
+ amount_msats_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(amount_msats_arg));
+ void* description_arg_ptr = untag_ptr(description_arg);
+ CHECK_ACCESS(description_arg_ptr);
+ LDKBolt11InvoiceDescription description_arg_conv = *(LDKBolt11InvoiceDescription*)(description_arg_ptr);
+ description_arg_conv = Bolt11InvoiceDescription_clone((LDKBolt11InvoiceDescription*)untag_ptr(description_arg));
+ void* invoice_expiry_delta_secs_arg_ptr = untag_ptr(invoice_expiry_delta_secs_arg);
+ CHECK_ACCESS(invoice_expiry_delta_secs_arg_ptr);
+ LDKCOption_u32Z invoice_expiry_delta_secs_arg_conv = *(LDKCOption_u32Z*)(invoice_expiry_delta_secs_arg_ptr);
+ invoice_expiry_delta_secs_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(invoice_expiry_delta_secs_arg));
+ void* min_final_cltv_expiry_delta_arg_ptr = untag_ptr(min_final_cltv_expiry_delta_arg);
+ CHECK_ACCESS(min_final_cltv_expiry_delta_arg_ptr);
+ LDKCOption_u16Z min_final_cltv_expiry_delta_arg_conv = *(LDKCOption_u16Z*)(min_final_cltv_expiry_delta_arg_ptr);
+ min_final_cltv_expiry_delta_arg_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(min_final_cltv_expiry_delta_arg));
+ void* payment_hash_arg_ptr = untag_ptr(payment_hash_arg);
+ CHECK_ACCESS(payment_hash_arg_ptr);
+ LDKCOption_ThirtyTwoBytesZ payment_hash_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_hash_arg_ptr);
+ payment_hash_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_hash_arg));
+ LDKBolt11InvoiceParameters ret_var = Bolt11InvoiceParameters_new(amount_msats_arg_conv, description_arg_conv, invoice_expiry_delta_secs_arg_conv, min_final_cltv_expiry_delta_arg_conv, payment_hash_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;
+}
+
+int64_t CS_LDK_Bolt11InvoiceParameters_default() {
+ LDKBolt11InvoiceParameters ret_var = Bolt11InvoiceParameters_default();
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
int64_t CS_LDK_ChannelManager_create_offer_builder(int64_t this_arg, int64_t absolute_expiry) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return tag_ptr(ret_conv, true);
}
+int64_t CS_LDK_ChannelManager_pay_for_offer_from_human_readable_name(int64_t this_arg, int64_t name, int64_t amount_msats, int8_tArray payment_id, int64_t retry_strategy, int64_t max_total_routing_fee_msat, int64_tArray dns_resolvers) {
+ 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;
+ LDKHumanReadableName name_conv;
+ name_conv.inner = untag_ptr(name);
+ name_conv.is_owned = ptr_is_owned(name);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(name_conv);
+ name_conv = HumanReadableName_clone(&name_conv);
+ LDKThirtyTwoBytes payment_id_ref;
+ CHECK(payment_id->arr_len == 32);
+ memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
+ 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));
+ LDKCVec_DestinationZ dns_resolvers_constr;
+ dns_resolvers_constr.datalen = dns_resolvers->arr_len;
+ if (dns_resolvers_constr.datalen > 0)
+ dns_resolvers_constr.data = MALLOC(dns_resolvers_constr.datalen * sizeof(LDKDestination), "LDKCVec_DestinationZ Elements");
+ else
+ dns_resolvers_constr.data = NULL;
+ int64_t* dns_resolvers_vals = dns_resolvers->elems;
+ for (size_t n = 0; n < dns_resolvers_constr.datalen; n++) {
+ int64_t dns_resolvers_conv_13 = dns_resolvers_vals[n];
+ void* dns_resolvers_conv_13_ptr = untag_ptr(dns_resolvers_conv_13);
+ CHECK_ACCESS(dns_resolvers_conv_13_ptr);
+ LDKDestination dns_resolvers_conv_13_conv = *(LDKDestination*)(dns_resolvers_conv_13_ptr);
+ dns_resolvers_conv_13_conv = Destination_clone((LDKDestination*)untag_ptr(dns_resolvers_conv_13));
+ dns_resolvers_constr.data[n] = dns_resolvers_conv_13_conv;
+ }
+ FREE(dns_resolvers);
+ LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+ *ret_conv = ChannelManager_pay_for_offer_from_human_readable_name(&this_arg_conv, name_conv, amount_msats, payment_id_ref, retry_strategy_conv, max_total_routing_fee_msat_conv, dns_resolvers_constr);
+ return tag_ptr(ret_conv, true);
+}
+
int64_t CS_LDK_ChannelManager_create_inbound_payment(int64_t this_arg, int64_t min_value_msat, int32_t invoice_expiry_delta_secs, int64_t min_final_cltv_expiry_delta) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return tag_ptr(ret_ret, true);
}
+int64_t CS_LDK_ChannelManager_as_DNSResolverMessageHandler(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;
+ LDKDNSResolverMessageHandler* ret_ret = MALLOC(sizeof(LDKDNSResolverMessageHandler), "LDKDNSResolverMessageHandler");
+ *ret_ret = ChannelManager_as_DNSResolverMessageHandler(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
int64_t CS_LDK_ChannelManager_as_NodeIdLookUp(int64_t this_arg) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
ChannelManagerReadArgs_set_router(&this_ptr_conv, val_conv);
}
+int64_t CS_LDK_ChannelManagerReadArgs_get_message_router(int64_t this_ptr) {
+ LDKChannelManagerReadArgs this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ // WARNING: This object doesn't live past this scope, needs clone!
+ int64_t ret_ret = tag_ptr(ChannelManagerReadArgs_get_message_router(&this_ptr_conv), false);
+ return ret_ret;
+}
+
+void CS_LDK_ChannelManagerReadArgs_set_message_router(int64_t this_ptr, int64_t val) {
+ LDKChannelManagerReadArgs this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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);
+ LDKMessageRouter val_conv = *(LDKMessageRouter*)(val_ptr);
+ if (val_conv.free == LDKMessageRouter_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKMessageRouter_JCalls_cloned(&val_conv);
+ }
+ ChannelManagerReadArgs_set_message_router(&this_ptr_conv, val_conv);
+}
+
int64_t CS_LDK_ChannelManagerReadArgs_get_logger(int64_t this_ptr) {
LDKChannelManagerReadArgs this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
ChannelManagerReadArgs_set_default_config(&this_ptr_conv, val_conv);
}
-int64_t CS_LDK_ChannelManagerReadArgs_new(int64_t entropy_source, int64_t node_signer, int64_t signer_provider, int64_t fee_estimator, int64_t chain_monitor, int64_t tx_broadcaster, int64_t router, int64_t logger, int64_t default_config, int64_tArray channel_monitors) {
+int64_t CS_LDK_ChannelManagerReadArgs_new(int64_t entropy_source, int64_t node_signer, int64_t signer_provider, int64_t fee_estimator, int64_t chain_monitor, int64_t tx_broadcaster, int64_t router, int64_t message_router, int64_t logger, int64_t default_config, int64_tArray channel_monitors) {
void* entropy_source_ptr = untag_ptr(entropy_source);
CHECK_ACCESS(entropy_source_ptr);
LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKRouter_JCalls_cloned(&router_conv);
}
+ void* message_router_ptr = untag_ptr(message_router);
+ CHECK_ACCESS(message_router_ptr);
+ LDKMessageRouter message_router_conv = *(LDKMessageRouter*)(message_router_ptr);
+ if (message_router_conv.free == LDKMessageRouter_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKMessageRouter_JCalls_cloned(&message_router_conv);
+ }
void* logger_ptr = untag_ptr(logger);
CHECK_ACCESS(logger_ptr);
LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
channel_monitors_constr.data[q] = channel_monitors_conv_16_conv;
}
FREE(channel_monitors);
- LDKChannelManagerReadArgs ret_var = ChannelManagerReadArgs_new(entropy_source_conv, node_signer_conv, signer_provider_conv, fee_estimator_conv, chain_monitor_conv, tx_broadcaster_conv, router_conv, logger_conv, default_config_conv, channel_monitors_constr);
+ LDKChannelManagerReadArgs ret_var = ChannelManagerReadArgs_new(entropy_source_conv, node_signer_conv, signer_provider_conv, fee_estimator_conv, chain_monitor_conv, tx_broadcaster_conv, router_conv, message_router_conv, logger_conv, default_config_conv, channel_monitors_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);
ChannelDetails_set_feerate_sat_per_1000_weight(&this_ptr_conv, val_conv);
}
-int64_t CS_LDK_ChannelDetails_get_balance_msat(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;
- int64_t ret_conv = ChannelDetails_get_balance_msat(&this_ptr_conv);
- return ret_conv;
-}
-
-void CS_LDK_ChannelDetails_set_balance_msat(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;
- ChannelDetails_set_balance_msat(&this_ptr_conv, val);
-}
-
int64_t CS_LDK_ChannelDetails_get_outbound_capacity_msat(int64_t this_ptr) {
LDKChannelDetails this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
ChannelDetails_set_pending_outbound_htlcs(&this_ptr_conv, val_constr);
}
-int64_t CS_LDK_ChannelDetails_new(int64_t 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_announced_arg, int64_t inbound_htlc_minimum_msat_arg, int64_t inbound_htlc_maximum_msat_arg, int64_t config_arg, int64_tArray pending_inbound_htlcs_arg, int64_tArray pending_outbound_htlcs_arg) {
+int64_t CS_LDK_ChannelDetails_new(int64_t 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 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_announced_arg, int64_t inbound_htlc_minimum_msat_arg, int64_t inbound_htlc_maximum_msat_arg, int64_t config_arg, int64_tArray pending_inbound_htlcs_arg, int64_tArray pending_outbound_htlcs_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);
pending_outbound_htlcs_arg_constr.data[v] = pending_outbound_htlcs_arg_conv_21_conv;
}
FREE(pending_outbound_htlcs_arg);
- LDKChannelDetails ret_var = ChannelDetails_new(channel_id_arg_conv, 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_announced_arg, inbound_htlc_minimum_msat_arg_conv, inbound_htlc_maximum_msat_arg_conv, config_arg_conv, pending_inbound_htlcs_arg_constr, pending_outbound_htlcs_arg_constr);
+ LDKChannelDetails ret_var = ChannelDetails_new(channel_id_arg_conv, 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, 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_announced_arg, inbound_htlc_minimum_msat_arg_conv, inbound_htlc_maximum_msat_arg_conv, config_arg_conv, pending_inbound_htlcs_arg_constr, pending_outbound_htlcs_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);
ExpandedKey_free(this_obj_conv);
}
+int64_t CS_LDK_ExpandedKey_hash(int64_t o) {
+ LDKExpandedKey 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 = ExpandedKey_hash(&o_conv);
+ return ret_conv;
+}
+
+static inline uint64_t ExpandedKey_clone_ptr(LDKExpandedKey *NONNULL_PTR arg) {
+ LDKExpandedKey ret_var = ExpandedKey_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;
+}
+int64_t CS_LDK_ExpandedKey_clone_ptr(int64_t arg) {
+ LDKExpandedKey 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 = ExpandedKey_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_ExpandedKey_clone(int64_t orig) {
+ LDKExpandedKey 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;
+ LDKExpandedKey ret_var = ExpandedKey_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;
+}
+
+jboolean CS_LDK_ExpandedKey_eq(int64_t a, int64_t b) {
+ LDKExpandedKey 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;
+ LDKExpandedKey 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 = ExpandedKey_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int64_t CS_LDK_ExpandedKey_new(int8_tArray key_material) {
- uint8_t key_material_arr[32];
+ LDKThirtyTwoBytes key_material_ref;
CHECK(key_material->arr_len == 32);
- memcpy(key_material_arr, key_material->elems, 32); FREE(key_material);
- uint8_t (*key_material_ref)[32] = &key_material_arr;
+ memcpy(key_material_ref.data, key_material->elems, 32); FREE(key_material);
LDKExpandedKey ret_var = ExpandedKey_new(key_material_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
return ret_ref;
}
+jboolean CS_LDK_FinalOnionHopData_eq(int64_t a, int64_t b) {
+ LDKFinalOnionHopData 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;
+ LDKFinalOnionHopData 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 = FinalOnionHopData_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void CS_LDK_OnionPacket_free(int64_t this_obj) {
LDKOnionPacket this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return tag_ptr(ret_ret, true);
}
+int64_t CS_LDK_IgnoringMessageHandler_as_DNSResolverMessageHandler(int64_t this_arg) {
+ LDKIgnoringMessageHandler 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;
+ LDKDNSResolverMessageHandler* ret_ret = MALLOC(sizeof(LDKDNSResolverMessageHandler), "LDKDNSResolverMessageHandler");
+ *ret_ret = IgnoringMessageHandler_as_DNSResolverMessageHandler(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
int64_t CS_LDK_IgnoringMessageHandler_as_CustomOnionMessageHandler(int64_t this_arg) {
LDKIgnoringMessageHandler this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_conv;
}
-int8_tArray CS_LDK_InitFeatures_write(int64_t obj) {
- LDKInitFeatures 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 = InitFeatures_write(&obj_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-int64_t CS_LDK_InitFeatures_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
- *ret_conv = InitFeatures_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
-}
-
-int8_tArray CS_LDK_ChannelFeatures_write(int64_t obj) {
- LDKChannelFeatures 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 = ChannelFeatures_write(&obj_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-int64_t CS_LDK_ChannelFeatures_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
- *ret_conv = ChannelFeatures_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
-}
-
-int8_tArray CS_LDK_NodeFeatures_write(int64_t obj) {
- LDKNodeFeatures 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 = NodeFeatures_write(&obj_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-int64_t CS_LDK_NodeFeatures_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
- *ret_conv = NodeFeatures_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
-}
-
-int8_tArray CS_LDK_Bolt11InvoiceFeatures_write(int64_t obj) {
- LDKBolt11InvoiceFeatures 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 = Bolt11InvoiceFeatures_write(&obj_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-int64_t CS_LDK_Bolt11InvoiceFeatures_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
- *ret_conv = Bolt11InvoiceFeatures_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
-}
-
-int8_tArray CS_LDK_Bolt12InvoiceFeatures_write(int64_t obj) {
- LDKBolt12InvoiceFeatures 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 = Bolt12InvoiceFeatures_write(&obj_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-int64_t CS_LDK_Bolt12InvoiceFeatures_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
- *ret_conv = Bolt12InvoiceFeatures_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
-}
-
-int8_tArray CS_LDK_BlindedHopFeatures_write(int64_t obj) {
- LDKBlindedHopFeatures 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 = BlindedHopFeatures_write(&obj_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-int64_t CS_LDK_BlindedHopFeatures_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
- *ret_conv = BlindedHopFeatures_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
-}
-
-int8_tArray CS_LDK_ChannelTypeFeatures_write(int64_t obj) {
- LDKChannelTypeFeatures 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 = ChannelTypeFeatures_write(&obj_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-int64_t CS_LDK_ChannelTypeFeatures_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
- *ret_conv = ChannelTypeFeatures_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
-}
-
void CS_LDK_ShutdownScript_free(int64_t this_obj) {
LDKShutdownScript this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return tag_ptr(ret_conv, true);
}
-jstring CS_LDK_ChannelId_to_str(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;
- LDKStr ret_str = ChannelId_to_str(&o_conv);
- jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
- Str_free(ret_str);
- return ret_conv;
-}
-
int64_t CS_LDK_create_phantom_invoice(int64_t amt_msat, int64_t payment_hash, jstring description, int32_t invoice_expiry_delta_secs, int64_tArray phantom_route_hints, int64_t entropy_source, int64_t node_signer, int64_t logger, int32_t network, int64_t min_final_cltv_expiry_delta, int64_t duration_since_epoch) {
void* amt_msat_ptr = untag_ptr(amt_msat);
CHECK_ACCESS(amt_msat_ptr);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_create_invoice_from_channelmanager(int64_t channelmanager, int64_t node_signer, int64_t logger, int32_t network, int64_t amt_msat, jstring description, int32_t invoice_expiry_delta_secs, int64_t min_final_cltv_expiry_delta) {
+int64_t CS_LDK_create_invoice_from_channelmanager(int64_t channelmanager, int64_t amt_msat, jstring description, int32_t invoice_expiry_delta_secs, int64_t min_final_cltv_expiry_delta) {
LDKChannelManager channelmanager_conv;
channelmanager_conv.inner = untag_ptr(channelmanager);
channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channelmanager_conv);
channelmanager_conv.is_owned = false;
- void* node_signer_ptr = untag_ptr(node_signer);
- CHECK_ACCESS(node_signer_ptr);
- LDKNodeSigner node_signer_conv = *(LDKNodeSigner*)(node_signer_ptr);
- if (node_signer_conv.free == LDKNodeSigner_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKNodeSigner_JCalls_cloned(&node_signer_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);
- }
- LDKCurrency network_conv = LDKCurrency_from_cs(network);
void* amt_msat_ptr = untag_ptr(amt_msat);
CHECK_ACCESS(amt_msat_ptr);
LDKCOption_u64Z amt_msat_conv = *(LDKCOption_u64Z*)(amt_msat_ptr);
LDKCOption_u16Z min_final_cltv_expiry_delta_conv = *(LDKCOption_u16Z*)(min_final_cltv_expiry_delta_ptr);
min_final_cltv_expiry_delta_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(min_final_cltv_expiry_delta));
LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
- *ret_conv = create_invoice_from_channelmanager(&channelmanager_conv, node_signer_conv, logger_conv, network_conv, amt_msat_conv, description_conv, invoice_expiry_delta_secs, min_final_cltv_expiry_delta_conv);
+ *ret_conv = create_invoice_from_channelmanager(&channelmanager_conv, amt_msat_conv, description_conv, invoice_expiry_delta_secs, min_final_cltv_expiry_delta_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_create_invoice_from_channelmanager_with_description_hash(int64_t channelmanager, int64_t node_signer, int64_t logger, int32_t network, int64_t amt_msat, int64_t description_hash, int32_t invoice_expiry_delta_secs, int64_t min_final_cltv_expiry_delta) {
+int64_t CS_LDK_create_invoice_from_channelmanager_with_description_hash(int64_t channelmanager, int64_t amt_msat, int64_t description_hash, int32_t invoice_expiry_delta_secs, int64_t min_final_cltv_expiry_delta) {
LDKChannelManager channelmanager_conv;
channelmanager_conv.inner = untag_ptr(channelmanager);
channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channelmanager_conv);
channelmanager_conv.is_owned = false;
- void* node_signer_ptr = untag_ptr(node_signer);
- CHECK_ACCESS(node_signer_ptr);
- LDKNodeSigner node_signer_conv = *(LDKNodeSigner*)(node_signer_ptr);
- if (node_signer_conv.free == LDKNodeSigner_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKNodeSigner_JCalls_cloned(&node_signer_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);
- }
- LDKCurrency network_conv = LDKCurrency_from_cs(network);
void* amt_msat_ptr = untag_ptr(amt_msat);
CHECK_ACCESS(amt_msat_ptr);
LDKCOption_u64Z amt_msat_conv = *(LDKCOption_u64Z*)(amt_msat_ptr);
LDKCOption_u16Z min_final_cltv_expiry_delta_conv = *(LDKCOption_u16Z*)(min_final_cltv_expiry_delta_ptr);
min_final_cltv_expiry_delta_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(min_final_cltv_expiry_delta));
LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
- *ret_conv = create_invoice_from_channelmanager_with_description_hash(&channelmanager_conv, node_signer_conv, logger_conv, network_conv, amt_msat_conv, description_hash_conv, invoice_expiry_delta_secs, min_final_cltv_expiry_delta_conv);
+ *ret_conv = create_invoice_from_channelmanager_with_description_hash(&channelmanager_conv, amt_msat_conv, description_hash_conv, invoice_expiry_delta_secs, min_final_cltv_expiry_delta_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(int64_t channelmanager, int64_t node_signer, int64_t logger, int32_t network, int64_t amt_msat, int64_t description_hash, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs, int64_t min_final_cltv_expiry_delta) {
+int64_t CS_LDK_create_invoice_from_channelmanager_with_description_hash_and_payment_hash(int64_t channelmanager, int64_t amt_msat, int64_t description_hash, int32_t invoice_expiry_delta_secs, int8_tArray payment_hash, int64_t min_final_cltv_expiry_delta) {
LDKChannelManager channelmanager_conv;
channelmanager_conv.inner = untag_ptr(channelmanager);
channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channelmanager_conv);
channelmanager_conv.is_owned = false;
- void* node_signer_ptr = untag_ptr(node_signer);
- CHECK_ACCESS(node_signer_ptr);
- LDKNodeSigner node_signer_conv = *(LDKNodeSigner*)(node_signer_ptr);
- if (node_signer_conv.free == LDKNodeSigner_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKNodeSigner_JCalls_cloned(&node_signer_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);
- }
- LDKCurrency network_conv = LDKCurrency_from_cs(network);
void* amt_msat_ptr = untag_ptr(amt_msat);
CHECK_ACCESS(amt_msat_ptr);
LDKCOption_u64Z amt_msat_conv = *(LDKCOption_u64Z*)(amt_msat_ptr);
description_hash_conv.is_owned = ptr_is_owned(description_hash);
CHECK_INNER_FIELD_ACCESS_OR_NULL(description_hash_conv);
description_hash_conv = Sha256_clone(&description_hash_conv);
+ LDKThirtyTwoBytes payment_hash_ref;
+ CHECK(payment_hash->arr_len == 32);
+ memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash);
void* min_final_cltv_expiry_delta_ptr = untag_ptr(min_final_cltv_expiry_delta);
CHECK_ACCESS(min_final_cltv_expiry_delta_ptr);
LDKCOption_u16Z min_final_cltv_expiry_delta_conv = *(LDKCOption_u16Z*)(min_final_cltv_expiry_delta_ptr);
min_final_cltv_expiry_delta_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(min_final_cltv_expiry_delta));
LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
- *ret_conv = create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(&channelmanager_conv, node_signer_conv, logger_conv, network_conv, amt_msat_conv, description_hash_conv, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_create_invoice_from_channelmanager_and_duration_since_epoch(int64_t channelmanager, int64_t node_signer, int64_t logger, int32_t network, int64_t amt_msat, jstring description, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs, int64_t min_final_cltv_expiry_delta) {
- LDKChannelManager channelmanager_conv;
- channelmanager_conv.inner = untag_ptr(channelmanager);
- channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channelmanager_conv);
- channelmanager_conv.is_owned = false;
- void* node_signer_ptr = untag_ptr(node_signer);
- CHECK_ACCESS(node_signer_ptr);
- LDKNodeSigner node_signer_conv = *(LDKNodeSigner*)(node_signer_ptr);
- if (node_signer_conv.free == LDKNodeSigner_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKNodeSigner_JCalls_cloned(&node_signer_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);
- }
- LDKCurrency network_conv = LDKCurrency_from_cs(network);
- void* amt_msat_ptr = untag_ptr(amt_msat);
- CHECK_ACCESS(amt_msat_ptr);
- LDKCOption_u64Z amt_msat_conv = *(LDKCOption_u64Z*)(amt_msat_ptr);
- amt_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(amt_msat));
- LDKStr description_conv = str_ref_to_owned_c(description);
- void* min_final_cltv_expiry_delta_ptr = untag_ptr(min_final_cltv_expiry_delta);
- CHECK_ACCESS(min_final_cltv_expiry_delta_ptr);
- LDKCOption_u16Z min_final_cltv_expiry_delta_conv = *(LDKCOption_u16Z*)(min_final_cltv_expiry_delta_ptr);
- min_final_cltv_expiry_delta_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(min_final_cltv_expiry_delta));
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
- *ret_conv = create_invoice_from_channelmanager_and_duration_since_epoch(&channelmanager_conv, node_signer_conv, logger_conv, network_conv, amt_msat_conv, description_conv, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta_conv);
+ *ret_conv = create_invoice_from_channelmanager_with_description_hash_and_payment_hash(&channelmanager_conv, amt_msat_conv, description_hash_conv, invoice_expiry_delta_secs, payment_hash_ref, min_final_cltv_expiry_delta_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(int64_t channelmanager, int64_t node_signer, int64_t logger, int32_t network, int64_t amt_msat, jstring description, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs, int8_tArray payment_hash, int64_t min_final_cltv_expiry_delta) {
+int64_t CS_LDK_create_invoice_from_channelmanager_with_payment_hash(int64_t channelmanager, int64_t amt_msat, jstring description, int32_t invoice_expiry_delta_secs, int8_tArray payment_hash, int64_t min_final_cltv_expiry_delta) {
LDKChannelManager channelmanager_conv;
channelmanager_conv.inner = untag_ptr(channelmanager);
channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channelmanager_conv);
channelmanager_conv.is_owned = false;
- void* node_signer_ptr = untag_ptr(node_signer);
- CHECK_ACCESS(node_signer_ptr);
- LDKNodeSigner node_signer_conv = *(LDKNodeSigner*)(node_signer_ptr);
- if (node_signer_conv.free == LDKNodeSigner_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKNodeSigner_JCalls_cloned(&node_signer_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);
- }
- LDKCurrency network_conv = LDKCurrency_from_cs(network);
void* amt_msat_ptr = untag_ptr(amt_msat);
CHECK_ACCESS(amt_msat_ptr);
LDKCOption_u64Z amt_msat_conv = *(LDKCOption_u64Z*)(amt_msat_ptr);
LDKCOption_u16Z min_final_cltv_expiry_delta_conv = *(LDKCOption_u16Z*)(min_final_cltv_expiry_delta_ptr);
min_final_cltv_expiry_delta_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(min_final_cltv_expiry_delta));
LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
- *ret_conv = create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(&channelmanager_conv, node_signer_conv, logger_conv, network_conv, amt_msat_conv, description_conv, duration_since_epoch, invoice_expiry_delta_secs, payment_hash_ref, min_final_cltv_expiry_delta_conv);
+ *ret_conv = create_invoice_from_channelmanager_with_payment_hash(&channelmanager_conv, amt_msat_conv, description_conv, invoice_expiry_delta_secs, payment_hash_ref, min_final_cltv_expiry_delta_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_payment_parameters_from_zero_amount_invoice(int64_t invoice, int64_t amount_msat) {
+int64_t CS_LDK_payment_parameters_from_variable_amount_invoice(int64_t invoice, int64_t amount_msat) {
LDKBolt11Invoice invoice_conv;
invoice_conv.inner = untag_ptr(invoice);
invoice_conv.is_owned = ptr_is_owned(invoice);
CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_conv);
invoice_conv.is_owned = false;
LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ");
- *ret_conv = payment_parameters_from_zero_amount_invoice(&invoice_conv, amount_msat);
+ *ret_conv = payment_parameters_from_variable_amount_invoice(&invoice_conv, amount_msat);
return tag_ptr(ret_conv, true);
}
return ret_conv;
}
-void CS_LDK_PaymentSendFailure_free(int64_t this_ptr) {
- if (!ptr_is_owned(this_ptr)) return;
- void* this_ptr_ptr = untag_ptr(this_ptr);
- CHECK_ACCESS(this_ptr_ptr);
- LDKPaymentSendFailure this_ptr_conv = *(LDKPaymentSendFailure*)(this_ptr_ptr);
- FREE(untag_ptr(this_ptr));
- PaymentSendFailure_free(this_ptr_conv);
-}
-
-static inline uint64_t PaymentSendFailure_clone_ptr(LDKPaymentSendFailure *NONNULL_PTR arg) {
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = PaymentSendFailure_clone(arg);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-int64_t CS_LDK_PaymentSendFailure_clone_ptr(int64_t arg) {
- LDKPaymentSendFailure* arg_conv = (LDKPaymentSendFailure*)untag_ptr(arg);
- int64_t ret_conv = PaymentSendFailure_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_PaymentSendFailure_clone(int64_t orig) {
- LDKPaymentSendFailure* orig_conv = (LDKPaymentSendFailure*)untag_ptr(orig);
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = PaymentSendFailure_clone(orig_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_PaymentSendFailure_parameter_error(int64_t a) {
- void* a_ptr = untag_ptr(a);
- CHECK_ACCESS(a_ptr);
- LDKAPIError a_conv = *(LDKAPIError*)(a_ptr);
- a_conv = APIError_clone((LDKAPIError*)untag_ptr(a));
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = PaymentSendFailure_parameter_error(a_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_PaymentSendFailure_path_parameter_error(int64_tArray a) {
- LDKCVec_CResult_NoneAPIErrorZZ a_constr;
- a_constr.datalen = a->arr_len;
- if (a_constr.datalen > 0)
- a_constr.data = MALLOC(a_constr.datalen * sizeof(LDKCResult_NoneAPIErrorZ), "LDKCVec_CResult_NoneAPIErrorZZ Elements");
- else
- a_constr.data = NULL;
- int64_t* a_vals = a->elems;
- for (size_t w = 0; w < a_constr.datalen; w++) {
- int64_t a_conv_22 = a_vals[w];
- void* a_conv_22_ptr = untag_ptr(a_conv_22);
- CHECK_ACCESS(a_conv_22_ptr);
- LDKCResult_NoneAPIErrorZ a_conv_22_conv = *(LDKCResult_NoneAPIErrorZ*)(a_conv_22_ptr);
- a_conv_22_conv = CResult_NoneAPIErrorZ_clone((LDKCResult_NoneAPIErrorZ*)untag_ptr(a_conv_22));
- a_constr.data[w] = a_conv_22_conv;
- }
- FREE(a);
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = PaymentSendFailure_path_parameter_error(a_constr);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_PaymentSendFailure_all_failed_resend_safe(int64_tArray a) {
- LDKCVec_APIErrorZ a_constr;
- a_constr.datalen = a->arr_len;
- if (a_constr.datalen > 0)
- a_constr.data = MALLOC(a_constr.datalen * sizeof(LDKAPIError), "LDKCVec_APIErrorZ Elements");
- else
- a_constr.data = NULL;
- int64_t* a_vals = a->elems;
- for (size_t k = 0; k < a_constr.datalen; k++) {
- int64_t a_conv_10 = a_vals[k];
- void* a_conv_10_ptr = untag_ptr(a_conv_10);
- CHECK_ACCESS(a_conv_10_ptr);
- LDKAPIError a_conv_10_conv = *(LDKAPIError*)(a_conv_10_ptr);
- a_conv_10_conv = APIError_clone((LDKAPIError*)untag_ptr(a_conv_10));
- a_constr.data[k] = a_conv_10_conv;
- }
- FREE(a);
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = PaymentSendFailure_all_failed_resend_safe(a_constr);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_PaymentSendFailure_duplicate_payment() {
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = PaymentSendFailure_duplicate_payment();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_PaymentSendFailure_partial_failure(int64_tArray results, int64_t failed_paths_retry, int8_tArray payment_id) {
- LDKCVec_CResult_NoneAPIErrorZZ results_constr;
- results_constr.datalen = results->arr_len;
- if (results_constr.datalen > 0)
- results_constr.data = MALLOC(results_constr.datalen * sizeof(LDKCResult_NoneAPIErrorZ), "LDKCVec_CResult_NoneAPIErrorZZ Elements");
- else
- results_constr.data = NULL;
- int64_t* results_vals = results->elems;
- for (size_t w = 0; w < results_constr.datalen; w++) {
- int64_t results_conv_22 = results_vals[w];
- void* results_conv_22_ptr = untag_ptr(results_conv_22);
- CHECK_ACCESS(results_conv_22_ptr);
- LDKCResult_NoneAPIErrorZ results_conv_22_conv = *(LDKCResult_NoneAPIErrorZ*)(results_conv_22_ptr);
- results_conv_22_conv = CResult_NoneAPIErrorZ_clone((LDKCResult_NoneAPIErrorZ*)untag_ptr(results_conv_22));
- results_constr.data[w] = results_conv_22_conv;
- }
- FREE(results);
- LDKRouteParameters failed_paths_retry_conv;
- failed_paths_retry_conv.inner = untag_ptr(failed_paths_retry);
- failed_paths_retry_conv.is_owned = ptr_is_owned(failed_paths_retry);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(failed_paths_retry_conv);
- failed_paths_retry_conv = RouteParameters_clone(&failed_paths_retry_conv);
- LDKThirtyTwoBytes payment_id_ref;
- CHECK(payment_id->arr_len == 32);
- memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = PaymentSendFailure_partial_failure(results_constr, failed_paths_retry_conv, payment_id_ref);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-jboolean CS_LDK_PaymentSendFailure_eq(int64_t a, int64_t b) {
- LDKPaymentSendFailure* a_conv = (LDKPaymentSendFailure*)untag_ptr(a);
- LDKPaymentSendFailure* b_conv = (LDKPaymentSendFailure*)untag_ptr(b);
- jboolean ret_conv = PaymentSendFailure_eq(a_conv, b_conv);
- return ret_conv;
-}
-
void CS_LDK_Bolt12PaymentError_free(int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
-int64_t CS_LDK_ProbeSendFailure_sending_failed(int64_t a) {
+int64_t CS_LDK_ProbeSendFailure_parameter_error(int64_t a) {
void* a_ptr = untag_ptr(a);
CHECK_ACCESS(a_ptr);
- LDKPaymentSendFailure a_conv = *(LDKPaymentSendFailure*)(a_ptr);
- a_conv = PaymentSendFailure_clone((LDKPaymentSendFailure*)untag_ptr(a));
+ LDKAPIError a_conv = *(LDKAPIError*)(a_ptr);
+ a_conv = APIError_clone((LDKAPIError*)untag_ptr(a));
LDKProbeSendFailure *ret_copy = MALLOC(sizeof(LDKProbeSendFailure), "LDKProbeSendFailure");
- *ret_copy = ProbeSendFailure_sending_failed(a_conv);
+ *ret_copy = ProbeSendFailure_parameter_error(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_ProbeSendFailure_duplicate_probe() {
+ LDKProbeSendFailure *ret_copy = MALLOC(sizeof(LDKProbeSendFailure), "LDKProbeSendFailure");
+ *ret_copy = ProbeSendFailure_duplicate_probe();
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
Type_free(this_ptr_conv);
}
+int8_tArray CS_LDK_InitFeatures_write(int64_t obj) {
+ LDKInitFeatures 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 = InitFeatures_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_InitFeatures_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+ *ret_conv = InitFeatures_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int8_tArray CS_LDK_ChannelFeatures_write(int64_t obj) {
+ LDKChannelFeatures 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 = ChannelFeatures_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_ChannelFeatures_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+ *ret_conv = ChannelFeatures_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int8_tArray CS_LDK_NodeFeatures_write(int64_t obj) {
+ LDKNodeFeatures 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 = NodeFeatures_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_NodeFeatures_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+ *ret_conv = NodeFeatures_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int8_tArray CS_LDK_Bolt11InvoiceFeatures_write(int64_t obj) {
+ LDKBolt11InvoiceFeatures 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 = Bolt11InvoiceFeatures_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_Bolt11InvoiceFeatures_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = Bolt11InvoiceFeatures_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int8_tArray CS_LDK_Bolt12InvoiceFeatures_write(int64_t obj) {
+ LDKBolt12InvoiceFeatures 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 = Bolt12InvoiceFeatures_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_Bolt12InvoiceFeatures_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = Bolt12InvoiceFeatures_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int8_tArray CS_LDK_BlindedHopFeatures_write(int64_t obj) {
+ LDKBlindedHopFeatures 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 = BlindedHopFeatures_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_BlindedHopFeatures_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
+ *ret_conv = BlindedHopFeatures_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int8_tArray CS_LDK_ChannelTypeFeatures_write(int64_t obj) {
+ LDKChannelTypeFeatures 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 = ChannelTypeFeatures_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_ChannelTypeFeatures_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
+ *ret_conv = ChannelTypeFeatures_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
void CS_LDK_OfferId_free(int64_t this_obj) {
LDKOfferId this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
-int8_tArray CS_LDK_Offer_signing_pubkey(int64_t this_arg) {
+int8_tArray CS_LDK_Offer_issuer_signing_pubkey(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;
int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, Offer_signing_pubkey(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, Offer_issuer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return ret_conv;
}
-int64_t CS_LDK_Offer_request_invoice_deriving_payer_id(int64_t this_arg, int64_t expanded_key, int64_t nonce, int8_tArray payment_id) {
+int64_t CS_LDK_Offer_request_invoice(int64_t this_arg, int64_t expanded_key, int64_t nonce, 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);
LDKThirtyTwoBytes payment_id_ref;
CHECK(payment_id->arr_len == 32);
memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
- LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ");
- *ret_conv = Offer_request_invoice_deriving_payer_id(&this_arg_conv, &expanded_key_conv, nonce_conv, payment_id_ref);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_Offer_request_invoice_deriving_metadata(int64_t this_arg, int8_tArray payer_id, int64_t expanded_key, int64_t nonce, 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(payer_id->arr_len == 33);
- memcpy(payer_id_ref.compressed_form, payer_id->elems, 33); FREE(payer_id);
- 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;
- LDKNonce nonce_conv;
- nonce_conv.inner = untag_ptr(nonce);
- nonce_conv.is_owned = ptr_is_owned(nonce);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_conv);
- nonce_conv = Nonce_clone(&nonce_conv);
- LDKThirtyTwoBytes payment_id_ref;
- CHECK(payment_id->arr_len == 32);
- memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
- 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, nonce_conv, payment_id_ref);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_Offer_request_invoice(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 = metadata->arr_len;
- metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes");
- memcpy(metadata_ref.data, metadata->elems, metadata_ref.datalen); FREE(metadata);
- LDKPublicKey payer_id_ref;
- CHECK(payer_id->arr_len == 33);
- memcpy(payer_id_ref.compressed_form, payer_id->elems, 33); FREE(payer_id);
- LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
- *ret_conv = Offer_request_invoice(&this_arg_conv, metadata_ref, payer_id_ref);
+ LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = Offer_request_invoice(&this_arg_conv, &expanded_key_conv, nonce_conv, payment_id_ref);
return tag_ptr(ret_conv, true);
}
return ret_ref;
}
+int64_tArray CS_LDK_UnsignedBolt12Invoice_payment_paths(int64_t this_arg) {
+ LDKUnsignedBolt12Invoice 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_BlindedPaymentPathZ ret_var = UnsignedBolt12Invoice_payment_paths(&this_arg_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t u = 0; u < ret_var.datalen; u++) {
+ LDKBlindedPaymentPath ret_conv_20_var = ret_var.data[u];
+ int64_t ret_conv_20_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_20_var);
+ ret_conv_20_ref = tag_ptr(ret_conv_20_var.inner, ret_conv_20_var.is_owned);
+ ret_arr_ptr[u] = ret_conv_20_ref;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
int64_t CS_LDK_UnsignedBolt12Invoice_created_at(int64_t this_arg) {
LDKUnsignedBolt12Invoice this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
+int8_tArray CS_LDK_UnsignedBolt12Invoice_issuer_signing_pubkey(int64_t this_arg) {
+ LDKUnsignedBolt12Invoice 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 = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, UnsignedBolt12Invoice_issuer_signing_pubkey(&this_arg_conv).compressed_form, 33);
+ return ret_arr;
+}
+
int8_tArray CS_LDK_UnsignedBolt12Invoice_payer_metadata(int64_t this_arg) {
LDKUnsignedBolt12Invoice this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-int8_tArray CS_LDK_UnsignedBolt12Invoice_payer_id(int64_t this_arg) {
+int8_tArray CS_LDK_UnsignedBolt12Invoice_payer_signing_pubkey(int64_t this_arg) {
LDKUnsignedBolt12Invoice 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 = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, UnsignedBolt12Invoice_payer_id(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, UnsignedBolt12Invoice_payer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return ret_conv;
}
+int64_tArray CS_LDK_Bolt12Invoice_payment_paths(int64_t this_arg) {
+ LDKBolt12Invoice 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_BlindedPaymentPathZ ret_var = Bolt12Invoice_payment_paths(&this_arg_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t u = 0; u < ret_var.datalen; u++) {
+ LDKBlindedPaymentPath ret_conv_20_var = ret_var.data[u];
+ int64_t ret_conv_20_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_20_var);
+ ret_conv_20_ref = tag_ptr(ret_conv_20_var.inner, ret_conv_20_var.is_owned);
+ ret_arr_ptr[u] = ret_conv_20_ref;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
int64_t CS_LDK_Bolt12Invoice_created_at(int64_t this_arg) {
LDKBolt12Invoice this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
+int8_tArray CS_LDK_Bolt12Invoice_issuer_signing_pubkey(int64_t this_arg) {
+ LDKBolt12Invoice 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 = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, Bolt12Invoice_issuer_signing_pubkey(&this_arg_conv).compressed_form, 33);
+ return ret_arr;
+}
+
int8_tArray CS_LDK_Bolt12Invoice_payer_metadata(int64_t this_arg) {
LDKBolt12Invoice this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-int8_tArray CS_LDK_Bolt12Invoice_payer_id(int64_t this_arg) {
+int8_tArray CS_LDK_Bolt12Invoice_payer_signing_pubkey(int64_t this_arg) {
LDKBolt12Invoice 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 = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, Bolt12Invoice_payer_id(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, Bolt12Invoice_payer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return tag_ptr(ret_conv, true);
}
-void CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_free(int64_t this_obj) {
- LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj_conv;
+void CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_free(int64_t this_obj) {
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder 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);
+ InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_free(this_obj_conv);
}
-void CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_free(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);
-}
-
-int64_t CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_build(int64_t this_arg) {
- LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+int64_t CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_build_and_sign(int64_t this_arg) {
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder 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
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder
- LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
- *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_build(this_arg_conv);
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_build_and_sign(this_arg_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_chain(int64_t this_arg, int32_t network) {
- LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+int64_t CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_chain(int64_t this_arg, int32_t network) {
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder 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
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder
LDKNetwork network_conv = LDKNetwork_from_cs(network);
LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
- *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_chain(this_arg_conv, network_conv);
+ *ret_conv = InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_chain(this_arg_conv, network_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(int64_t this_arg, int64_t amount_msats) {
- LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+int64_t CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_amount_msats(int64_t this_arg, int64_t amount_msats) {
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder 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
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder
LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
- *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(this_arg_conv, amount_msats);
+ *ret_conv = InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_amount_msats(this_arg_conv, amount_msats);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_quantity(int64_t this_arg, int64_t quantity) {
- LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+int64_t CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_quantity(int64_t this_arg, int64_t quantity) {
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder 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
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder
LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
- *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_quantity(this_arg_conv, quantity);
+ *ret_conv = InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_quantity(this_arg_conv, quantity);
return tag_ptr(ret_conv, true);
}
-void CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_payer_note(int64_t this_arg, jstring payer_note) {
- LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+void CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_payer_note(int64_t this_arg, jstring payer_note) {
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder 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
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder
LDKStr payer_note_conv = str_ref_to_owned_c(payer_note);
- InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv);
+ InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_payer_note(this_arg_conv, payer_note_conv);
}
-int64_t CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(int64_t this_arg) {
- LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+void CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_sourced_from_human_readable_name(int64_t this_arg, int64_t hrn) {
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder 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
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder
- 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);
-}
-
-int64_t CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_chain(int64_t this_arg, int32_t 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_cs(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);
-}
-
-int64_t CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(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);
-}
-
-int64_t CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_quantity(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);
-}
-
-void CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_payer_note(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 = str_ref_to_owned_c(payer_note);
- InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv);
+ LDKHumanReadableName hrn_conv;
+ hrn_conv.inner = untag_ptr(hrn);
+ hrn_conv.is_owned = ptr_is_owned(hrn);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(hrn_conv);
+ hrn_conv = HumanReadableName_clone(&hrn_conv);
+ InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_sourced_from_human_readable_name(this_arg_conv, hrn_conv);
}
void CS_LDK_UnsignedInvoiceRequest_free(int64_t this_obj) {
return ret_ref;
}
-int8_tArray CS_LDK_UnsignedInvoiceRequest_signing_pubkey(int64_t this_arg) {
+int8_tArray CS_LDK_UnsignedInvoiceRequest_issuer_signing_pubkey(int64_t this_arg) {
LDKUnsignedInvoiceRequest 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 = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, UnsignedInvoiceRequest_signing_pubkey(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, UnsignedInvoiceRequest_issuer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return ret_ref;
}
+jboolean CS_LDK_UnsignedInvoiceRequest_has_amount_msats(int64_t this_arg) {
+ LDKUnsignedInvoiceRequest 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 = UnsignedInvoiceRequest_has_amount_msats(&this_arg_conv);
+ return ret_conv;
+}
+
int64_t CS_LDK_UnsignedInvoiceRequest_invoice_request_features(int64_t this_arg) {
LDKUnsignedInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-int8_tArray CS_LDK_UnsignedInvoiceRequest_payer_id(int64_t this_arg) {
+int8_tArray CS_LDK_UnsignedInvoiceRequest_payer_signing_pubkey(int64_t this_arg) {
LDKUnsignedInvoiceRequest 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 = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, UnsignedInvoiceRequest_payer_id(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, UnsignedInvoiceRequest_payer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return ret_ref;
}
+int64_t CS_LDK_UnsignedInvoiceRequest_offer_from_hrn(int64_t this_arg) {
+ LDKUnsignedInvoiceRequest 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;
+ LDKHumanReadableName ret_var = UnsignedInvoiceRequest_offer_from_hrn(&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;
+}
+
ptrArray CS_LDK_InvoiceRequest_chains(int64_t this_arg) {
LDKInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-int8_tArray CS_LDK_InvoiceRequest_signing_pubkey(int64_t this_arg) {
+int8_tArray CS_LDK_InvoiceRequest_issuer_signing_pubkey(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 = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, InvoiceRequest_signing_pubkey(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, InvoiceRequest_issuer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return ret_ref;
}
+jboolean CS_LDK_InvoiceRequest_has_amount_msats(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;
+ jboolean ret_conv = InvoiceRequest_has_amount_msats(&this_arg_conv);
+ return ret_conv;
+}
+
int64_t CS_LDK_InvoiceRequest_invoice_request_features(int64_t this_arg) {
LDKInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-int8_tArray CS_LDK_InvoiceRequest_payer_id(int64_t this_arg) {
+int8_tArray CS_LDK_InvoiceRequest_payer_signing_pubkey(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 = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, InvoiceRequest_payer_id(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, InvoiceRequest_payer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return ret_ref;
}
+int64_t CS_LDK_InvoiceRequest_offer_from_hrn(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;
+ LDKHumanReadableName ret_var = InvoiceRequest_offer_from_hrn(&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;
+}
+
int64_t CS_LDK_InvoiceRequest_respond_with(int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) {
LDKInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-int8_tArray CS_LDK_VerifiedInvoiceRequest_signing_pubkey(int64_t this_arg) {
+int8_tArray CS_LDK_VerifiedInvoiceRequest_issuer_signing_pubkey(int64_t this_arg) {
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;
int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, VerifiedInvoiceRequest_signing_pubkey(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, VerifiedInvoiceRequest_issuer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return ret_ref;
}
+jboolean CS_LDK_VerifiedInvoiceRequest_has_amount_msats(int64_t this_arg) {
+ 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;
+ jboolean ret_conv = VerifiedInvoiceRequest_has_amount_msats(&this_arg_conv);
+ return ret_conv;
+}
+
int64_t CS_LDK_VerifiedInvoiceRequest_invoice_request_features(int64_t this_arg) {
LDKVerifiedInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-int8_tArray CS_LDK_VerifiedInvoiceRequest_payer_id(int64_t this_arg) {
+int8_tArray CS_LDK_VerifiedInvoiceRequest_payer_signing_pubkey(int64_t this_arg) {
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;
int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, VerifiedInvoiceRequest_payer_id(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, VerifiedInvoiceRequest_payer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return ret_ref;
}
+int64_t CS_LDK_VerifiedInvoiceRequest_offer_from_hrn(int64_t this_arg) {
+ 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;
+ LDKHumanReadableName ret_var = VerifiedInvoiceRequest_offer_from_hrn(&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;
+}
+
int64_t CS_LDK_VerifiedInvoiceRequest_respond_with(int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) {
LDKVerifiedInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_arr;
}
+int64_t CS_LDK_InvoiceRequest_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_InvoiceRequestDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestDecodeErrorZ), "LDKCResult_InvoiceRequestDecodeErrorZ");
+ *ret_conv = InvoiceRequest_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
void CS_LDK_InvoiceRequestFields_free(int64_t this_obj) {
LDKInvoiceRequestFields this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
InvoiceRequestFields_free(this_obj_conv);
}
-int8_tArray CS_LDK_InvoiceRequestFields_get_payer_id(int64_t this_ptr) {
+int8_tArray CS_LDK_InvoiceRequestFields_get_payer_signing_pubkey(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 = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, InvoiceRequestFields_get_payer_id(&this_ptr_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, InvoiceRequestFields_get_payer_signing_pubkey(&this_ptr_conv).compressed_form, 33);
return ret_arr;
}
-void CS_LDK_InvoiceRequestFields_set_payer_id(int64_t this_ptr, int8_tArray val) {
+void CS_LDK_InvoiceRequestFields_set_payer_signing_pubkey(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);
LDKPublicKey val_ref;
CHECK(val->arr_len == 33);
memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- InvoiceRequestFields_set_payer_id(&this_ptr_conv, val_ref);
+ InvoiceRequestFields_set_payer_signing_pubkey(&this_ptr_conv, val_ref);
}
int64_t CS_LDK_InvoiceRequestFields_get_quantity(int64_t this_ptr) {
InvoiceRequestFields_set_payer_note_truncated(&this_ptr_conv, val_conv);
}
-int64_t CS_LDK_InvoiceRequestFields_new(int8_tArray payer_id_arg, int64_t quantity_arg, int64_t payer_note_truncated_arg) {
- LDKPublicKey payer_id_arg_ref;
- CHECK(payer_id_arg->arr_len == 33);
- memcpy(payer_id_arg_ref.compressed_form, payer_id_arg->elems, 33); FREE(payer_id_arg);
+int64_t CS_LDK_InvoiceRequestFields_get_human_readable_name(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;
+ LDKHumanReadableName ret_var = InvoiceRequestFields_get_human_readable_name(&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;
+}
+
+void CS_LDK_InvoiceRequestFields_set_human_readable_name(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;
+ LDKHumanReadableName 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 = HumanReadableName_clone(&val_conv);
+ InvoiceRequestFields_set_human_readable_name(&this_ptr_conv, val_conv);
+}
+
+int64_t CS_LDK_InvoiceRequestFields_new(int8_tArray payer_signing_pubkey_arg, int64_t quantity_arg, int64_t payer_note_truncated_arg, int64_t human_readable_name_arg) {
+ LDKPublicKey payer_signing_pubkey_arg_ref;
+ CHECK(payer_signing_pubkey_arg->arr_len == 33);
+ memcpy(payer_signing_pubkey_arg_ref.compressed_form, payer_signing_pubkey_arg->elems, 33); FREE(payer_signing_pubkey_arg);
void* quantity_arg_ptr = untag_ptr(quantity_arg);
CHECK_ACCESS(quantity_arg_ptr);
LDKCOption_u64Z quantity_arg_conv = *(LDKCOption_u64Z*)(quantity_arg_ptr);
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);
+ LDKHumanReadableName human_readable_name_arg_conv;
+ human_readable_name_arg_conv.inner = untag_ptr(human_readable_name_arg);
+ human_readable_name_arg_conv.is_owned = ptr_is_owned(human_readable_name_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(human_readable_name_arg_conv);
+ human_readable_name_arg_conv = HumanReadableName_clone(&human_readable_name_arg_conv);
+ LDKInvoiceRequestFields ret_var = InvoiceRequestFields_new(payer_signing_pubkey_arg_ref, quantity_arg_conv, payer_note_truncated_arg_conv, human_readable_name_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_conv;
}
-int32_t CS_LDK_Bolt12SemanticError_missing_signing_pubkey() {
- int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_missing_signing_pubkey());
+int32_t CS_LDK_Bolt12SemanticError_missing_issuer_signing_pubkey() {
+ int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_missing_issuer_signing_pubkey());
return ret_conv;
}
-int32_t CS_LDK_Bolt12SemanticError_invalid_signing_pubkey() {
- int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_invalid_signing_pubkey());
- return ret_conv;
-}
-
-int32_t CS_LDK_Bolt12SemanticError_unexpected_signing_pubkey() {
- int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_unexpected_signing_pubkey());
+int32_t CS_LDK_Bolt12SemanticError_unexpected_issuer_signing_pubkey() {
+ int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_unexpected_issuer_signing_pubkey());
return ret_conv;
}
return ret_conv;
}
-int32_t CS_LDK_Bolt12SemanticError_missing_payer_id() {
- int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_missing_payer_id());
+int32_t CS_LDK_Bolt12SemanticError_missing_payer_signing_pubkey() {
+ int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_missing_payer_signing_pubkey());
return ret_conv;
}
return ret_conv;
}
+int32_t CS_LDK_Bolt12SemanticError_missing_signing_pubkey() {
+ int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_missing_signing_pubkey());
+ return ret_conv;
+}
+
+int32_t CS_LDK_Bolt12SemanticError_invalid_signing_pubkey() {
+ int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_invalid_signing_pubkey());
+ return ret_conv;
+}
+
int32_t CS_LDK_Bolt12SemanticError_missing_signature() {
int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_missing_signature());
return ret_conv;
}
+int32_t CS_LDK_Bolt12SemanticError_unexpected_human_readable_name() {
+ int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_unexpected_human_readable_name());
+ return ret_conv;
+}
+
void CS_LDK_RefundMaybeWithDerivedMetadataBuilder_free(int64_t this_obj) {
LDKRefundMaybeWithDerivedMetadataBuilder this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
-int64_t CS_LDK_RefundMaybeWithDerivedMetadataBuilder_new(int8_tArray metadata, int8_tArray payer_id, int64_t amount_msats) {
+int64_t CS_LDK_RefundMaybeWithDerivedMetadataBuilder_new(int8_tArray metadata, int8_tArray signing_pubkey, int64_t amount_msats) {
LDKCVec_u8Z metadata_ref;
metadata_ref.datalen = metadata->arr_len;
metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes");
memcpy(metadata_ref.data, metadata->elems, metadata_ref.datalen); FREE(metadata);
- LDKPublicKey payer_id_ref;
- CHECK(payer_id->arr_len == 33);
- memcpy(payer_id_ref.compressed_form, payer_id->elems, 33); FREE(payer_id);
+ LDKPublicKey signing_pubkey_ref;
+ CHECK(signing_pubkey->arr_len == 33);
+ memcpy(signing_pubkey_ref.compressed_form, signing_pubkey->elems, 33); FREE(signing_pubkey);
LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
- *ret_conv = RefundMaybeWithDerivedMetadataBuilder_new(metadata_ref, payer_id_ref, amount_msats);
+ *ret_conv = RefundMaybeWithDerivedMetadataBuilder_new(metadata_ref, signing_pubkey_ref, amount_msats);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(int8_tArray node_id, int64_t expanded_key, int64_t nonce, int64_t amount_msats, int8_tArray payment_id) {
+int64_t CS_LDK_RefundMaybeWithDerivedMetadataBuilder_deriving_signing_pubkey(int8_tArray node_id, int64_t expanded_key, int64_t nonce, int64_t amount_msats, int8_tArray payment_id) {
LDKPublicKey node_id_ref;
CHECK(node_id->arr_len == 33);
memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id);
CHECK(payment_id->arr_len == 32);
memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
- *ret_conv = RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(node_id_ref, &expanded_key_conv, nonce_conv, amount_msats, payment_id_ref);
+ *ret_conv = RefundMaybeWithDerivedMetadataBuilder_deriving_signing_pubkey(node_id_ref, &expanded_key_conv, nonce_conv, amount_msats, payment_id_ref);
return tag_ptr(ret_conv, true);
}
return ret_ref;
}
-int8_tArray CS_LDK_Refund_payer_id(int64_t this_arg) {
+int8_tArray CS_LDK_Refund_payer_signing_pubkey(int64_t this_arg) {
LDKRefund 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 = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, Refund_payer_id(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, Refund_payer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return tag_ptr(ret_ret, true);
}
-int64_t CS_LDK_DefaultRouter_as_MessageRouter(int64_t this_arg) {
- LDKDefaultRouter 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;
- LDKMessageRouter* ret_ret = MALLOC(sizeof(LDKMessageRouter), "LDKMessageRouter");
- *ret_ret = DefaultRouter_as_MessageRouter(&this_arg_conv);
- return tag_ptr(ret_ret, true);
-}
-
void CS_LDK_Router_free(int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
-int64_t CS_LDK_ProbabilisticScorer_historical_estimated_payment_success_probability(int64_t this_arg, int64_t scid, int64_t target, int64_t amount_msat, int64_t params) {
+int64_t CS_LDK_ProbabilisticScorer_historical_estimated_payment_success_probability(int64_t this_arg, int64_t scid, int64_t target, int64_t amount_msat, int64_t params, jboolean allow_fallback_estimation) {
+ LDKProbabilisticScorer 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 target_conv;
+ target_conv.inner = untag_ptr(target);
+ target_conv.is_owned = ptr_is_owned(target);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(target_conv);
+ target_conv.is_owned = false;
+ LDKProbabilisticScoringFeeParameters params_conv;
+ params_conv.inner = untag_ptr(params);
+ params_conv.is_owned = ptr_is_owned(params);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(params_conv);
+ params_conv.is_owned = false;
+ LDKCOption_f64Z *ret_copy = MALLOC(sizeof(LDKCOption_f64Z), "LDKCOption_f64Z");
+ *ret_copy = ProbabilisticScorer_historical_estimated_payment_success_probability(&this_arg_conv, scid, &target_conv, amount_msat, ¶ms_conv, allow_fallback_estimation);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_ProbabilisticScorer_live_estimated_payment_success_probability(int64_t this_arg, int64_t scid, int64_t target, int64_t amount_msat, int64_t params) {
LDKProbabilisticScorer 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(params_conv);
params_conv.is_owned = false;
LDKCOption_f64Z *ret_copy = MALLOC(sizeof(LDKCOption_f64Z), "LDKCOption_f64Z");
- *ret_copy = ProbabilisticScorer_historical_estimated_payment_success_probability(&this_arg_conv, scid, &target_conv, amount_msat, ¶ms_conv);
+ *ret_copy = ProbabilisticScorer_live_estimated_payment_success_probability(&this_arg_conv, scid, &target_conv, amount_msat, ¶ms_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
HeldHtlcAvailable_free(this_obj_conv);
}
-int8_tArray CS_LDK_HeldHtlcAvailable_get_payment_release_secret(int64_t this_ptr) {
- LDKHeldHtlcAvailable this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_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 = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, *HeldHtlcAvailable_get_payment_release_secret(&this_ptr_conv), 32);
- return ret_arr;
-}
-
-void CS_LDK_HeldHtlcAvailable_set_payment_release_secret(int64_t this_ptr, int8_tArray val) {
- LDKHeldHtlcAvailable this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_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(val->arr_len == 32);
- memcpy(val_ref.data, val->elems, 32); FREE(val);
- HeldHtlcAvailable_set_payment_release_secret(&this_ptr_conv, val_ref);
-}
-
-int64_t CS_LDK_HeldHtlcAvailable_new(int8_tArray payment_release_secret_arg) {
- LDKThirtyTwoBytes payment_release_secret_arg_ref;
- CHECK(payment_release_secret_arg->arr_len == 32);
- memcpy(payment_release_secret_arg_ref.data, payment_release_secret_arg->elems, 32); FREE(payment_release_secret_arg);
- LDKHeldHtlcAvailable ret_var = HeldHtlcAvailable_new(payment_release_secret_arg_ref);
+int64_t CS_LDK_HeldHtlcAvailable_new() {
+ LDKHeldHtlcAvailable ret_var = HeldHtlcAvailable_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);
ReleaseHeldHtlc_free(this_obj_conv);
}
-int8_tArray CS_LDK_ReleaseHeldHtlc_get_payment_release_secret(int64_t this_ptr) {
- LDKReleaseHeldHtlc this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_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 = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, *ReleaseHeldHtlc_get_payment_release_secret(&this_ptr_conv), 32);
- return ret_arr;
-}
-
-void CS_LDK_ReleaseHeldHtlc_set_payment_release_secret(int64_t this_ptr, int8_tArray val) {
- LDKReleaseHeldHtlc this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_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(val->arr_len == 32);
- memcpy(val_ref.data, val->elems, 32); FREE(val);
- ReleaseHeldHtlc_set_payment_release_secret(&this_ptr_conv, val_ref);
-}
-
-int64_t CS_LDK_ReleaseHeldHtlc_new(int8_tArray payment_release_secret_arg) {
- LDKThirtyTwoBytes payment_release_secret_arg_ref;
- CHECK(payment_release_secret_arg->arr_len == 32);
- memcpy(payment_release_secret_arg_ref.data, payment_release_secret_arg->elems, 32); FREE(payment_release_secret_arg);
- LDKReleaseHeldHtlc ret_var = ReleaseHeldHtlc_new(payment_release_secret_arg_ref);
+int64_t CS_LDK_ReleaseHeldHtlc_new() {
+ LDKReleaseHeldHtlc ret_var = ReleaseHeldHtlc_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 tag_ptr(ret_conv, true);
}
+void CS_LDK_DNSResolverMessageHandler_free(int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKDNSResolverMessageHandler this_ptr_conv = *(LDKDNSResolverMessageHandler*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ DNSResolverMessageHandler_free(this_ptr_conv);
+}
+
+void CS_LDK_DNSResolverMessage_free(int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKDNSResolverMessage this_ptr_conv = *(LDKDNSResolverMessage*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ DNSResolverMessage_free(this_ptr_conv);
+}
+
+static inline uint64_t DNSResolverMessage_clone_ptr(LDKDNSResolverMessage *NONNULL_PTR arg) {
+ LDKDNSResolverMessage *ret_copy = MALLOC(sizeof(LDKDNSResolverMessage), "LDKDNSResolverMessage");
+ *ret_copy = DNSResolverMessage_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t CS_LDK_DNSResolverMessage_clone_ptr(int64_t arg) {
+ LDKDNSResolverMessage* arg_conv = (LDKDNSResolverMessage*)untag_ptr(arg);
+ int64_t ret_conv = DNSResolverMessage_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_DNSResolverMessage_clone(int64_t orig) {
+ LDKDNSResolverMessage* orig_conv = (LDKDNSResolverMessage*)untag_ptr(orig);
+ LDKDNSResolverMessage *ret_copy = MALLOC(sizeof(LDKDNSResolverMessage), "LDKDNSResolverMessage");
+ *ret_copy = DNSResolverMessage_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_DNSResolverMessage_dnssecquery(int64_t a) {
+ LDKDNSSECQuery 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 = DNSSECQuery_clone(&a_conv);
+ LDKDNSResolverMessage *ret_copy = MALLOC(sizeof(LDKDNSResolverMessage), "LDKDNSResolverMessage");
+ *ret_copy = DNSResolverMessage_dnssecquery(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_DNSResolverMessage_dnssecproof(int64_t a) {
+ LDKDNSSECProof 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 = DNSSECProof_clone(&a_conv);
+ LDKDNSResolverMessage *ret_copy = MALLOC(sizeof(LDKDNSResolverMessage), "LDKDNSResolverMessage");
+ *ret_copy = DNSResolverMessage_dnssecproof(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_DNSResolverMessage_hash(int64_t o) {
+ LDKDNSResolverMessage* o_conv = (LDKDNSResolverMessage*)untag_ptr(o);
+ int64_t ret_conv = DNSResolverMessage_hash(o_conv);
+ return ret_conv;
+}
+
+jboolean CS_LDK_DNSResolverMessage_eq(int64_t a, int64_t b) {
+ LDKDNSResolverMessage* a_conv = (LDKDNSResolverMessage*)untag_ptr(a);
+ LDKDNSResolverMessage* b_conv = (LDKDNSResolverMessage*)untag_ptr(b);
+ jboolean ret_conv = DNSResolverMessage_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
+void CS_LDK_DNSSECQuery_free(int64_t this_obj) {
+ LDKDNSSECQuery 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);
+ DNSSECQuery_free(this_obj_conv);
+}
+
+static inline uint64_t DNSSECQuery_clone_ptr(LDKDNSSECQuery *NONNULL_PTR arg) {
+ LDKDNSSECQuery ret_var = DNSSECQuery_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;
+}
+int64_t CS_LDK_DNSSECQuery_clone_ptr(int64_t arg) {
+ LDKDNSSECQuery 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 = DNSSECQuery_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_DNSSECQuery_clone(int64_t orig) {
+ LDKDNSSECQuery 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;
+ LDKDNSSECQuery ret_var = DNSSECQuery_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;
+}
+
+int64_t CS_LDK_DNSSECQuery_hash(int64_t o) {
+ LDKDNSSECQuery 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 = DNSSECQuery_hash(&o_conv);
+ return ret_conv;
+}
+
+jboolean CS_LDK_DNSSECQuery_eq(int64_t a, int64_t b) {
+ LDKDNSSECQuery 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;
+ LDKDNSSECQuery 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 = DNSSECQuery_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+void CS_LDK_DNSSECProof_free(int64_t this_obj) {
+ LDKDNSSECProof 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);
+ DNSSECProof_free(this_obj_conv);
+}
+
+int8_tArray CS_LDK_DNSSECProof_get_proof(int64_t this_ptr) {
+ LDKDNSSECProof this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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 = DNSSECProof_get_proof(&this_ptr_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+void CS_LDK_DNSSECProof_set_proof(int64_t this_ptr, int8_tArray val) {
+ LDKDNSSECProof this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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 = val->arr_len;
+ val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes");
+ memcpy(val_ref.data, val->elems, val_ref.datalen); FREE(val);
+ DNSSECProof_set_proof(&this_ptr_conv, val_ref);
+}
+
+static inline uint64_t DNSSECProof_clone_ptr(LDKDNSSECProof *NONNULL_PTR arg) {
+ LDKDNSSECProof ret_var = DNSSECProof_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;
+}
+int64_t CS_LDK_DNSSECProof_clone_ptr(int64_t arg) {
+ LDKDNSSECProof 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 = DNSSECProof_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_DNSSECProof_clone(int64_t orig) {
+ LDKDNSSECProof 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;
+ LDKDNSSECProof ret_var = DNSSECProof_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;
+}
+
+int64_t CS_LDK_DNSSECProof_hash(int64_t o) {
+ LDKDNSSECProof 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 = DNSSECProof_hash(&o_conv);
+ return ret_conv;
+}
+
+jboolean CS_LDK_DNSSECProof_eq(int64_t a, int64_t b) {
+ LDKDNSSECProof 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;
+ LDKDNSSECProof 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 = DNSSECProof_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+jboolean CS_LDK_DNSResolverMessage_is_known_type(int64_t tlv_type) {
+ jboolean ret_conv = DNSResolverMessage_is_known_type(tlv_type);
+ return ret_conv;
+}
+
+int8_tArray CS_LDK_DNSResolverMessage_write(int64_t obj) {
+ LDKDNSResolverMessage* obj_conv = (LDKDNSResolverMessage*)untag_ptr(obj);
+ LDKCVec_u8Z ret_var = DNSResolverMessage_write(obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_DNSResolverMessage_read(int8_tArray ser, int64_t arg) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_DNSResolverMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverMessageDecodeErrorZ), "LDKCResult_DNSResolverMessageDecodeErrorZ");
+ *ret_conv = DNSResolverMessage_read(ser_ref, arg);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_DNSResolverMessage_as_OnionMessageContents(int64_t this_arg) {
+ LDKDNSResolverMessage* this_arg_conv = (LDKDNSResolverMessage*)untag_ptr(this_arg);
+ LDKOnionMessageContents* ret_ret = MALLOC(sizeof(LDKOnionMessageContents), "LDKOnionMessageContents");
+ *ret_ret = DNSResolverMessage_as_OnionMessageContents(this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
+void CS_LDK_HumanReadableName_free(int64_t this_obj) {
+ LDKHumanReadableName 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);
+ HumanReadableName_free(this_obj_conv);
+}
+
+static inline uint64_t HumanReadableName_clone_ptr(LDKHumanReadableName *NONNULL_PTR arg) {
+ LDKHumanReadableName ret_var = HumanReadableName_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;
+}
+int64_t CS_LDK_HumanReadableName_clone_ptr(int64_t arg) {
+ LDKHumanReadableName 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 = HumanReadableName_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_HumanReadableName_clone(int64_t orig) {
+ LDKHumanReadableName 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;
+ LDKHumanReadableName ret_var = HumanReadableName_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;
+}
+
+int64_t CS_LDK_HumanReadableName_hash(int64_t o) {
+ LDKHumanReadableName 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 = HumanReadableName_hash(&o_conv);
+ return ret_conv;
+}
+
+jboolean CS_LDK_HumanReadableName_eq(int64_t a, int64_t b) {
+ LDKHumanReadableName 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;
+ LDKHumanReadableName 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 = HumanReadableName_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_HumanReadableName_new(jstring user, jstring domain) {
+ LDKStr user_conv = str_ref_to_owned_c(user);
+ LDKStr domain_conv = str_ref_to_owned_c(domain);
+ LDKCResult_HumanReadableNameNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameNoneZ), "LDKCResult_HumanReadableNameNoneZ");
+ *ret_conv = HumanReadableName_new(user_conv, domain_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_HumanReadableName_from_encoded(jstring encoded) {
+ LDKStr encoded_conv = str_ref_to_owned_c(encoded);
+ LDKCResult_HumanReadableNameNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameNoneZ), "LDKCResult_HumanReadableNameNoneZ");
+ *ret_conv = HumanReadableName_from_encoded(encoded_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jstring CS_LDK_HumanReadableName_user(int64_t this_arg) {
+ LDKHumanReadableName 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;
+ LDKStr ret_str = HumanReadableName_user(&this_arg_conv);
+ jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
+ Str_free(ret_str);
+ return ret_conv;
+}
+
+jstring CS_LDK_HumanReadableName_domain(int64_t this_arg) {
+ LDKHumanReadableName 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;
+ LDKStr ret_str = HumanReadableName_domain(&this_arg_conv);
+ jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
+ Str_free(ret_str);
+ return ret_conv;
+}
+
+int8_tArray CS_LDK_HumanReadableName_write(int64_t obj) {
+ LDKHumanReadableName 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 = HumanReadableName_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_HumanReadableName_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_HumanReadableNameDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameDecodeErrorZ), "LDKCResult_HumanReadableNameDecodeErrorZ");
+ *ret_conv = HumanReadableName_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_OMNameResolver_free(int64_t this_obj) {
+ LDKOMNameResolver 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);
+ OMNameResolver_free(this_obj_conv);
+}
+
+int64_t CS_LDK_OMNameResolver_new(int32_t latest_block_time, int32_t latest_block_height) {
+ LDKOMNameResolver ret_var = OMNameResolver_new(latest_block_time, latest_block_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;
+}
+
+void CS_LDK_OMNameResolver_new_best_block(int64_t this_arg, int32_t height, int32_t time) {
+ LDKOMNameResolver 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;
+ OMNameResolver_new_best_block(&this_arg_conv, height, time);
+}
+
+int64_t CS_LDK_OMNameResolver_resolve_name(int64_t this_arg, int8_tArray payment_id, int64_t name, int64_t entropy_source) {
+ LDKOMNameResolver 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(payment_id->arr_len == 32);
+ memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
+ LDKHumanReadableName name_conv;
+ name_conv.inner = untag_ptr(name);
+ name_conv.is_owned = ptr_is_owned(name);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(name_conv);
+ name_conv = HumanReadableName_clone(&name_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;
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ), "LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ");
+ *ret_conv = OMNameResolver_resolve_name(&this_arg_conv, payment_id_ref, name_conv, entropy_source_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_OMNameResolver_handle_dnssec_proof_for_offer(int64_t this_arg, int64_t msg, int64_t context) {
+ LDKOMNameResolver 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;
+ LDKDNSSECProof 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 = DNSSECProof_clone(&msg_conv);
+ LDKDNSResolverContext context_conv;
+ context_conv.inner = untag_ptr(context);
+ context_conv.is_owned = ptr_is_owned(context);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(context_conv);
+ context_conv = DNSResolverContext_clone(&context_conv);
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ");
+ *ret_copy = OMNameResolver_handle_dnssec_proof_for_offer(&this_arg_conv, msg_conv, context_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_OMNameResolver_handle_dnssec_proof_for_uri(int64_t this_arg, int64_t msg, int64_t context) {
+ LDKOMNameResolver 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;
+ LDKDNSSECProof 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 = DNSSECProof_clone(&msg_conv);
+ LDKDNSResolverContext context_conv;
+ context_conv.inner = untag_ptr(context);
+ context_conv.is_owned = ptr_is_owned(context);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(context_conv);
+ context_conv = DNSResolverContext_clone(&context_conv);
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ");
+ *ret_copy = OMNameResolver_handle_dnssec_proof_for_uri(&this_arg_conv, msg_conv, context_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
void CS_LDK_OnionMessenger_free(int64_t this_obj) {
LDKOnionMessenger this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+int64_t CS_LDK_ResponseInstruction_into_instructions(int64_t this_arg) {
+ LDKResponseInstruction 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 = ResponseInstruction_clone(&this_arg_conv);
+ LDKMessageSendInstructions *ret_copy = MALLOC(sizeof(LDKMessageSendInstructions), "LDKMessageSendInstructions");
+ *ret_copy = ResponseInstruction_into_instructions(this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
void CS_LDK_MessageSendInstructions_free(int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_OnionMessenger_new(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 async_payments_handler, int64_t custom_handler) {
+int64_t CS_LDK_OnionMessenger_new(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 async_payments_handler, int64_t dns_resolver, 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);
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKAsyncPaymentsMessageHandler_JCalls_cloned(&async_payments_handler_conv);
}
+ void* dns_resolver_ptr = untag_ptr(dns_resolver);
+ CHECK_ACCESS(dns_resolver_ptr);
+ LDKDNSResolverMessageHandler dns_resolver_conv = *(LDKDNSResolverMessageHandler*)(dns_resolver_ptr);
+ if (dns_resolver_conv.free == LDKDNSResolverMessageHandler_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKDNSResolverMessageHandler_JCalls_cloned(&dns_resolver_conv);
+ }
void* custom_handler_ptr = untag_ptr(custom_handler);
CHECK_ACCESS(custom_handler_ptr);
LDKCustomOnionMessageHandler custom_handler_conv = *(LDKCustomOnionMessageHandler*)(custom_handler_ptr);
// 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, node_id_lookup_conv, message_router_conv, offers_handler_conv, async_payments_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, async_payments_handler_conv, dns_resolver_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);
return ret_ref;
}
-int64_t CS_LDK_OnionMessenger_new_with_offline_peer_interception(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 async_payments_handler, int64_t custom_handler) {
+int64_t CS_LDK_OnionMessenger_new_with_offline_peer_interception(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 async_payments_handler, int64_t dns_resolver, 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);
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKAsyncPaymentsMessageHandler_JCalls_cloned(&async_payments_handler_conv);
}
+ void* dns_resolver_ptr = untag_ptr(dns_resolver);
+ CHECK_ACCESS(dns_resolver_ptr);
+ LDKDNSResolverMessageHandler dns_resolver_conv = *(LDKDNSResolverMessageHandler*)(dns_resolver_ptr);
+ if (dns_resolver_conv.free == LDKDNSResolverMessageHandler_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKDNSResolverMessageHandler_JCalls_cloned(&dns_resolver_conv);
+ }
void* custom_handler_ptr = untag_ptr(custom_handler);
CHECK_ACCESS(custom_handler_ptr);
LDKCustomOnionMessageHandler custom_handler_conv = *(LDKCustomOnionMessageHandler*)(custom_handler_ptr);
// 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_with_offline_peer_interception(entropy_source_conv, node_signer_conv, logger_conv, node_id_lookup_conv, message_router_conv, offers_handler_conv, async_payments_handler_conv, custom_handler_conv);
+ LDKOnionMessenger ret_var = OnionMessenger_new_with_offline_peer_interception(entropy_source_conv, node_signer_conv, logger_conv, node_id_lookup_conv, message_router_conv, offers_handler_conv, async_payments_handler_conv, dns_resolver_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);
return ret_ref;
}
+int64_t CS_LDK_ParsedOnionMessageContents_dnsresolver(int64_t a) {
+ void* a_ptr = untag_ptr(a);
+ CHECK_ACCESS(a_ptr);
+ LDKDNSResolverMessage a_conv = *(LDKDNSResolverMessage*)(a_ptr);
+ a_conv = DNSResolverMessage_clone((LDKDNSResolverMessage*)untag_ptr(a));
+ LDKParsedOnionMessageContents *ret_copy = MALLOC(sizeof(LDKParsedOnionMessageContents), "LDKParsedOnionMessageContents");
+ *ret_copy = ParsedOnionMessageContents_dnsresolver(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
int64_t CS_LDK_ParsedOnionMessageContents_custom(int64_t a) {
void* a_ptr = untag_ptr(a);
CHECK_ACCESS(a_ptr);
ReceiveTlvs_free(this_obj_conv);
}
-int8_tArray CS_LDK_ReceiveTlvs_get_payment_secret(int64_t this_ptr) {
- LDKReceiveTlvs this_ptr_conv;
+static inline uint64_t ReceiveTlvs_clone_ptr(LDKReceiveTlvs *NONNULL_PTR arg) {
+ LDKReceiveTlvs ret_var = ReceiveTlvs_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;
+}
+int64_t CS_LDK_ReceiveTlvs_clone_ptr(int64_t arg) {
+ LDKReceiveTlvs 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 = ReceiveTlvs_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_ReceiveTlvs_clone(int64_t orig) {
+ LDKReceiveTlvs 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;
+ LDKReceiveTlvs ret_var = ReceiveTlvs_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;
+}
+
+int64_t CS_LDK_ReceiveTlvs_tlvs(int64_t this_arg) {
+ LDKReceiveTlvs 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;
+ LDKUnauthenticatedReceiveTlvs ret_var = ReceiveTlvs_tlvs(&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;
+}
+
+void CS_LDK_UnauthenticatedReceiveTlvs_free(int64_t this_obj) {
+ LDKUnauthenticatedReceiveTlvs 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);
+ UnauthenticatedReceiveTlvs_free(this_obj_conv);
+}
+
+int8_tArray CS_LDK_UnauthenticatedReceiveTlvs_get_payment_secret(int64_t this_ptr) {
+ LDKUnauthenticatedReceiveTlvs this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_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 = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, *ReceiveTlvs_get_payment_secret(&this_ptr_conv), 32);
+ memcpy(ret_arr->elems, *UnauthenticatedReceiveTlvs_get_payment_secret(&this_ptr_conv), 32);
return ret_arr;
}
-void CS_LDK_ReceiveTlvs_set_payment_secret(int64_t this_ptr, int8_tArray val) {
- LDKReceiveTlvs this_ptr_conv;
+void CS_LDK_UnauthenticatedReceiveTlvs_set_payment_secret(int64_t this_ptr, int8_tArray val) {
+ LDKUnauthenticatedReceiveTlvs this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKThirtyTwoBytes val_ref;
CHECK(val->arr_len == 32);
memcpy(val_ref.data, val->elems, 32); FREE(val);
- ReceiveTlvs_set_payment_secret(&this_ptr_conv, val_ref);
+ UnauthenticatedReceiveTlvs_set_payment_secret(&this_ptr_conv, val_ref);
}
-int64_t CS_LDK_ReceiveTlvs_get_payment_constraints(int64_t this_ptr) {
- LDKReceiveTlvs this_ptr_conv;
+int64_t CS_LDK_UnauthenticatedReceiveTlvs_get_payment_constraints(int64_t this_ptr) {
+ LDKUnauthenticatedReceiveTlvs this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKPaymentConstraints ret_var = ReceiveTlvs_get_payment_constraints(&this_ptr_conv);
+ LDKPaymentConstraints ret_var = UnauthenticatedReceiveTlvs_get_payment_constraints(&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;
}
-void CS_LDK_ReceiveTlvs_set_payment_constraints(int64_t this_ptr, int64_t val) {
- LDKReceiveTlvs this_ptr_conv;
+void CS_LDK_UnauthenticatedReceiveTlvs_set_payment_constraints(int64_t this_ptr, int64_t val) {
+ LDKUnauthenticatedReceiveTlvs this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
val_conv.is_owned = ptr_is_owned(val);
CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
val_conv = PaymentConstraints_clone(&val_conv);
- ReceiveTlvs_set_payment_constraints(&this_ptr_conv, val_conv);
+ UnauthenticatedReceiveTlvs_set_payment_constraints(&this_ptr_conv, val_conv);
}
-int64_t CS_LDK_ReceiveTlvs_get_payment_context(int64_t this_ptr) {
- LDKReceiveTlvs this_ptr_conv;
+int64_t CS_LDK_UnauthenticatedReceiveTlvs_get_payment_context(int64_t this_ptr) {
+ LDKUnauthenticatedReceiveTlvs this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_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);
+ *ret_copy = UnauthenticatedReceiveTlvs_get_payment_context(&this_ptr_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-void CS_LDK_ReceiveTlvs_set_payment_context(int64_t this_ptr, int64_t val) {
- LDKReceiveTlvs this_ptr_conv;
+void CS_LDK_UnauthenticatedReceiveTlvs_set_payment_context(int64_t this_ptr, int64_t val) {
+ LDKUnauthenticatedReceiveTlvs this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
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);
+ UnauthenticatedReceiveTlvs_set_payment_context(&this_ptr_conv, val_conv);
}
-int64_t CS_LDK_ReceiveTlvs_new(int8_tArray payment_secret_arg, int64_t payment_constraints_arg, int64_t payment_context_arg) {
+int64_t CS_LDK_UnauthenticatedReceiveTlvs_new(int8_tArray payment_secret_arg, int64_t payment_constraints_arg, int64_t payment_context_arg) {
LDKThirtyTwoBytes payment_secret_arg_ref;
CHECK(payment_secret_arg->arr_len == 32);
memcpy(payment_secret_arg_ref.data, payment_secret_arg->elems, 32); FREE(payment_secret_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);
+ LDKUnauthenticatedReceiveTlvs ret_var = UnauthenticatedReceiveTlvs_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);
return ret_ref;
}
-static inline uint64_t ReceiveTlvs_clone_ptr(LDKReceiveTlvs *NONNULL_PTR arg) {
- LDKReceiveTlvs ret_var = ReceiveTlvs_clone(arg);
+static inline uint64_t UnauthenticatedReceiveTlvs_clone_ptr(LDKUnauthenticatedReceiveTlvs *NONNULL_PTR arg) {
+ LDKUnauthenticatedReceiveTlvs ret_var = UnauthenticatedReceiveTlvs_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;
}
-int64_t CS_LDK_ReceiveTlvs_clone_ptr(int64_t arg) {
- LDKReceiveTlvs arg_conv;
+int64_t CS_LDK_UnauthenticatedReceiveTlvs_clone_ptr(int64_t arg) {
+ LDKUnauthenticatedReceiveTlvs 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 = ReceiveTlvs_clone_ptr(&arg_conv);
+ int64_t ret_conv = UnauthenticatedReceiveTlvs_clone_ptr(&arg_conv);
return ret_conv;
}
-int64_t CS_LDK_ReceiveTlvs_clone(int64_t orig) {
- LDKReceiveTlvs orig_conv;
+int64_t CS_LDK_UnauthenticatedReceiveTlvs_clone(int64_t orig) {
+ LDKUnauthenticatedReceiveTlvs 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;
- LDKReceiveTlvs ret_var = ReceiveTlvs_clone(&orig_conv);
+ LDKUnauthenticatedReceiveTlvs ret_var = UnauthenticatedReceiveTlvs_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;
+}
+
+int64_t CS_LDK_UnauthenticatedReceiveTlvs_authenticate(int64_t this_arg, int64_t nonce, int64_t expanded_key) {
+ LDKUnauthenticatedReceiveTlvs 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 = UnauthenticatedReceiveTlvs_clone(&this_arg_conv);
+ LDKNonce nonce_conv;
+ nonce_conv.inner = untag_ptr(nonce);
+ nonce_conv.is_owned = ptr_is_owned(nonce);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_conv);
+ nonce_conv = Nonce_clone(&nonce_conv);
+ 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;
+ LDKReceiveTlvs ret_var = UnauthenticatedReceiveTlvs_authenticate(this_arg_conv, nonce_conv, &expanded_key_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-int64_t CS_LDK_PaymentContext_unknown(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;
-}
-
int64_t CS_LDK_PaymentContext_bolt12_offer(int64_t a) {
LDKBolt12OfferContext a_conv;
a_conv.inner = untag_ptr(a);
return ret_conv;
}
-void CS_LDK_UnknownPaymentContext_free(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;
-}
-int64_t CS_LDK_UnknownPaymentContext_clone_ptr(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;
-}
-
-int64_t CS_LDK_UnknownPaymentContext_clone(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;
-}
-
-jboolean CS_LDK_UnknownPaymentContext_eq(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;
-}
-
void CS_LDK_Bolt12OfferContext_free(int64_t this_obj) {
LDKBolt12OfferContext this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_arr;
}
+int8_tArray CS_LDK_UnauthenticatedReceiveTlvs_write(int64_t obj) {
+ LDKUnauthenticatedReceiveTlvs 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 = UnauthenticatedReceiveTlvs_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
int8_tArray CS_LDK_PaymentRelay_write(int64_t obj) {
LDKPaymentRelay obj_conv;
obj_conv.inner = untag_ptr(obj);
return tag_ptr(ret_conv, true);
}
-int8_tArray CS_LDK_UnknownPaymentContext_write(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 = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-int64_t CS_LDK_UnknownPaymentContext_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
- *ret_conv = UnknownPaymentContext_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
-}
-
int8_tArray CS_LDK_Bolt12OfferContext_write(int64_t obj) {
LDKBolt12OfferContext obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+int64_t CS_LDK_MessageContext_async_payments(int64_t a) {
+ void* a_ptr = untag_ptr(a);
+ CHECK_ACCESS(a_ptr);
+ LDKAsyncPaymentsContext a_conv = *(LDKAsyncPaymentsContext*)(a_ptr);
+ a_conv = AsyncPaymentsContext_clone((LDKAsyncPaymentsContext*)untag_ptr(a));
+ LDKMessageContext *ret_copy = MALLOC(sizeof(LDKMessageContext), "LDKMessageContext");
+ *ret_copy = MessageContext_async_payments(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_MessageContext_dnsresolver(int64_t a) {
+ LDKDNSResolverContext 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 = DNSResolverContext_clone(&a_conv);
+ LDKMessageContext *ret_copy = MALLOC(sizeof(LDKMessageContext), "LDKMessageContext");
+ *ret_copy = MessageContext_dnsresolver(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
int64_t CS_LDK_MessageContext_custom(int8_tArray a) {
LDKCVec_u8Z a_ref;
a_ref.datalen = a->arr_len;
return ret_ref;
}
-int64_t CS_LDK_OffersContext_inbound_payment(int8_tArray payment_hash) {
+int64_t CS_LDK_OffersContext_inbound_payment(int8_tArray payment_hash, int64_t nonce, int8_tArray hmac) {
LDKThirtyTwoBytes payment_hash_ref;
CHECK(payment_hash->arr_len == 32);
memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash);
+ LDKNonce nonce_conv;
+ nonce_conv.inner = untag_ptr(nonce);
+ nonce_conv.is_owned = ptr_is_owned(nonce);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_conv);
+ nonce_conv = Nonce_clone(&nonce_conv);
+ LDKThirtyTwoBytes hmac_ref;
+ CHECK(hmac->arr_len == 32);
+ memcpy(hmac_ref.data, hmac->elems, 32); FREE(hmac);
LDKOffersContext *ret_copy = MALLOC(sizeof(LDKOffersContext), "LDKOffersContext");
- *ret_copy = OffersContext_inbound_payment(payment_hash_ref);
+ *ret_copy = OffersContext_inbound_payment(payment_hash_ref, nonce_conv, hmac_ref);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_conv;
}
+void CS_LDK_AsyncPaymentsContext_free(int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKAsyncPaymentsContext this_ptr_conv = *(LDKAsyncPaymentsContext*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ AsyncPaymentsContext_free(this_ptr_conv);
+}
+
+static inline uint64_t AsyncPaymentsContext_clone_ptr(LDKAsyncPaymentsContext *NONNULL_PTR arg) {
+ LDKAsyncPaymentsContext *ret_copy = MALLOC(sizeof(LDKAsyncPaymentsContext), "LDKAsyncPaymentsContext");
+ *ret_copy = AsyncPaymentsContext_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t CS_LDK_AsyncPaymentsContext_clone_ptr(int64_t arg) {
+ LDKAsyncPaymentsContext* arg_conv = (LDKAsyncPaymentsContext*)untag_ptr(arg);
+ int64_t ret_conv = AsyncPaymentsContext_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_AsyncPaymentsContext_clone(int64_t orig) {
+ LDKAsyncPaymentsContext* orig_conv = (LDKAsyncPaymentsContext*)untag_ptr(orig);
+ LDKAsyncPaymentsContext *ret_copy = MALLOC(sizeof(LDKAsyncPaymentsContext), "LDKAsyncPaymentsContext");
+ *ret_copy = AsyncPaymentsContext_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_AsyncPaymentsContext_outbound_payment(int8_tArray payment_id, int64_t nonce, int8_tArray hmac) {
+ LDKThirtyTwoBytes payment_id_ref;
+ CHECK(payment_id->arr_len == 32);
+ memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
+ LDKNonce nonce_conv;
+ nonce_conv.inner = untag_ptr(nonce);
+ nonce_conv.is_owned = ptr_is_owned(nonce);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_conv);
+ nonce_conv = Nonce_clone(&nonce_conv);
+ LDKThirtyTwoBytes hmac_ref;
+ CHECK(hmac->arr_len == 32);
+ memcpy(hmac_ref.data, hmac->elems, 32); FREE(hmac);
+ LDKAsyncPaymentsContext *ret_copy = MALLOC(sizeof(LDKAsyncPaymentsContext), "LDKAsyncPaymentsContext");
+ *ret_copy = AsyncPaymentsContext_outbound_payment(payment_id_ref, nonce_conv, hmac_ref);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
int8_tArray CS_LDK_MessageContext_write(int64_t obj) {
LDKMessageContext* obj_conv = (LDKMessageContext*)untag_ptr(obj);
LDKCVec_u8Z ret_var = MessageContext_write(obj_conv);
return tag_ptr(ret_conv, true);
}
+int8_tArray CS_LDK_AsyncPaymentsContext_write(int64_t obj) {
+ LDKAsyncPaymentsContext* obj_conv = (LDKAsyncPaymentsContext*)untag_ptr(obj);
+ LDKCVec_u8Z ret_var = AsyncPaymentsContext_write(obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_AsyncPaymentsContext_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AsyncPaymentsContextDecodeErrorZ), "LDKCResult_AsyncPaymentsContextDecodeErrorZ");
+ *ret_conv = AsyncPaymentsContext_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_DNSResolverContext_free(int64_t this_obj) {
+ LDKDNSResolverContext 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);
+ DNSResolverContext_free(this_obj_conv);
+}
+
+int8_tArray CS_LDK_DNSResolverContext_get_nonce(int64_t this_ptr) {
+ LDKDNSResolverContext this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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 = init_int8_tArray(16, __LINE__);
+ memcpy(ret_arr->elems, *DNSResolverContext_get_nonce(&this_ptr_conv), 16);
+ return ret_arr;
+}
+
+void CS_LDK_DNSResolverContext_set_nonce(int64_t this_ptr, int8_tArray val) {
+ LDKDNSResolverContext this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKSixteenBytes val_ref;
+ CHECK(val->arr_len == 16);
+ memcpy(val_ref.data, val->elems, 16); FREE(val);
+ DNSResolverContext_set_nonce(&this_ptr_conv, val_ref);
+}
+
+int64_t CS_LDK_DNSResolverContext_new(int8_tArray nonce_arg) {
+ LDKSixteenBytes nonce_arg_ref;
+ CHECK(nonce_arg->arr_len == 16);
+ memcpy(nonce_arg_ref.data, nonce_arg->elems, 16); FREE(nonce_arg);
+ LDKDNSResolverContext ret_var = DNSResolverContext_new(nonce_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 DNSResolverContext_clone_ptr(LDKDNSResolverContext *NONNULL_PTR arg) {
+ LDKDNSResolverContext ret_var = DNSResolverContext_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;
+}
+int64_t CS_LDK_DNSResolverContext_clone_ptr(int64_t arg) {
+ LDKDNSResolverContext 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 = DNSResolverContext_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_DNSResolverContext_clone(int64_t orig) {
+ LDKDNSResolverContext 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;
+ LDKDNSResolverContext ret_var = DNSResolverContext_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;
+}
+
+int64_t CS_LDK_DNSResolverContext_hash(int64_t o) {
+ LDKDNSResolverContext 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 = DNSResolverContext_hash(&o_conv);
+ return ret_conv;
+}
+
+jboolean CS_LDK_DNSResolverContext_eq(int64_t a, int64_t b) {
+ LDKDNSResolverContext 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;
+ LDKDNSResolverContext 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 = DNSResolverContext_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+int8_tArray CS_LDK_DNSResolverContext_write(int64_t obj) {
+ LDKDNSResolverContext 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 = DNSResolverContext_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_DNSResolverContext_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_DNSResolverContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverContextDecodeErrorZ), "LDKCResult_DNSResolverContextDecodeErrorZ");
+ *ret_conv = DNSResolverContext_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
void CS_LDK_FundingInfo_free(int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_conv;
}
+int32_t CS_LDK_PaymentFailureReason_blinded_path_creation_failed() {
+ int32_t ret_conv = LDKPaymentFailureReason_to_cs(PaymentFailureReason_blinded_path_creation_failed());
+ return ret_conv;
+}
+
jboolean CS_LDK_PaymentFailureReason_eq(int64_t a, int64_t b) {
LDKPaymentFailureReason* a_conv = (LDKPaymentFailureReason*)untag_ptr(a);
LDKPaymentFailureReason* b_conv = (LDKPaymentFailureReason*)untag_ptr(b);
return tag_ptr(ret_conv, true);
}
+void CS_LDK_InboundChannelFunds_free(int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKInboundChannelFunds this_ptr_conv = *(LDKInboundChannelFunds*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ InboundChannelFunds_free(this_ptr_conv);
+}
+
+static inline uint64_t InboundChannelFunds_clone_ptr(LDKInboundChannelFunds *NONNULL_PTR arg) {
+ LDKInboundChannelFunds *ret_copy = MALLOC(sizeof(LDKInboundChannelFunds), "LDKInboundChannelFunds");
+ *ret_copy = InboundChannelFunds_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t CS_LDK_InboundChannelFunds_clone_ptr(int64_t arg) {
+ LDKInboundChannelFunds* arg_conv = (LDKInboundChannelFunds*)untag_ptr(arg);
+ int64_t ret_conv = InboundChannelFunds_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_InboundChannelFunds_clone(int64_t orig) {
+ LDKInboundChannelFunds* orig_conv = (LDKInboundChannelFunds*)untag_ptr(orig);
+ LDKInboundChannelFunds *ret_copy = MALLOC(sizeof(LDKInboundChannelFunds), "LDKInboundChannelFunds");
+ *ret_copy = InboundChannelFunds_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_InboundChannelFunds_push_msat(int64_t a) {
+ LDKInboundChannelFunds *ret_copy = MALLOC(sizeof(LDKInboundChannelFunds), "LDKInboundChannelFunds");
+ *ret_copy = InboundChannelFunds_push_msat(a);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_InboundChannelFunds_dual_funded() {
+ LDKInboundChannelFunds *ret_copy = MALLOC(sizeof(LDKInboundChannelFunds), "LDKInboundChannelFunds");
+ *ret_copy = InboundChannelFunds_dual_funded();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+jboolean CS_LDK_InboundChannelFunds_eq(int64_t a, int64_t b) {
+ LDKInboundChannelFunds* a_conv = (LDKInboundChannelFunds*)untag_ptr(a);
+ LDKInboundChannelFunds* b_conv = (LDKInboundChannelFunds*)untag_ptr(b);
+ jboolean ret_conv = InboundChannelFunds_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
void CS_LDK_Event_free(int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
-int64_t CS_LDK_Event_payment_claimable(int8_tArray receiver_node_id, int8_tArray payment_hash, int64_t onion_fields, int64_t amount_msat, int64_t counterparty_skimmed_fee_msat, int64_t purpose, int64_t via_channel_id, int64_t via_user_channel_id, int64_t claim_deadline) {
+int64_t CS_LDK_Event_payment_claimable(int8_tArray receiver_node_id, int8_tArray payment_hash, int64_t onion_fields, int64_t amount_msat, int64_t counterparty_skimmed_fee_msat, int64_t purpose, int64_t via_channel_id, int64_t via_user_channel_id, int64_t claim_deadline, int64_t payment_id) {
LDKPublicKey receiver_node_id_ref;
CHECK(receiver_node_id->arr_len == 33);
memcpy(receiver_node_id_ref.compressed_form, receiver_node_id->elems, 33); FREE(receiver_node_id);
CHECK_ACCESS(claim_deadline_ptr);
LDKCOption_u32Z claim_deadline_conv = *(LDKCOption_u32Z*)(claim_deadline_ptr);
claim_deadline_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(claim_deadline));
+ void* payment_id_ptr = untag_ptr(payment_id);
+ CHECK_ACCESS(payment_id_ptr);
+ LDKCOption_ThirtyTwoBytesZ payment_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_id_ptr);
+ payment_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_id));
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_payment_claimable(receiver_node_id_ref, payment_hash_ref, onion_fields_conv, amount_msat, counterparty_skimmed_fee_msat, purpose_conv, via_channel_id_conv, via_user_channel_id_conv, claim_deadline_conv);
+ *ret_copy = Event_payment_claimable(receiver_node_id_ref, payment_hash_ref, onion_fields_conv, amount_msat, counterparty_skimmed_fee_msat, purpose_conv, via_channel_id_conv, via_user_channel_id_conv, claim_deadline_conv, payment_id_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-int64_t CS_LDK_Event_payment_claimed(int8_tArray receiver_node_id, int8_tArray payment_hash, int64_t amount_msat, int64_t purpose, int64_tArray htlcs, int64_t sender_intended_total_msat, int64_t onion_fields) {
+int64_t CS_LDK_Event_payment_claimed(int8_tArray receiver_node_id, int8_tArray payment_hash, int64_t amount_msat, int64_t purpose, int64_tArray htlcs, int64_t sender_intended_total_msat, int64_t onion_fields, int64_t payment_id) {
LDKPublicKey receiver_node_id_ref;
CHECK(receiver_node_id->arr_len == 33);
memcpy(receiver_node_id_ref.compressed_form, receiver_node_id->elems, 33); FREE(receiver_node_id);
onion_fields_conv.is_owned = ptr_is_owned(onion_fields);
CHECK_INNER_FIELD_ACCESS_OR_NULL(onion_fields_conv);
onion_fields_conv = RecipientOnionFields_clone(&onion_fields_conv);
+ void* payment_id_ptr = untag_ptr(payment_id);
+ CHECK_ACCESS(payment_id_ptr);
+ LDKCOption_ThirtyTwoBytesZ payment_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_id_ptr);
+ payment_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_id));
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_payment_claimed(receiver_node_id_ref, payment_hash_ref, amount_msat, purpose_conv, htlcs_constr, sender_intended_total_msat_conv, onion_fields_conv);
+ *ret_copy = Event_payment_claimed(receiver_node_id_ref, payment_hash_ref, amount_msat, purpose_conv, htlcs_constr, sender_intended_total_msat_conv, onion_fields_conv, payment_id_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
-int64_t CS_LDK_Event_payment_forwarded(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) {
+int64_t CS_LDK_Event_payment_forwarded(int64_t prev_channel_id, int64_t next_channel_id, int64_t prev_user_channel_id, int64_t next_user_channel_id, int8_tArray prev_node_id, int8_tArray next_node_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_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));
+ LDKPublicKey prev_node_id_ref;
+ CHECK(prev_node_id->arr_len == 33);
+ memcpy(prev_node_id_ref.compressed_form, prev_node_id->elems, 33); FREE(prev_node_id);
+ LDKPublicKey next_node_id_ref;
+ CHECK(next_node_id->arr_len == 33);
+ memcpy(next_node_id_ref.compressed_form, next_node_id->elems, 33); FREE(next_node_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);
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, 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);
+ *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, prev_user_channel_id_conv, next_user_channel_id_conv, prev_node_id_ref, next_node_id_ref, 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;
}
return ret_ref;
}
-int64_t CS_LDK_Event_channel_closed(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) {
+int64_t CS_LDK_Event_channel_closed(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, int64_t last_local_balance_msat) {
LDKChannelId channel_id_conv;
channel_id_conv.inner = untag_ptr(channel_id);
channel_id_conv.is_owned = ptr_is_owned(channel_id);
channel_funding_txo_conv.is_owned = ptr_is_owned(channel_funding_txo);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_conv);
channel_funding_txo_conv = OutPoint_clone(&channel_funding_txo_conv);
+ void* last_local_balance_msat_ptr = untag_ptr(last_local_balance_msat);
+ CHECK_ACCESS(last_local_balance_msat_ptr);
+ LDKCOption_u64Z last_local_balance_msat_conv = *(LDKCOption_u64Z*)(last_local_balance_msat_ptr);
+ last_local_balance_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(last_local_balance_msat));
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *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);
+ *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, last_local_balance_msat_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
-int64_t CS_LDK_Event_open_channel_request(int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, int64_t channel_type, jboolean is_announced, int64_t params) {
+int64_t CS_LDK_Event_open_channel_request(int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t channel_negotiation_type, int64_t channel_type, jboolean is_announced, int64_t params) {
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);
LDKPublicKey counterparty_node_id_ref;
CHECK(counterparty_node_id->arr_len == 33);
memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id);
+ void* channel_negotiation_type_ptr = untag_ptr(channel_negotiation_type);
+ CHECK_ACCESS(channel_negotiation_type_ptr);
+ LDKInboundChannelFunds channel_negotiation_type_conv = *(LDKInboundChannelFunds*)(channel_negotiation_type_ptr);
+ channel_negotiation_type_conv = InboundChannelFunds_clone((LDKInboundChannelFunds*)untag_ptr(channel_negotiation_type));
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(params_conv);
params_conv = ChannelParameters_clone(¶ms_conv);
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_open_channel_request(temporary_channel_id_conv, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv, is_announced, params_conv);
+ *ret_copy = Event_open_channel_request(temporary_channel_id_conv, counterparty_node_id_ref, funding_satoshis, channel_negotiation_type_conv, channel_type_conv, is_announced, params_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_conv;
}
+void CS_LDK_InitFeatures_set_dual_fund_optional(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_dual_fund_optional(&this_arg_conv);
+}
+
+void CS_LDK_InitFeatures_set_dual_fund_required(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_dual_fund_required(&this_arg_conv);
+}
+
+jboolean CS_LDK_InitFeatures_supports_dual_fund(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_dual_fund(&this_arg_conv);
+ return ret_conv;
+}
+
+void CS_LDK_NodeFeatures_set_dual_fund_optional(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_dual_fund_optional(&this_arg_conv);
+}
+
+void CS_LDK_NodeFeatures_set_dual_fund_required(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_dual_fund_required(&this_arg_conv);
+}
+
+jboolean CS_LDK_NodeFeatures_supports_dual_fund(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_dual_fund(&this_arg_conv);
+ return ret_conv;
+}
+
+jboolean CS_LDK_InitFeatures_requires_dual_fund(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_dual_fund(&this_arg_conv);
+ return ret_conv;
+}
+
+jboolean CS_LDK_NodeFeatures_requires_dual_fund(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_dual_fund(&this_arg_conv);
+ return ret_conv;
+}
+
void CS_LDK_InitFeatures_set_taproot_optional(int64_t this_arg) {
LDKInitFeatures this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_conv;
}
+void CS_LDK_Bolt12InvoiceFeatures_set_trampoline_routing_optional(int64_t this_arg) {
+ LDKBolt12InvoiceFeatures 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;
+ Bolt12InvoiceFeatures_set_trampoline_routing_optional(&this_arg_conv);
+}
+
+void CS_LDK_Bolt12InvoiceFeatures_set_trampoline_routing_required(int64_t this_arg) {
+ LDKBolt12InvoiceFeatures 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;
+ Bolt12InvoiceFeatures_set_trampoline_routing_required(&this_arg_conv);
+}
+
+jboolean CS_LDK_Bolt12InvoiceFeatures_supports_trampoline_routing(int64_t this_arg) {
+ LDKBolt12InvoiceFeatures 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 = Bolt12InvoiceFeatures_supports_trampoline_routing(&this_arg_conv);
+ return ret_conv;
+}
+
jboolean CS_LDK_InitFeatures_requires_trampoline_routing(int64_t this_arg) {
LDKInitFeatures this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_conv;
}
+jboolean CS_LDK_Bolt12InvoiceFeatures_requires_trampoline_routing(int64_t this_arg) {
+ LDKBolt12InvoiceFeatures 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 = Bolt12InvoiceFeatures_requires_trampoline_routing(&this_arg_conv);
+ return ret_conv;
+}
+
+void CS_LDK_NodeFeatures_set_dns_resolution_optional(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_dns_resolution_optional(&this_arg_conv);
+}
+
+void CS_LDK_NodeFeatures_set_dns_resolution_required(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_dns_resolution_required(&this_arg_conv);
+}
+
+jboolean CS_LDK_NodeFeatures_supports_dns_resolution(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_dns_resolution(&this_arg_conv);
+ return ret_conv;
+}
+
+jboolean CS_LDK_NodeFeatures_requires_dns_resolution(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_dns_resolution(&this_arg_conv);
+ return ret_conv;
+}
+
void CS_LDK_RoutingFees_free(int64_t this_obj) {
LDKRoutingFees this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return tag_ptr(ret_ret, true);
}
+int64_t CS_LDK_FilesystemStore_as_MigratableKVStore(int64_t this_arg) {
+ LDKFilesystemStore 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;
+ LDKMigratableKVStore* ret_ret = MALLOC(sizeof(LDKMigratableKVStore), "LDKMigratableKVStore");
+ *ret_ret = FilesystemStore_as_MigratableKVStore(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
void CS_LDK_BackgroundProcessor_free(int64_t this_obj) {
LDKBackgroundProcessor this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return tag_ptr(ret_conv, true);
}
-void CS_LDK_Bolt11ParseError_free(int64_t this_ptr) {
- if (!ptr_is_owned(this_ptr)) return;
- void* this_ptr_ptr = untag_ptr(this_ptr);
- CHECK_ACCESS(this_ptr_ptr);
- LDKBolt11ParseError this_ptr_conv = *(LDKBolt11ParseError*)(this_ptr_ptr);
- FREE(untag_ptr(this_ptr));
- Bolt11ParseError_free(this_ptr_conv);
+void CS_LDK_Bolt11ParseError_free(int64_t this_obj) {
+ LDKBolt11ParseError 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);
+ Bolt11ParseError_free(this_obj_conv);
+}
+
+jboolean CS_LDK_Bolt11ParseError_eq(int64_t a, int64_t b) {
+ LDKBolt11ParseError 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;
+ LDKBolt11ParseError 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 = Bolt11ParseError_eq(&a_conv, &b_conv);
+ return ret_conv;
}
static inline uint64_t Bolt11ParseError_clone_ptr(LDKBolt11ParseError *NONNULL_PTR arg) {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_clone(arg);
- int64_t ret_ref = tag_ptr(ret_copy, true);
+ LDKBolt11ParseError ret_var = Bolt11ParseError_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;
}
int64_t CS_LDK_Bolt11ParseError_clone_ptr(int64_t arg) {
- LDKBolt11ParseError* arg_conv = (LDKBolt11ParseError*)untag_ptr(arg);
- int64_t ret_conv = Bolt11ParseError_clone_ptr(arg_conv);
+ LDKBolt11ParseError 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 = Bolt11ParseError_clone_ptr(&arg_conv);
return ret_conv;
}
int64_t CS_LDK_Bolt11ParseError_clone(int64_t orig) {
- LDKBolt11ParseError* orig_conv = (LDKBolt11ParseError*)untag_ptr(orig);
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_clone(orig_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_bech32_error(int64_t a) {
- void* a_ptr = untag_ptr(a);
- CHECK_ACCESS(a_ptr);
- LDKBech32Error a_conv = *(LDKBech32Error*)(a_ptr);
- a_conv = Bech32Error_clone((LDKBech32Error*)untag_ptr(a));
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_bech32_error(a_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_parse_amount_error(int32_t a) {
-
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_parse_amount_error((LDKError){ ._dummy = 0 });
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_malformed_signature(int32_t a) {
- LDKSecp256k1Error a_conv = LDKSecp256k1Error_from_cs(a);
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_malformed_signature(a_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_bad_prefix() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_bad_prefix();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_unknown_currency() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_unknown_currency();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_unknown_si_prefix() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_unknown_si_prefix();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_malformed_hrp() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_malformed_hrp();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_too_short_data_part() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_too_short_data_part();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_unexpected_end_of_tagged_fields() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_unexpected_end_of_tagged_fields();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_description_decode_error(int32_t a) {
-
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_description_decode_error((LDKError){ ._dummy = 0 });
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_padding_error() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_padding_error();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_integer_overflow_error() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_integer_overflow_error();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_invalid_seg_wit_program_length() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_invalid_seg_wit_program_length();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_invalid_pub_key_hash_length() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_invalid_pub_key_hash_length();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_invalid_script_hash_length() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_invalid_script_hash_length();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_invalid_recovery_id() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_invalid_recovery_id();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_invalid_slice_length(jstring a) {
- LDKStr a_conv = str_ref_to_owned_c(a);
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_invalid_slice_length(a_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_skip() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_skip();
- int64_t ret_ref = tag_ptr(ret_copy, true);
+ LDKBolt11ParseError 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;
+ LDKBolt11ParseError ret_var = Bolt11ParseError_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;
}
-jboolean CS_LDK_Bolt11ParseError_eq(int64_t a, int64_t b) {
- LDKBolt11ParseError* a_conv = (LDKBolt11ParseError*)untag_ptr(a);
- LDKBolt11ParseError* b_conv = (LDKBolt11ParseError*)untag_ptr(b);
- jboolean ret_conv = Bolt11ParseError_eq(a_conv, b_conv);
- return ret_conv;
-}
-
void CS_LDK_ParseOrSemanticError_free(int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
}
int64_t CS_LDK_ParseOrSemanticError_parse_error(int64_t a) {
- void* a_ptr = untag_ptr(a);
- CHECK_ACCESS(a_ptr);
- LDKBolt11ParseError a_conv = *(LDKBolt11ParseError*)(a_ptr);
- a_conv = Bolt11ParseError_clone((LDKBolt11ParseError*)untag_ptr(a));
+ LDKBolt11ParseError 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 = Bolt11ParseError_clone(&a_conv);
LDKParseOrSemanticError *ret_copy = MALLOC(sizeof(LDKParseOrSemanticError), "LDKParseOrSemanticError");
*ret_copy = ParseOrSemanticError_parse_error(a_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_conv;
}
+void CS_LDK_Bolt11InvoiceDescription_free(int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKBolt11InvoiceDescription this_ptr_conv = *(LDKBolt11InvoiceDescription*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ Bolt11InvoiceDescription_free(this_ptr_conv);
+}
+
+static inline uint64_t Bolt11InvoiceDescription_clone_ptr(LDKBolt11InvoiceDescription *NONNULL_PTR arg) {
+ LDKBolt11InvoiceDescription *ret_copy = MALLOC(sizeof(LDKBolt11InvoiceDescription), "LDKBolt11InvoiceDescription");
+ *ret_copy = Bolt11InvoiceDescription_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t CS_LDK_Bolt11InvoiceDescription_clone_ptr(int64_t arg) {
+ LDKBolt11InvoiceDescription* arg_conv = (LDKBolt11InvoiceDescription*)untag_ptr(arg);
+ int64_t ret_conv = Bolt11InvoiceDescription_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_Bolt11InvoiceDescription_clone(int64_t orig) {
+ LDKBolt11InvoiceDescription* orig_conv = (LDKBolt11InvoiceDescription*)untag_ptr(orig);
+ LDKBolt11InvoiceDescription *ret_copy = MALLOC(sizeof(LDKBolt11InvoiceDescription), "LDKBolt11InvoiceDescription");
+ *ret_copy = Bolt11InvoiceDescription_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_Bolt11InvoiceDescription_direct(int64_t a) {
+ LDKDescription 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 = Description_clone(&a_conv);
+ LDKBolt11InvoiceDescription *ret_copy = MALLOC(sizeof(LDKBolt11InvoiceDescription), "LDKBolt11InvoiceDescription");
+ *ret_copy = Bolt11InvoiceDescription_direct(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_Bolt11InvoiceDescription_hash(int64_t a) {
+ LDKSha256 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 = Sha256_clone(&a_conv);
+ LDKBolt11InvoiceDescription *ret_copy = MALLOC(sizeof(LDKBolt11InvoiceDescription), "LDKBolt11InvoiceDescription");
+ *ret_copy = Bolt11InvoiceDescription_hash(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+jboolean CS_LDK_Bolt11InvoiceDescription_eq(int64_t a, int64_t b) {
+ LDKBolt11InvoiceDescription* a_conv = (LDKBolt11InvoiceDescription*)untag_ptr(a);
+ LDKBolt11InvoiceDescription* b_conv = (LDKBolt11InvoiceDescription*)untag_ptr(b);
+ jboolean ret_conv = Bolt11InvoiceDescription_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
+jstring CS_LDK_Bolt11InvoiceDescription_to_str(int64_t o) {
+ LDKBolt11InvoiceDescription* o_conv = (LDKBolt11InvoiceDescription*)untag_ptr(o);
+ LDKStr ret_str = Bolt11InvoiceDescription_to_str(o_conv);
+ jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
+ Str_free(ret_str);
+ return ret_conv;
+}
+
void CS_LDK_SignedRawBolt11Invoice_free(int64_t this_obj) {
LDKSignedRawBolt11Invoice this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return tag_ptr(ret_conv, true);
}
+int64_t CS_LDK_Description_empty() {
+ LDKDescription ret_var = Description_empty();
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
int64_t CS_LDK_Description_into_inner(int64_t this_arg) {
LDKDescription this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
}
jstring CS_LDK_Bolt11ParseError_to_str(int64_t o) {
- LDKBolt11ParseError* o_conv = (LDKBolt11ParseError*)untag_ptr(o);
- LDKStr ret_str = Bolt11ParseError_to_str(o_conv);
+ LDKBolt11ParseError 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;
+ LDKStr ret_str = Bolt11ParseError_to_str(&o_conv);
jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
Str_free(ret_str);
return ret_conv;
case 8: return LDKBolt12SemanticError_UnknownRequiredFeatures;
case 9: return LDKBolt12SemanticError_UnexpectedFeatures;
case 10: return LDKBolt12SemanticError_MissingDescription;
- case 11: return LDKBolt12SemanticError_MissingSigningPubkey;
- case 12: return LDKBolt12SemanticError_InvalidSigningPubkey;
- case 13: return LDKBolt12SemanticError_UnexpectedSigningPubkey;
- case 14: return LDKBolt12SemanticError_MissingQuantity;
- case 15: return LDKBolt12SemanticError_InvalidQuantity;
- case 16: return LDKBolt12SemanticError_UnexpectedQuantity;
- case 17: return LDKBolt12SemanticError_InvalidMetadata;
- case 18: return LDKBolt12SemanticError_UnexpectedMetadata;
- case 19: return LDKBolt12SemanticError_MissingPayerMetadata;
- case 20: return LDKBolt12SemanticError_MissingPayerId;
- case 21: return LDKBolt12SemanticError_DuplicatePaymentId;
- case 22: return LDKBolt12SemanticError_MissingPaths;
- case 23: return LDKBolt12SemanticError_UnexpectedPaths;
- case 24: return LDKBolt12SemanticError_InvalidPayInfo;
- case 25: return LDKBolt12SemanticError_MissingCreationTime;
- case 26: return LDKBolt12SemanticError_MissingPaymentHash;
- case 27: return LDKBolt12SemanticError_UnexpectedPaymentHash;
- case 28: return LDKBolt12SemanticError_MissingSignature;
+ case 11: return LDKBolt12SemanticError_MissingIssuerSigningPubkey;
+ case 12: return LDKBolt12SemanticError_UnexpectedIssuerSigningPubkey;
+ case 13: return LDKBolt12SemanticError_MissingQuantity;
+ case 14: return LDKBolt12SemanticError_InvalidQuantity;
+ case 15: return LDKBolt12SemanticError_UnexpectedQuantity;
+ case 16: return LDKBolt12SemanticError_InvalidMetadata;
+ case 17: return LDKBolt12SemanticError_UnexpectedMetadata;
+ case 18: return LDKBolt12SemanticError_MissingPayerMetadata;
+ case 19: return LDKBolt12SemanticError_MissingPayerSigningPubkey;
+ case 20: return LDKBolt12SemanticError_DuplicatePaymentId;
+ case 21: return LDKBolt12SemanticError_MissingPaths;
+ case 22: return LDKBolt12SemanticError_UnexpectedPaths;
+ case 23: return LDKBolt12SemanticError_InvalidPayInfo;
+ case 24: return LDKBolt12SemanticError_MissingCreationTime;
+ case 25: return LDKBolt12SemanticError_MissingPaymentHash;
+ case 26: return LDKBolt12SemanticError_UnexpectedPaymentHash;
+ case 27: return LDKBolt12SemanticError_MissingSigningPubkey;
+ case 28: return LDKBolt12SemanticError_InvalidSigningPubkey;
+ case 29: return LDKBolt12SemanticError_MissingSignature;
+ case 30: return LDKBolt12SemanticError_UnexpectedHumanReadableName;
default: abort();
}
}
case LDKBolt12SemanticError_UnknownRequiredFeatures: return 8;
case LDKBolt12SemanticError_UnexpectedFeatures: return 9;
case LDKBolt12SemanticError_MissingDescription: return 10;
- case LDKBolt12SemanticError_MissingSigningPubkey: return 11;
- case LDKBolt12SemanticError_InvalidSigningPubkey: return 12;
- case LDKBolt12SemanticError_UnexpectedSigningPubkey: return 13;
- case LDKBolt12SemanticError_MissingQuantity: return 14;
- case LDKBolt12SemanticError_InvalidQuantity: return 15;
- case LDKBolt12SemanticError_UnexpectedQuantity: return 16;
- case LDKBolt12SemanticError_InvalidMetadata: return 17;
- case LDKBolt12SemanticError_UnexpectedMetadata: return 18;
- case LDKBolt12SemanticError_MissingPayerMetadata: return 19;
- case LDKBolt12SemanticError_MissingPayerId: return 20;
- case LDKBolt12SemanticError_DuplicatePaymentId: return 21;
- case LDKBolt12SemanticError_MissingPaths: return 22;
- case LDKBolt12SemanticError_UnexpectedPaths: return 23;
- case LDKBolt12SemanticError_InvalidPayInfo: return 24;
- case LDKBolt12SemanticError_MissingCreationTime: return 25;
- case LDKBolt12SemanticError_MissingPaymentHash: return 26;
- case LDKBolt12SemanticError_UnexpectedPaymentHash: return 27;
- case LDKBolt12SemanticError_MissingSignature: return 28;
+ case LDKBolt12SemanticError_MissingIssuerSigningPubkey: return 11;
+ case LDKBolt12SemanticError_UnexpectedIssuerSigningPubkey: return 12;
+ case LDKBolt12SemanticError_MissingQuantity: return 13;
+ case LDKBolt12SemanticError_InvalidQuantity: return 14;
+ case LDKBolt12SemanticError_UnexpectedQuantity: return 15;
+ case LDKBolt12SemanticError_InvalidMetadata: return 16;
+ case LDKBolt12SemanticError_UnexpectedMetadata: return 17;
+ case LDKBolt12SemanticError_MissingPayerMetadata: return 18;
+ case LDKBolt12SemanticError_MissingPayerSigningPubkey: return 19;
+ case LDKBolt12SemanticError_DuplicatePaymentId: return 20;
+ case LDKBolt12SemanticError_MissingPaths: return 21;
+ case LDKBolt12SemanticError_UnexpectedPaths: return 22;
+ case LDKBolt12SemanticError_InvalidPayInfo: return 23;
+ case LDKBolt12SemanticError_MissingCreationTime: return 24;
+ case LDKBolt12SemanticError_MissingPaymentHash: return 25;
+ case LDKBolt12SemanticError_UnexpectedPaymentHash: return 26;
+ case LDKBolt12SemanticError_MissingSigningPubkey: return 27;
+ case LDKBolt12SemanticError_InvalidSigningPubkey: return 28;
+ case LDKBolt12SemanticError_MissingSignature: return 29;
+ case LDKBolt12SemanticError_UnexpectedHumanReadableName: return 30;
default: abort();
}
}
case 6: return LDKPaymentFailureReason_UnknownRequiredFeatures;
case 7: return LDKPaymentFailureReason_InvoiceRequestExpired;
case 8: return LDKPaymentFailureReason_InvoiceRequestRejected;
+ case 9: return LDKPaymentFailureReason_BlindedPathCreationFailed;
default: abort();
}
}
case LDKPaymentFailureReason_UnknownRequiredFeatures: return 6;
case LDKPaymentFailureReason_InvoiceRequestExpired: return 7;
case LDKPaymentFailureReason_InvoiceRequestRejected: return 8;
+ case LDKPaymentFailureReason_BlindedPathCreationFailed: return 9;
default: abort();
}
}
return ret_ref;
}
-uint32_t CS_LDK_LDKAPIError_ty_from_ptr(int64_t ptr) {
- LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKAPIError_APIMisuseError: return 0;
- case LDKAPIError_FeeRateTooHigh: return 1;
- case LDKAPIError_InvalidRoute: return 2;
- case LDKAPIError_ChannelUnavailable: return 3;
- case LDKAPIError_MonitorUpdateInProgress: return 4;
- case LDKAPIError_IncompatibleShutdownScript: return 5;
- default: abort();
- }
-}
-jstring CS_LDK_LDKAPIError_APIMisuseError_get_err(int64_t ptr) {
- LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKAPIError_APIMisuseError);
- LDKStr err_str = obj->api_misuse_error.err;
- jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len);
- return err_conv;
-}
-jstring CS_LDK_LDKAPIError_FeeRateTooHigh_get_err(int64_t ptr) {
- LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKAPIError_FeeRateTooHigh);
- LDKStr err_str = obj->fee_rate_too_high.err;
- jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len);
- return err_conv;
-}
-int32_t CS_LDK_LDKAPIError_FeeRateTooHigh_get_feerate(int64_t ptr) {
- LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKAPIError_FeeRateTooHigh);
- int32_t feerate_conv = obj->fee_rate_too_high.feerate;
- return feerate_conv;
-}
-jstring CS_LDK_LDKAPIError_InvalidRoute_get_err(int64_t ptr) {
- LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKAPIError_InvalidRoute);
- LDKStr err_str = obj->invalid_route.err;
- jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len);
- return err_conv;
-}
-jstring CS_LDK_LDKAPIError_ChannelUnavailable_get_err(int64_t ptr) {
- LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKAPIError_ChannelUnavailable);
- LDKStr err_str = obj->channel_unavailable.err;
- jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len);
- return err_conv;
-}
-int64_t CS_LDK_LDKAPIError_IncompatibleShutdownScript_get_script(int64_t ptr) {
- LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKAPIError_IncompatibleShutdownScript);
- LDKShutdownScript script_var = obj->incompatible_shutdown_script.script;
- int64_t script_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(script_var);
- script_ref = tag_ptr(script_var.inner, false);
- return script_ref;
-}
-static inline void CResult_NoneAPIErrorZ_get_ok(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return *owner->contents.result;
-}
-void CS_LDK_CResult_NoneAPIErrorZ_get_ok(int64_t owner) {
- LDKCResult_NoneAPIErrorZ* owner_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(owner);
- CResult_NoneAPIErrorZ_get_ok(owner_conv);
-}
-
-static inline struct LDKAPIError CResult_NoneAPIErrorZ_get_err(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return APIError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_NoneAPIErrorZ_get_err(int64_t owner) {
- LDKCResult_NoneAPIErrorZ* owner_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(owner);
- LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError");
- *ret_copy = CResult_NoneAPIErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline LDKCVec_CResult_NoneAPIErrorZZ CVec_CResult_NoneAPIErrorZZ_clone(const LDKCVec_CResult_NoneAPIErrorZZ *orig) {
- LDKCVec_CResult_NoneAPIErrorZZ ret = { .data = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ) * orig->datalen, "LDKCVec_CResult_NoneAPIErrorZZ clone bytes"), .datalen = orig->datalen };
- for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = CResult_NoneAPIErrorZ_clone(&orig->data[i]);
- }
- return ret;
-}
-static inline LDKCVec_APIErrorZ CVec_APIErrorZ_clone(const LDKCVec_APIErrorZ *orig) {
- LDKCVec_APIErrorZ ret = { .data = MALLOC(sizeof(LDKAPIError) * orig->datalen, "LDKCVec_APIErrorZ clone bytes"), .datalen = orig->datalen };
- for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = APIError_clone(&orig->data[i]);
- }
- return ret;
-}
uint32_t CS_LDK_LDKCOption_ThirtyTwoBytesZ_ty_from_ptr(int64_t ptr) {
LDKCOption_ThirtyTwoBytesZ *obj = (LDKCOption_ThirtyTwoBytesZ*)untag_ptr(ptr);
switch(obj->tag) {
CResult_RecipientOnionFieldsNoneZ_get_err(owner_conv);
}
+uint32_t CS_LDK_LDKDNSResolverMessage_ty_from_ptr(int64_t ptr) {
+ LDKDNSResolverMessage *obj = (LDKDNSResolverMessage*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKDNSResolverMessage_DNSSECQuery: return 0;
+ case LDKDNSResolverMessage_DNSSECProof: return 1;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKDNSResolverMessage_DNSSECQuery_get_dnssec_query(int64_t ptr) {
+ LDKDNSResolverMessage *obj = (LDKDNSResolverMessage*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKDNSResolverMessage_DNSSECQuery);
+ LDKDNSSECQuery dnssec_query_var = obj->dnssec_query;
+ int64_t dnssec_query_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(dnssec_query_var);
+ dnssec_query_ref = tag_ptr(dnssec_query_var.inner, false);
+ return dnssec_query_ref;
+}
+int64_t CS_LDK_LDKDNSResolverMessage_DNSSECProof_get_dnssec_proof(int64_t ptr) {
+ LDKDNSResolverMessage *obj = (LDKDNSResolverMessage*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKDNSResolverMessage_DNSSECProof);
+ LDKDNSSECProof dnssec_proof_var = obj->dnssec_proof;
+ int64_t dnssec_proof_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(dnssec_proof_var);
+ dnssec_proof_ref = tag_ptr(dnssec_proof_var.inner, false);
+ return dnssec_proof_ref;
+}
+static inline struct LDKDNSResolverMessage C2Tuple_DNSResolverMessageResponseInstructionZ_get_a(LDKC2Tuple_DNSResolverMessageResponseInstructionZ *NONNULL_PTR owner){
+ return DNSResolverMessage_clone(&owner->a);
+}
+int64_t CS_LDK_C2Tuple_DNSResolverMessageResponseInstructionZ_get_a(int64_t owner) {
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ* owner_conv = (LDKC2Tuple_DNSResolverMessageResponseInstructionZ*)untag_ptr(owner);
+ LDKDNSResolverMessage *ret_copy = MALLOC(sizeof(LDKDNSResolverMessage), "LDKDNSResolverMessage");
+ *ret_copy = C2Tuple_DNSResolverMessageResponseInstructionZ_get_a(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKResponseInstruction C2Tuple_DNSResolverMessageResponseInstructionZ_get_b(LDKC2Tuple_DNSResolverMessageResponseInstructionZ *NONNULL_PTR owner){
+ LDKResponseInstruction ret = owner->b;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_C2Tuple_DNSResolverMessageResponseInstructionZ_get_b(int64_t owner) {
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ* owner_conv = (LDKC2Tuple_DNSResolverMessageResponseInstructionZ*)untag_ptr(owner);
+ LDKResponseInstruction ret_var = C2Tuple_DNSResolverMessageResponseInstructionZ_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;
+}
+
+uint32_t CS_LDK_LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ_ty_from_ptr(int64_t ptr) {
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ *obj = (LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ_Some: return 0;
+ case LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ_None: return 1;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ_Some_get_some(int64_t ptr) {
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ *obj = (LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ_Some);
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ* some_conv = MALLOC(sizeof(LDKC2Tuple_DNSResolverMessageResponseInstructionZ), "LDKC2Tuple_DNSResolverMessageResponseInstructionZ");
+ *some_conv = obj->some;
+ *some_conv = C2Tuple_DNSResolverMessageResponseInstructionZ_clone(some_conv);
+ return tag_ptr(some_conv, true);
+}
+uint32_t CS_LDK_LDKDestination_ty_from_ptr(int64_t ptr) {
+ LDKDestination *obj = (LDKDestination*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKDestination_Node: return 0;
+ case LDKDestination_BlindedPath: return 1;
+ default: abort();
+ }
+}
+int8_tArray CS_LDK_LDKDestination_Node_get_node(int64_t ptr) {
+ LDKDestination *obj = (LDKDestination*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKDestination_Node);
+ int8_tArray node_arr = init_int8_tArray(33, __LINE__);
+ memcpy(node_arr->elems, obj->node.compressed_form, 33);
+ return node_arr;
+}
+int64_t CS_LDK_LDKDestination_BlindedPath_get_blinded_path(int64_t ptr) {
+ LDKDestination *obj = (LDKDestination*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKDestination_BlindedPath);
+ LDKBlindedMessagePath blinded_path_var = obj->blinded_path;
+ int64_t blinded_path_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(blinded_path_var);
+ blinded_path_ref = tag_ptr(blinded_path_var.inner, false);
+ return blinded_path_ref;
+}
+uint32_t CS_LDK_LDKOffersContext_ty_from_ptr(int64_t ptr) {
+ LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKOffersContext_InvoiceRequest: return 0;
+ case LDKOffersContext_OutboundPayment: return 1;
+ case LDKOffersContext_InboundPayment: return 2;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKOffersContext_InvoiceRequest_get_nonce(int64_t ptr) {
+ LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKOffersContext_InvoiceRequest);
+ LDKNonce nonce_var = obj->invoice_request.nonce;
+ int64_t nonce_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_var);
+ nonce_ref = tag_ptr(nonce_var.inner, false);
+ return nonce_ref;
+}
+int8_tArray CS_LDK_LDKOffersContext_OutboundPayment_get_payment_id(int64_t ptr) {
+ LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKOffersContext_OutboundPayment);
+ int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_id_arr->elems, obj->outbound_payment.payment_id.data, 32);
+ return payment_id_arr;
+}
+int64_t CS_LDK_LDKOffersContext_OutboundPayment_get_nonce(int64_t ptr) {
+ LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKOffersContext_OutboundPayment);
+ LDKNonce nonce_var = obj->outbound_payment.nonce;
+ int64_t nonce_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_var);
+ nonce_ref = tag_ptr(nonce_var.inner, false);
+ return nonce_ref;
+}
+int8_tArray CS_LDK_LDKOffersContext_OutboundPayment_get_hmac(int64_t ptr) {
+ LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKOffersContext_OutboundPayment);
+ int8_tArray hmac_arr = init_int8_tArray(32, __LINE__);
+ memcpy(hmac_arr->elems, obj->outbound_payment.hmac.data, 32);
+ return hmac_arr;
+}
+int8_tArray CS_LDK_LDKOffersContext_InboundPayment_get_payment_hash(int64_t ptr) {
+ LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKOffersContext_InboundPayment);
+ int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_hash_arr->elems, obj->inbound_payment.payment_hash.data, 32);
+ return payment_hash_arr;
+}
+int64_t CS_LDK_LDKOffersContext_InboundPayment_get_nonce(int64_t ptr) {
+ LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKOffersContext_InboundPayment);
+ LDKNonce nonce_var = obj->inbound_payment.nonce;
+ int64_t nonce_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_var);
+ nonce_ref = tag_ptr(nonce_var.inner, false);
+ return nonce_ref;
+}
+int8_tArray CS_LDK_LDKOffersContext_InboundPayment_get_hmac(int64_t ptr) {
+ LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKOffersContext_InboundPayment);
+ int8_tArray hmac_arr = init_int8_tArray(32, __LINE__);
+ memcpy(hmac_arr->elems, obj->inbound_payment.hmac.data, 32);
+ return hmac_arr;
+}
+uint32_t CS_LDK_LDKAsyncPaymentsContext_ty_from_ptr(int64_t ptr) {
+ LDKAsyncPaymentsContext *obj = (LDKAsyncPaymentsContext*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKAsyncPaymentsContext_OutboundPayment: return 0;
+ default: abort();
+ }
+}
+int8_tArray CS_LDK_LDKAsyncPaymentsContext_OutboundPayment_get_payment_id(int64_t ptr) {
+ LDKAsyncPaymentsContext *obj = (LDKAsyncPaymentsContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKAsyncPaymentsContext_OutboundPayment);
+ int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
+ memcpy(payment_id_arr->elems, obj->outbound_payment.payment_id.data, 32);
+ return payment_id_arr;
+}
+int64_t CS_LDK_LDKAsyncPaymentsContext_OutboundPayment_get_nonce(int64_t ptr) {
+ LDKAsyncPaymentsContext *obj = (LDKAsyncPaymentsContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKAsyncPaymentsContext_OutboundPayment);
+ LDKNonce nonce_var = obj->outbound_payment.nonce;
+ int64_t nonce_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_var);
+ nonce_ref = tag_ptr(nonce_var.inner, false);
+ return nonce_ref;
+}
+int8_tArray CS_LDK_LDKAsyncPaymentsContext_OutboundPayment_get_hmac(int64_t ptr) {
+ LDKAsyncPaymentsContext *obj = (LDKAsyncPaymentsContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKAsyncPaymentsContext_OutboundPayment);
+ int8_tArray hmac_arr = init_int8_tArray(32, __LINE__);
+ memcpy(hmac_arr->elems, obj->outbound_payment.hmac.data, 32);
+ return hmac_arr;
+}
+uint32_t CS_LDK_LDKMessageContext_ty_from_ptr(int64_t ptr) {
+ LDKMessageContext *obj = (LDKMessageContext*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKMessageContext_Offers: return 0;
+ case LDKMessageContext_AsyncPayments: return 1;
+ case LDKMessageContext_DNSResolver: return 2;
+ case LDKMessageContext_Custom: return 3;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKMessageContext_Offers_get_offers(int64_t ptr) {
+ LDKMessageContext *obj = (LDKMessageContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageContext_Offers);
+ int64_t offers_ref = tag_ptr(&obj->offers, false);
+ return offers_ref;
+}
+int64_t CS_LDK_LDKMessageContext_AsyncPayments_get_async_payments(int64_t ptr) {
+ LDKMessageContext *obj = (LDKMessageContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageContext_AsyncPayments);
+ int64_t async_payments_ref = tag_ptr(&obj->async_payments, false);
+ return async_payments_ref;
+}
+int64_t CS_LDK_LDKMessageContext_DNSResolver_get_dns_resolver(int64_t ptr) {
+ LDKMessageContext *obj = (LDKMessageContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageContext_DNSResolver);
+ LDKDNSResolverContext dns_resolver_var = obj->dns_resolver;
+ int64_t dns_resolver_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(dns_resolver_var);
+ dns_resolver_ref = tag_ptr(dns_resolver_var.inner, false);
+ return dns_resolver_ref;
+}
+int8_tArray CS_LDK_LDKMessageContext_Custom_get_custom(int64_t ptr) {
+ LDKMessageContext *obj = (LDKMessageContext*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageContext_Custom);
+ LDKCVec_u8Z custom_var = obj->custom;
+ int8_tArray custom_arr = init_int8_tArray(custom_var.datalen, __LINE__);
+ memcpy(custom_arr->elems, custom_var.data, custom_var.datalen);
+ return custom_arr;
+}
+uint32_t CS_LDK_LDKMessageSendInstructions_ty_from_ptr(int64_t ptr) {
+ LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKMessageSendInstructions_WithSpecifiedReplyPath: return 0;
+ case LDKMessageSendInstructions_WithReplyPath: return 1;
+ case LDKMessageSendInstructions_WithoutReplyPath: return 2;
+ case LDKMessageSendInstructions_ForReply: return 3;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKMessageSendInstructions_WithSpecifiedReplyPath_get_destination(int64_t ptr) {
+ LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageSendInstructions_WithSpecifiedReplyPath);
+ int64_t destination_ref = tag_ptr(&obj->with_specified_reply_path.destination, false);
+ return destination_ref;
+}
+int64_t CS_LDK_LDKMessageSendInstructions_WithSpecifiedReplyPath_get_reply_path(int64_t ptr) {
+ LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageSendInstructions_WithSpecifiedReplyPath);
+ LDKBlindedMessagePath reply_path_var = obj->with_specified_reply_path.reply_path;
+ int64_t reply_path_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_var);
+ reply_path_ref = tag_ptr(reply_path_var.inner, false);
+ return reply_path_ref;
+}
+int64_t CS_LDK_LDKMessageSendInstructions_WithReplyPath_get_destination(int64_t ptr) {
+ LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageSendInstructions_WithReplyPath);
+ int64_t destination_ref = tag_ptr(&obj->with_reply_path.destination, false);
+ return destination_ref;
+}
+int64_t CS_LDK_LDKMessageSendInstructions_WithReplyPath_get_context(int64_t ptr) {
+ LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageSendInstructions_WithReplyPath);
+ int64_t context_ref = tag_ptr(&obj->with_reply_path.context, false);
+ return context_ref;
+}
+int64_t CS_LDK_LDKMessageSendInstructions_WithoutReplyPath_get_destination(int64_t ptr) {
+ LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageSendInstructions_WithoutReplyPath);
+ int64_t destination_ref = tag_ptr(&obj->without_reply_path.destination, false);
+ return destination_ref;
+}
+int64_t CS_LDK_LDKMessageSendInstructions_ForReply_get_instructions(int64_t ptr) {
+ LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKMessageSendInstructions_ForReply);
+ LDKResponseInstruction instructions_var = obj->for_reply.instructions;
+ int64_t instructions_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(instructions_var);
+ instructions_ref = tag_ptr(instructions_var.inner, false);
+ return instructions_ref;
+}
+static inline struct LDKDNSResolverMessage C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_a(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ *NONNULL_PTR owner){
+ return DNSResolverMessage_clone(&owner->a);
+}
+int64_t CS_LDK_C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_a(int64_t owner) {
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ* owner_conv = (LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ*)untag_ptr(owner);
+ LDKDNSResolverMessage *ret_copy = MALLOC(sizeof(LDKDNSResolverMessage), "LDKDNSResolverMessage");
+ *ret_copy = C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_a(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKMessageSendInstructions C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_b(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ *NONNULL_PTR owner){
+ return MessageSendInstructions_clone(&owner->b);
+}
+int64_t CS_LDK_C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_b(int64_t owner) {
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ* owner_conv = (LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ*)untag_ptr(owner);
+ LDKMessageSendInstructions *ret_copy = MALLOC(sizeof(LDKMessageSendInstructions), "LDKMessageSendInstructions");
+ *ret_copy = C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_b(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ CVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ_clone(const LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ *orig) {
+ LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ) * orig->datalen, "LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone(&orig->data[i]);
+ }
+ return ret;
+}
+static inline struct LDKDNSResolverMessage CResult_DNSResolverMessageDecodeErrorZ_get_ok(LDKCResult_DNSResolverMessageDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return DNSResolverMessage_clone(&*owner->contents.result);
+}
+int64_t CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_DNSResolverMessageDecodeErrorZ* owner_conv = (LDKCResult_DNSResolverMessageDecodeErrorZ*)untag_ptr(owner);
+ LDKDNSResolverMessage *ret_copy = MALLOC(sizeof(LDKDNSResolverMessage), "LDKDNSResolverMessage");
+ *ret_copy = CResult_DNSResolverMessageDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_DNSResolverMessageDecodeErrorZ_get_err(LDKCResult_DNSResolverMessageDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_DNSResolverMessageDecodeErrorZ* owner_conv = (LDKCResult_DNSResolverMessageDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_DNSResolverMessageDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKHumanReadableName CResult_HumanReadableNameNoneZ_get_ok(LDKCResult_HumanReadableNameNoneZ *NONNULL_PTR owner){
+ LDKHumanReadableName ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_HumanReadableNameNoneZ_get_ok(int64_t owner) {
+ LDKCResult_HumanReadableNameNoneZ* owner_conv = (LDKCResult_HumanReadableNameNoneZ*)untag_ptr(owner);
+ LDKHumanReadableName ret_var = CResult_HumanReadableNameNoneZ_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_HumanReadableNameNoneZ_get_err(LDKCResult_HumanReadableNameNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+void CS_LDK_CResult_HumanReadableNameNoneZ_get_err(int64_t owner) {
+ LDKCResult_HumanReadableNameNoneZ* owner_conv = (LDKCResult_HumanReadableNameNoneZ*)untag_ptr(owner);
+ CResult_HumanReadableNameNoneZ_get_err(owner_conv);
+}
+
+static inline struct LDKHumanReadableName CResult_HumanReadableNameDecodeErrorZ_get_ok(LDKCResult_HumanReadableNameDecodeErrorZ *NONNULL_PTR owner){
+ LDKHumanReadableName ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_HumanReadableNameDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_HumanReadableNameDecodeErrorZ* owner_conv = (LDKCResult_HumanReadableNameDecodeErrorZ*)untag_ptr(owner);
+ LDKHumanReadableName ret_var = CResult_HumanReadableNameDecodeErrorZ_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_HumanReadableNameDecodeErrorZ_get_err(LDKCResult_HumanReadableNameDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_HumanReadableNameDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_HumanReadableNameDecodeErrorZ* owner_conv = (LDKCResult_HumanReadableNameDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_HumanReadableNameDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKDNSSECQuery C2Tuple_DNSSECQueryDNSResolverContextZ_get_a(LDKC2Tuple_DNSSECQueryDNSResolverContextZ *NONNULL_PTR owner){
+ LDKDNSSECQuery ret = owner->a;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_C2Tuple_DNSSECQueryDNSResolverContextZ_get_a(int64_t owner) {
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ* owner_conv = (LDKC2Tuple_DNSSECQueryDNSResolverContextZ*)untag_ptr(owner);
+ LDKDNSSECQuery ret_var = C2Tuple_DNSSECQueryDNSResolverContextZ_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 LDKDNSResolverContext C2Tuple_DNSSECQueryDNSResolverContextZ_get_b(LDKC2Tuple_DNSSECQueryDNSResolverContextZ *NONNULL_PTR owner){
+ LDKDNSResolverContext ret = owner->b;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_C2Tuple_DNSSECQueryDNSResolverContextZ_get_b(int64_t owner) {
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ* owner_conv = (LDKC2Tuple_DNSSECQueryDNSResolverContextZ*)untag_ptr(owner);
+ LDKDNSResolverContext ret_var = C2Tuple_DNSSECQueryDNSResolverContextZ_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_DNSSECQueryDNSResolverContextZ CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_get_ok(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return C2Tuple_DNSSECQueryDNSResolverContextZ_clone(&*owner->contents.result);
+}
+int64_t CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_get_ok(int64_t owner) {
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* owner_conv = (LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ*)untag_ptr(owner);
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSSECQueryDNSResolverContextZ), "LDKC2Tuple_DNSSECQueryDNSResolverContextZ");
+ *ret_conv = CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_get_ok(owner_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+static inline void CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_get_err(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+void CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_get_err(int64_t owner) {
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* owner_conv = (LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ*)untag_ptr(owner);
+ CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_get_err(owner_conv);
+}
+
+static inline struct LDKHumanReadableName C2Tuple_HumanReadableNameThirtyTwoBytesZ_get_a(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ *NONNULL_PTR owner){
+ LDKHumanReadableName ret = owner->a;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_C2Tuple_HumanReadableNameThirtyTwoBytesZ_get_a(int64_t owner) {
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ* owner_conv = (LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)untag_ptr(owner);
+ LDKHumanReadableName ret_var = C2Tuple_HumanReadableNameThirtyTwoBytesZ_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 LDKThirtyTwoBytes C2Tuple_HumanReadableNameThirtyTwoBytesZ_get_b(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ *NONNULL_PTR owner){
+ return ThirtyTwoBytes_clone(&owner->b);
+}
+int8_tArray CS_LDK_C2Tuple_HumanReadableNameThirtyTwoBytesZ_get_b(int64_t owner) {
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ* owner_conv = (LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)untag_ptr(owner);
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, C2Tuple_HumanReadableNameThirtyTwoBytesZ_get_b(owner_conv).data, 32);
+ return ret_arr;
+}
+
+static inline LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ_clone(const LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ *orig) {
+ LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ) * orig->datalen, "LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone(&orig->data[i]);
+ }
+ return ret;
+}
+static inline struct LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_get_a(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ *NONNULL_PTR owner){
+ return CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ_clone(&owner->a);
+}
+int64_tArray CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_get_a(int64_t owner) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ* owner_conv = (LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ*)untag_ptr(owner);
+ LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ ret_var = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_get_a(owner_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t r = 0; r < ret_var.datalen; r++) {
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ* ret_conv_43_conv = MALLOC(sizeof(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ), "LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ");
+ *ret_conv_43_conv = ret_var.data[r];
+ ret_arr_ptr[r] = tag_ptr(ret_conv_43_conv, true);
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
+static inline struct LDKOffer C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_get_b(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ *NONNULL_PTR owner){
+ LDKOffer ret = owner->b;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_get_b(int64_t owner) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ* owner_conv = (LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ*)untag_ptr(owner);
+ LDKOffer ret_var = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_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;
+}
+
+uint32_t CS_LDK_LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_ty_from_ptr(int64_t ptr) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ *obj = (LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_Some: return 0;
+ case LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_None: return 1;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_Some_get_some(int64_t ptr) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ *obj = (LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_Some);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ* some_conv = MALLOC(sizeof(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ), "LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ");
+ *some_conv = obj->some;
+ *some_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone(some_conv);
+ return tag_ptr(some_conv, true);
+}
+static inline struct LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_a(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ *NONNULL_PTR owner){
+ return CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ_clone(&owner->a);
+}
+int64_tArray CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_a(int64_t owner) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ* owner_conv = (LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ*)untag_ptr(owner);
+ LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ ret_var = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_a(owner_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t r = 0; r < ret_var.datalen; r++) {
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ* ret_conv_43_conv = MALLOC(sizeof(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ), "LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ");
+ *ret_conv_43_conv = ret_var.data[r];
+ ret_arr_ptr[r] = tag_ptr(ret_conv_43_conv, true);
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
+static inline struct LDKStr C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_b(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ *NONNULL_PTR owner){
+ return owner->b;
+}
+jstring CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_b(int64_t owner) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ* owner_conv = (LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ*)untag_ptr(owner);
+ LDKStr ret_str = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_b(owner_conv);
+ jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
+ return ret_conv;
+}
+
+uint32_t CS_LDK_LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_ty_from_ptr(int64_t ptr) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ *obj = (LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_Some: return 0;
+ case LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_None: return 1;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_Some_get_some(int64_t ptr) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ *obj = (LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_Some);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ* some_conv = MALLOC(sizeof(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ), "LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ");
+ *some_conv = obj->some;
+ *some_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone(some_conv);
+ return tag_ptr(some_conv, true);
+}
static inline struct LDKUnsignedBolt12Invoice CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner){
LDKUnsignedBolt12Invoice ret = *owner->contents.result;
ret.is_owned = false;
CResult_SchnorrSignatureNoneZ_get_err(owner_conv);
}
+static inline LDKCVec_BlindedPaymentPathZ CVec_BlindedPaymentPathZ_clone(const LDKCVec_BlindedPaymentPathZ *orig) {
+ LDKCVec_BlindedPaymentPathZ ret = { .data = MALLOC(sizeof(LDKBlindedPaymentPath) * orig->datalen, "LDKCVec_BlindedPaymentPathZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = BlindedPaymentPath_clone(&orig->data[i]);
+ }
+ return ret;
+}
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++) {
FREE(untag_ptr(ret));
return ret_conv;
}
+LDKCResult_ECDSASignatureNoneZ sign_splicing_funding_input_LDKEcdsaChannelSigner_jcall(const void* this_arg, LDKTransaction tx, uintptr_t input_index, uint64_t input_value) {
+ LDKEcdsaChannelSigner_JCalls *j_calls = (LDKEcdsaChannelSigner_JCalls*) this_arg;
+ LDKTransaction tx_var = tx;
+ int8_tArray tx_arr = init_int8_tArray(tx_var.datalen, __LINE__);
+ memcpy(tx_arr->elems, tx_var.data, tx_var.datalen);
+ Transaction_free(tx_var);
+ int64_t input_index_conv = input_index;
+ int64_t input_value_conv = input_value;
+ uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 15, (int64_t)tx_arr, input_index_conv, input_value_conv);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_ECDSASignatureNoneZ ret_conv = *(LDKCResult_ECDSASignatureNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
static void LDKEcdsaChannelSigner_JCalls_cloned(LDKEcdsaChannelSigner* new_obj) {
LDKEcdsaChannelSigner_JCalls *j_calls = (LDKEcdsaChannelSigner_JCalls*) new_obj->this_arg;
atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
.sign_closing_transaction = sign_closing_transaction_LDKEcdsaChannelSigner_jcall,
.sign_holder_anchor_input = sign_holder_anchor_input_LDKEcdsaChannelSigner_jcall,
.sign_channel_announcement_with_funding_key = sign_channel_announcement_with_funding_key_LDKEcdsaChannelSigner_jcall,
+ .sign_splicing_funding_input = sign_splicing_funding_input_LDKEcdsaChannelSigner_jcall,
.cloned = LDKEcdsaChannelSigner_JCalls_cloned,
.free = LDKEcdsaChannelSigner_JCalls_free,
.ChannelSigner = LDKChannelSigner_init(ChannelSigner, pubkeys),
return tag_ptr(ret_conv, true);
}
+int64_t CS_LDK_EcdsaChannelSigner_sign_splicing_funding_input(int64_t this_arg, int8_tArray tx, int64_t input_index, int64_t input_value) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKEcdsaChannelSigner* this_arg_conv = (LDKEcdsaChannelSigner*)this_arg_ptr;
+ LDKTransaction tx_ref;
+ tx_ref.datalen = tx->arr_len;
+ tx_ref.data = MALLOC(tx_ref.datalen, "LDKTransaction Bytes");
+ memcpy(tx_ref.data, tx->elems, tx_ref.datalen); FREE(tx);
+ tx_ref.data_is_owned = true;
+ LDKCResult_ECDSASignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_ECDSASignatureNoneZ), "LDKCResult_ECDSASignatureNoneZ");
+ *ret_conv = (this_arg_conv->sign_splicing_funding_input)(this_arg_conv->this_arg, tx_ref, input_index, input_value);
+ return tag_ptr(ret_conv, true);
+}
+
static inline struct LDKEcdsaChannelSigner CResult_EcdsaChannelSignerDecodeErrorZ_get_ok(LDKCResult_EcdsaChannelSignerDecodeErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return EcdsaChannelSigner_clone(&*owner->contents.result);
score_params_var = ProbabilisticScoringFeeParameters_clone(&score_params_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(score_params_var);
score_params_ref = tag_ptr(score_params_var.inner, score_params_var.is_owned);
- return js_invoke_function_l_lll(j_calls->instance_ptr, 15, ref_candidate, usage_ref, score_params_ref);
+ return js_invoke_function_l_lll(j_calls->instance_ptr, 16, ref_candidate, usage_ref, score_params_ref);
}
static void LDKScoreLookUp_JCalls_cloned(LDKScoreLookUp* new_obj) {
LDKScoreLookUp_JCalls *j_calls = (LDKScoreLookUp_JCalls*) new_obj->this_arg;
path_ref = tag_ptr(path_var.inner, path_var.is_owned);
int64_t short_channel_id_conv = short_channel_id;
int64_t duration_since_epoch_conv = duration_since_epoch;
- js_invoke_function_void_lll(j_calls->instance_ptr, 16, path_ref, short_channel_id_conv, duration_since_epoch_conv);
+ js_invoke_function_void_lll(j_calls->instance_ptr, 17, path_ref, short_channel_id_conv, duration_since_epoch_conv);
}
void payment_path_successful_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uint64_t duration_since_epoch) {
LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg;
CHECK_INNER_FIELD_ACCESS_OR_NULL(path_var);
path_ref = tag_ptr(path_var.inner, path_var.is_owned);
int64_t duration_since_epoch_conv = duration_since_epoch;
- js_invoke_function_void_ll(j_calls->instance_ptr, 17, path_ref, duration_since_epoch_conv);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 18, path_ref, duration_since_epoch_conv);
}
void probe_failed_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uint64_t short_channel_id, uint64_t duration_since_epoch) {
LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg;
path_ref = tag_ptr(path_var.inner, path_var.is_owned);
int64_t short_channel_id_conv = short_channel_id;
int64_t duration_since_epoch_conv = duration_since_epoch;
- js_invoke_function_void_lll(j_calls->instance_ptr, 18, path_ref, short_channel_id_conv, duration_since_epoch_conv);
+ js_invoke_function_void_lll(j_calls->instance_ptr, 19, path_ref, short_channel_id_conv, duration_since_epoch_conv);
}
void probe_successful_LDKScoreUpdate_jcall(void* this_arg, const LDKPath * path, uint64_t duration_since_epoch) {
LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg;
CHECK_INNER_FIELD_ACCESS_OR_NULL(path_var);
path_ref = tag_ptr(path_var.inner, path_var.is_owned);
int64_t duration_since_epoch_conv = duration_since_epoch;
- js_invoke_function_void_ll(j_calls->instance_ptr, 19, path_ref, duration_since_epoch_conv);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 20, path_ref, duration_since_epoch_conv);
}
void time_passed_LDKScoreUpdate_jcall(void* this_arg, uint64_t duration_since_epoch) {
LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) this_arg;
int64_t duration_since_epoch_conv = duration_since_epoch;
- js_invoke_function_void_l(j_calls->instance_ptr, 20, duration_since_epoch_conv);
+ js_invoke_function_void_l(j_calls->instance_ptr, 21, duration_since_epoch_conv);
}
static void LDKScoreUpdate_JCalls_cloned(LDKScoreUpdate* new_obj) {
LDKScoreUpdate_JCalls *j_calls = (LDKScoreUpdate_JCalls*) new_obj->this_arg;
}
LDKScoreLookUp read_lock_LDKLockableScore_jcall(const void* this_arg) {
LDKLockableScore_JCalls *j_calls = (LDKLockableScore_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 21);
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 22);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKScoreLookUp ret_conv = *(LDKScoreLookUp*)(ret_ptr);
}
LDKScoreUpdate write_lock_LDKLockableScore_jcall(const void* this_arg) {
LDKLockableScore_JCalls *j_calls = (LDKLockableScore_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 22);
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 23);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKScoreUpdate ret_conv = *(LDKScoreUpdate*)(ret_ptr);
}
LDKCVec_u8Z write_LDKWriteableScore_jcall(const void* this_arg) {
LDKWriteableScore_JCalls *j_calls = (LDKWriteableScore_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_l_(j_calls->instance_ptr, 23);
+ int8_tArray ret = (int8_tArray)js_invoke_function_l_(j_calls->instance_ptr, 24);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
return ret_ref;
}
-static inline LDKCVec_BlindedPaymentPathZ CVec_BlindedPaymentPathZ_clone(const LDKCVec_BlindedPaymentPathZ *orig) {
- LDKCVec_BlindedPaymentPathZ ret = { .data = MALLOC(sizeof(LDKBlindedPaymentPath) * orig->datalen, "LDKCVec_BlindedPaymentPathZ clone bytes"), .datalen = orig->datalen };
- for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = BlindedPaymentPath_clone(&orig->data[i]);
- }
- return ret;
-}
static inline struct LDKCVec_BlindedPaymentPathZ CResult_CVec_BlindedPaymentPathZNoneZ_get_ok(LDKCResult_CVec_BlindedPaymentPathZNoneZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return CVec_BlindedPaymentPathZ_clone(&*owner->contents.result);
CResult_CVec_BlindedPaymentPathZNoneZ_get_err(owner_conv);
}
-static inline struct LDKOnionMessagePath CResult_OnionMessagePathNoneZ_get_ok(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR owner){
- LDKOnionMessagePath ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-int64_t CS_LDK_CResult_OnionMessagePathNoneZ_get_ok(int64_t owner) {
- LDKCResult_OnionMessagePathNoneZ* owner_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(owner);
- LDKOnionMessagePath ret_var = CResult_OnionMessagePathNoneZ_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_OnionMessagePathNoneZ_get_err(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return *owner->contents.err;
-}
-void CS_LDK_CResult_OnionMessagePathNoneZ_get_err(int64_t owner) {
- LDKCResult_OnionMessagePathNoneZ* owner_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(owner);
- CResult_OnionMessagePathNoneZ_get_err(owner_conv);
-}
-
-static inline struct LDKCVec_BlindedMessagePathZ CResult_CVec_BlindedMessagePathZNoneZ_get_ok(LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR owner){
-CHECK(owner->result_ok);
- return CVec_BlindedMessagePathZ_clone(&*owner->contents.result);
-}
-int64_tArray CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_get_ok(int64_t owner) {
- LDKCResult_CVec_BlindedMessagePathZNoneZ* owner_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(owner);
- LDKCVec_BlindedMessagePathZ ret_var = CResult_CVec_BlindedMessagePathZNoneZ_get_ok(owner_conv);
- int64_tArray ret_arr = NULL;
- ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
- int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
- for (size_t u = 0; u < ret_var.datalen; u++) {
- LDKBlindedMessagePath ret_conv_20_var = ret_var.data[u];
- int64_t ret_conv_20_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_20_var);
- ret_conv_20_ref = tag_ptr(ret_conv_20_var.inner, ret_conv_20_var.is_owned);
- ret_arr_ptr[u] = ret_conv_20_ref;
- }
-
- FREE(ret_var.data);
- return ret_arr;
-}
-
-static inline void CResult_CVec_BlindedMessagePathZNoneZ_get_err(LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return *owner->contents.err;
-}
-void CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_get_err(int64_t owner) {
- LDKCResult_CVec_BlindedMessagePathZNoneZ* owner_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(owner);
- CResult_CVec_BlindedMessagePathZNoneZ_get_err(owner_conv);
-}
-
-static inline LDKCVec_MessageForwardNodeZ CVec_MessageForwardNodeZ_clone(const LDKCVec_MessageForwardNodeZ *orig) {
- LDKCVec_MessageForwardNodeZ ret = { .data = MALLOC(sizeof(LDKMessageForwardNode) * orig->datalen, "LDKCVec_MessageForwardNodeZ clone bytes"), .datalen = orig->datalen };
- for (size_t i = 0; i < ret.datalen; i++) {
- ret.data[i] = MessageForwardNode_clone(&orig->data[i]);
- }
- return ret;
-}
static inline struct LDKInFlightHtlcs CResult_InFlightHtlcsDecodeErrorZ_get_ok(LDKCResult_InFlightHtlcsDecodeErrorZ *NONNULL_PTR owner){
LDKInFlightHtlcs ret = *owner->contents.result;
ret.is_owned = false;
int64_t record_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(record_var);
record_ref = tag_ptr(record_var.inner, record_var.is_owned);
- js_invoke_function_void_l(j_calls->instance_ptr, 24, record_ref);
+ js_invoke_function_void_l(j_calls->instance_ptr, 25, record_ref);
}
static void LDKLogger_JCalls_cloned(LDKLogger* new_obj) {
LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) new_obj->this_arg;
}
return ret;
}
-static inline struct LDKInitFeatures CResult_InitFeaturesDecodeErrorZ_get_ok(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKInitFeatures ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_get_ok(int64_t owner) {
- LDKCResult_InitFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKInitFeatures ret_var = CResult_InitFeaturesDecodeErrorZ_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_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_get_err(int64_t owner) {
- LDKCResult_InitFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_InitFeaturesDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKChannelFeatures CResult_ChannelFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKChannelFeatures ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_get_ok(int64_t owner) {
- LDKCResult_ChannelFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKChannelFeatures ret_var = CResult_ChannelFeaturesDecodeErrorZ_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_ChannelFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_get_err(int64_t owner) {
- LDKCResult_ChannelFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_ChannelFeaturesDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKNodeFeatures CResult_NodeFeaturesDecodeErrorZ_get_ok(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKNodeFeatures ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_get_ok(int64_t owner) {
- LDKCResult_NodeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKNodeFeatures ret_var = CResult_NodeFeaturesDecodeErrorZ_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_NodeFeaturesDecodeErrorZ_get_err(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_get_err(int64_t owner) {
- LDKCResult_NodeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_NodeFeaturesDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKBolt11InvoiceFeatures CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_ok(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKBolt11InvoiceFeatures ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_ok(int64_t owner) {
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKBolt11InvoiceFeatures ret_var = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_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_Bolt11InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_err(int64_t owner) {
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKBolt12InvoiceFeatures CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_ok(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKBolt12InvoiceFeatures ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_ok(int64_t owner) {
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKBolt12InvoiceFeatures ret_var = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_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_Bolt12InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_err(int64_t owner) {
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKBlindedHopFeatures CResult_BlindedHopFeaturesDecodeErrorZ_get_ok(LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKBlindedHopFeatures ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_get_ok(int64_t owner) {
- LDKCResult_BlindedHopFeaturesDecodeErrorZ* owner_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKBlindedHopFeatures ret_var = CResult_BlindedHopFeaturesDecodeErrorZ_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_BlindedHopFeaturesDecodeErrorZ_get_err(LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_get_err(int64_t owner) {
- LDKCResult_BlindedHopFeaturesDecodeErrorZ* owner_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_BlindedHopFeaturesDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-static inline struct LDKChannelTypeFeatures CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner){
- LDKChannelTypeFeatures ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(int64_t owner) {
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKChannelTypeFeatures ret_var = CResult_ChannelTypeFeaturesDecodeErrorZ_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_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(int64_t owner) {
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(owner);
- LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
- *ret_copy = CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- 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_conv;
}
-static inline struct LDKInvoiceRequestWithDerivedPayerIdBuilder CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
- LDKInvoiceRequestWithDerivedPayerIdBuilder ret = *owner->contents.result;
+static inline struct LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder ret = *owner->contents.result;
ret.is_owned = false;
return ret;
}
-int64_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(int64_t owner) {
- LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
- LDKInvoiceRequestWithDerivedPayerIdBuilder ret_var = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(owner_conv);
+int64_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(int64_t owner) {
+ LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder ret_var = CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_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){
+static inline enum LDKBolt12SemanticError CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
return Bolt12SemanticError_clone(&*owner->contents.err);
}
-int32_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(int64_t owner) {
- LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
- int32_t ret_conv = LDKBolt12SemanticError_to_cs(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;
-}
-int64_t CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(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);
-}
-int32_t CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(int64_t owner) {
- LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
- int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(owner_conv));
+int32_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(int64_t owner) {
+ LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ* owner_conv = (LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(owner);
+ int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(owner_conv));
return ret_conv;
}
int8_tArray chain_hash_arr = init_int8_tArray(32, __LINE__);
memcpy(chain_hash_arr->elems, *chain_hash, 32);
int64_t short_channel_id_conv = short_channel_id;
- uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 25, (int64_t)chain_hash_arr, short_channel_id_conv);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 26, (int64_t)chain_hash_arr, short_channel_id_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKUtxoResult ret_conv = *(LDKUtxoResult*)(ret_ptr);
uint32_t CS_LDK_LDKPaymentContext_ty_from_ptr(int64_t ptr) {
LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr);
switch(obj->tag) {
- case LDKPaymentContext_Unknown: return 0;
- case LDKPaymentContext_Bolt12Offer: return 1;
- case LDKPaymentContext_Bolt12Refund: return 2;
+ case LDKPaymentContext_Bolt12Offer: return 0;
+ case LDKPaymentContext_Bolt12Refund: return 1;
default: abort();
}
}
-int64_t CS_LDK_LDKPaymentContext_Unknown_get_unknown(int64_t ptr) {
- LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr);
- CHECK(obj->tag == 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 unknown_ref;
-}
int64_t CS_LDK_LDKPaymentContext_Bolt12Offer_get_bolt12_offer(int64_t ptr) {
LDKPaymentContext *obj = (LDKPaymentContext*)untag_ptr(ptr);
CHECK(obj->tag == LDKPaymentContext_Bolt12Offer);
*some_conv = C2Tuple_u64u16Z_clone(some_conv);
return tag_ptr(some_conv, true);
}
+uint32_t CS_LDK_LDKAPIError_ty_from_ptr(int64_t ptr) {
+ LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKAPIError_APIMisuseError: return 0;
+ case LDKAPIError_FeeRateTooHigh: return 1;
+ case LDKAPIError_InvalidRoute: return 2;
+ case LDKAPIError_ChannelUnavailable: return 3;
+ case LDKAPIError_MonitorUpdateInProgress: return 4;
+ case LDKAPIError_IncompatibleShutdownScript: return 5;
+ default: abort();
+ }
+}
+jstring CS_LDK_LDKAPIError_APIMisuseError_get_err(int64_t ptr) {
+ LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKAPIError_APIMisuseError);
+ LDKStr err_str = obj->api_misuse_error.err;
+ jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len);
+ return err_conv;
+}
+jstring CS_LDK_LDKAPIError_FeeRateTooHigh_get_err(int64_t ptr) {
+ LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKAPIError_FeeRateTooHigh);
+ LDKStr err_str = obj->fee_rate_too_high.err;
+ jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len);
+ return err_conv;
+}
+int32_t CS_LDK_LDKAPIError_FeeRateTooHigh_get_feerate(int64_t ptr) {
+ LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKAPIError_FeeRateTooHigh);
+ int32_t feerate_conv = obj->fee_rate_too_high.feerate;
+ return feerate_conv;
+}
+jstring CS_LDK_LDKAPIError_InvalidRoute_get_err(int64_t ptr) {
+ LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKAPIError_InvalidRoute);
+ LDKStr err_str = obj->invalid_route.err;
+ jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len);
+ return err_conv;
+}
+jstring CS_LDK_LDKAPIError_ChannelUnavailable_get_err(int64_t ptr) {
+ LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKAPIError_ChannelUnavailable);
+ LDKStr err_str = obj->channel_unavailable.err;
+ jstring err_conv = str_ref_to_cs(err_str.chars, err_str.len);
+ return err_conv;
+}
+int64_t CS_LDK_LDKAPIError_IncompatibleShutdownScript_get_script(int64_t ptr) {
+ LDKAPIError *obj = (LDKAPIError*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKAPIError_IncompatibleShutdownScript);
+ LDKShutdownScript script_var = obj->incompatible_shutdown_script.script;
+ int64_t script_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(script_var);
+ script_ref = tag_ptr(script_var.inner, false);
+ return script_ref;
+}
static inline struct LDKChannelId CResult_ChannelIdAPIErrorZ_get_ok(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner){
LDKChannelId ret = *owner->contents.result;
ret.is_owned = false;
}
return ret;
}
-uint32_t CS_LDK_LDKPaymentSendFailure_ty_from_ptr(int64_t ptr) {
- LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKPaymentSendFailure_ParameterError: return 0;
- case LDKPaymentSendFailure_PathParameterError: return 1;
- case LDKPaymentSendFailure_AllFailedResendSafe: return 2;
- case LDKPaymentSendFailure_DuplicatePayment: return 3;
- case LDKPaymentSendFailure_PartialFailure: return 4;
- default: abort();
- }
-}
-int64_t CS_LDK_LDKPaymentSendFailure_ParameterError_get_parameter_error(int64_t ptr) {
- LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
- CHECK(obj->tag == LDKPaymentSendFailure_ParameterError);
- int64_t parameter_error_ref = tag_ptr(&obj->parameter_error, false);
- return parameter_error_ref;
-}
-int64_tArray CS_LDK_LDKPaymentSendFailure_PathParameterError_get_path_parameter_error(int64_t ptr) {
- LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
- CHECK(obj->tag == LDKPaymentSendFailure_PathParameterError);
- LDKCVec_CResult_NoneAPIErrorZZ path_parameter_error_var = obj->path_parameter_error;
- int64_tArray path_parameter_error_arr = NULL;
- path_parameter_error_arr = init_int64_tArray(path_parameter_error_var.datalen, __LINE__);
- int64_t *path_parameter_error_arr_ptr = (int64_t*)(((uint8_t*)path_parameter_error_arr) + 8);
- for (size_t w = 0; w < path_parameter_error_var.datalen; w++) {
- LDKCResult_NoneAPIErrorZ* path_parameter_error_conv_22_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *path_parameter_error_conv_22_conv = path_parameter_error_var.data[w];
- *path_parameter_error_conv_22_conv = CResult_NoneAPIErrorZ_clone(path_parameter_error_conv_22_conv);
- path_parameter_error_arr_ptr[w] = tag_ptr(path_parameter_error_conv_22_conv, true);
- }
-
- return path_parameter_error_arr;
-}
-int64_tArray CS_LDK_LDKPaymentSendFailure_AllFailedResendSafe_get_all_failed_resend_safe(int64_t ptr) {
- LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
- CHECK(obj->tag == LDKPaymentSendFailure_AllFailedResendSafe);
- LDKCVec_APIErrorZ all_failed_resend_safe_var = obj->all_failed_resend_safe;
- int64_tArray all_failed_resend_safe_arr = NULL;
- all_failed_resend_safe_arr = init_int64_tArray(all_failed_resend_safe_var.datalen, __LINE__);
- int64_t *all_failed_resend_safe_arr_ptr = (int64_t*)(((uint8_t*)all_failed_resend_safe_arr) + 8);
- for (size_t k = 0; k < all_failed_resend_safe_var.datalen; k++) {
- int64_t all_failed_resend_safe_conv_10_ref = tag_ptr(&all_failed_resend_safe_var.data[k], false);
- all_failed_resend_safe_arr_ptr[k] = all_failed_resend_safe_conv_10_ref;
- }
-
- return all_failed_resend_safe_arr;
-}
-int64_tArray CS_LDK_LDKPaymentSendFailure_PartialFailure_get_results(int64_t ptr) {
- LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
- CHECK(obj->tag == LDKPaymentSendFailure_PartialFailure);
- LDKCVec_CResult_NoneAPIErrorZZ results_var = obj->partial_failure.results;
- int64_tArray results_arr = NULL;
- results_arr = init_int64_tArray(results_var.datalen, __LINE__);
- int64_t *results_arr_ptr = (int64_t*)(((uint8_t*)results_arr) + 8);
- for (size_t w = 0; w < results_var.datalen; w++) {
- LDKCResult_NoneAPIErrorZ* results_conv_22_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *results_conv_22_conv = results_var.data[w];
- *results_conv_22_conv = CResult_NoneAPIErrorZ_clone(results_conv_22_conv);
- results_arr_ptr[w] = tag_ptr(results_conv_22_conv, true);
- }
-
- return results_arr;
-}
-int64_t CS_LDK_LDKPaymentSendFailure_PartialFailure_get_failed_paths_retry(int64_t ptr) {
- LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
- CHECK(obj->tag == LDKPaymentSendFailure_PartialFailure);
- LDKRouteParameters failed_paths_retry_var = obj->partial_failure.failed_paths_retry;
- int64_t failed_paths_retry_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(failed_paths_retry_var);
- failed_paths_retry_ref = tag_ptr(failed_paths_retry_var.inner, false);
- return failed_paths_retry_ref;
-}
-int8_tArray CS_LDK_LDKPaymentSendFailure_PartialFailure_get_payment_id(int64_t ptr) {
- LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)untag_ptr(ptr);
- CHECK(obj->tag == LDKPaymentSendFailure_PartialFailure);
- int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_id_arr->elems, obj->partial_failure.payment_id.data, 32);
- return payment_id_arr;
-}
-static inline void CResult_NonePaymentSendFailureZ_get_ok(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR owner){
+static inline void CResult_NoneAPIErrorZ_get_ok(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return *owner->contents.result;
}
-void CS_LDK_CResult_NonePaymentSendFailureZ_get_ok(int64_t owner) {
- LDKCResult_NonePaymentSendFailureZ* owner_conv = (LDKCResult_NonePaymentSendFailureZ*)untag_ptr(owner);
- CResult_NonePaymentSendFailureZ_get_ok(owner_conv);
+void CS_LDK_CResult_NoneAPIErrorZ_get_ok(int64_t owner) {
+ LDKCResult_NoneAPIErrorZ* owner_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(owner);
+ CResult_NoneAPIErrorZ_get_ok(owner_conv);
}
-static inline struct LDKPaymentSendFailure CResult_NonePaymentSendFailureZ_get_err(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR owner){
+static inline struct LDKAPIError CResult_NoneAPIErrorZ_get_err(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
- return PaymentSendFailure_clone(&*owner->contents.err);
+ return APIError_clone(&*owner->contents.err);
}
-int64_t CS_LDK_CResult_NonePaymentSendFailureZ_get_err(int64_t owner) {
- LDKCResult_NonePaymentSendFailureZ* owner_conv = (LDKCResult_NonePaymentSendFailureZ*)untag_ptr(owner);
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = CResult_NonePaymentSendFailureZ_get_err(owner_conv);
+int64_t CS_LDK_CResult_NoneAPIErrorZ_get_err(int64_t owner) {
+ LDKCResult_NoneAPIErrorZ* owner_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(owner);
+ LDKAPIError *ret_copy = MALLOC(sizeof(LDKAPIError), "LDKAPIError");
+ *ret_copy = CResult_NoneAPIErrorZ_get_err(owner_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_conv;
}
-static inline struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesPaymentSendFailureZ_get_ok(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ *NONNULL_PTR owner){
+uint32_t CS_LDK_LDKCOption_OffersContextZ_ty_from_ptr(int64_t ptr) {
+ LDKCOption_OffersContextZ *obj = (LDKCOption_OffersContextZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_OffersContextZ_Some: return 0;
+ case LDKCOption_OffersContextZ_None: return 1;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKCOption_OffersContextZ_Some_get_some(int64_t ptr) {
+ LDKCOption_OffersContextZ *obj = (LDKCOption_OffersContextZ*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKCOption_OffersContextZ_Some);
+ int64_t some_ref = tag_ptr(&obj->some, false);
+ return some_ref;
+}
+uint32_t CS_LDK_LDKBolt12PaymentError_ty_from_ptr(int64_t ptr) {
+ LDKBolt12PaymentError *obj = (LDKBolt12PaymentError*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKBolt12PaymentError_UnexpectedInvoice: return 0;
+ case LDKBolt12PaymentError_DuplicateInvoice: return 1;
+ case LDKBolt12PaymentError_UnknownRequiredFeatures: return 2;
+ case LDKBolt12PaymentError_SendingFailed: return 3;
+ default: abort();
+ }
+}
+int32_t CS_LDK_LDKBolt12PaymentError_SendingFailed_get_sending_failed(int64_t ptr) {
+ LDKBolt12PaymentError *obj = (LDKBolt12PaymentError*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKBolt12PaymentError_SendingFailed);
+ int32_t sending_failed_conv = LDKRetryableSendFailure_to_cs(obj->sending_failed);
+ return sending_failed_conv;
+}
+static inline void CResult_NoneBolt12PaymentErrorZ_get_ok(LDKCResult_NoneBolt12PaymentErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
- return ThirtyTwoBytes_clone(&*owner->contents.result);
+ return *owner->contents.result;
}
-int8_tArray CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_get_ok(int64_t owner) {
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* owner_conv = (LDKCResult_ThirtyTwoBytesPaymentSendFailureZ*)untag_ptr(owner);
- int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, CResult_ThirtyTwoBytesPaymentSendFailureZ_get_ok(owner_conv).data, 32);
- return ret_arr;
+void CS_LDK_CResult_NoneBolt12PaymentErrorZ_get_ok(int64_t owner) {
+ LDKCResult_NoneBolt12PaymentErrorZ* owner_conv = (LDKCResult_NoneBolt12PaymentErrorZ*)untag_ptr(owner);
+ CResult_NoneBolt12PaymentErrorZ_get_ok(owner_conv);
}
-static inline struct LDKPaymentSendFailure CResult_ThirtyTwoBytesPaymentSendFailureZ_get_err(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ *NONNULL_PTR owner){
+static inline struct LDKBolt12PaymentError CResult_NoneBolt12PaymentErrorZ_get_err(LDKCResult_NoneBolt12PaymentErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
- return PaymentSendFailure_clone(&*owner->contents.err);
+ return Bolt12PaymentError_clone(&*owner->contents.err);
}
-int64_t CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_get_err(int64_t owner) {
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* owner_conv = (LDKCResult_ThirtyTwoBytesPaymentSendFailureZ*)untag_ptr(owner);
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = CResult_ThirtyTwoBytesPaymentSendFailureZ_get_err(owner_conv);
+int64_t CS_LDK_CResult_NoneBolt12PaymentErrorZ_get_err(int64_t owner) {
+ LDKCResult_NoneBolt12PaymentErrorZ* owner_conv = (LDKCResult_NoneBolt12PaymentErrorZ*)untag_ptr(owner);
+ LDKBolt12PaymentError *ret_copy = MALLOC(sizeof(LDKBolt12PaymentError), "LDKBolt12PaymentError");
+ *ret_copy = CResult_NoneBolt12PaymentErrorZ_get_err(owner_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_arr;
}
-static inline struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ *NONNULL_PTR owner){
+uint32_t CS_LDK_LDKProbeSendFailure_ty_from_ptr(int64_t ptr) {
+ LDKProbeSendFailure *obj = (LDKProbeSendFailure*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKProbeSendFailure_RouteNotFound: return 0;
+ case LDKProbeSendFailure_ParameterError: return 1;
+ case LDKProbeSendFailure_DuplicateProbe: return 2;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKProbeSendFailure_ParameterError_get_parameter_error(int64_t ptr) {
+ LDKProbeSendFailure *obj = (LDKProbeSendFailure*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKProbeSendFailure_ParameterError);
+ int64_t parameter_error_ref = tag_ptr(&obj->parameter_error, false);
+ return parameter_error_ref;
+}
+static inline struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_clone(&*owner->contents.result);
}
-int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_ok(int64_t owner) {
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* owner_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ*)untag_ptr(owner);
+int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_ok(int64_t owner) {
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* owner_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ*)untag_ptr(owner);
LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ), "LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ");
- *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_ok(owner_conv);
+ *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_ok(owner_conv);
return tag_ptr(ret_conv, true);
}
-static inline struct LDKPaymentSendFailure CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_err(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ *NONNULL_PTR owner){
+static inline struct LDKProbeSendFailure CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_err(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
- return PaymentSendFailure_clone(&*owner->contents.err);
+ return ProbeSendFailure_clone(&*owner->contents.err);
}
-int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_err(int64_t owner) {
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* owner_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ*)untag_ptr(owner);
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_err(owner_conv);
+int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_err(int64_t owner) {
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* owner_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ*)untag_ptr(owner);
+ LDKProbeSendFailure *ret_copy = MALLOC(sizeof(LDKProbeSendFailure), "LDKProbeSendFailure");
+ *ret_copy = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_err(owner_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
}
return ret;
}
-uint32_t CS_LDK_LDKProbeSendFailure_ty_from_ptr(int64_t ptr) {
- LDKProbeSendFailure *obj = (LDKProbeSendFailure*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKProbeSendFailure_RouteNotFound: return 0;
- case LDKProbeSendFailure_SendingFailed: return 1;
- default: abort();
- }
-}
-int64_t CS_LDK_LDKProbeSendFailure_SendingFailed_get_sending_failed(int64_t ptr) {
- LDKProbeSendFailure *obj = (LDKProbeSendFailure*)untag_ptr(ptr);
- CHECK(obj->tag == LDKProbeSendFailure_SendingFailed);
- int64_t sending_failed_ref = tag_ptr(&obj->sending_failed, false);
- return sending_failed_ref;
-}
static inline struct LDKCVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_ok(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ_clone(&*owner->contents.result);
}
return ret;
}
+static inline struct LDKPublicKey C2Tuple_PublicKeyChannelIdZ_get_a(LDKC2Tuple_PublicKeyChannelIdZ *NONNULL_PTR owner){
+ return owner->a;
+}
+int8_tArray CS_LDK_C2Tuple_PublicKeyChannelIdZ_get_a(int64_t owner) {
+ LDKC2Tuple_PublicKeyChannelIdZ* owner_conv = (LDKC2Tuple_PublicKeyChannelIdZ*)untag_ptr(owner);
+ int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, C2Tuple_PublicKeyChannelIdZ_get_a(owner_conv).compressed_form, 33);
+ return ret_arr;
+}
+
+static inline struct LDKChannelId C2Tuple_PublicKeyChannelIdZ_get_b(LDKC2Tuple_PublicKeyChannelIdZ *NONNULL_PTR owner){
+ LDKChannelId ret = owner->b;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_C2Tuple_PublicKeyChannelIdZ_get_b(int64_t owner) {
+ LDKC2Tuple_PublicKeyChannelIdZ* owner_conv = (LDKC2Tuple_PublicKeyChannelIdZ*)untag_ptr(owner);
+ LDKChannelId ret_var = C2Tuple_PublicKeyChannelIdZ_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;
+}
+
+uint32_t CS_LDK_LDKCOption_C2Tuple_PublicKeyChannelIdZZ_ty_from_ptr(int64_t ptr) {
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ *obj = (LDKCOption_C2Tuple_PublicKeyChannelIdZZ*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKCOption_C2Tuple_PublicKeyChannelIdZZ_Some: return 0;
+ case LDKCOption_C2Tuple_PublicKeyChannelIdZZ_None: return 1;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKCOption_C2Tuple_PublicKeyChannelIdZZ_Some_get_some(int64_t ptr) {
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ *obj = (LDKCOption_C2Tuple_PublicKeyChannelIdZZ*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKCOption_C2Tuple_PublicKeyChannelIdZZ_Some);
+ LDKC2Tuple_PublicKeyChannelIdZ* some_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyChannelIdZ), "LDKC2Tuple_PublicKeyChannelIdZ");
+ *some_conv = obj->some;
+ *some_conv = C2Tuple_PublicKeyChannelIdZ_clone(some_conv);
+ return tag_ptr(some_conv, true);
+}
+uint32_t CS_LDK_LDKSignOrCreationError_ty_from_ptr(int64_t ptr) {
+ LDKSignOrCreationError *obj = (LDKSignOrCreationError*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKSignOrCreationError_SignError: return 0;
+ case LDKSignOrCreationError_CreationError: return 1;
+ default: abort();
+ }
+}
+int32_t CS_LDK_LDKSignOrCreationError_CreationError_get_creation_error(int64_t ptr) {
+ LDKSignOrCreationError *obj = (LDKSignOrCreationError*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKSignOrCreationError_CreationError);
+ int32_t creation_error_conv = LDKCreationError_to_cs(obj->creation_error);
+ return creation_error_conv;
+}
+static inline struct LDKBolt11Invoice CResult_Bolt11InvoiceSignOrCreationErrorZ_get_ok(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR owner){
+ LDKBolt11Invoice ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_get_ok(int64_t owner) {
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* owner_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(owner);
+ LDKBolt11Invoice ret_var = CResult_Bolt11InvoiceSignOrCreationErrorZ_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 LDKSignOrCreationError CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return SignOrCreationError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err(int64_t owner) {
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* owner_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(owner);
+ LDKSignOrCreationError *ret_copy = MALLOC(sizeof(LDKSignOrCreationError), "LDKSignOrCreationError");
+ *ret_copy = CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
static inline struct LDKOfferWithDerivedMetadataBuilder CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner){
LDKOfferWithDerivedMetadataBuilder ret = *owner->contents.result;
ret.is_owned = false;
jstring some_conv = str_ref_to_cs(some_str.chars, some_str.len);
return some_conv;
}
+static inline LDKCVec_DestinationZ CVec_DestinationZ_clone(const LDKCVec_DestinationZ *orig) {
+ LDKCVec_DestinationZ ret = { .data = MALLOC(sizeof(LDKDestination) * orig->datalen, "LDKCVec_DestinationZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = Destination_clone(&orig->data[i]);
+ }
+ return ret;
+}
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);
return ret_ref;
}
-uint32_t CS_LDK_LDKOffersContext_ty_from_ptr(int64_t ptr) {
- LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKOffersContext_InvoiceRequest: return 0;
- case LDKOffersContext_OutboundPayment: return 1;
- case LDKOffersContext_InboundPayment: return 2;
- default: abort();
- }
-}
-int64_t CS_LDK_LDKOffersContext_InvoiceRequest_get_nonce(int64_t ptr) {
- LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
- CHECK(obj->tag == LDKOffersContext_InvoiceRequest);
- LDKNonce nonce_var = obj->invoice_request.nonce;
- int64_t nonce_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_var);
- nonce_ref = tag_ptr(nonce_var.inner, false);
- return nonce_ref;
-}
-int8_tArray CS_LDK_LDKOffersContext_OutboundPayment_get_payment_id(int64_t ptr) {
- LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
- CHECK(obj->tag == LDKOffersContext_OutboundPayment);
- int8_tArray payment_id_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_id_arr->elems, obj->outbound_payment.payment_id.data, 32);
- return payment_id_arr;
-}
-int64_t CS_LDK_LDKOffersContext_OutboundPayment_get_nonce(int64_t ptr) {
- LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
- CHECK(obj->tag == LDKOffersContext_OutboundPayment);
- LDKNonce nonce_var = obj->outbound_payment.nonce;
- int64_t nonce_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_var);
- nonce_ref = tag_ptr(nonce_var.inner, false);
- return nonce_ref;
-}
-int8_tArray CS_LDK_LDKOffersContext_OutboundPayment_get_hmac(int64_t ptr) {
- LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
- CHECK(obj->tag == LDKOffersContext_OutboundPayment);
- int8_tArray hmac_arr = init_int8_tArray(32, __LINE__);
- memcpy(hmac_arr->elems, obj->outbound_payment.hmac.data, 32);
- return hmac_arr;
-}
-int8_tArray CS_LDK_LDKOffersContext_InboundPayment_get_payment_hash(int64_t ptr) {
- LDKOffersContext *obj = (LDKOffersContext*)untag_ptr(ptr);
- CHECK(obj->tag == LDKOffersContext_InboundPayment);
- int8_tArray payment_hash_arr = init_int8_tArray(32, __LINE__);
- memcpy(payment_hash_arr->elems, obj->inbound_payment.payment_hash.data, 32);
- return payment_hash_arr;
-}
-uint32_t CS_LDK_LDKCOption_OffersContextZ_ty_from_ptr(int64_t ptr) {
- LDKCOption_OffersContextZ *obj = (LDKCOption_OffersContextZ*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKCOption_OffersContextZ_Some: return 0;
- case LDKCOption_OffersContextZ_None: return 1;
- default: abort();
- }
-}
-int64_t CS_LDK_LDKCOption_OffersContextZ_Some_get_some(int64_t ptr) {
- LDKCOption_OffersContextZ *obj = (LDKCOption_OffersContextZ*)untag_ptr(ptr);
- CHECK(obj->tag == LDKCOption_OffersContextZ_Some);
- int64_t some_ref = tag_ptr(&obj->some, false);
- return some_ref;
-}
uint32_t CS_LDK_LDKOffersMessage_ty_from_ptr(int64_t ptr) {
LDKOffersMessage *obj = (LDKOffersMessage*)untag_ptr(ptr);
switch(obj->tag) {
*some_conv = C2Tuple_OffersMessageResponseInstructionZ_clone(some_conv);
return tag_ptr(some_conv, true);
}
-uint32_t CS_LDK_LDKDestination_ty_from_ptr(int64_t ptr) {
- LDKDestination *obj = (LDKDestination*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKDestination_Node: return 0;
- case LDKDestination_BlindedPath: return 1;
- default: abort();
- }
-}
-int8_tArray CS_LDK_LDKDestination_Node_get_node(int64_t ptr) {
- LDKDestination *obj = (LDKDestination*)untag_ptr(ptr);
- CHECK(obj->tag == LDKDestination_Node);
- int8_tArray node_arr = init_int8_tArray(33, __LINE__);
- memcpy(node_arr->elems, obj->node.compressed_form, 33);
- return node_arr;
-}
-int64_t CS_LDK_LDKDestination_BlindedPath_get_blinded_path(int64_t ptr) {
- LDKDestination *obj = (LDKDestination*)untag_ptr(ptr);
- CHECK(obj->tag == LDKDestination_BlindedPath);
- LDKBlindedMessagePath blinded_path_var = obj->blinded_path;
- int64_t blinded_path_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(blinded_path_var);
- blinded_path_ref = tag_ptr(blinded_path_var.inner, false);
- return blinded_path_ref;
-}
-uint32_t CS_LDK_LDKMessageContext_ty_from_ptr(int64_t ptr) {
- LDKMessageContext *obj = (LDKMessageContext*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKMessageContext_Offers: return 0;
- case LDKMessageContext_Custom: return 1;
- default: abort();
- }
-}
-int64_t CS_LDK_LDKMessageContext_Offers_get_offers(int64_t ptr) {
- LDKMessageContext *obj = (LDKMessageContext*)untag_ptr(ptr);
- CHECK(obj->tag == LDKMessageContext_Offers);
- int64_t offers_ref = tag_ptr(&obj->offers, false);
- return offers_ref;
-}
-int8_tArray CS_LDK_LDKMessageContext_Custom_get_custom(int64_t ptr) {
- LDKMessageContext *obj = (LDKMessageContext*)untag_ptr(ptr);
- CHECK(obj->tag == LDKMessageContext_Custom);
- LDKCVec_u8Z custom_var = obj->custom;
- int8_tArray custom_arr = init_int8_tArray(custom_var.datalen, __LINE__);
- memcpy(custom_arr->elems, custom_var.data, custom_var.datalen);
- return custom_arr;
-}
-uint32_t CS_LDK_LDKMessageSendInstructions_ty_from_ptr(int64_t ptr) {
- LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKMessageSendInstructions_WithSpecifiedReplyPath: return 0;
- case LDKMessageSendInstructions_WithReplyPath: return 1;
- case LDKMessageSendInstructions_WithoutReplyPath: return 2;
- case LDKMessageSendInstructions_ForReply: return 3;
- default: abort();
- }
-}
-int64_t CS_LDK_LDKMessageSendInstructions_WithSpecifiedReplyPath_get_destination(int64_t ptr) {
- LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
- CHECK(obj->tag == LDKMessageSendInstructions_WithSpecifiedReplyPath);
- int64_t destination_ref = tag_ptr(&obj->with_specified_reply_path.destination, false);
- return destination_ref;
-}
-int64_t CS_LDK_LDKMessageSendInstructions_WithSpecifiedReplyPath_get_reply_path(int64_t ptr) {
- LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
- CHECK(obj->tag == LDKMessageSendInstructions_WithSpecifiedReplyPath);
- LDKBlindedMessagePath reply_path_var = obj->with_specified_reply_path.reply_path;
- int64_t reply_path_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(reply_path_var);
- reply_path_ref = tag_ptr(reply_path_var.inner, false);
- return reply_path_ref;
-}
-int64_t CS_LDK_LDKMessageSendInstructions_WithReplyPath_get_destination(int64_t ptr) {
- LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
- CHECK(obj->tag == LDKMessageSendInstructions_WithReplyPath);
- int64_t destination_ref = tag_ptr(&obj->with_reply_path.destination, false);
- return destination_ref;
-}
-int64_t CS_LDK_LDKMessageSendInstructions_WithReplyPath_get_context(int64_t ptr) {
- LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
- CHECK(obj->tag == LDKMessageSendInstructions_WithReplyPath);
- int64_t context_ref = tag_ptr(&obj->with_reply_path.context, false);
- return context_ref;
-}
-int64_t CS_LDK_LDKMessageSendInstructions_WithoutReplyPath_get_destination(int64_t ptr) {
- LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
- CHECK(obj->tag == LDKMessageSendInstructions_WithoutReplyPath);
- int64_t destination_ref = tag_ptr(&obj->without_reply_path.destination, false);
- return destination_ref;
-}
-int64_t CS_LDK_LDKMessageSendInstructions_ForReply_get_instructions(int64_t ptr) {
- LDKMessageSendInstructions *obj = (LDKMessageSendInstructions*)untag_ptr(ptr);
- CHECK(obj->tag == LDKMessageSendInstructions_ForReply);
- LDKResponseInstruction instructions_var = obj->for_reply.instructions;
- int64_t instructions_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(instructions_var);
- instructions_ref = tag_ptr(instructions_var.inner, false);
- return instructions_ref;
-}
static inline struct LDKOffersMessage C2Tuple_OffersMessageMessageSendInstructionsZ_get_a(LDKC2Tuple_OffersMessageMessageSendInstructionsZ *NONNULL_PTR owner){
return OffersMessage_clone(&owner->a);
}
jboolean requires_blinded_error_conv = obj->receive_keysend.requires_blinded_error;
return requires_blinded_error_conv;
}
+jboolean CS_LDK_LDKPendingHTLCRouting_ReceiveKeysend_get_has_recipient_created_payment_secret(int64_t ptr) {
+ LDKPendingHTLCRouting *obj = (LDKPendingHTLCRouting*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKPendingHTLCRouting_ReceiveKeysend);
+ jboolean has_recipient_created_payment_secret_conv = obj->receive_keysend.has_recipient_created_payment_secret;
+ return has_recipient_created_payment_secret_conv;
+}
static inline struct LDKPendingHTLCRouting CResult_PendingHTLCRoutingDecodeErrorZ_get_ok(LDKCResult_PendingHTLCRoutingDecodeErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return PendingHTLCRouting_clone(&*owner->contents.result);
int64_t monitor_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_var);
monitor_ref = tag_ptr(monitor_var.inner, monitor_var.is_owned);
- uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 26, funding_txo_ref, monitor_ref);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 27, funding_txo_ref, monitor_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_ChannelMonitorUpdateStatusNoneZ ret_conv = *(LDKCResult_ChannelMonitorUpdateStatusNoneZ*)(ret_ptr);
update_var = ChannelMonitorUpdate_clone(&update_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(update_var);
update_ref = tag_ptr(update_var.inner, update_var.is_owned);
- uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_ll(j_calls->instance_ptr, 27, funding_txo_ref, update_ref);
+ uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_ll(j_calls->instance_ptr, 28, funding_txo_ref, update_ref);
LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_cs(ret);
return ret_conv;
}
LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ release_pending_monitor_events_LDKWatch_jcall(const void* this_arg) {
LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
- int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 28);
+ int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 29);
LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
}
FREE(txs_var.data);
- js_invoke_function_void_l(j_calls->instance_ptr, 29, (int64_t)txs_arr);
+ js_invoke_function_void_l(j_calls->instance_ptr, 30, (int64_t)txs_arr);
}
static void LDKBroadcasterInterface_JCalls_cloned(LDKBroadcasterInterface* new_obj) {
LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) new_obj->this_arg;
}
LDKThirtyTwoBytes get_secure_random_bytes_LDKEntropySource_jcall(const void* this_arg) {
LDKEntropySource_JCalls *j_calls = (LDKEntropySource_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_l_(j_calls->instance_ptr, 30);
+ int8_tArray ret = (int8_tArray)js_invoke_function_l_(j_calls->instance_ptr, 31);
LDKThirtyTwoBytes ret_ref;
CHECK(ret->arr_len == 32);
memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
FREE(j_calls);
}
}
-LDKThirtyTwoBytes get_inbound_payment_key_material_LDKNodeSigner_jcall(const void* this_arg) {
+LDKExpandedKey get_inbound_payment_key_LDKNodeSigner_jcall(const void* this_arg) {
LDKNodeSigner_JCalls *j_calls = (LDKNodeSigner_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_l_(j_calls->instance_ptr, 31);
- LDKThirtyTwoBytes ret_ref;
- CHECK(ret->arr_len == 32);
- memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
- return ret_ref;
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 32);
+ LDKExpandedKey ret_conv;
+ ret_conv.inner = untag_ptr(ret);
+ ret_conv.is_owned = ptr_is_owned(ret);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv);
+ return ret_conv;
}
LDKCResult_PublicKeyNoneZ get_node_id_LDKNodeSigner_jcall(const void* this_arg, LDKRecipient recipient) {
LDKNodeSigner_JCalls *j_calls = (LDKNodeSigner_JCalls*) this_arg;
int32_t recipient_conv = LDKRecipient_to_cs(recipient);
- uint64_t ret = js_invoke_function_l_Recipient(j_calls->instance_ptr, 32, recipient_conv);
+ uint64_t ret = js_invoke_function_l_Recipient(j_calls->instance_ptr, 33, recipient_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_PublicKeyNoneZ ret_conv = *(LDKCResult_PublicKeyNoneZ*)(ret_ptr);
LDKCOption_BigEndianScalarZ *tweak_copy = MALLOC(sizeof(LDKCOption_BigEndianScalarZ), "LDKCOption_BigEndianScalarZ");
*tweak_copy = tweak;
int64_t tweak_ref = tag_ptr(tweak_copy, true);
- uint64_t ret = js_invoke_function_l_Recipientll(j_calls->instance_ptr, 33, recipient_conv, (int64_t)other_key_arr, tweak_ref);
+ uint64_t ret = js_invoke_function_l_Recipientll(j_calls->instance_ptr, 34, recipient_conv, (int64_t)other_key_arr, tweak_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_ThirtyTwoBytesNoneZ ret_conv = *(LDKCResult_ThirtyTwoBytesNoneZ*)(ret_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_var);
invoice_ref = tag_ptr(invoice_var.inner, invoice_var.is_owned);
int32_t recipient_conv = LDKRecipient_to_cs(recipient);
- uint64_t ret = js_invoke_function_l_lRecipient(j_calls->instance_ptr, 34, invoice_ref, recipient_conv);
+ uint64_t ret = js_invoke_function_l_lRecipient(j_calls->instance_ptr, 35, invoice_ref, recipient_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_RecoverableSignatureNoneZ ret_conv = *(LDKCResult_RecoverableSignatureNoneZ*)(ret_ptr);
FREE(untag_ptr(ret));
return ret_conv;
}
-LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_request_LDKNodeSigner_jcall(const void* this_arg, const LDKUnsignedInvoiceRequest * invoice_request) {
- LDKNodeSigner_JCalls *j_calls = (LDKNodeSigner_JCalls*) this_arg;
- LDKUnsignedInvoiceRequest invoice_request_var = *invoice_request;
- int64_t invoice_request_ref = 0;
- 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);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 35, invoice_request_ref);
- void* ret_ptr = untag_ptr(ret);
- CHECK_ACCESS(ret_ptr);
- LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr);
- FREE(untag_ptr(ret));
- return ret_conv;
-}
LDKCResult_SchnorrSignatureNoneZ sign_bolt12_invoice_LDKNodeSigner_jcall(const void* this_arg, const LDKUnsignedBolt12Invoice * invoice) {
LDKNodeSigner_JCalls *j_calls = (LDKNodeSigner_JCalls*) this_arg;
LDKUnsignedBolt12Invoice invoice_var = *invoice;
LDKNodeSigner ret = {
.this_arg = (void*) calls,
- .get_inbound_payment_key_material = get_inbound_payment_key_material_LDKNodeSigner_jcall,
+ .get_inbound_payment_key = get_inbound_payment_key_LDKNodeSigner_jcall,
.get_node_id = get_node_id_LDKNodeSigner_jcall,
.ecdh = ecdh_LDKNodeSigner_jcall,
.sign_invoice = sign_invoice_LDKNodeSigner_jcall,
- .sign_bolt12_invoice_request = sign_bolt12_invoice_request_LDKNodeSigner_jcall,
.sign_bolt12_invoice = sign_bolt12_invoice_LDKNodeSigner_jcall,
.sign_gossip_message = sign_gossip_message_LDKNodeSigner_jcall,
.free = LDKNodeSigner_JCalls_free,
*res_ptr = LDKNodeSigner_init(o);
return tag_ptr(res_ptr, true);
}
-int8_tArray CS_LDK_NodeSigner_get_inbound_payment_key_material(int64_t this_arg) {
+int64_t CS_LDK_NodeSigner_get_inbound_payment_key(int64_t this_arg) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKNodeSigner* this_arg_conv = (LDKNodeSigner*)this_arg_ptr;
- int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, (this_arg_conv->get_inbound_payment_key_material)(this_arg_conv->this_arg).data, 32);
- return ret_arr;
+ LDKExpandedKey ret_var = (this_arg_conv->get_inbound_payment_key)(this_arg_conv->this_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;
}
int64_t CS_LDK_NodeSigner_get_node_id(int64_t this_arg, int32_t recipient) {
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_NodeSigner_sign_bolt12_invoice_request(int64_t this_arg, int64_t invoice_request) {
- void* this_arg_ptr = untag_ptr(this_arg);
- if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKNodeSigner* this_arg_conv = (LDKNodeSigner*)this_arg_ptr;
- LDKUnsignedInvoiceRequest invoice_request_conv;
- invoice_request_conv.inner = untag_ptr(invoice_request);
- invoice_request_conv.is_owned = ptr_is_owned(invoice_request);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_request_conv);
- invoice_request_conv.is_owned = false;
- LDKCResult_SchnorrSignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SchnorrSignatureNoneZ), "LDKCResult_SchnorrSignatureNoneZ");
- *ret_conv = (this_arg_conv->sign_bolt12_invoice_request)(this_arg_conv->this_arg, &invoice_request_conv);
- return tag_ptr(ret_conv, true);
-}
-
int64_t CS_LDK_NodeSigner_sign_bolt12_invoice(int64_t this_arg, int64_t invoice) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
return ret_conv;
}
-typedef struct LDKMessageRouter_JCalls {
- atomic_size_t refcnt;
- uint32_t instance_ptr;
-} LDKMessageRouter_JCalls;
-static void LDKMessageRouter_JCalls_free(void* this_arg) {
- LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
- if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
- FREE(j_calls);
- }
-}
-LDKCResult_OnionMessagePathNoneZ find_path_LDKMessageRouter_jcall(const void* this_arg, LDKPublicKey sender, LDKCVec_PublicKeyZ peers, LDKDestination destination) {
- LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
- int8_tArray sender_arr = init_int8_tArray(33, __LINE__);
- memcpy(sender_arr->elems, sender.compressed_form, 33);
- LDKCVec_PublicKeyZ peers_var = peers;
- ptrArray peers_arr = NULL;
- peers_arr = init_ptrArray(peers_var.datalen, __LINE__);
- int8_tArray *peers_arr_ptr = (int8_tArray*)(((uint8_t*)peers_arr) + 8);
- for (size_t i = 0; i < peers_var.datalen; i++) {
- int8_tArray peers_conv_8_arr = init_int8_tArray(33, __LINE__);
- memcpy(peers_conv_8_arr->elems, peers_var.data[i].compressed_form, 33);
- peers_arr_ptr[i] = peers_conv_8_arr;
- }
-
- FREE(peers_var.data);
- LDKDestination *destination_copy = MALLOC(sizeof(LDKDestination), "LDKDestination");
- *destination_copy = destination;
- int64_t destination_ref = tag_ptr(destination_copy, true);
- uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 44, (int64_t)sender_arr, (int64_t)peers_arr, destination_ref);
- void* ret_ptr = untag_ptr(ret);
- CHECK_ACCESS(ret_ptr);
- LDKCResult_OnionMessagePathNoneZ ret_conv = *(LDKCResult_OnionMessagePathNoneZ*)(ret_ptr);
- FREE(untag_ptr(ret));
- return ret_conv;
-}
-LDKCResult_CVec_BlindedMessagePathZNoneZ create_blinded_paths_LDKMessageRouter_jcall(const void* this_arg, LDKPublicKey recipient, LDKMessageContext context, LDKCVec_PublicKeyZ peers) {
- LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
- int8_tArray recipient_arr = init_int8_tArray(33, __LINE__);
- memcpy(recipient_arr->elems, recipient.compressed_form, 33);
- LDKMessageContext *context_copy = MALLOC(sizeof(LDKMessageContext), "LDKMessageContext");
- *context_copy = context;
- int64_t context_ref = tag_ptr(context_copy, true);
- LDKCVec_PublicKeyZ peers_var = peers;
- ptrArray peers_arr = NULL;
- peers_arr = init_ptrArray(peers_var.datalen, __LINE__);
- int8_tArray *peers_arr_ptr = (int8_tArray*)(((uint8_t*)peers_arr) + 8);
- for (size_t i = 0; i < peers_var.datalen; i++) {
- int8_tArray peers_conv_8_arr = init_int8_tArray(33, __LINE__);
- memcpy(peers_conv_8_arr->elems, peers_var.data[i].compressed_form, 33);
- peers_arr_ptr[i] = peers_conv_8_arr;
- }
-
- FREE(peers_var.data);
- uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 45, (int64_t)recipient_arr, context_ref, (int64_t)peers_arr);
- void* ret_ptr = untag_ptr(ret);
- CHECK_ACCESS(ret_ptr);
- LDKCResult_CVec_BlindedMessagePathZNoneZ ret_conv = *(LDKCResult_CVec_BlindedMessagePathZNoneZ*)(ret_ptr);
- FREE(untag_ptr(ret));
- return ret_conv;
-}
-LDKCResult_CVec_BlindedMessagePathZNoneZ create_compact_blinded_paths_LDKMessageRouter_jcall(const void* this_arg, LDKPublicKey recipient, LDKMessageContext context, LDKCVec_MessageForwardNodeZ peers) {
- LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
- int8_tArray recipient_arr = init_int8_tArray(33, __LINE__);
- memcpy(recipient_arr->elems, recipient.compressed_form, 33);
- LDKMessageContext *context_copy = MALLOC(sizeof(LDKMessageContext), "LDKMessageContext");
- *context_copy = context;
- int64_t context_ref = tag_ptr(context_copy, true);
- LDKCVec_MessageForwardNodeZ peers_var = peers;
- int64_tArray peers_arr = NULL;
- peers_arr = init_int64_tArray(peers_var.datalen, __LINE__);
- int64_t *peers_arr_ptr = (int64_t*)(((uint8_t*)peers_arr) + 8);
- for (size_t u = 0; u < peers_var.datalen; u++) {
- LDKMessageForwardNode peers_conv_20_var = peers_var.data[u];
- int64_t peers_conv_20_ref = 0;
- CHECK_INNER_FIELD_ACCESS_OR_NULL(peers_conv_20_var);
- peers_conv_20_ref = tag_ptr(peers_conv_20_var.inner, peers_conv_20_var.is_owned);
- peers_arr_ptr[u] = peers_conv_20_ref;
- }
-
- FREE(peers_var.data);
- uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 46, (int64_t)recipient_arr, context_ref, (int64_t)peers_arr);
- void* ret_ptr = untag_ptr(ret);
- CHECK_ACCESS(ret_ptr);
- LDKCResult_CVec_BlindedMessagePathZNoneZ ret_conv = *(LDKCResult_CVec_BlindedMessagePathZNoneZ*)(ret_ptr);
- FREE(untag_ptr(ret));
- return ret_conv;
-}
-static void LDKMessageRouter_JCalls_cloned(LDKMessageRouter* new_obj) {
- LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) new_obj->this_arg;
- atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-}
-static inline LDKMessageRouter LDKMessageRouter_init (int64_t o) {
- LDKMessageRouter_JCalls *calls = MALLOC(sizeof(LDKMessageRouter_JCalls), "LDKMessageRouter_JCalls");
- atomic_init(&calls->refcnt, 1);
- calls->instance_ptr = o;
-
- LDKMessageRouter ret = {
- .this_arg = (void*) calls,
- .find_path = find_path_LDKMessageRouter_jcall,
- .create_blinded_paths = create_blinded_paths_LDKMessageRouter_jcall,
- .create_compact_blinded_paths = create_compact_blinded_paths_LDKMessageRouter_jcall,
- .free = LDKMessageRouter_JCalls_free,
- };
- return ret;
-}
-uint64_t CS_LDK_LDKMessageRouter_new(int32_t o) {
- LDKMessageRouter *res_ptr = MALLOC(sizeof(LDKMessageRouter), "LDKMessageRouter");
- *res_ptr = LDKMessageRouter_init(o);
- return tag_ptr(res_ptr, true);
-}
-int64_t CS_LDK_MessageRouter_find_path(int64_t this_arg, int8_tArray sender, ptrArray peers, int64_t destination) {
- void* this_arg_ptr = untag_ptr(this_arg);
- if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKMessageRouter* this_arg_conv = (LDKMessageRouter*)this_arg_ptr;
- LDKPublicKey sender_ref;
- CHECK(sender->arr_len == 33);
- memcpy(sender_ref.compressed_form, sender->elems, 33); FREE(sender);
- LDKCVec_PublicKeyZ peers_constr;
- peers_constr.datalen = peers->arr_len;
- if (peers_constr.datalen > 0)
- peers_constr.data = MALLOC(peers_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
- else
- peers_constr.data = NULL;
- int8_tArray* peers_vals = (void*) peers->elems;
- for (size_t i = 0; i < peers_constr.datalen; i++) {
- int8_tArray peers_conv_8 = peers_vals[i];
- LDKPublicKey peers_conv_8_ref;
- CHECK(peers_conv_8->arr_len == 33);
- memcpy(peers_conv_8_ref.compressed_form, peers_conv_8->elems, 33); FREE(peers_conv_8);
- peers_constr.data[i] = peers_conv_8_ref;
- }
- FREE(peers);
- void* destination_ptr = untag_ptr(destination);
- CHECK_ACCESS(destination_ptr);
- LDKDestination destination_conv = *(LDKDestination*)(destination_ptr);
- destination_conv = Destination_clone((LDKDestination*)untag_ptr(destination));
- LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
- *ret_conv = (this_arg_conv->find_path)(this_arg_conv->this_arg, sender_ref, peers_constr, destination_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_MessageRouter_create_blinded_paths(int64_t this_arg, int8_tArray recipient, int64_t context, ptrArray peers) {
- void* this_arg_ptr = untag_ptr(this_arg);
- if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKMessageRouter* this_arg_conv = (LDKMessageRouter*)this_arg_ptr;
- LDKPublicKey recipient_ref;
- CHECK(recipient->arr_len == 33);
- memcpy(recipient_ref.compressed_form, recipient->elems, 33); FREE(recipient);
- void* context_ptr = untag_ptr(context);
- CHECK_ACCESS(context_ptr);
- LDKMessageContext context_conv = *(LDKMessageContext*)(context_ptr);
- context_conv = MessageContext_clone((LDKMessageContext*)untag_ptr(context));
- LDKCVec_PublicKeyZ peers_constr;
- peers_constr.datalen = peers->arr_len;
- if (peers_constr.datalen > 0)
- peers_constr.data = MALLOC(peers_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
- else
- peers_constr.data = NULL;
- int8_tArray* peers_vals = (void*) peers->elems;
- for (size_t i = 0; i < peers_constr.datalen; i++) {
- int8_tArray peers_conv_8 = peers_vals[i];
- LDKPublicKey peers_conv_8_ref;
- CHECK(peers_conv_8->arr_len == 33);
- memcpy(peers_conv_8_ref.compressed_form, peers_conv_8->elems, 33); FREE(peers_conv_8);
- peers_constr.data[i] = peers_conv_8_ref;
- }
- FREE(peers);
- LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
- *ret_conv = (this_arg_conv->create_blinded_paths)(this_arg_conv->this_arg, recipient_ref, context_conv, peers_constr);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_MessageRouter_create_compact_blinded_paths(int64_t this_arg, int8_tArray recipient, int64_t context, int64_tArray peers) {
- void* this_arg_ptr = untag_ptr(this_arg);
- if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
- LDKMessageRouter* this_arg_conv = (LDKMessageRouter*)this_arg_ptr;
- LDKPublicKey recipient_ref;
- CHECK(recipient->arr_len == 33);
- memcpy(recipient_ref.compressed_form, recipient->elems, 33); FREE(recipient);
- void* context_ptr = untag_ptr(context);
- CHECK_ACCESS(context_ptr);
- LDKMessageContext context_conv = *(LDKMessageContext*)(context_ptr);
- context_conv = MessageContext_clone((LDKMessageContext*)untag_ptr(context));
- LDKCVec_MessageForwardNodeZ peers_constr;
- peers_constr.datalen = peers->arr_len;
- if (peers_constr.datalen > 0)
- peers_constr.data = MALLOC(peers_constr.datalen * sizeof(LDKMessageForwardNode), "LDKCVec_MessageForwardNodeZ Elements");
- else
- peers_constr.data = NULL;
- int64_t* peers_vals = peers->elems;
- for (size_t u = 0; u < peers_constr.datalen; u++) {
- int64_t peers_conv_20 = peers_vals[u];
- LDKMessageForwardNode peers_conv_20_conv;
- peers_conv_20_conv.inner = untag_ptr(peers_conv_20);
- peers_conv_20_conv.is_owned = ptr_is_owned(peers_conv_20);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(peers_conv_20_conv);
- peers_conv_20_conv = MessageForwardNode_clone(&peers_conv_20_conv);
- peers_constr.data[u] = peers_conv_20_conv;
- }
- FREE(peers);
- LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
- *ret_conv = (this_arg_conv->create_compact_blinded_paths)(this_arg_conv->this_arg, recipient_ref, context_conv, peers_constr);
- return tag_ptr(ret_conv, true);
-}
-
typedef struct LDKRouter_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
- LDKMessageRouter_JCalls* MessageRouter;
} LDKRouter_JCalls;
static void LDKRouter_JCalls_free(void* this_arg) {
LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) this_arg;
int64_t inflight_htlcs_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(inflight_htlcs_var);
inflight_htlcs_ref = tag_ptr(inflight_htlcs_var.inner, inflight_htlcs_var.is_owned);
- uint64_t ret = js_invoke_function_l_llll(j_calls->instance_ptr, 47, (int64_t)payer_arr, route_params_ref, (int64_t)first_hops_arr, inflight_htlcs_ref);
+ uint64_t ret = js_invoke_function_l_llll(j_calls->instance_ptr, 44, (int64_t)payer_arr, route_params_ref, (int64_t)first_hops_arr, inflight_htlcs_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_RouteLightningErrorZ ret_conv = *(LDKCResult_RouteLightningErrorZ*)(ret_ptr);
memcpy(_payment_hash_arr->elems, _payment_hash.data, 32);
int8_tArray _payment_id_arr = init_int8_tArray(32, __LINE__);
memcpy(_payment_id_arr->elems, _payment_id.data, 32);
- uint64_t ret = js_invoke_function_l_llllll(j_calls->instance_ptr, 48, (int64_t)payer_arr, route_params_ref, (int64_t)first_hops_arr, inflight_htlcs_ref, (int64_t)_payment_hash_arr, (int64_t)_payment_id_arr);
+ uint64_t ret = js_invoke_function_l_llllll(j_calls->instance_ptr, 45, (int64_t)payer_arr, route_params_ref, (int64_t)first_hops_arr, inflight_htlcs_ref, (int64_t)_payment_hash_arr, (int64_t)_payment_id_arr);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_RouteLightningErrorZ ret_conv = *(LDKCResult_RouteLightningErrorZ*)(ret_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(tlvs_var);
tlvs_ref = tag_ptr(tlvs_var.inner, tlvs_var.is_owned);
int64_t amount_msats_conv = amount_msats;
- uint64_t ret = js_invoke_function_l_llll(j_calls->instance_ptr, 49, (int64_t)recipient_arr, (int64_t)first_hops_arr, tlvs_ref, amount_msats_conv);
+ uint64_t ret = js_invoke_function_l_llll(j_calls->instance_ptr, 46, (int64_t)recipient_arr, (int64_t)first_hops_arr, tlvs_ref, amount_msats_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_CVec_BlindedPaymentPathZNoneZ ret_conv = *(LDKCResult_CVec_BlindedPaymentPathZNoneZ*)(ret_ptr);
static void LDKRouter_JCalls_cloned(LDKRouter* new_obj) {
LDKRouter_JCalls *j_calls = (LDKRouter_JCalls*) new_obj->this_arg;
atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
- atomic_fetch_add_explicit(&j_calls->MessageRouter->refcnt, 1, memory_order_release);
}
-static inline LDKRouter LDKRouter_init (int64_t o, int64_t MessageRouter) {
+static inline LDKRouter LDKRouter_init (int64_t o) {
LDKRouter_JCalls *calls = MALLOC(sizeof(LDKRouter_JCalls), "LDKRouter_JCalls");
atomic_init(&calls->refcnt, 1);
calls->instance_ptr = o;
.find_route_with_id = find_route_with_id_LDKRouter_jcall,
.create_blinded_payment_paths = create_blinded_payment_paths_LDKRouter_jcall,
.free = LDKRouter_JCalls_free,
- .MessageRouter = LDKMessageRouter_init(MessageRouter),
};
- calls->MessageRouter = ret.MessageRouter.this_arg;
return ret;
}
-uint64_t CS_LDK_LDKRouter_new(int32_t o, int32_t MessageRouter) {
+uint64_t CS_LDK_LDKRouter_new(int32_t o) {
LDKRouter *res_ptr = MALLOC(sizeof(LDKRouter), "LDKRouter");
- *res_ptr = LDKRouter_init(o, MessageRouter);
+ *res_ptr = LDKRouter_init(o);
return tag_ptr(res_ptr, true);
}
int64_t CS_LDK_Router_find_route(int64_t this_arg, int8_tArray payer, int64_t route_params, int64_tArray first_hops, int64_t inflight_htlcs) {
return tag_ptr(ret_conv, true);
}
+static inline struct LDKOnionMessagePath CResult_OnionMessagePathNoneZ_get_ok(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR owner){
+ LDKOnionMessagePath ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_OnionMessagePathNoneZ_get_ok(int64_t owner) {
+ LDKCResult_OnionMessagePathNoneZ* owner_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(owner);
+ LDKOnionMessagePath ret_var = CResult_OnionMessagePathNoneZ_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_OnionMessagePathNoneZ_get_err(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+void CS_LDK_CResult_OnionMessagePathNoneZ_get_err(int64_t owner) {
+ LDKCResult_OnionMessagePathNoneZ* owner_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(owner);
+ CResult_OnionMessagePathNoneZ_get_err(owner_conv);
+}
+
+static inline struct LDKCVec_BlindedMessagePathZ CResult_CVec_BlindedMessagePathZNoneZ_get_ok(LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return CVec_BlindedMessagePathZ_clone(&*owner->contents.result);
+}
+int64_tArray CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_get_ok(int64_t owner) {
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* owner_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(owner);
+ LDKCVec_BlindedMessagePathZ ret_var = CResult_CVec_BlindedMessagePathZNoneZ_get_ok(owner_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t u = 0; u < ret_var.datalen; u++) {
+ LDKBlindedMessagePath ret_conv_20_var = ret_var.data[u];
+ int64_t ret_conv_20_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_20_var);
+ ret_conv_20_ref = tag_ptr(ret_conv_20_var.inner, ret_conv_20_var.is_owned);
+ ret_arr_ptr[u] = ret_conv_20_ref;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
+static inline void CResult_CVec_BlindedMessagePathZNoneZ_get_err(LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+void CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_get_err(int64_t owner) {
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* owner_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(owner);
+ CResult_CVec_BlindedMessagePathZNoneZ_get_err(owner_conv);
+}
+
+static inline LDKCVec_MessageForwardNodeZ CVec_MessageForwardNodeZ_clone(const LDKCVec_MessageForwardNodeZ *orig) {
+ LDKCVec_MessageForwardNodeZ ret = { .data = MALLOC(sizeof(LDKMessageForwardNode) * orig->datalen, "LDKCVec_MessageForwardNodeZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = MessageForwardNode_clone(&orig->data[i]);
+ }
+ return ret;
+}
+typedef struct LDKMessageRouter_JCalls {
+ atomic_size_t refcnt;
+ uint32_t instance_ptr;
+} LDKMessageRouter_JCalls;
+static void LDKMessageRouter_JCalls_free(void* this_arg) {
+ LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ FREE(j_calls);
+ }
+}
+LDKCResult_OnionMessagePathNoneZ find_path_LDKMessageRouter_jcall(const void* this_arg, LDKPublicKey sender, LDKCVec_PublicKeyZ peers, LDKDestination destination) {
+ LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
+ int8_tArray sender_arr = init_int8_tArray(33, __LINE__);
+ memcpy(sender_arr->elems, sender.compressed_form, 33);
+ LDKCVec_PublicKeyZ peers_var = peers;
+ ptrArray peers_arr = NULL;
+ peers_arr = init_ptrArray(peers_var.datalen, __LINE__);
+ int8_tArray *peers_arr_ptr = (int8_tArray*)(((uint8_t*)peers_arr) + 8);
+ for (size_t i = 0; i < peers_var.datalen; i++) {
+ int8_tArray peers_conv_8_arr = init_int8_tArray(33, __LINE__);
+ memcpy(peers_conv_8_arr->elems, peers_var.data[i].compressed_form, 33);
+ peers_arr_ptr[i] = peers_conv_8_arr;
+ }
+
+ FREE(peers_var.data);
+ LDKDestination *destination_copy = MALLOC(sizeof(LDKDestination), "LDKDestination");
+ *destination_copy = destination;
+ int64_t destination_ref = tag_ptr(destination_copy, true);
+ uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 47, (int64_t)sender_arr, (int64_t)peers_arr, destination_ref);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_OnionMessagePathNoneZ ret_conv = *(LDKCResult_OnionMessagePathNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
+LDKCResult_CVec_BlindedMessagePathZNoneZ create_blinded_paths_LDKMessageRouter_jcall(const void* this_arg, LDKPublicKey recipient, LDKMessageContext context, LDKCVec_PublicKeyZ peers) {
+ LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
+ int8_tArray recipient_arr = init_int8_tArray(33, __LINE__);
+ memcpy(recipient_arr->elems, recipient.compressed_form, 33);
+ LDKMessageContext *context_copy = MALLOC(sizeof(LDKMessageContext), "LDKMessageContext");
+ *context_copy = context;
+ int64_t context_ref = tag_ptr(context_copy, true);
+ LDKCVec_PublicKeyZ peers_var = peers;
+ ptrArray peers_arr = NULL;
+ peers_arr = init_ptrArray(peers_var.datalen, __LINE__);
+ int8_tArray *peers_arr_ptr = (int8_tArray*)(((uint8_t*)peers_arr) + 8);
+ for (size_t i = 0; i < peers_var.datalen; i++) {
+ int8_tArray peers_conv_8_arr = init_int8_tArray(33, __LINE__);
+ memcpy(peers_conv_8_arr->elems, peers_var.data[i].compressed_form, 33);
+ peers_arr_ptr[i] = peers_conv_8_arr;
+ }
+
+ FREE(peers_var.data);
+ uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 48, (int64_t)recipient_arr, context_ref, (int64_t)peers_arr);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_CVec_BlindedMessagePathZNoneZ ret_conv = *(LDKCResult_CVec_BlindedMessagePathZNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
+LDKCResult_CVec_BlindedMessagePathZNoneZ create_compact_blinded_paths_LDKMessageRouter_jcall(const void* this_arg, LDKPublicKey recipient, LDKMessageContext context, LDKCVec_MessageForwardNodeZ peers) {
+ LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) this_arg;
+ int8_tArray recipient_arr = init_int8_tArray(33, __LINE__);
+ memcpy(recipient_arr->elems, recipient.compressed_form, 33);
+ LDKMessageContext *context_copy = MALLOC(sizeof(LDKMessageContext), "LDKMessageContext");
+ *context_copy = context;
+ int64_t context_ref = tag_ptr(context_copy, true);
+ LDKCVec_MessageForwardNodeZ peers_var = peers;
+ int64_tArray peers_arr = NULL;
+ peers_arr = init_int64_tArray(peers_var.datalen, __LINE__);
+ int64_t *peers_arr_ptr = (int64_t*)(((uint8_t*)peers_arr) + 8);
+ for (size_t u = 0; u < peers_var.datalen; u++) {
+ LDKMessageForwardNode peers_conv_20_var = peers_var.data[u];
+ int64_t peers_conv_20_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(peers_conv_20_var);
+ peers_conv_20_ref = tag_ptr(peers_conv_20_var.inner, peers_conv_20_var.is_owned);
+ peers_arr_ptr[u] = peers_conv_20_ref;
+ }
+
+ FREE(peers_var.data);
+ uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 49, (int64_t)recipient_arr, context_ref, (int64_t)peers_arr);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_CVec_BlindedMessagePathZNoneZ ret_conv = *(LDKCResult_CVec_BlindedMessagePathZNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
+static void LDKMessageRouter_JCalls_cloned(LDKMessageRouter* new_obj) {
+ LDKMessageRouter_JCalls *j_calls = (LDKMessageRouter_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKMessageRouter LDKMessageRouter_init (int64_t o) {
+ LDKMessageRouter_JCalls *calls = MALLOC(sizeof(LDKMessageRouter_JCalls), "LDKMessageRouter_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ calls->instance_ptr = o;
+
+ LDKMessageRouter ret = {
+ .this_arg = (void*) calls,
+ .find_path = find_path_LDKMessageRouter_jcall,
+ .create_blinded_paths = create_blinded_paths_LDKMessageRouter_jcall,
+ .create_compact_blinded_paths = create_compact_blinded_paths_LDKMessageRouter_jcall,
+ .free = LDKMessageRouter_JCalls_free,
+ };
+ return ret;
+}
+uint64_t CS_LDK_LDKMessageRouter_new(int32_t o) {
+ LDKMessageRouter *res_ptr = MALLOC(sizeof(LDKMessageRouter), "LDKMessageRouter");
+ *res_ptr = LDKMessageRouter_init(o);
+ return tag_ptr(res_ptr, true);
+}
+int64_t CS_LDK_MessageRouter_find_path(int64_t this_arg, int8_tArray sender, ptrArray peers, int64_t destination) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKMessageRouter* this_arg_conv = (LDKMessageRouter*)this_arg_ptr;
+ LDKPublicKey sender_ref;
+ CHECK(sender->arr_len == 33);
+ memcpy(sender_ref.compressed_form, sender->elems, 33); FREE(sender);
+ LDKCVec_PublicKeyZ peers_constr;
+ peers_constr.datalen = peers->arr_len;
+ if (peers_constr.datalen > 0)
+ peers_constr.data = MALLOC(peers_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
+ else
+ peers_constr.data = NULL;
+ int8_tArray* peers_vals = (void*) peers->elems;
+ for (size_t i = 0; i < peers_constr.datalen; i++) {
+ int8_tArray peers_conv_8 = peers_vals[i];
+ LDKPublicKey peers_conv_8_ref;
+ CHECK(peers_conv_8->arr_len == 33);
+ memcpy(peers_conv_8_ref.compressed_form, peers_conv_8->elems, 33); FREE(peers_conv_8);
+ peers_constr.data[i] = peers_conv_8_ref;
+ }
+ FREE(peers);
+ void* destination_ptr = untag_ptr(destination);
+ CHECK_ACCESS(destination_ptr);
+ LDKDestination destination_conv = *(LDKDestination*)(destination_ptr);
+ destination_conv = Destination_clone((LDKDestination*)untag_ptr(destination));
+ LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
+ *ret_conv = (this_arg_conv->find_path)(this_arg_conv->this_arg, sender_ref, peers_constr, destination_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_MessageRouter_create_blinded_paths(int64_t this_arg, int8_tArray recipient, int64_t context, ptrArray peers) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKMessageRouter* this_arg_conv = (LDKMessageRouter*)this_arg_ptr;
+ LDKPublicKey recipient_ref;
+ CHECK(recipient->arr_len == 33);
+ memcpy(recipient_ref.compressed_form, recipient->elems, 33); FREE(recipient);
+ void* context_ptr = untag_ptr(context);
+ CHECK_ACCESS(context_ptr);
+ LDKMessageContext context_conv = *(LDKMessageContext*)(context_ptr);
+ context_conv = MessageContext_clone((LDKMessageContext*)untag_ptr(context));
+ LDKCVec_PublicKeyZ peers_constr;
+ peers_constr.datalen = peers->arr_len;
+ if (peers_constr.datalen > 0)
+ peers_constr.data = MALLOC(peers_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
+ else
+ peers_constr.data = NULL;
+ int8_tArray* peers_vals = (void*) peers->elems;
+ for (size_t i = 0; i < peers_constr.datalen; i++) {
+ int8_tArray peers_conv_8 = peers_vals[i];
+ LDKPublicKey peers_conv_8_ref;
+ CHECK(peers_conv_8->arr_len == 33);
+ memcpy(peers_conv_8_ref.compressed_form, peers_conv_8->elems, 33); FREE(peers_conv_8);
+ peers_constr.data[i] = peers_conv_8_ref;
+ }
+ FREE(peers);
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
+ *ret_conv = (this_arg_conv->create_blinded_paths)(this_arg_conv->this_arg, recipient_ref, context_conv, peers_constr);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_MessageRouter_create_compact_blinded_paths(int64_t this_arg, int8_tArray recipient, int64_t context, int64_tArray peers) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKMessageRouter* this_arg_conv = (LDKMessageRouter*)this_arg_ptr;
+ LDKPublicKey recipient_ref;
+ CHECK(recipient->arr_len == 33);
+ memcpy(recipient_ref.compressed_form, recipient->elems, 33); FREE(recipient);
+ void* context_ptr = untag_ptr(context);
+ CHECK_ACCESS(context_ptr);
+ LDKMessageContext context_conv = *(LDKMessageContext*)(context_ptr);
+ context_conv = MessageContext_clone((LDKMessageContext*)untag_ptr(context));
+ LDKCVec_MessageForwardNodeZ peers_constr;
+ peers_constr.datalen = peers->arr_len;
+ if (peers_constr.datalen > 0)
+ peers_constr.data = MALLOC(peers_constr.datalen * sizeof(LDKMessageForwardNode), "LDKCVec_MessageForwardNodeZ Elements");
+ else
+ peers_constr.data = NULL;
+ int64_t* peers_vals = peers->elems;
+ for (size_t u = 0; u < peers_constr.datalen; u++) {
+ int64_t peers_conv_20 = peers_vals[u];
+ LDKMessageForwardNode peers_conv_20_conv;
+ peers_conv_20_conv.inner = untag_ptr(peers_conv_20);
+ peers_conv_20_conv.is_owned = ptr_is_owned(peers_conv_20);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(peers_conv_20_conv);
+ peers_conv_20_conv = MessageForwardNode_clone(&peers_conv_20_conv);
+ peers_constr.data[u] = peers_conv_20_conv;
+ }
+ FREE(peers);
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
+ *ret_conv = (this_arg_conv->create_compact_blinded_paths)(this_arg_conv->this_arg, recipient_ref, context_conv, peers_constr);
+ return tag_ptr(ret_conv, true);
+}
+
static inline struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesChannelManagerZ_get_a(LDKC2Tuple_ThirtyTwoBytesChannelManagerZ *NONNULL_PTR owner){
return ThirtyTwoBytes_clone(&owner->a);
}
}
return ret;
}
+static inline bool C2Tuple_boolboolZ_get_a(LDKC2Tuple_boolboolZ *NONNULL_PTR owner){
+ return owner->a;
+}
+jboolean CS_LDK_C2Tuple_boolboolZ_get_a(int64_t owner) {
+ LDKC2Tuple_boolboolZ* owner_conv = (LDKC2Tuple_boolboolZ*)untag_ptr(owner);
+ jboolean ret_conv = C2Tuple_boolboolZ_get_a(owner_conv);
+ return ret_conv;
+}
+
+static inline bool C2Tuple_boolboolZ_get_b(LDKC2Tuple_boolboolZ *NONNULL_PTR owner){
+ return owner->b;
+}
+jboolean CS_LDK_C2Tuple_boolboolZ_get_b(int64_t owner) {
+ LDKC2Tuple_boolboolZ* owner_conv = (LDKC2Tuple_boolboolZ*)untag_ptr(owner);
+ jboolean ret_conv = C2Tuple_boolboolZ_get_b(owner_conv);
+ return ret_conv;
+}
+
uint32_t CS_LDK_LDKBalance_ty_from_ptr(int64_t ptr) {
LDKBalance *obj = (LDKBalance*)untag_ptr(ptr);
switch(obj->tag) {
return ret_conv;
}
+static inline struct LDKStr C3Tuple_StrStrStrZ_get_a(LDKC3Tuple_StrStrStrZ *NONNULL_PTR owner){
+ return owner->a;
+}
+jstring CS_LDK_C3Tuple_StrStrStrZ_get_a(int64_t owner) {
+ LDKC3Tuple_StrStrStrZ* owner_conv = (LDKC3Tuple_StrStrStrZ*)untag_ptr(owner);
+ LDKStr ret_str = C3Tuple_StrStrStrZ_get_a(owner_conv);
+ jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
+ return ret_conv;
+}
+
+static inline struct LDKStr C3Tuple_StrStrStrZ_get_b(LDKC3Tuple_StrStrStrZ *NONNULL_PTR owner){
+ return owner->b;
+}
+jstring CS_LDK_C3Tuple_StrStrStrZ_get_b(int64_t owner) {
+ LDKC3Tuple_StrStrStrZ* owner_conv = (LDKC3Tuple_StrStrStrZ*)untag_ptr(owner);
+ LDKStr ret_str = C3Tuple_StrStrStrZ_get_b(owner_conv);
+ jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
+ return ret_conv;
+}
+
+static inline struct LDKStr C3Tuple_StrStrStrZ_get_c(LDKC3Tuple_StrStrStrZ *NONNULL_PTR owner){
+ return owner->c;
+}
+jstring CS_LDK_C3Tuple_StrStrStrZ_get_c(int64_t owner) {
+ LDKC3Tuple_StrStrStrZ* owner_conv = (LDKC3Tuple_StrStrStrZ*)untag_ptr(owner);
+ LDKStr ret_str = C3Tuple_StrStrStrZ_get_c(owner_conv);
+ jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
+ return ret_conv;
+}
+
+static inline LDKCVec_C3Tuple_StrStrStrZZ CVec_C3Tuple_StrStrStrZZ_clone(const LDKCVec_C3Tuple_StrStrStrZZ *orig) {
+ LDKCVec_C3Tuple_StrStrStrZZ ret = { .data = MALLOC(sizeof(LDKC3Tuple_StrStrStrZ) * orig->datalen, "LDKCVec_C3Tuple_StrStrStrZZ clone bytes"), .datalen = orig->datalen };
+ for (size_t i = 0; i < ret.datalen; i++) {
+ ret.data[i] = C3Tuple_StrStrStrZ_clone(&orig->data[i]);
+ }
+ return ret;
+}
+static inline struct LDKCVec_C3Tuple_StrStrStrZZ CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_ok(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return CVec_C3Tuple_StrStrStrZZ_clone(&*owner->contents.result);
+}
+int64_tArray CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_ok(int64_t owner) {
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* owner_conv = (LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ*)untag_ptr(owner);
+ LDKCVec_C3Tuple_StrStrStrZZ ret_var = CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_ok(owner_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t x = 0; x < ret_var.datalen; x++) {
+ LDKC3Tuple_StrStrStrZ* ret_conv_23_conv = MALLOC(sizeof(LDKC3Tuple_StrStrStrZ), "LDKC3Tuple_StrStrStrZ");
+ *ret_conv_23_conv = ret_var.data[x];
+ ret_arr_ptr[x] = tag_ptr(ret_conv_23_conv, true);
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
+static inline enum LDKIOError CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_err(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
+}
+int32_t CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_err(int64_t owner) {
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* owner_conv = (LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ*)untag_ptr(owner);
+ int32_t ret_conv = LDKIOError_to_cs(CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
static inline LDKCVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ_clone(const LDKCVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ *orig) {
LDKCVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_ThirtyTwoBytesChannelMonitorZ) * orig->datalen, "LDKCVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ clone bytes"), .datalen = orig->datalen };
for (size_t i = 0; i < ret.datalen; i++) {
return ret_conv;
}
-static inline struct LDKUnsignedInvoiceRequest CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner){
- LDKUnsignedInvoiceRequest ret = *owner->contents.result;
+static inline struct LDKMonitorName CResult_MonitorNameIOErrorZ_get_ok(LDKCResult_MonitorNameIOErrorZ *NONNULL_PTR owner){
+ LDKMonitorName ret = *owner->contents.result;
ret.is_owned = false;
return ret;
}
-int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(int64_t owner) {
- LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
- LDKUnsignedInvoiceRequest ret_var = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(owner_conv);
+int64_t CS_LDK_CResult_MonitorNameIOErrorZ_get_ok(int64_t owner) {
+ LDKCResult_MonitorNameIOErrorZ* owner_conv = (LDKCResult_MonitorNameIOErrorZ*)untag_ptr(owner);
+ LDKMonitorName ret_var = CResult_MonitorNameIOErrorZ_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){
+static inline enum LDKIOError CResult_MonitorNameIOErrorZ_get_err(LDKCResult_MonitorNameIOErrorZ *NONNULL_PTR owner){
CHECK(!owner->result_ok);
- return Bolt12SemanticError_clone(&*owner->contents.err);
+ return *owner->contents.err;
+}
+int32_t CS_LDK_CResult_MonitorNameIOErrorZ_get_err(int64_t owner) {
+ LDKCResult_MonitorNameIOErrorZ* owner_conv = (LDKCResult_MonitorNameIOErrorZ*)untag_ptr(owner);
+ int32_t ret_conv = LDKIOError_to_cs(CResult_MonitorNameIOErrorZ_get_err(owner_conv));
+ return ret_conv;
+}
+
+static inline struct LDKUpdateName CResult_UpdateNameIOErrorZ_get_ok(LDKCResult_UpdateNameIOErrorZ *NONNULL_PTR owner){
+ LDKUpdateName ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_UpdateNameIOErrorZ_get_ok(int64_t owner) {
+ LDKCResult_UpdateNameIOErrorZ* owner_conv = (LDKCResult_UpdateNameIOErrorZ*)untag_ptr(owner);
+ LDKUpdateName ret_var = CResult_UpdateNameIOErrorZ_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 LDKIOError CResult_UpdateNameIOErrorZ_get_err(LDKCResult_UpdateNameIOErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return *owner->contents.err;
}
-int32_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(int64_t owner) {
- LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* owner_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(owner);
- int32_t ret_conv = LDKBolt12SemanticError_to_cs(CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(owner_conv));
+int32_t CS_LDK_CResult_UpdateNameIOErrorZ_get_err(int64_t owner) {
+ LDKCResult_UpdateNameIOErrorZ* owner_conv = (LDKCResult_UpdateNameIOErrorZ*)untag_ptr(owner);
+ int32_t ret_conv = LDKIOError_to_cs(CResult_UpdateNameIOErrorZ_get_err(owner_conv));
return ret_conv;
}
return ret_conv;
}
+static inline struct LDKInvoiceRequest CResult_InvoiceRequestDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestDecodeErrorZ *NONNULL_PTR owner){
+ LDKInvoiceRequest ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_InvoiceRequestDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_InvoiceRequestDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestDecodeErrorZ*)untag_ptr(owner);
+ LDKInvoiceRequest ret_var = CResult_InvoiceRequestDecodeErrorZ_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_InvoiceRequestDecodeErrorZ_get_err(LDKCResult_InvoiceRequestDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_InvoiceRequestDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_InvoiceRequestDecodeErrorZ* owner_conv = (LDKCResult_InvoiceRequestDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_InvoiceRequestDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
static inline struct LDKInvoiceRequestFields CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner){
LDKInvoiceRequestFields ret = *owner->contents.result;
ret.is_owned = false;
}
return ret;
}
+uint32_t CS_LDK_LDKInboundChannelFunds_ty_from_ptr(int64_t ptr) {
+ LDKInboundChannelFunds *obj = (LDKInboundChannelFunds*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKInboundChannelFunds_PushMsat: return 0;
+ case LDKInboundChannelFunds_DualFunded: return 1;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKInboundChannelFunds_PushMsat_get_push_msat(int64_t ptr) {
+ LDKInboundChannelFunds *obj = (LDKInboundChannelFunds*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKInboundChannelFunds_PushMsat);
+ int64_t push_msat_conv = obj->push_msat;
+ return push_msat_conv;
+}
uint32_t CS_LDK_LDKBumpTransactionEvent_ty_from_ptr(int64_t ptr) {
LDKBumpTransactionEvent *obj = (LDKBumpTransactionEvent*)untag_ptr(ptr);
switch(obj->tag) {
int64_t claim_deadline_ref = tag_ptr(&obj->payment_claimable.claim_deadline, false);
return claim_deadline_ref;
}
+int64_t CS_LDK_LDKEvent_PaymentClaimable_get_payment_id(int64_t ptr) {
+ LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKEvent_PaymentClaimable);
+ int64_t payment_id_ref = tag_ptr(&obj->payment_claimable.payment_id, false);
+ return payment_id_ref;
+}
int8_tArray CS_LDK_LDKEvent_PaymentClaimed_get_receiver_node_id(int64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
CHECK(obj->tag == LDKEvent_PaymentClaimed);
onion_fields_ref = tag_ptr(onion_fields_var.inner, false);
return onion_fields_ref;
}
+int64_t CS_LDK_LDKEvent_PaymentClaimed_get_payment_id(int64_t ptr) {
+ LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKEvent_PaymentClaimed);
+ int64_t payment_id_ref = tag_ptr(&obj->payment_claimed.payment_id, false);
+ return payment_id_ref;
+}
int8_tArray CS_LDK_LDKEvent_ConnectionNeeded_get_node_id(int64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
CHECK(obj->tag == LDKEvent_ConnectionNeeded);
int64_t next_user_channel_id_ref = tag_ptr(&obj->payment_forwarded.next_user_channel_id, false);
return next_user_channel_id_ref;
}
+int8_tArray CS_LDK_LDKEvent_PaymentForwarded_get_prev_node_id(int64_t ptr) {
+ LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKEvent_PaymentForwarded);
+ int8_tArray prev_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(prev_node_id_arr->elems, obj->payment_forwarded.prev_node_id.compressed_form, 33);
+ return prev_node_id_arr;
+}
+int8_tArray CS_LDK_LDKEvent_PaymentForwarded_get_next_node_id(int64_t ptr) {
+ LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKEvent_PaymentForwarded);
+ int8_tArray next_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(next_node_id_arr->elems, obj->payment_forwarded.next_node_id.compressed_form, 33);
+ return next_node_id_arr;
+}
int64_t CS_LDK_LDKEvent_PaymentForwarded_get_total_fee_earned_msat(int64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
CHECK(obj->tag == LDKEvent_PaymentForwarded);
channel_funding_txo_ref = tag_ptr(channel_funding_txo_var.inner, false);
return channel_funding_txo_ref;
}
+int64_t CS_LDK_LDKEvent_ChannelClosed_get_last_local_balance_msat(int64_t ptr) {
+ LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKEvent_ChannelClosed);
+ int64_t last_local_balance_msat_ref = tag_ptr(&obj->channel_closed.last_local_balance_msat, false);
+ return last_local_balance_msat_ref;
+}
int64_t CS_LDK_LDKEvent_DiscardFunding_get_channel_id(int64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
CHECK(obj->tag == LDKEvent_DiscardFunding);
int64_t funding_satoshis_conv = obj->open_channel_request.funding_satoshis;
return funding_satoshis_conv;
}
-int64_t CS_LDK_LDKEvent_OpenChannelRequest_get_push_msat(int64_t ptr) {
+int64_t CS_LDK_LDKEvent_OpenChannelRequest_get_channel_negotiation_type(int64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
CHECK(obj->tag == LDKEvent_OpenChannelRequest);
- int64_t push_msat_conv = obj->open_channel_request.push_msat;
- return push_msat_conv;
+ int64_t channel_negotiation_type_ref = tag_ptr(&obj->open_channel_request.channel_negotiation_type, false);
+ return channel_negotiation_type_ref;
}
int64_t CS_LDK_LDKEvent_OpenChannelRequest_get_channel_type(int64_t ptr) {
LDKEvent *obj = (LDKEvent*)untag_ptr(ptr);
}
return ret;
}
-uint32_t CS_LDK_LDKBolt11ParseError_ty_from_ptr(int64_t ptr) {
- LDKBolt11ParseError *obj = (LDKBolt11ParseError*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKBolt11ParseError_Bech32Error: return 0;
- case LDKBolt11ParseError_ParseAmountError: return 1;
- case LDKBolt11ParseError_MalformedSignature: return 2;
- case LDKBolt11ParseError_BadPrefix: return 3;
- case LDKBolt11ParseError_UnknownCurrency: return 4;
- case LDKBolt11ParseError_UnknownSiPrefix: return 5;
- case LDKBolt11ParseError_MalformedHRP: return 6;
- case LDKBolt11ParseError_TooShortDataPart: return 7;
- case LDKBolt11ParseError_UnexpectedEndOfTaggedFields: return 8;
- case LDKBolt11ParseError_DescriptionDecodeError: return 9;
- case LDKBolt11ParseError_PaddingError: return 10;
- case LDKBolt11ParseError_IntegerOverflowError: return 11;
- case LDKBolt11ParseError_InvalidSegWitProgramLength: return 12;
- case LDKBolt11ParseError_InvalidPubKeyHashLength: return 13;
- case LDKBolt11ParseError_InvalidScriptHashLength: return 14;
- case LDKBolt11ParseError_InvalidRecoveryId: return 15;
- case LDKBolt11ParseError_InvalidSliceLength: return 16;
- case LDKBolt11ParseError_Skip: return 17;
- default: abort();
- }
-}
-int64_t CS_LDK_LDKBolt11ParseError_Bech32Error_get_bech32_error(int64_t ptr) {
- LDKBolt11ParseError *obj = (LDKBolt11ParseError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKBolt11ParseError_Bech32Error);
- int64_t bech32_error_ref = tag_ptr(&obj->bech32_error, false);
- return bech32_error_ref;
-}
-int32_t CS_LDK_LDKBolt11ParseError_ParseAmountError_get_parse_amount_error(int64_t ptr) {
- LDKBolt11ParseError *obj = (LDKBolt11ParseError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKBolt11ParseError_ParseAmountError);
- /*obj->parse_amount_error*/
- return 0;
-}
-int32_t CS_LDK_LDKBolt11ParseError_MalformedSignature_get_malformed_signature(int64_t ptr) {
- LDKBolt11ParseError *obj = (LDKBolt11ParseError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKBolt11ParseError_MalformedSignature);
- int32_t malformed_signature_conv = LDKSecp256k1Error_to_cs(obj->malformed_signature);
- return malformed_signature_conv;
-}
-int32_t CS_LDK_LDKBolt11ParseError_DescriptionDecodeError_get_description_decode_error(int64_t ptr) {
- LDKBolt11ParseError *obj = (LDKBolt11ParseError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKBolt11ParseError_DescriptionDecodeError);
- /*obj->description_decode_error*/
- return 0;
-}
-jstring CS_LDK_LDKBolt11ParseError_InvalidSliceLength_get_invalid_slice_length(int64_t ptr) {
- LDKBolt11ParseError *obj = (LDKBolt11ParseError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKBolt11ParseError_InvalidSliceLength);
- LDKStr invalid_slice_length_str = obj->invalid_slice_length;
- jstring invalid_slice_length_conv = str_ref_to_cs(invalid_slice_length_str.chars, invalid_slice_length_str.len);
- return invalid_slice_length_conv;
-}
static inline enum LDKSiPrefix CResult_SiPrefixBolt11ParseErrorZ_get_ok(LDKCResult_SiPrefixBolt11ParseErrorZ *NONNULL_PTR owner){
CHECK(owner->result_ok);
return SiPrefix_clone(&*owner->contents.result);
}
static inline struct LDKBolt11ParseError CResult_SiPrefixBolt11ParseErrorZ_get_err(LDKCResult_SiPrefixBolt11ParseErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return Bolt11ParseError_clone(&*owner->contents.err);
+ LDKBolt11ParseError ret = *owner->contents.err;
+ ret.is_owned = false;
+ return ret;
}
int64_t CS_LDK_CResult_SiPrefixBolt11ParseErrorZ_get_err(int64_t owner) {
LDKCResult_SiPrefixBolt11ParseErrorZ* owner_conv = (LDKCResult_SiPrefixBolt11ParseErrorZ*)untag_ptr(owner);
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = CResult_SiPrefixBolt11ParseErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
+ LDKBolt11ParseError ret_var = CResult_SiPrefixBolt11ParseErrorZ_get_err(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;
}
int64_t CS_LDK_LDKParseOrSemanticError_ParseError_get_parse_error(int64_t ptr) {
LDKParseOrSemanticError *obj = (LDKParseOrSemanticError*)untag_ptr(ptr);
CHECK(obj->tag == LDKParseOrSemanticError_ParseError);
- int64_t parse_error_ref = tag_ptr(&obj->parse_error, false);
+ LDKBolt11ParseError parse_error_var = obj->parse_error;
+ int64_t parse_error_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(parse_error_var);
+ parse_error_ref = tag_ptr(parse_error_var.inner, false);
return parse_error_ref;
}
int32_t CS_LDK_LDKParseOrSemanticError_SemanticError_get_semantic_error(int64_t ptr) {
}
static inline struct LDKBolt11ParseError CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_get_err(LDKCResult_SignedRawBolt11InvoiceBolt11ParseErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return Bolt11ParseError_clone(&*owner->contents.err);
+ LDKBolt11ParseError ret = *owner->contents.err;
+ ret.is_owned = false;
+ return ret;
}
int64_t CS_LDK_CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_get_err(int64_t owner) {
LDKCResult_SignedRawBolt11InvoiceBolt11ParseErrorZ* owner_conv = (LDKCResult_SignedRawBolt11InvoiceBolt11ParseErrorZ*)untag_ptr(owner);
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
+ LDKBolt11ParseError ret_var = CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_get_err(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;
}
return ret_ref;
}
+static inline struct LDKInitFeatures CResult_InitFeaturesDecodeErrorZ_get_ok(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner){
+ LDKInitFeatures ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_InitFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKInitFeatures ret_var = CResult_InitFeaturesDecodeErrorZ_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_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_InitFeaturesDecodeErrorZ* owner_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_InitFeaturesDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKChannelFeatures CResult_ChannelFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner){
+ LDKChannelFeatures ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_ChannelFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKChannelFeatures ret_var = CResult_ChannelFeaturesDecodeErrorZ_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_ChannelFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_ChannelFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelFeaturesDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKNodeFeatures CResult_NodeFeaturesDecodeErrorZ_get_ok(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner){
+ LDKNodeFeatures ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_NodeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKNodeFeatures ret_var = CResult_NodeFeaturesDecodeErrorZ_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_NodeFeaturesDecodeErrorZ_get_err(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_NodeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_NodeFeaturesDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKBolt11InvoiceFeatures CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_ok(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
+ LDKBolt11InvoiceFeatures ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKBolt11InvoiceFeatures ret_var = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_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_Bolt11InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKBolt12InvoiceFeatures CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_ok(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
+ LDKBolt12InvoiceFeatures ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKBolt12InvoiceFeatures ret_var = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_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_Bolt12InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* owner_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKBlindedHopFeatures CResult_BlindedHopFeaturesDecodeErrorZ_get_ok(LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR owner){
+ LDKBlindedHopFeatures ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ* owner_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKBlindedHopFeatures ret_var = CResult_BlindedHopFeaturesDecodeErrorZ_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_BlindedHopFeaturesDecodeErrorZ_get_err(LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ* owner_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_BlindedHopFeaturesDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKChannelTypeFeatures CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner){
+ LDKChannelTypeFeatures ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKChannelTypeFeatures ret_var = CResult_ChannelTypeFeaturesDecodeErrorZ_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_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ* owner_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_ChannelTypeFeaturesDecodeErrorZ_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);
}
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;
-}
-int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_get_ok(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 LDKDecodeError CResult_UnknownPaymentContextDecodeErrorZ_get_err(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return DecodeError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_get_err(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;
LDKParsedOnionMessageContents *obj = (LDKParsedOnionMessageContents*)untag_ptr(ptr);
switch(obj->tag) {
case LDKParsedOnionMessageContents_Offers: return 0;
- case LDKParsedOnionMessageContents_Custom: return 1;
+ case LDKParsedOnionMessageContents_DNSResolver: return 1;
+ case LDKParsedOnionMessageContents_Custom: return 2;
default: abort();
}
}
int64_t offers_ref = tag_ptr(&obj->offers, false);
return offers_ref;
}
+int64_t CS_LDK_LDKParsedOnionMessageContents_DNSResolver_get_dns_resolver(int64_t ptr) {
+ LDKParsedOnionMessageContents *obj = (LDKParsedOnionMessageContents*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKParsedOnionMessageContents_DNSResolver);
+ int64_t dns_resolver_ref = tag_ptr(&obj->dns_resolver, false);
+ return dns_resolver_ref;
+}
int64_t CS_LDK_LDKParsedOnionMessageContents_Custom_get_custom(int64_t ptr) {
LDKParsedOnionMessageContents *obj = (LDKParsedOnionMessageContents*)untag_ptr(ptr);
CHECK(obj->tag == LDKParsedOnionMessageContents_Custom);
}
return ret;
}
-uint32_t CS_LDK_LDKSignOrCreationError_ty_from_ptr(int64_t ptr) {
- LDKSignOrCreationError *obj = (LDKSignOrCreationError*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKSignOrCreationError_SignError: return 0;
- case LDKSignOrCreationError_CreationError: return 1;
- default: abort();
- }
-}
-int32_t CS_LDK_LDKSignOrCreationError_CreationError_get_creation_error(int64_t ptr) {
- LDKSignOrCreationError *obj = (LDKSignOrCreationError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKSignOrCreationError_CreationError);
- int32_t creation_error_conv = LDKCreationError_to_cs(obj->creation_error);
- return creation_error_conv;
-}
-static inline struct LDKBolt11Invoice CResult_Bolt11InvoiceSignOrCreationErrorZ_get_ok(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR owner){
- LDKBolt11Invoice ret = *owner->contents.result;
- ret.is_owned = false;
- return ret;
-}
-int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_get_ok(int64_t owner) {
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* owner_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(owner);
- LDKBolt11Invoice ret_var = CResult_Bolt11InvoiceSignOrCreationErrorZ_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 LDKSignOrCreationError CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR owner){
-CHECK(!owner->result_ok);
- return SignOrCreationError_clone(&*owner->contents.err);
-}
-int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err(int64_t owner) {
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* owner_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(owner);
- LDKSignOrCreationError *ret_copy = MALLOC(sizeof(LDKSignOrCreationError), "LDKSignOrCreationError");
- *ret_copy = CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err(owner_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
static inline struct LDKInvoiceError CResult_InvoiceErrorDecodeErrorZ_get_ok(LDKCResult_InvoiceErrorDecodeErrorZ *NONNULL_PTR owner){
LDKInvoiceError ret = *owner->contents.result;
ret.is_owned = false;
return ret_ref;
}
+static inline struct LDKAsyncPaymentsContext CResult_AsyncPaymentsContextDecodeErrorZ_get_ok(LDKCResult_AsyncPaymentsContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(owner->result_ok);
+ return AsyncPaymentsContext_clone(&*owner->contents.result);
+}
+int64_t CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ* owner_conv = (LDKCResult_AsyncPaymentsContextDecodeErrorZ*)untag_ptr(owner);
+ LDKAsyncPaymentsContext *ret_copy = MALLOC(sizeof(LDKAsyncPaymentsContext), "LDKAsyncPaymentsContext");
+ *ret_copy = CResult_AsyncPaymentsContextDecodeErrorZ_get_ok(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKDecodeError CResult_AsyncPaymentsContextDecodeErrorZ_get_err(LDKCResult_AsyncPaymentsContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ* owner_conv = (LDKCResult_AsyncPaymentsContextDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_AsyncPaymentsContextDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline struct LDKDNSResolverContext CResult_DNSResolverContextDecodeErrorZ_get_ok(LDKCResult_DNSResolverContextDecodeErrorZ *NONNULL_PTR owner){
+ LDKDNSResolverContext ret = *owner->contents.result;
+ ret.is_owned = false;
+ return ret;
+}
+int64_t CS_LDK_CResult_DNSResolverContextDecodeErrorZ_get_ok(int64_t owner) {
+ LDKCResult_DNSResolverContextDecodeErrorZ* owner_conv = (LDKCResult_DNSResolverContextDecodeErrorZ*)untag_ptr(owner);
+ LDKDNSResolverContext ret_var = CResult_DNSResolverContextDecodeErrorZ_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_DNSResolverContextDecodeErrorZ_get_err(LDKCResult_DNSResolverContextDecodeErrorZ *NONNULL_PTR owner){
+CHECK(!owner->result_ok);
+ return DecodeError_clone(&*owner->contents.err);
+}
+int64_t CS_LDK_CResult_DNSResolverContextDecodeErrorZ_get_err(int64_t owner) {
+ LDKCResult_DNSResolverContextDecodeErrorZ* owner_conv = (LDKCResult_DNSResolverContextDecodeErrorZ*)untag_ptr(owner);
+ LDKDecodeError *ret_copy = MALLOC(sizeof(LDKDecodeError), "LDKDecodeError");
+ *ret_copy = CResult_DNSResolverContextDecodeErrorZ_get_err(owner_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+typedef struct LDKMigratableKVStore_JCalls {
+ atomic_size_t refcnt;
+ uint32_t instance_ptr;
+ LDKKVStore_JCalls* KVStore;
+} LDKMigratableKVStore_JCalls;
+static void LDKMigratableKVStore_JCalls_free(void* this_arg) {
+ LDKMigratableKVStore_JCalls *j_calls = (LDKMigratableKVStore_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ FREE(j_calls);
+ }
+}
+LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ list_all_keys_LDKMigratableKVStore_jcall(const void* this_arg) {
+ LDKMigratableKVStore_JCalls *j_calls = (LDKMigratableKVStore_JCalls*) this_arg;
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 65);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ ret_conv = *(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
+static void LDKMigratableKVStore_JCalls_cloned(LDKMigratableKVStore* new_obj) {
+ LDKMigratableKVStore_JCalls *j_calls = (LDKMigratableKVStore_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+ atomic_fetch_add_explicit(&j_calls->KVStore->refcnt, 1, memory_order_release);
+}
+static inline LDKMigratableKVStore LDKMigratableKVStore_init (int64_t o, int64_t KVStore) {
+ LDKMigratableKVStore_JCalls *calls = MALLOC(sizeof(LDKMigratableKVStore_JCalls), "LDKMigratableKVStore_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ calls->instance_ptr = o;
+
+ LDKMigratableKVStore ret = {
+ .this_arg = (void*) calls,
+ .list_all_keys = list_all_keys_LDKMigratableKVStore_jcall,
+ .free = LDKMigratableKVStore_JCalls_free,
+ .KVStore = LDKKVStore_init(KVStore),
+ };
+ calls->KVStore = ret.KVStore.this_arg;
+ return ret;
+}
+uint64_t CS_LDK_LDKMigratableKVStore_new(int32_t o, int32_t KVStore) {
+ LDKMigratableKVStore *res_ptr = MALLOC(sizeof(LDKMigratableKVStore), "LDKMigratableKVStore");
+ *res_ptr = LDKMigratableKVStore_init(o, KVStore);
+ return tag_ptr(res_ptr, true);
+}
+int64_t CS_LDK_MigratableKVStore_list_all_keys(int64_t this_arg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKMigratableKVStore* this_arg_conv = (LDKMigratableKVStore*)this_arg_ptr;
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ), "LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ");
+ *ret_conv = (this_arg_conv->list_all_keys)(this_arg_conv->this_arg);
+ return tag_ptr(ret_conv, true);
+}
+
typedef struct LDKPersister_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
// WARNING: we may need a move here but no clone is available for LDKChannelManager
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_manager_var);
channel_manager_ref = tag_ptr(channel_manager_var.inner, channel_manager_var.is_owned);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 65, channel_manager_ref);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 66, channel_manager_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr);
// WARNING: we may need a move here but no clone is available for LDKNetworkGraph
CHECK_INNER_FIELD_ACCESS_OR_NULL(network_graph_var);
network_graph_ref = tag_ptr(network_graph_var.inner, network_graph_var.is_owned);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 66, network_graph_ref);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 67, network_graph_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr);
LDKPersister_JCalls *j_calls = (LDKPersister_JCalls*) this_arg;
// WARNING: This object doesn't live past this scope, needs clone!
int64_t ret_scorer = tag_ptr(scorer, false);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 67, ret_scorer);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 68, ret_scorer);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneIOErrorZ ret_conv = *(LDKCResult_NoneIOErrorZ*)(ret_ptr);
monitor_var = ChannelMonitor_clone(&monitor_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_var);
monitor_ref = tag_ptr(monitor_var.inner, monitor_var.is_owned);
- uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_ll(j_calls->instance_ptr, 68, channel_funding_outpoint_ref, monitor_ref);
+ uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_ll(j_calls->instance_ptr, 69, channel_funding_outpoint_ref, monitor_ref);
LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_cs(ret);
return ret_conv;
}
monitor_var = ChannelMonitor_clone(&monitor_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(monitor_var);
monitor_ref = tag_ptr(monitor_var.inner, monitor_var.is_owned);
- uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_lll(j_calls->instance_ptr, 69, channel_funding_outpoint_ref, monitor_update_ref, monitor_ref);
+ uint64_t ret = js_invoke_function_ChannelMonitorUpdateStatus_lll(j_calls->instance_ptr, 70, channel_funding_outpoint_ref, monitor_update_ref, monitor_ref);
LDKChannelMonitorUpdateStatus ret_conv = LDKChannelMonitorUpdateStatus_from_cs(ret);
return ret_conv;
}
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);
- js_invoke_function_void_l(j_calls->instance_ptr, 70, channel_funding_outpoint_ref);
+ js_invoke_function_void_l(j_calls->instance_ptr, 71, channel_funding_outpoint_ref);
}
static void LDKPersist_JCalls_cloned(LDKPersist* new_obj) {
LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) new_obj->this_arg;
FREE(txdata_var.data);
int32_t height_conv = height;
- js_invoke_function_void_lli(j_calls->instance_ptr, 71, (int64_t)header_arr, (int64_t)txdata_arr, height_conv);
+ js_invoke_function_void_lli(j_calls->instance_ptr, 72, (int64_t)header_arr, (int64_t)txdata_arr, height_conv);
}
void block_connected_LDKListen_jcall(const void* this_arg, LDKu8slice block, uint32_t height) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
int8_tArray block_arr = init_int8_tArray(block_var.datalen, __LINE__);
memcpy(block_arr->elems, block_var.data, block_var.datalen);
int32_t height_conv = height;
- js_invoke_function_void_li(j_calls->instance_ptr, 72, (int64_t)block_arr, height_conv);
+ js_invoke_function_void_li(j_calls->instance_ptr, 73, (int64_t)block_arr, height_conv);
}
void block_disconnected_LDKListen_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
int8_tArray header_arr = init_int8_tArray(80, __LINE__);
memcpy(header_arr->elems, *header, 80);
int32_t height_conv = height;
- js_invoke_function_void_li(j_calls->instance_ptr, 73, (int64_t)header_arr, height_conv);
+ js_invoke_function_void_li(j_calls->instance_ptr, 74, (int64_t)header_arr, height_conv);
}
static void LDKListen_JCalls_cloned(LDKListen* new_obj) {
LDKListen_JCalls *j_calls = (LDKListen_JCalls*) new_obj->this_arg;
FREE(txdata_var.data);
int32_t height_conv = height;
- js_invoke_function_void_lli(j_calls->instance_ptr, 74, (int64_t)header_arr, (int64_t)txdata_arr, height_conv);
+ js_invoke_function_void_lli(j_calls->instance_ptr, 75, (int64_t)header_arr, (int64_t)txdata_arr, height_conv);
}
void transaction_unconfirmed_LDKConfirm_jcall(const void* this_arg, const uint8_t (* txid)[32]) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
int8_tArray txid_arr = init_int8_tArray(32, __LINE__);
memcpy(txid_arr->elems, *txid, 32);
- js_invoke_function_void_l(j_calls->instance_ptr, 75, (int64_t)txid_arr);
+ js_invoke_function_void_l(j_calls->instance_ptr, 76, (int64_t)txid_arr);
}
void best_block_updated_LDKConfirm_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
int8_tArray header_arr = init_int8_tArray(80, __LINE__);
memcpy(header_arr->elems, *header, 80);
int32_t height_conv = height;
- js_invoke_function_void_li(j_calls->instance_ptr, 76, (int64_t)header_arr, height_conv);
+ js_invoke_function_void_li(j_calls->instance_ptr, 77, (int64_t)header_arr, height_conv);
}
LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ get_relevant_txids_LDKConfirm_jcall(const void* this_arg) {
LDKConfirm_JCalls *j_calls = (LDKConfirm_JCalls*) this_arg;
- int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 77);
+ int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 78);
LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
}
void call_LDKFutureCallback_jcall(const void* this_arg) {
LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) this_arg;
- js_invoke_function_void_(j_calls->instance_ptr, 78);
+ js_invoke_function_void_(j_calls->instance_ptr, 79);
}
static void LDKFutureCallback_JCalls_cloned(LDKFutureCallback* new_obj) {
LDKFutureCallback_JCalls *j_calls = (LDKFutureCallback_JCalls*) new_obj->this_arg;
LDKEvent *event_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
*event_copy = event;
int64_t event_ref = tag_ptr(event_copy, true);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 79, event_ref);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 80, event_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneReplayEventZ ret_conv = *(LDKCResult_NoneReplayEventZ*)(ret_ptr);
LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
LDKEventHandler* handler_ret = MALLOC(sizeof(LDKEventHandler), "LDKEventHandler");
*handler_ret = handler;
- js_invoke_function_void_l(j_calls->instance_ptr, 80, tag_ptr(handler_ret, true));
+ js_invoke_function_void_l(j_calls->instance_ptr, 81, tag_ptr(handler_ret, true));
}
static void LDKEventsProvider_JCalls_cloned(LDKEventsProvider* new_obj) {
LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) new_obj->this_arg;
(this_arg_conv->process_pending_events)(this_arg_conv->this_arg, handler_conv);
}
+typedef struct LDKVerification_JCalls {
+ atomic_size_t refcnt;
+ uint32_t instance_ptr;
+} LDKVerification_JCalls;
+static void LDKVerification_JCalls_free(void* this_arg) {
+ LDKVerification_JCalls *j_calls = (LDKVerification_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ FREE(j_calls);
+ }
+}
+LDKThirtyTwoBytes hmac_for_offer_payment_LDKVerification_jcall(const void* this_arg, LDKNonce nonce, const LDKExpandedKey * expanded_key) {
+ LDKVerification_JCalls *j_calls = (LDKVerification_JCalls*) this_arg;
+ LDKNonce nonce_var = nonce;
+ int64_t nonce_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_var);
+ nonce_ref = tag_ptr(nonce_var.inner, nonce_var.is_owned);
+ LDKExpandedKey expanded_key_var = *expanded_key;
+ int64_t expanded_key_ref = 0;
+ expanded_key_var = ExpandedKey_clone(&expanded_key_var);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_var);
+ expanded_key_ref = tag_ptr(expanded_key_var.inner, expanded_key_var.is_owned);
+ int8_tArray ret = (int8_tArray)js_invoke_function_l_ll(j_calls->instance_ptr, 82, nonce_ref, expanded_key_ref);
+ LDKThirtyTwoBytes ret_ref;
+ CHECK(ret->arr_len == 32);
+ memcpy(ret_ref.data, ret->elems, 32); FREE(ret);
+ return ret_ref;
+}
+LDKCResult_NoneNoneZ verify_for_offer_payment_LDKVerification_jcall(const void* this_arg, LDKThirtyTwoBytes hmac, LDKNonce nonce, const LDKExpandedKey * expanded_key) {
+ LDKVerification_JCalls *j_calls = (LDKVerification_JCalls*) this_arg;
+ int8_tArray hmac_arr = init_int8_tArray(32, __LINE__);
+ memcpy(hmac_arr->elems, hmac.data, 32);
+ LDKNonce nonce_var = nonce;
+ int64_t nonce_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_var);
+ nonce_ref = tag_ptr(nonce_var.inner, nonce_var.is_owned);
+ LDKExpandedKey expanded_key_var = *expanded_key;
+ int64_t expanded_key_ref = 0;
+ expanded_key_var = ExpandedKey_clone(&expanded_key_var);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(expanded_key_var);
+ expanded_key_ref = tag_ptr(expanded_key_var.inner, expanded_key_var.is_owned);
+ uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 83, (int64_t)hmac_arr, nonce_ref, expanded_key_ref);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
+static void LDKVerification_JCalls_cloned(LDKVerification* new_obj) {
+ LDKVerification_JCalls *j_calls = (LDKVerification_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKVerification LDKVerification_init (int64_t o) {
+ LDKVerification_JCalls *calls = MALLOC(sizeof(LDKVerification_JCalls), "LDKVerification_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ calls->instance_ptr = o;
+
+ LDKVerification ret = {
+ .this_arg = (void*) calls,
+ .hmac_for_offer_payment = hmac_for_offer_payment_LDKVerification_jcall,
+ .verify_for_offer_payment = verify_for_offer_payment_LDKVerification_jcall,
+ .free = LDKVerification_JCalls_free,
+ };
+ return ret;
+}
+uint64_t CS_LDK_LDKVerification_new(int32_t o) {
+ LDKVerification *res_ptr = MALLOC(sizeof(LDKVerification), "LDKVerification");
+ *res_ptr = LDKVerification_init(o);
+ return tag_ptr(res_ptr, true);
+}
+int8_tArray CS_LDK_Verification_hmac_for_offer_payment(int64_t this_arg, int64_t nonce, int64_t expanded_key) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKVerification* this_arg_conv = (LDKVerification*)this_arg_ptr;
+ LDKNonce nonce_conv;
+ nonce_conv.inner = untag_ptr(nonce);
+ nonce_conv.is_owned = ptr_is_owned(nonce);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_conv);
+ nonce_conv = Nonce_clone(&nonce_conv);
+ 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;
+ int8_tArray ret_arr = init_int8_tArray(32, __LINE__);
+ memcpy(ret_arr->elems, (this_arg_conv->hmac_for_offer_payment)(this_arg_conv->this_arg, nonce_conv, &expanded_key_conv).data, 32);
+ return ret_arr;
+}
+
+int64_t CS_LDK_Verification_verify_for_offer_payment(int64_t this_arg, int8_tArray hmac, int64_t nonce, int64_t expanded_key) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKVerification* this_arg_conv = (LDKVerification*)this_arg_ptr;
+ LDKThirtyTwoBytes hmac_ref;
+ CHECK(hmac->arr_len == 32);
+ memcpy(hmac_ref.data, hmac->elems, 32); FREE(hmac);
+ LDKNonce nonce_conv;
+ nonce_conv.inner = untag_ptr(nonce);
+ nonce_conv.is_owned = ptr_is_owned(nonce);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_conv);
+ nonce_conv = Nonce_clone(&nonce_conv);
+ 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;
+ LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+ *ret_conv = (this_arg_conv->verify_for_offer_payment)(this_arg_conv->this_arg, hmac_ref, nonce_conv, &expanded_key_conv);
+ return tag_ptr(ret_conv, true);
+}
+
uint32_t CS_LDK_LDKFailureCode_ty_from_ptr(int64_t ptr) {
LDKFailureCode *obj = (LDKFailureCode*)untag_ptr(ptr);
switch(obj->tag) {
int64_t invalid_onion_payload_ref = tag_ptr(&obj->invalid_onion_payload, false);
return invalid_onion_payload_ref;
}
+uint32_t CS_LDK_LDKBolt11InvoiceDescription_ty_from_ptr(int64_t ptr) {
+ LDKBolt11InvoiceDescription *obj = (LDKBolt11InvoiceDescription*)untag_ptr(ptr);
+ switch(obj->tag) {
+ case LDKBolt11InvoiceDescription_Direct: return 0;
+ case LDKBolt11InvoiceDescription_Hash: return 1;
+ default: abort();
+ }
+}
+int64_t CS_LDK_LDKBolt11InvoiceDescription_Direct_get_direct(int64_t ptr) {
+ LDKBolt11InvoiceDescription *obj = (LDKBolt11InvoiceDescription*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKBolt11InvoiceDescription_Direct);
+ LDKDescription direct_var = obj->direct;
+ int64_t direct_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(direct_var);
+ direct_ref = tag_ptr(direct_var.inner, false);
+ return direct_ref;
+}
+int64_t CS_LDK_LDKBolt11InvoiceDescription_Hash_get_hash(int64_t ptr) {
+ LDKBolt11InvoiceDescription *obj = (LDKBolt11InvoiceDescription*)untag_ptr(ptr);
+ CHECK(obj->tag == LDKBolt11InvoiceDescription_Hash);
+ LDKSha256 hash_var = obj->hash;
+ int64_t hash_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(hash_var);
+ hash_ref = tag_ptr(hash_var.inner, false);
+ return hash_ref;
+}
typedef struct LDKMessageSendEventsProvider_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
}
LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_LDKMessageSendEventsProvider_jcall(const void* this_arg) {
LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
- int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 81);
+ int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 84);
LDKCVec_MessageSendEventZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
msg_var = OpenChannel_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 82, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 85, (int64_t)their_node_id_arr, msg_ref);
}
void handle_open_channel_v2_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKOpenChannelV2 * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = OpenChannelV2_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 83, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 86, (int64_t)their_node_id_arr, msg_ref);
}
void handle_accept_channel_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAcceptChannel * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = AcceptChannel_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 84, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 87, (int64_t)their_node_id_arr, msg_ref);
}
void handle_accept_channel_v2_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAcceptChannelV2 * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = AcceptChannelV2_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 85, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 88, (int64_t)their_node_id_arr, msg_ref);
}
void handle_funding_created_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = FundingCreated_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 86, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 89, (int64_t)their_node_id_arr, msg_ref);
}
void handle_funding_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = FundingSigned_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 87, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 90, (int64_t)their_node_id_arr, msg_ref);
}
void handle_channel_ready_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReady * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ChannelReady_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 88, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 91, (int64_t)their_node_id_arr, msg_ref);
}
void handle_shutdown_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKShutdown * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = Shutdown_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 89, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 92, (int64_t)their_node_id_arr, msg_ref);
}
void handle_closing_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ClosingSigned_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 90, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 93, (int64_t)their_node_id_arr, msg_ref);
}
void handle_stfu_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKStfu * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = Stfu_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 91, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 94, (int64_t)their_node_id_arr, msg_ref);
}
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;
msg_var = TxAddInput_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 92, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 95, (int64_t)their_node_id_arr, msg_ref);
}
void handle_tx_add_output_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAddOutput * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxAddOutput_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 93, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 96, (int64_t)their_node_id_arr, msg_ref);
}
void handle_tx_remove_input_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxRemoveInput * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxRemoveInput_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 94, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 97, (int64_t)their_node_id_arr, msg_ref);
}
void handle_tx_remove_output_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxRemoveOutput * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxRemoveOutput_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 95, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 98, (int64_t)their_node_id_arr, msg_ref);
}
void handle_tx_complete_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxComplete * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxComplete_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 96, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 99, (int64_t)their_node_id_arr, msg_ref);
}
void handle_tx_signatures_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxSignatures * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxSignatures_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 97, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 100, (int64_t)their_node_id_arr, msg_ref);
}
void handle_tx_init_rbf_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxInitRbf * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxInitRbf_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 98, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 101, (int64_t)their_node_id_arr, msg_ref);
}
void handle_tx_ack_rbf_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAckRbf * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxAckRbf_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 99, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 102, (int64_t)their_node_id_arr, msg_ref);
}
void handle_tx_abort_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKTxAbort * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = TxAbort_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 100, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 103, (int64_t)their_node_id_arr, msg_ref);
}
void handle_update_add_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateAddHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 101, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 104, (int64_t)their_node_id_arr, msg_ref);
}
void handle_update_fulfill_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFulfillHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 102, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 105, (int64_t)their_node_id_arr, msg_ref);
}
void handle_update_fail_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFailHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 103, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 106, (int64_t)their_node_id_arr, msg_ref);
}
void handle_update_fail_malformed_htlc_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFailMalformedHTLC_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 104, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 107, (int64_t)their_node_id_arr, msg_ref);
}
void handle_commitment_signed_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = CommitmentSigned_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 105, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 108, (int64_t)their_node_id_arr, msg_ref);
}
void handle_revoke_and_ack_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = RevokeAndACK_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 106, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 109, (int64_t)their_node_id_arr, msg_ref);
}
void handle_update_fee_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = UpdateFee_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 107, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 110, (int64_t)their_node_id_arr, msg_ref);
}
void handle_announcement_signatures_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = AnnouncementSignatures_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 108, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 111, (int64_t)their_node_id_arr, msg_ref);
}
void peer_disconnected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- js_invoke_function_void_l(j_calls->instance_ptr, 109, (int64_t)their_node_id_arr);
+ js_invoke_function_void_l(j_calls->instance_ptr, 112, (int64_t)their_node_id_arr);
}
LDKCResult_NoneNoneZ peer_connected_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg, bool inbound) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
jboolean inbound_conv = inbound;
- uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 110, (int64_t)their_node_id_arr, msg_ref, inbound_conv);
+ uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 113, (int64_t)their_node_id_arr, msg_ref, inbound_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
msg_var = ChannelReestablish_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 111, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 114, (int64_t)their_node_id_arr, msg_ref);
}
void handle_channel_update_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelUpdate * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ChannelUpdate_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 112, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 115, (int64_t)their_node_id_arr, msg_ref);
}
void handle_error_LDKChannelMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage * msg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
msg_var = ErrorMessage_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 113, (int64_t)their_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 116, (int64_t)their_node_id_arr, msg_ref);
}
LDKNodeFeatures provided_node_features_LDKChannelMessageHandler_jcall(const void* this_arg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 114);
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 117);
LDKNodeFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 115, (int64_t)their_node_id_arr);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 118, (int64_t)their_node_id_arr);
LDKInitFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
}
LDKCOption_CVec_ThirtyTwoBytesZZ get_chain_hashes_LDKChannelMessageHandler_jcall(const void* this_arg) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 116);
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 119);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCOption_CVec_ThirtyTwoBytesZZ ret_conv = *(LDKCOption_CVec_ThirtyTwoBytesZZ*)(ret_ptr);
FREE(untag_ptr(ret));
return ret_conv;
}
+void message_received_LDKChannelMessageHandler_jcall(const void* this_arg) {
+ LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+ js_invoke_function_void_(j_calls->instance_ptr, 120);
+}
static void LDKChannelMessageHandler_JCalls_cloned(LDKChannelMessageHandler* new_obj) {
LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) new_obj->this_arg;
atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
.provided_node_features = provided_node_features_LDKChannelMessageHandler_jcall,
.provided_init_features = provided_init_features_LDKChannelMessageHandler_jcall,
.get_chain_hashes = get_chain_hashes_LDKChannelMessageHandler_jcall,
+ .message_received = message_received_LDKChannelMessageHandler_jcall,
.free = LDKChannelMessageHandler_JCalls_free,
.MessageSendEventsProvider = LDKMessageSendEventsProvider_init(MessageSendEventsProvider),
};
return ret_ref;
}
+void CS_LDK_ChannelMessageHandler_message_received(int64_t this_arg) {
+ 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;
+ (this_arg_conv->message_received)(this_arg_conv->this_arg);
+}
+
typedef struct LDKOffersMessageHandler_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
int64_t responder_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(responder_var);
responder_ref = tag_ptr(responder_var.inner, responder_var.is_owned);
- uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 117, message_ref, context_ref, responder_ref);
+ uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 121, message_ref, context_ref, responder_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCOption_C2Tuple_OffersMessageResponseInstructionZZ ret_conv = *(LDKCOption_C2Tuple_OffersMessageResponseInstructionZZ*)(ret_ptr);
}
LDKCVec_C2Tuple_OffersMessageMessageSendInstructionsZZ release_pending_messages_LDKOffersMessageHandler_jcall(const void* this_arg) {
LDKOffersMessageHandler_JCalls *j_calls = (LDKOffersMessageHandler_JCalls*) this_arg;
- int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 118);
+ int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 122);
LDKCVec_C2Tuple_OffersMessageMessageSendInstructionsZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
FREE(j_calls);
}
}
-LDKCOption_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ held_htlc_available_LDKAsyncPaymentsMessageHandler_jcall(const void* this_arg, LDKHeldHtlcAvailable message, LDKResponder responder) {
+LDKCOption_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ handle_held_htlc_available_LDKAsyncPaymentsMessageHandler_jcall(const void* this_arg, LDKHeldHtlcAvailable message, LDKResponder responder) {
LDKAsyncPaymentsMessageHandler_JCalls *j_calls = (LDKAsyncPaymentsMessageHandler_JCalls*) this_arg;
LDKHeldHtlcAvailable message_var = message;
int64_t message_ref = 0;
int64_t responder_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(responder_var);
responder_ref = tag_ptr(responder_var.inner, responder_var.is_owned);
- uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 119, message_ref, responder_ref);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 123, message_ref, responder_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCOption_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ ret_conv = *(LDKCOption_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ*)(ret_ptr);
FREE(untag_ptr(ret));
return ret_conv;
}
-void release_held_htlc_LDKAsyncPaymentsMessageHandler_jcall(const void* this_arg, LDKReleaseHeldHtlc message) {
+void handle_release_held_htlc_LDKAsyncPaymentsMessageHandler_jcall(const void* this_arg, LDKReleaseHeldHtlc message, LDKAsyncPaymentsContext context) {
LDKAsyncPaymentsMessageHandler_JCalls *j_calls = (LDKAsyncPaymentsMessageHandler_JCalls*) this_arg;
LDKReleaseHeldHtlc message_var = message;
int64_t message_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var);
message_ref = tag_ptr(message_var.inner, message_var.is_owned);
- js_invoke_function_void_l(j_calls->instance_ptr, 120, message_ref);
+ LDKAsyncPaymentsContext *context_copy = MALLOC(sizeof(LDKAsyncPaymentsContext), "LDKAsyncPaymentsContext");
+ *context_copy = context;
+ int64_t context_ref = tag_ptr(context_copy, true);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 124, message_ref, context_ref);
}
LDKCVec_C2Tuple_AsyncPaymentsMessageMessageSendInstructionsZZ release_pending_messages_LDKAsyncPaymentsMessageHandler_jcall(const void* this_arg) {
LDKAsyncPaymentsMessageHandler_JCalls *j_calls = (LDKAsyncPaymentsMessageHandler_JCalls*) this_arg;
- int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 121);
+ int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 125);
LDKCVec_C2Tuple_AsyncPaymentsMessageMessageSendInstructionsZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
LDKAsyncPaymentsMessageHandler ret = {
.this_arg = (void*) calls,
- .held_htlc_available = held_htlc_available_LDKAsyncPaymentsMessageHandler_jcall,
- .release_held_htlc = release_held_htlc_LDKAsyncPaymentsMessageHandler_jcall,
+ .handle_held_htlc_available = handle_held_htlc_available_LDKAsyncPaymentsMessageHandler_jcall,
+ .handle_release_held_htlc = handle_release_held_htlc_LDKAsyncPaymentsMessageHandler_jcall,
.release_pending_messages = release_pending_messages_LDKAsyncPaymentsMessageHandler_jcall,
.free = LDKAsyncPaymentsMessageHandler_JCalls_free,
};
*res_ptr = LDKAsyncPaymentsMessageHandler_init(o);
return tag_ptr(res_ptr, true);
}
-int64_t CS_LDK_AsyncPaymentsMessageHandler_held_htlc_available(int64_t this_arg, int64_t message, int64_t responder) {
+int64_t CS_LDK_AsyncPaymentsMessageHandler_handle_held_htlc_available(int64_t this_arg, int64_t message, int64_t responder) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKAsyncPaymentsMessageHandler* this_arg_conv = (LDKAsyncPaymentsMessageHandler*)this_arg_ptr;
CHECK_INNER_FIELD_ACCESS_OR_NULL(responder_conv);
responder_conv = Responder_clone(&responder_conv);
LDKCOption_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ), "LDKCOption_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ");
- *ret_copy = (this_arg_conv->held_htlc_available)(this_arg_conv->this_arg, message_conv, responder_conv);
+ *ret_copy = (this_arg_conv->handle_held_htlc_available)(this_arg_conv->this_arg, message_conv, responder_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-void CS_LDK_AsyncPaymentsMessageHandler_release_held_htlc(int64_t this_arg, int64_t message) {
+void CS_LDK_AsyncPaymentsMessageHandler_handle_release_held_htlc(int64_t this_arg, int64_t message, int64_t context) {
void* this_arg_ptr = untag_ptr(this_arg);
if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
LDKAsyncPaymentsMessageHandler* this_arg_conv = (LDKAsyncPaymentsMessageHandler*)this_arg_ptr;
message_conv.is_owned = ptr_is_owned(message);
CHECK_INNER_FIELD_ACCESS_OR_NULL(message_conv);
message_conv = ReleaseHeldHtlc_clone(&message_conv);
- (this_arg_conv->release_held_htlc)(this_arg_conv->this_arg, message_conv);
+ void* context_ptr = untag_ptr(context);
+ CHECK_ACCESS(context_ptr);
+ LDKAsyncPaymentsContext context_conv = *(LDKAsyncPaymentsContext*)(context_ptr);
+ context_conv = AsyncPaymentsContext_clone((LDKAsyncPaymentsContext*)untag_ptr(context));
+ (this_arg_conv->handle_release_held_htlc)(this_arg_conv->this_arg, message_conv, context_conv);
}
int64_tArray CS_LDK_AsyncPaymentsMessageHandler_release_pending_messages(int64_t this_arg) {
return ret_arr;
}
+typedef struct LDKDNSResolverMessageHandler_JCalls {
+ atomic_size_t refcnt;
+ uint32_t instance_ptr;
+} LDKDNSResolverMessageHandler_JCalls;
+static void LDKDNSResolverMessageHandler_JCalls_free(void* this_arg) {
+ LDKDNSResolverMessageHandler_JCalls *j_calls = (LDKDNSResolverMessageHandler_JCalls*) this_arg;
+ if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+ FREE(j_calls);
+ }
+}
+LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ handle_dnssec_query_LDKDNSResolverMessageHandler_jcall(const void* this_arg, LDKDNSSECQuery message, LDKResponder responder) {
+ LDKDNSResolverMessageHandler_JCalls *j_calls = (LDKDNSResolverMessageHandler_JCalls*) this_arg;
+ LDKDNSSECQuery message_var = message;
+ int64_t message_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var);
+ message_ref = tag_ptr(message_var.inner, message_var.is_owned);
+ LDKResponder responder_var = responder;
+ int64_t responder_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(responder_var);
+ responder_ref = tag_ptr(responder_var.inner, responder_var.is_owned);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 126, message_ref, responder_ref);
+ void* ret_ptr = untag_ptr(ret);
+ CHECK_ACCESS(ret_ptr);
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ ret_conv = *(LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ*)(ret_ptr);
+ FREE(untag_ptr(ret));
+ return ret_conv;
+}
+void handle_dnssec_proof_LDKDNSResolverMessageHandler_jcall(const void* this_arg, LDKDNSSECProof message, LDKDNSResolverContext context) {
+ LDKDNSResolverMessageHandler_JCalls *j_calls = (LDKDNSResolverMessageHandler_JCalls*) this_arg;
+ LDKDNSSECProof message_var = message;
+ int64_t message_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(message_var);
+ message_ref = tag_ptr(message_var.inner, message_var.is_owned);
+ LDKDNSResolverContext context_var = context;
+ int64_t context_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(context_var);
+ context_ref = tag_ptr(context_var.inner, context_var.is_owned);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 127, message_ref, context_ref);
+}
+LDKNodeFeatures provided_node_features_LDKDNSResolverMessageHandler_jcall(const void* this_arg) {
+ LDKDNSResolverMessageHandler_JCalls *j_calls = (LDKDNSResolverMessageHandler_JCalls*) this_arg;
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 128);
+ LDKNodeFeatures ret_conv;
+ ret_conv.inner = untag_ptr(ret);
+ ret_conv.is_owned = ptr_is_owned(ret);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv);
+ return ret_conv;
+}
+LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ release_pending_messages_LDKDNSResolverMessageHandler_jcall(const void* this_arg) {
+ LDKDNSResolverMessageHandler_JCalls *j_calls = (LDKDNSResolverMessageHandler_JCalls*) this_arg;
+ int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 129);
+ LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ ret_constr;
+ ret_constr.datalen = ret->arr_len;
+ if (ret_constr.datalen > 0)
+ ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ), "LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ Elements");
+ else
+ ret_constr.data = NULL;
+ int64_t* ret_vals = ret->elems;
+ for (size_t b = 0; b < ret_constr.datalen; b++) {
+ int64_t ret_conv_53 = ret_vals[b];
+ void* ret_conv_53_ptr = untag_ptr(ret_conv_53);
+ CHECK_ACCESS(ret_conv_53_ptr);
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ ret_conv_53_conv = *(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ*)(ret_conv_53_ptr);
+ FREE(untag_ptr(ret_conv_53));
+ ret_constr.data[b] = ret_conv_53_conv;
+ }
+ FREE(ret);
+ return ret_constr;
+}
+static void LDKDNSResolverMessageHandler_JCalls_cloned(LDKDNSResolverMessageHandler* new_obj) {
+ LDKDNSResolverMessageHandler_JCalls *j_calls = (LDKDNSResolverMessageHandler_JCalls*) new_obj->this_arg;
+ atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+}
+static inline LDKDNSResolverMessageHandler LDKDNSResolverMessageHandler_init (int64_t o) {
+ LDKDNSResolverMessageHandler_JCalls *calls = MALLOC(sizeof(LDKDNSResolverMessageHandler_JCalls), "LDKDNSResolverMessageHandler_JCalls");
+ atomic_init(&calls->refcnt, 1);
+ calls->instance_ptr = o;
+
+ LDKDNSResolverMessageHandler ret = {
+ .this_arg = (void*) calls,
+ .handle_dnssec_query = handle_dnssec_query_LDKDNSResolverMessageHandler_jcall,
+ .handle_dnssec_proof = handle_dnssec_proof_LDKDNSResolverMessageHandler_jcall,
+ .provided_node_features = provided_node_features_LDKDNSResolverMessageHandler_jcall,
+ .release_pending_messages = release_pending_messages_LDKDNSResolverMessageHandler_jcall,
+ .free = LDKDNSResolverMessageHandler_JCalls_free,
+ };
+ return ret;
+}
+uint64_t CS_LDK_LDKDNSResolverMessageHandler_new(int32_t o) {
+ LDKDNSResolverMessageHandler *res_ptr = MALLOC(sizeof(LDKDNSResolverMessageHandler), "LDKDNSResolverMessageHandler");
+ *res_ptr = LDKDNSResolverMessageHandler_init(o);
+ return tag_ptr(res_ptr, true);
+}
+int64_t CS_LDK_DNSResolverMessageHandler_handle_dnssec_query(int64_t this_arg, int64_t message, int64_t responder) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKDNSResolverMessageHandler* this_arg_conv = (LDKDNSResolverMessageHandler*)this_arg_ptr;
+ LDKDNSSECQuery 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 = DNSSECQuery_clone(&message_conv);
+ LDKResponder responder_conv;
+ responder_conv.inner = untag_ptr(responder);
+ responder_conv.is_owned = ptr_is_owned(responder);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(responder_conv);
+ responder_conv = Responder_clone(&responder_conv);
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ), "LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ");
+ *ret_copy = (this_arg_conv->handle_dnssec_query)(this_arg_conv->this_arg, message_conv, responder_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_DNSResolverMessageHandler_handle_dnssec_proof(int64_t this_arg, int64_t message, int64_t context) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKDNSResolverMessageHandler* this_arg_conv = (LDKDNSResolverMessageHandler*)this_arg_ptr;
+ LDKDNSSECProof 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 = DNSSECProof_clone(&message_conv);
+ LDKDNSResolverContext context_conv;
+ context_conv.inner = untag_ptr(context);
+ context_conv.is_owned = ptr_is_owned(context);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(context_conv);
+ context_conv = DNSResolverContext_clone(&context_conv);
+ (this_arg_conv->handle_dnssec_proof)(this_arg_conv->this_arg, message_conv, context_conv);
+}
+
+int64_t CS_LDK_DNSResolverMessageHandler_provided_node_features(int64_t this_arg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKDNSResolverMessageHandler* this_arg_conv = (LDKDNSResolverMessageHandler*)this_arg_ptr;
+ LDKNodeFeatures ret_var = (this_arg_conv->provided_node_features)(this_arg_conv->this_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;
+}
+
+int64_tArray CS_LDK_DNSResolverMessageHandler_release_pending_messages(int64_t this_arg) {
+ void* this_arg_ptr = untag_ptr(this_arg);
+ if (ptr_is_owned(this_arg)) { CHECK_ACCESS(this_arg_ptr); }
+ LDKDNSResolverMessageHandler* this_arg_conv = (LDKDNSResolverMessageHandler*)this_arg_ptr;
+ LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ ret_var = (this_arg_conv->release_pending_messages)(this_arg_conv->this_arg);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t b = 0; b < ret_var.datalen; b++) {
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ* ret_conv_53_conv = MALLOC(sizeof(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ), "LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ");
+ *ret_conv_53_conv = ret_var.data[b];
+ ret_arr_ptr[b] = tag_ptr(ret_conv_53_conv, true);
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
typedef struct LDKNodeIdLookUp_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
LDKPublicKey next_node_id_LDKNodeIdLookUp_jcall(const void* this_arg, uint64_t short_channel_id) {
LDKNodeIdLookUp_JCalls *j_calls = (LDKNodeIdLookUp_JCalls*) this_arg;
int64_t short_channel_id_conv = short_channel_id;
- int8_tArray ret = (int8_tArray)js_invoke_function_l_l(j_calls->instance_ptr, 122, short_channel_id_conv);
+ int8_tArray ret = (int8_tArray)js_invoke_function_l_l(j_calls->instance_ptr, 130, short_channel_id_conv);
LDKPublicKey ret_ref;
CHECK(ret->arr_len == 33);
memcpy(ret_ref.compressed_form, ret->elems, 33); FREE(ret);
FREE(j_calls);
}
}
-LDKCResult_boolLightningErrorZ handle_node_announcement_LDKRoutingMessageHandler_jcall(const void* this_arg, const LDKNodeAnnouncement * msg) {
+LDKCResult_boolLightningErrorZ handle_node_announcement_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKNodeAnnouncement * msg) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+ int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
LDKNodeAnnouncement msg_var = *msg;
int64_t msg_ref = 0;
msg_var = NodeAnnouncement_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 123, msg_ref);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 131, (int64_t)their_node_id_arr, msg_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
FREE(untag_ptr(ret));
return ret_conv;
}
-LDKCResult_boolLightningErrorZ handle_channel_announcement_LDKRoutingMessageHandler_jcall(const void* this_arg, const LDKChannelAnnouncement * msg) {
+LDKCResult_boolLightningErrorZ handle_channel_announcement_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelAnnouncement * msg) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+ int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
LDKChannelAnnouncement msg_var = *msg;
int64_t msg_ref = 0;
msg_var = ChannelAnnouncement_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 124, msg_ref);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 132, (int64_t)their_node_id_arr, msg_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
FREE(untag_ptr(ret));
return ret_conv;
}
-LDKCResult_boolLightningErrorZ handle_channel_update_LDKRoutingMessageHandler_jcall(const void* this_arg, const LDKChannelUpdate * msg) {
+LDKCResult_boolLightningErrorZ handle_channel_update_LDKRoutingMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelUpdate * msg) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+ int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
+ memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
LDKChannelUpdate msg_var = *msg;
int64_t msg_ref = 0;
msg_var = ChannelUpdate_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 125, msg_ref);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 133, (int64_t)their_node_id_arr, msg_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(ret_ptr);
LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcement_LDKRoutingMessageHandler_jcall(const void* this_arg, uint64_t starting_point) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
int64_t starting_point_conv = starting_point;
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 126, starting_point_conv);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 134, starting_point_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_conv = *(LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)(ret_ptr);
int64_t starting_point_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(starting_point_var);
starting_point_ref = tag_ptr(starting_point_var.inner, starting_point_var.is_owned);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 127, starting_point_ref);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 135, starting_point_ref);
LDKNodeAnnouncement ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var);
init_ref = tag_ptr(init_var.inner, init_var.is_owned);
jboolean inbound_conv = inbound;
- uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 128, (int64_t)their_node_id_arr, init_ref, inbound_conv);
+ uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 136, (int64_t)their_node_id_arr, init_ref, inbound_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
int64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 129, (int64_t)their_node_id_arr, msg_ref);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 137, (int64_t)their_node_id_arr, msg_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
int64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 130, (int64_t)their_node_id_arr, msg_ref);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 138, (int64_t)their_node_id_arr, msg_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
int64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 131, (int64_t)their_node_id_arr, msg_ref);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 139, (int64_t)their_node_id_arr, msg_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
int64_t msg_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 132, (int64_t)their_node_id_arr, msg_ref);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 140, (int64_t)their_node_id_arr, msg_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
}
bool processing_queue_high_LDKRoutingMessageHandler_jcall(const void* this_arg) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
- return js_invoke_function_b_(j_calls->instance_ptr, 133);
+ return js_invoke_function_b_(j_calls->instance_ptr, 141);
}
LDKNodeFeatures provided_node_features_LDKRoutingMessageHandler_jcall(const void* this_arg) {
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 134);
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 142);
LDKNodeFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 135, (int64_t)their_node_id_arr);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 143, (int64_t)their_node_id_arr);
LDKInitFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
*res_ptr = LDKRoutingMessageHandler_init(o, MessageSendEventsProvider);
return tag_ptr(res_ptr, true);
}
-int64_t CS_LDK_RoutingMessageHandler_handle_node_announcement(int64_t this_arg, int64_t msg) {
+int64_t CS_LDK_RoutingMessageHandler_handle_node_announcement(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); }
LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg_ptr;
+ LDKPublicKey their_node_id_ref;
+ CHECK(their_node_id->arr_len == 33);
+ memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id);
LDKNodeAnnouncement 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;
LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
- *ret_conv = (this_arg_conv->handle_node_announcement)(this_arg_conv->this_arg, &msg_conv);
+ *ret_conv = (this_arg_conv->handle_node_announcement)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_RoutingMessageHandler_handle_channel_announcement(int64_t this_arg, int64_t msg) {
+int64_t CS_LDK_RoutingMessageHandler_handle_channel_announcement(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); }
LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg_ptr;
+ LDKPublicKey their_node_id_ref;
+ CHECK(their_node_id->arr_len == 33);
+ memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id);
LDKChannelAnnouncement 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;
LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
- *ret_conv = (this_arg_conv->handle_channel_announcement)(this_arg_conv->this_arg, &msg_conv);
+ *ret_conv = (this_arg_conv->handle_channel_announcement)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_RoutingMessageHandler_handle_channel_update(int64_t this_arg, int64_t msg) {
+int64_t CS_LDK_RoutingMessageHandler_handle_channel_update(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); }
LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg_ptr;
+ LDKPublicKey their_node_id_ref;
+ CHECK(their_node_id->arr_len == 33);
+ memcpy(their_node_id_ref.compressed_form, their_node_id->elems, 33); FREE(their_node_id);
LDKChannelUpdate 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;
LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
- *ret_conv = (this_arg_conv->handle_channel_update)(this_arg_conv->this_arg, &msg_conv);
+ *ret_conv = (this_arg_conv->handle_channel_update)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
return tag_ptr(ret_conv, true);
}
msg_var = OnionMessage_clone(&msg_var);
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
- js_invoke_function_void_ll(j_calls->instance_ptr, 136, (int64_t)peer_node_id_arr, msg_ref);
+ js_invoke_function_void_ll(j_calls->instance_ptr, 144, (int64_t)peer_node_id_arr, msg_ref);
}
LDKOnionMessage next_onion_message_for_peer_LDKOnionMessageHandler_jcall(const void* this_arg, LDKPublicKey peer_node_id) {
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
int8_tArray peer_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(peer_node_id_arr->elems, peer_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 137, (int64_t)peer_node_id_arr);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 145, (int64_t)peer_node_id_arr);
LDKOnionMessage ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
CHECK_INNER_FIELD_ACCESS_OR_NULL(init_var);
init_ref = tag_ptr(init_var.inner, init_var.is_owned);
jboolean inbound_conv = inbound;
- uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 138, (int64_t)their_node_id_arr, init_ref, inbound_conv);
+ uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 146, (int64_t)their_node_id_arr, init_ref, inbound_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- js_invoke_function_void_l(j_calls->instance_ptr, 139, (int64_t)their_node_id_arr);
+ js_invoke_function_void_l(j_calls->instance_ptr, 147, (int64_t)their_node_id_arr);
}
void timer_tick_occurred_LDKOnionMessageHandler_jcall(const void* this_arg) {
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
- js_invoke_function_void_(j_calls->instance_ptr, 140);
+ js_invoke_function_void_(j_calls->instance_ptr, 148);
}
LDKNodeFeatures provided_node_features_LDKOnionMessageHandler_jcall(const void* this_arg) {
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 141);
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 149);
LDKNodeFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKOnionMessageHandler_JCalls *j_calls = (LDKOnionMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 142, (int64_t)their_node_id_arr);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 150, (int64_t)their_node_id_arr);
LDKInitFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKu8slice buffer_var = buffer;
int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__);
memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen);
- uint64_t ret = js_invoke_function_l_sl(j_calls->instance_ptr, 143, message_type_conv, (int64_t)buffer_arr);
+ uint64_t ret = js_invoke_function_l_sl(j_calls->instance_ptr, 151, message_type_conv, (int64_t)buffer_arr);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_COption_TypeZDecodeErrorZ ret_conv = *(LDKCResult_COption_TypeZDecodeErrorZ*)(ret_ptr);
*msg_ret = msg;
int8_tArray sender_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(sender_node_id_arr->elems, sender_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 144, tag_ptr(msg_ret, true), (int64_t)sender_node_id_arr);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 152, tag_ptr(msg_ret, true), (int64_t)sender_node_id_arr);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(ret_ptr);
}
LDKCVec_C2Tuple_PublicKeyTypeZZ get_and_clear_pending_msg_LDKCustomMessageHandler_jcall(const void* this_arg) {
LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg;
- int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 145);
+ int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 153);
LDKCVec_C2Tuple_PublicKeyTypeZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- js_invoke_function_void_l(j_calls->instance_ptr, 146, (int64_t)their_node_id_arr);
+ js_invoke_function_void_l(j_calls->instance_ptr, 154, (int64_t)their_node_id_arr);
}
LDKCResult_NoneNoneZ peer_connected_LDKCustomMessageHandler_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg, bool inbound) {
LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg;
CHECK_INNER_FIELD_ACCESS_OR_NULL(msg_var);
msg_ref = tag_ptr(msg_var.inner, msg_var.is_owned);
jboolean inbound_conv = inbound;
- uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 147, (int64_t)their_node_id_arr, msg_ref, inbound_conv);
+ uint64_t ret = js_invoke_function_l_llb(j_calls->instance_ptr, 155, (int64_t)their_node_id_arr, msg_ref, inbound_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_NoneNoneZ ret_conv = *(LDKCResult_NoneNoneZ*)(ret_ptr);
}
LDKNodeFeatures provided_node_features_LDKCustomMessageHandler_jcall(const void* this_arg) {
LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 148);
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 156);
LDKNodeFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
LDKCustomMessageHandler_JCalls *j_calls = (LDKCustomMessageHandler_JCalls*) this_arg;
int8_tArray their_node_id_arr = init_int8_tArray(33, __LINE__);
memcpy(their_node_id_arr->elems, their_node_id.compressed_form, 33);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 149, (int64_t)their_node_id_arr);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 157, (int64_t)their_node_id_arr);
LDKInitFeatures ret_conv;
ret_conv.inner = untag_ptr(ret);
ret_conv.is_owned = ptr_is_owned(ret);
int64_t responder_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(responder_var);
responder_ref = tag_ptr(responder_var.inner, responder_var.is_owned);
- uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 150, tag_ptr(message_ret, true), context_ref, responder_ref);
+ uint64_t ret = js_invoke_function_l_lll(j_calls->instance_ptr, 158, tag_ptr(message_ret, true), context_ref, responder_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCOption_C2Tuple_OnionMessageContentsResponseInstructionZZ ret_conv = *(LDKCOption_C2Tuple_OnionMessageContentsResponseInstructionZZ*)(ret_ptr);
LDKu8slice buffer_var = buffer;
int8_tArray buffer_arr = init_int8_tArray(buffer_var.datalen, __LINE__);
memcpy(buffer_arr->elems, buffer_var.data, buffer_var.datalen);
- uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 151, message_type_conv, (int64_t)buffer_arr);
+ uint64_t ret = js_invoke_function_l_ll(j_calls->instance_ptr, 159, message_type_conv, (int64_t)buffer_arr);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_COption_OnionMessageContentsZDecodeErrorZ ret_conv = *(LDKCResult_COption_OnionMessageContentsZDecodeErrorZ*)(ret_ptr);
}
LDKCVec_C2Tuple_OnionMessageContentsMessageSendInstructionsZZ release_pending_custom_messages_LDKCustomOnionMessageHandler_jcall(const void* this_arg) {
LDKCustomOnionMessageHandler_JCalls *j_calls = (LDKCustomOnionMessageHandler_JCalls*) this_arg;
- int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 152);
+ int64_tArray ret = (int64_tArray)js_invoke_function_l_(j_calls->instance_ptr, 160);
LDKCVec_C2Tuple_OnionMessageContentsMessageSendInstructionsZZ ret_constr;
ret_constr.datalen = ret->arr_len;
if (ret_constr.datalen > 0)
int8_tArray data_arr = init_int8_tArray(data_var.datalen, __LINE__);
memcpy(data_arr->elems, data_var.data, data_var.datalen);
jboolean resume_read_conv = resume_read;
- return js_invoke_function_l_lb(j_calls->instance_ptr, 153, (int64_t)data_arr, resume_read_conv);
+ return js_invoke_function_l_lb(j_calls->instance_ptr, 161, (int64_t)data_arr, resume_read_conv);
}
void disconnect_socket_LDKSocketDescriptor_jcall(void* this_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
- js_invoke_function_void_(j_calls->instance_ptr, 154);
+ js_invoke_function_void_(j_calls->instance_ptr, 162);
}
bool eq_LDKSocketDescriptor_jcall(const void* this_arg, const LDKSocketDescriptor * other_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
LDKSocketDescriptor *other_arg_clone = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
*other_arg_clone = SocketDescriptor_clone(other_arg);
- return js_invoke_function_b_l(j_calls->instance_ptr, 155, tag_ptr(other_arg_clone, true));
+ return js_invoke_function_b_l(j_calls->instance_ptr, 163, tag_ptr(other_arg_clone, true));
}
uint64_t hash_LDKSocketDescriptor_jcall(const void* this_arg) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
- return js_invoke_function_l_(j_calls->instance_ptr, 156);
+ return js_invoke_function_l_(j_calls->instance_ptr, 164);
}
static void LDKSocketDescriptor_JCalls_cloned(LDKSocketDescriptor* new_obj) {
LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) new_obj->this_arg;
return ret_conv;
}
-uint32_t CS_LDK_LDKBolt12PaymentError_ty_from_ptr(int64_t ptr) {
- LDKBolt12PaymentError *obj = (LDKBolt12PaymentError*)untag_ptr(ptr);
- switch(obj->tag) {
- case LDKBolt12PaymentError_UnexpectedInvoice: return 0;
- case LDKBolt12PaymentError_DuplicateInvoice: return 1;
- case LDKBolt12PaymentError_UnknownRequiredFeatures: return 2;
- case LDKBolt12PaymentError_SendingFailed: return 3;
- default: abort();
- }
-}
-int32_t CS_LDK_LDKBolt12PaymentError_SendingFailed_get_sending_failed(int64_t ptr) {
- LDKBolt12PaymentError *obj = (LDKBolt12PaymentError*)untag_ptr(ptr);
- CHECK(obj->tag == LDKBolt12PaymentError_SendingFailed);
- int32_t sending_failed_conv = LDKRetryableSendFailure_to_cs(obj->sending_failed);
- return sending_failed_conv;
-}
typedef struct LDKSignBolt12InvoiceFn_JCalls {
atomic_size_t refcnt;
uint32_t instance_ptr;
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);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 157, message_ref);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 165, message_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr);
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);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 158, message_ref);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 166, message_ref);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_SchnorrSignatureNoneZ ret_conv = *(LDKCResult_SchnorrSignatureNoneZ*)(ret_ptr);
}
LDKCVec_u8Z write_LDKScore_jcall(const void* this_arg) {
LDKScore_JCalls *j_calls = (LDKScore_JCalls*) this_arg;
- int8_tArray ret = (int8_tArray)js_invoke_function_l_(j_calls->instance_ptr, 159);
+ int8_tArray ret = (int8_tArray)js_invoke_function_l_(j_calls->instance_ptr, 167);
LDKCVec_u8Z ret_ref;
ret_ref.datalen = ret->arr_len;
ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
FREE(must_pay_to_var.data);
int32_t target_feerate_sat_per_1000_weight_conv = target_feerate_sat_per_1000_weight;
- uint64_t ret = js_invoke_function_l_llli(j_calls->instance_ptr, 160, (int64_t)claim_id_arr, (int64_t)must_spend_arr, (int64_t)must_pay_to_arr, target_feerate_sat_per_1000_weight_conv);
+ uint64_t ret = js_invoke_function_l_llli(j_calls->instance_ptr, 168, (int64_t)claim_id_arr, (int64_t)must_spend_arr, (int64_t)must_pay_to_arr, target_feerate_sat_per_1000_weight_conv);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_CoinSelectionNoneZ ret_conv = *(LDKCResult_CoinSelectionNoneZ*)(ret_ptr);
int8_tArray psbt_arr = init_int8_tArray(psbt_var.datalen, __LINE__);
memcpy(psbt_arr->elems, psbt_var.data, psbt_var.datalen);
CVec_u8Z_free(psbt_var);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 161, (int64_t)psbt_arr);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 169, (int64_t)psbt_arr);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr);
}
LDKCResult_CVec_UtxoZNoneZ list_confirmed_utxos_LDKWalletSource_jcall(const void* this_arg) {
LDKWalletSource_JCalls *j_calls = (LDKWalletSource_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 162);
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 170);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_CVec_UtxoZNoneZ ret_conv = *(LDKCResult_CVec_UtxoZNoneZ*)(ret_ptr);
}
LDKCResult_CVec_u8ZNoneZ get_change_script_LDKWalletSource_jcall(const void* this_arg) {
LDKWalletSource_JCalls *j_calls = (LDKWalletSource_JCalls*) this_arg;
- uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 163);
+ uint64_t ret = js_invoke_function_l_(j_calls->instance_ptr, 171);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_CVec_u8ZNoneZ ret_conv = *(LDKCResult_CVec_u8ZNoneZ*)(ret_ptr);
int8_tArray psbt_arr = init_int8_tArray(psbt_var.datalen, __LINE__);
memcpy(psbt_arr->elems, psbt_var.data, psbt_var.datalen);
CVec_u8Z_free(psbt_var);
- uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 164, (int64_t)psbt_arr);
+ uint64_t ret = js_invoke_function_l_l(j_calls->instance_ptr, 172, (int64_t)psbt_arr);
void* ret_ptr = untag_ptr(ret);
CHECK_ACCESS(ret_ptr);
LDKCResult_TransactionNoneZ ret_conv = *(LDKCResult_TransactionNoneZ*)(ret_ptr);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_NoneAPIErrorZ_ok() {
- LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = CResult_NoneAPIErrorZ_ok();
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_NoneAPIErrorZ_err(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_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = CResult_NoneAPIErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_NoneAPIErrorZ_is_ok(int64_t o) {
- LDKCResult_NoneAPIErrorZ* o_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_NoneAPIErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_NoneAPIErrorZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_NoneAPIErrorZ _res_conv = *(LDKCResult_NoneAPIErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_NoneAPIErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_NoneAPIErrorZ_clone_ptr(LDKCResult_NoneAPIErrorZ *NONNULL_PTR arg) {
- LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = CResult_NoneAPIErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_NoneAPIErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_NoneAPIErrorZ* arg_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_NoneAPIErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_NoneAPIErrorZ_clone(int64_t orig) {
- LDKCResult_NoneAPIErrorZ* orig_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(orig);
- LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
- *ret_conv = CResult_NoneAPIErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-void CS_LDK_CVec_CResult_NoneAPIErrorZZ_free(int64_tArray _res) {
- LDKCVec_CResult_NoneAPIErrorZZ _res_constr;
- _res_constr.datalen = _res->arr_len;
- if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKCResult_NoneAPIErrorZ), "LDKCVec_CResult_NoneAPIErrorZZ Elements");
- else
- _res_constr.data = NULL;
- int64_t* _res_vals = _res->elems;
- for (size_t w = 0; w < _res_constr.datalen; w++) {
- int64_t _res_conv_22 = _res_vals[w];
- void* _res_conv_22_ptr = untag_ptr(_res_conv_22);
- CHECK_ACCESS(_res_conv_22_ptr);
- LDKCResult_NoneAPIErrorZ _res_conv_22_conv = *(LDKCResult_NoneAPIErrorZ*)(_res_conv_22_ptr);
- FREE(untag_ptr(_res_conv_22));
- _res_constr.data[w] = _res_conv_22_conv;
- }
- FREE(_res);
- CVec_CResult_NoneAPIErrorZZ_free(_res_constr);
-}
-
-void CS_LDK_CVec_APIErrorZ_free(int64_tArray _res) {
- LDKCVec_APIErrorZ _res_constr;
- _res_constr.datalen = _res->arr_len;
- if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKAPIError), "LDKCVec_APIErrorZ Elements");
- else
- _res_constr.data = NULL;
- int64_t* _res_vals = _res->elems;
- for (size_t k = 0; k < _res_constr.datalen; k++) {
- int64_t _res_conv_10 = _res_vals[k];
- void* _res_conv_10_ptr = untag_ptr(_res_conv_10);
- CHECK_ACCESS(_res_conv_10_ptr);
- LDKAPIError _res_conv_10_conv = *(LDKAPIError*)(_res_conv_10_ptr);
- FREE(untag_ptr(_res_conv_10));
- _res_constr.data[k] = _res_conv_10_conv;
- }
- FREE(_res);
- CVec_APIErrorZ_free(_res_constr);
-}
-
int64_t CS_LDK_COption_ThirtyTwoBytesZ_some(int8_tArray o) {
LDKThirtyTwoBytes o_ref;
CHECK(o->arr_len == 32);
return tag_ptr(ret_conv, true);
}
+static inline uint64_t C2Tuple_DNSResolverMessageResponseInstructionZ_clone_ptr(LDKC2Tuple_DNSResolverMessageResponseInstructionZ *NONNULL_PTR arg) {
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSResolverMessageResponseInstructionZ), "LDKC2Tuple_DNSResolverMessageResponseInstructionZ");
+ *ret_conv = C2Tuple_DNSResolverMessageResponseInstructionZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_C2Tuple_DNSResolverMessageResponseInstructionZ_clone_ptr(int64_t arg) {
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ* arg_conv = (LDKC2Tuple_DNSResolverMessageResponseInstructionZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_DNSResolverMessageResponseInstructionZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_C2Tuple_DNSResolverMessageResponseInstructionZ_clone(int64_t orig) {
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ* orig_conv = (LDKC2Tuple_DNSResolverMessageResponseInstructionZ*)untag_ptr(orig);
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSResolverMessageResponseInstructionZ), "LDKC2Tuple_DNSResolverMessageResponseInstructionZ");
+ *ret_conv = C2Tuple_DNSResolverMessageResponseInstructionZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_C2Tuple_DNSResolverMessageResponseInstructionZ_new(int64_t a, int64_t b) {
+ void* a_ptr = untag_ptr(a);
+ CHECK_ACCESS(a_ptr);
+ LDKDNSResolverMessage a_conv = *(LDKDNSResolverMessage*)(a_ptr);
+ a_conv = DNSResolverMessage_clone((LDKDNSResolverMessage*)untag_ptr(a));
+ LDKResponseInstruction 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 = ResponseInstruction_clone(&b_conv);
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSResolverMessageResponseInstructionZ), "LDKC2Tuple_DNSResolverMessageResponseInstructionZ");
+ *ret_conv = C2Tuple_DNSResolverMessageResponseInstructionZ_new(a_conv, b_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_C2Tuple_DNSResolverMessageResponseInstructionZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ _res_conv = *(LDKC2Tuple_DNSResolverMessageResponseInstructionZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_DNSResolverMessageResponseInstructionZ_free(_res_conv);
+}
+
+int64_t CS_LDK_COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_some(int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKC2Tuple_DNSResolverMessageResponseInstructionZ o_conv = *(LDKC2Tuple_DNSResolverMessageResponseInstructionZ*)(o_ptr);
+ o_conv = C2Tuple_DNSResolverMessageResponseInstructionZ_clone((LDKC2Tuple_DNSResolverMessageResponseInstructionZ*)untag_ptr(o));
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ), "LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ");
+ *ret_copy = COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_some(o_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_none() {
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ), "LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ");
+ *ret_copy = COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ _res_conv = *(LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_free(_res_conv);
+}
+
+static inline uint64_t COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone_ptr(LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ *NONNULL_PTR arg) {
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ), "LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ");
+ *ret_copy = COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t CS_LDK_COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone_ptr(int64_t arg) {
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ* arg_conv = (LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone(int64_t orig) {
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ* orig_conv = (LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ*)untag_ptr(orig);
+ LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ), "LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ");
+ *ret_copy = COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline uint64_t C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone_ptr(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ *NONNULL_PTR arg) {
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ), "LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ");
+ *ret_conv = C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone_ptr(int64_t arg) {
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ* arg_conv = (LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone(int64_t orig) {
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ* orig_conv = (LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ*)untag_ptr(orig);
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ), "LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ");
+ *ret_conv = C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_C2Tuple_DNSResolverMessageMessageSendInstructionsZ_new(int64_t a, int64_t b) {
+ void* a_ptr = untag_ptr(a);
+ CHECK_ACCESS(a_ptr);
+ LDKDNSResolverMessage a_conv = *(LDKDNSResolverMessage*)(a_ptr);
+ a_conv = DNSResolverMessage_clone((LDKDNSResolverMessage*)untag_ptr(a));
+ void* b_ptr = untag_ptr(b);
+ CHECK_ACCESS(b_ptr);
+ LDKMessageSendInstructions b_conv = *(LDKMessageSendInstructions*)(b_ptr);
+ b_conv = MessageSendInstructions_clone((LDKMessageSendInstructions*)untag_ptr(b));
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ), "LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ");
+ *ret_conv = C2Tuple_DNSResolverMessageMessageSendInstructionsZ_new(a_conv, b_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_C2Tuple_DNSResolverMessageMessageSendInstructionsZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ _res_conv = *(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_DNSResolverMessageMessageSendInstructionsZ_free(_res_conv);
+}
+
+void CS_LDK_CVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ_free(int64_tArray _res) {
+ LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ), "LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ Elements");
+ else
+ _res_constr.data = NULL;
+ int64_t* _res_vals = _res->elems;
+ for (size_t b = 0; b < _res_constr.datalen; b++) {
+ int64_t _res_conv_53 = _res_vals[b];
+ void* _res_conv_53_ptr = untag_ptr(_res_conv_53);
+ CHECK_ACCESS(_res_conv_53_ptr);
+ LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ _res_conv_53_conv = *(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ*)(_res_conv_53_ptr);
+ FREE(untag_ptr(_res_conv_53));
+ _res_constr.data[b] = _res_conv_53_conv;
+ }
+ FREE(_res);
+ CVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ_free(_res_constr);
+}
+
+int64_t CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_ok(int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKDNSResolverMessage o_conv = *(LDKDNSResolverMessage*)(o_ptr);
+ o_conv = DNSResolverMessage_clone((LDKDNSResolverMessage*)untag_ptr(o));
+ LDKCResult_DNSResolverMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverMessageDecodeErrorZ), "LDKCResult_DNSResolverMessageDecodeErrorZ");
+ *ret_conv = CResult_DNSResolverMessageDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_err(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_DNSResolverMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverMessageDecodeErrorZ), "LDKCResult_DNSResolverMessageDecodeErrorZ");
+ *ret_conv = CResult_DNSResolverMessageDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_DNSResolverMessageDecodeErrorZ* o_conv = (LDKCResult_DNSResolverMessageDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_DNSResolverMessageDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_DNSResolverMessageDecodeErrorZ _res_conv = *(LDKCResult_DNSResolverMessageDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_DNSResolverMessageDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_DNSResolverMessageDecodeErrorZ_clone_ptr(LDKCResult_DNSResolverMessageDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_DNSResolverMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverMessageDecodeErrorZ), "LDKCResult_DNSResolverMessageDecodeErrorZ");
+ *ret_conv = CResult_DNSResolverMessageDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_DNSResolverMessageDecodeErrorZ* arg_conv = (LDKCResult_DNSResolverMessageDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_DNSResolverMessageDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_DNSResolverMessageDecodeErrorZ* orig_conv = (LDKCResult_DNSResolverMessageDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_DNSResolverMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverMessageDecodeErrorZ), "LDKCResult_DNSResolverMessageDecodeErrorZ");
+ *ret_conv = CResult_DNSResolverMessageDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_HumanReadableNameNoneZ_ok(int64_t o) {
+ LDKHumanReadableName 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 = HumanReadableName_clone(&o_conv);
+ LDKCResult_HumanReadableNameNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameNoneZ), "LDKCResult_HumanReadableNameNoneZ");
+ *ret_conv = CResult_HumanReadableNameNoneZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_HumanReadableNameNoneZ_err() {
+ LDKCResult_HumanReadableNameNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameNoneZ), "LDKCResult_HumanReadableNameNoneZ");
+ *ret_conv = CResult_HumanReadableNameNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_HumanReadableNameNoneZ_is_ok(int64_t o) {
+ LDKCResult_HumanReadableNameNoneZ* o_conv = (LDKCResult_HumanReadableNameNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_HumanReadableNameNoneZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_HumanReadableNameNoneZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_HumanReadableNameNoneZ _res_conv = *(LDKCResult_HumanReadableNameNoneZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_HumanReadableNameNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_HumanReadableNameNoneZ_clone_ptr(LDKCResult_HumanReadableNameNoneZ *NONNULL_PTR arg) {
+ LDKCResult_HumanReadableNameNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameNoneZ), "LDKCResult_HumanReadableNameNoneZ");
+ *ret_conv = CResult_HumanReadableNameNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_HumanReadableNameNoneZ_clone_ptr(int64_t arg) {
+ LDKCResult_HumanReadableNameNoneZ* arg_conv = (LDKCResult_HumanReadableNameNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_HumanReadableNameNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_HumanReadableNameNoneZ_clone(int64_t orig) {
+ LDKCResult_HumanReadableNameNoneZ* orig_conv = (LDKCResult_HumanReadableNameNoneZ*)untag_ptr(orig);
+ LDKCResult_HumanReadableNameNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameNoneZ), "LDKCResult_HumanReadableNameNoneZ");
+ *ret_conv = CResult_HumanReadableNameNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_HumanReadableNameDecodeErrorZ_ok(int64_t o) {
+ LDKHumanReadableName 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 = HumanReadableName_clone(&o_conv);
+ LDKCResult_HumanReadableNameDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameDecodeErrorZ), "LDKCResult_HumanReadableNameDecodeErrorZ");
+ *ret_conv = CResult_HumanReadableNameDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_HumanReadableNameDecodeErrorZ_err(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_HumanReadableNameDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameDecodeErrorZ), "LDKCResult_HumanReadableNameDecodeErrorZ");
+ *ret_conv = CResult_HumanReadableNameDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_HumanReadableNameDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_HumanReadableNameDecodeErrorZ* o_conv = (LDKCResult_HumanReadableNameDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_HumanReadableNameDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_HumanReadableNameDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_HumanReadableNameDecodeErrorZ _res_conv = *(LDKCResult_HumanReadableNameDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_HumanReadableNameDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_HumanReadableNameDecodeErrorZ_clone_ptr(LDKCResult_HumanReadableNameDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_HumanReadableNameDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameDecodeErrorZ), "LDKCResult_HumanReadableNameDecodeErrorZ");
+ *ret_conv = CResult_HumanReadableNameDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_HumanReadableNameDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_HumanReadableNameDecodeErrorZ* arg_conv = (LDKCResult_HumanReadableNameDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_HumanReadableNameDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_HumanReadableNameDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_HumanReadableNameDecodeErrorZ* orig_conv = (LDKCResult_HumanReadableNameDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_HumanReadableNameDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameDecodeErrorZ), "LDKCResult_HumanReadableNameDecodeErrorZ");
+ *ret_conv = CResult_HumanReadableNameDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+static inline uint64_t C2Tuple_DNSSECQueryDNSResolverContextZ_clone_ptr(LDKC2Tuple_DNSSECQueryDNSResolverContextZ *NONNULL_PTR arg) {
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSSECQueryDNSResolverContextZ), "LDKC2Tuple_DNSSECQueryDNSResolverContextZ");
+ *ret_conv = C2Tuple_DNSSECQueryDNSResolverContextZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_C2Tuple_DNSSECQueryDNSResolverContextZ_clone_ptr(int64_t arg) {
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ* arg_conv = (LDKC2Tuple_DNSSECQueryDNSResolverContextZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_DNSSECQueryDNSResolverContextZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_C2Tuple_DNSSECQueryDNSResolverContextZ_clone(int64_t orig) {
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ* orig_conv = (LDKC2Tuple_DNSSECQueryDNSResolverContextZ*)untag_ptr(orig);
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSSECQueryDNSResolverContextZ), "LDKC2Tuple_DNSSECQueryDNSResolverContextZ");
+ *ret_conv = C2Tuple_DNSSECQueryDNSResolverContextZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_C2Tuple_DNSSECQueryDNSResolverContextZ_new(int64_t a, int64_t b) {
+ LDKDNSSECQuery 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 = DNSSECQuery_clone(&a_conv);
+ LDKDNSResolverContext 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 = DNSResolverContext_clone(&b_conv);
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_DNSSECQueryDNSResolverContextZ), "LDKC2Tuple_DNSSECQueryDNSResolverContextZ");
+ *ret_conv = C2Tuple_DNSSECQueryDNSResolverContextZ_new(a_conv, b_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_C2Tuple_DNSSECQueryDNSResolverContextZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ _res_conv = *(LDKC2Tuple_DNSSECQueryDNSResolverContextZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_DNSSECQueryDNSResolverContextZ_free(_res_conv);
+}
+
+int64_t CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_ok(int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKC2Tuple_DNSSECQueryDNSResolverContextZ o_conv = *(LDKC2Tuple_DNSSECQueryDNSResolverContextZ*)(o_ptr);
+ o_conv = C2Tuple_DNSSECQueryDNSResolverContextZ_clone((LDKC2Tuple_DNSSECQueryDNSResolverContextZ*)untag_ptr(o));
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ), "LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ");
+ *ret_conv = CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_err() {
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ), "LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ");
+ *ret_conv = CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_is_ok(int64_t o) {
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* o_conv = (LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ _res_conv = *(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone_ptr(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ *NONNULL_PTR arg) {
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ), "LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ");
+ *ret_conv = CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone_ptr(int64_t arg) {
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* arg_conv = (LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone(int64_t orig) {
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* orig_conv = (LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ*)untag_ptr(orig);
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ), "LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ");
+ *ret_conv = CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+static inline uint64_t C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone_ptr(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ *NONNULL_PTR arg) {
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ), "LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ");
+ *ret_conv = C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone_ptr(int64_t arg) {
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ* arg_conv = (LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone(int64_t orig) {
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ* orig_conv = (LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)untag_ptr(orig);
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ), "LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ");
+ *ret_conv = C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_C2Tuple_HumanReadableNameThirtyTwoBytesZ_new(int64_t a, int8_tArray b) {
+ LDKHumanReadableName 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 = HumanReadableName_clone(&a_conv);
+ LDKThirtyTwoBytes b_ref;
+ CHECK(b->arr_len == 32);
+ memcpy(b_ref.data, b->elems, 32); FREE(b);
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ), "LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ");
+ *ret_conv = C2Tuple_HumanReadableNameThirtyTwoBytesZ_new(a_conv, b_ref);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_C2Tuple_HumanReadableNameThirtyTwoBytesZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ _res_conv = *(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_HumanReadableNameThirtyTwoBytesZ_free(_res_conv);
+}
+
+void CS_LDK_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ_free(int64_tArray _res) {
+ LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ), "LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ Elements");
+ else
+ _res_constr.data = NULL;
+ int64_t* _res_vals = _res->elems;
+ 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_HumanReadableNameThirtyTwoBytesZ _res_conv_43_conv = *(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)(_res_conv_43_ptr);
+ FREE(untag_ptr(_res_conv_43));
+ _res_constr.data[r] = _res_conv_43_conv;
+ }
+ FREE(_res);
+ CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ_free(_res_constr);
+}
+
+static inline uint64_t C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone_ptr(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ *NONNULL_PTR arg) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ), "LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ");
+ *ret_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone_ptr(int64_t arg) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ* arg_conv = (LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone(int64_t orig) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ* orig_conv = (LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ*)untag_ptr(orig);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ), "LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ");
+ *ret_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_new(int64_tArray a, int64_t b) {
+ LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ a_constr;
+ a_constr.datalen = a->arr_len;
+ if (a_constr.datalen > 0)
+ a_constr.data = MALLOC(a_constr.datalen * sizeof(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ), "LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ Elements");
+ else
+ a_constr.data = NULL;
+ int64_t* a_vals = a->elems;
+ for (size_t r = 0; r < a_constr.datalen; r++) {
+ int64_t a_conv_43 = a_vals[r];
+ void* a_conv_43_ptr = untag_ptr(a_conv_43);
+ CHECK_ACCESS(a_conv_43_ptr);
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ a_conv_43_conv = *(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)(a_conv_43_ptr);
+ a_conv_43_conv = C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone((LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)untag_ptr(a_conv_43));
+ a_constr.data[r] = a_conv_43_conv;
+ }
+ FREE(a);
+ LDKOffer 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 = Offer_clone(&b_conv);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ), "LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ");
+ *ret_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_new(a_constr, b_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ _res_conv = *(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_free(_res_conv);
+}
+
+int64_t CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_some(int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ o_conv = *(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ*)(o_ptr);
+ o_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone((LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ*)untag_ptr(o));
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ");
+ *ret_copy = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_some(o_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_none() {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ");
+ *ret_copy = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ _res_conv = *(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_free(_res_conv);
+}
+
+static inline uint64_t COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone_ptr(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ *NONNULL_PTR arg) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ");
+ *ret_copy = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone_ptr(int64_t arg) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ* arg_conv = (LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone(int64_t orig) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ* orig_conv = (LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ*)untag_ptr(orig);
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ");
+ *ret_copy = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+static inline uint64_t C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone_ptr(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ *NONNULL_PTR arg) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ), "LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ");
+ *ret_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone_ptr(int64_t arg) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ* arg_conv = (LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone(int64_t orig) {
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ* orig_conv = (LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ*)untag_ptr(orig);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ), "LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ");
+ *ret_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_new(int64_tArray a, jstring b) {
+ LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ a_constr;
+ a_constr.datalen = a->arr_len;
+ if (a_constr.datalen > 0)
+ a_constr.data = MALLOC(a_constr.datalen * sizeof(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ), "LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ Elements");
+ else
+ a_constr.data = NULL;
+ int64_t* a_vals = a->elems;
+ for (size_t r = 0; r < a_constr.datalen; r++) {
+ int64_t a_conv_43 = a_vals[r];
+ void* a_conv_43_ptr = untag_ptr(a_conv_43);
+ CHECK_ACCESS(a_conv_43_ptr);
+ LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ a_conv_43_conv = *(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)(a_conv_43_ptr);
+ a_conv_43_conv = C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone((LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ*)untag_ptr(a_conv_43));
+ a_constr.data[r] = a_conv_43_conv;
+ }
+ FREE(a);
+ LDKStr b_conv = str_ref_to_owned_c(b);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ), "LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ");
+ *ret_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_new(a_constr, b_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ _res_conv = *(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_free(_res_conv);
+}
+
+int64_t CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_some(int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ o_conv = *(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ*)(o_ptr);
+ o_conv = C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone((LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ*)untag_ptr(o));
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ");
+ *ret_copy = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_some(o_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_none() {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ");
+ *ret_copy = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ _res_conv = *(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_free(_res_conv);
+}
+
+static inline uint64_t COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone_ptr(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ *NONNULL_PTR arg) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ");
+ *ret_copy = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone_ptr(int64_t arg) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ* arg_conv = (LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone(int64_t orig) {
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ* orig_conv = (LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ*)untag_ptr(orig);
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ");
+ *ret_copy = COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
int64_t CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(int64_t o) {
LDKUnsignedBolt12Invoice o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
+void CS_LDK_CVec_BlindedPaymentPathZ_free(int64_tArray _res) {
+ LDKCVec_BlindedPaymentPathZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKBlindedPaymentPath), "LDKCVec_BlindedPaymentPathZ Elements");
+ else
+ _res_constr.data = NULL;
+ int64_t* _res_vals = _res->elems;
+ for (size_t u = 0; u < _res_constr.datalen; u++) {
+ int64_t _res_conv_20 = _res_vals[u];
+ LDKBlindedPaymentPath _res_conv_20_conv;
+ _res_conv_20_conv.inner = untag_ptr(_res_conv_20);
+ _res_conv_20_conv.is_owned = ptr_is_owned(_res_conv_20);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_20_conv);
+ _res_constr.data[u] = _res_conv_20_conv;
+ }
+ FREE(_res);
+ CVec_BlindedPaymentPathZ_free(_res_constr);
+}
+
void CS_LDK_CVec_StrZ_free(ptrArray _res) {
LDKCVec_StrZ _res_constr;
_res_constr.datalen = _res->arr_len;
return tag_ptr(ret_conv, true);
}
-void CS_LDK_CVec_BlindedPaymentPathZ_free(int64_tArray _res) {
- LDKCVec_BlindedPaymentPathZ _res_constr;
- _res_constr.datalen = _res->arr_len;
- if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKBlindedPaymentPath), "LDKCVec_BlindedPaymentPathZ Elements");
- else
- _res_constr.data = NULL;
- int64_t* _res_vals = _res->elems;
- for (size_t u = 0; u < _res_constr.datalen; u++) {
- int64_t _res_conv_20 = _res_vals[u];
- LDKBlindedPaymentPath _res_conv_20_conv;
- _res_conv_20_conv.inner = untag_ptr(_res_conv_20);
- _res_conv_20_conv.is_owned = ptr_is_owned(_res_conv_20);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_20_conv);
- _res_constr.data[u] = _res_conv_20_conv;
- }
- FREE(_res);
- CVec_BlindedPaymentPathZ_free(_res_constr);
-}
-
int64_t CS_LDK_CResult_CVec_BlindedPaymentPathZNoneZ_ok(int64_tArray o) {
LDKCVec_BlindedPaymentPathZ o_constr;
o_constr.datalen = o->arr_len;
return tag_ptr(ret_conv, true);
}
-void CS_LDK_CVec_PublicKeyZ_free(ptrArray _res) {
- LDKCVec_PublicKeyZ _res_constr;
- _res_constr.datalen = _res->arr_len;
- if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
- else
- _res_constr.data = NULL;
- int8_tArray* _res_vals = (void*) _res->elems;
- for (size_t i = 0; i < _res_constr.datalen; i++) {
- int8_tArray _res_conv_8 = _res_vals[i];
- LDKPublicKey _res_conv_8_ref;
- CHECK(_res_conv_8->arr_len == 33);
- memcpy(_res_conv_8_ref.compressed_form, _res_conv_8->elems, 33); FREE(_res_conv_8);
- _res_constr.data[i] = _res_conv_8_ref;
- }
- FREE(_res);
- CVec_PublicKeyZ_free(_res_constr);
-}
-
-int64_t CS_LDK_CResult_OnionMessagePathNoneZ_ok(int64_t o) {
- LDKOnionMessagePath 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 = OnionMessagePath_clone(&o_conv);
- LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
- *ret_conv = CResult_OnionMessagePathNoneZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_OnionMessagePathNoneZ_err() {
- LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
- *ret_conv = CResult_OnionMessagePathNoneZ_err();
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_OnionMessagePathNoneZ_is_ok(int64_t o) {
- LDKCResult_OnionMessagePathNoneZ* o_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(o);
- jboolean ret_conv = CResult_OnionMessagePathNoneZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_OnionMessagePathNoneZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_OnionMessagePathNoneZ _res_conv = *(LDKCResult_OnionMessagePathNoneZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_OnionMessagePathNoneZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_OnionMessagePathNoneZ_clone_ptr(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR arg) {
- LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
- *ret_conv = CResult_OnionMessagePathNoneZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_OnionMessagePathNoneZ_clone_ptr(int64_t arg) {
- LDKCResult_OnionMessagePathNoneZ* arg_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_OnionMessagePathNoneZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_OnionMessagePathNoneZ_clone(int64_t orig) {
- LDKCResult_OnionMessagePathNoneZ* orig_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(orig);
- LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
- *ret_conv = CResult_OnionMessagePathNoneZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_ok(int64_tArray o) {
- LDKCVec_BlindedMessagePathZ o_constr;
- o_constr.datalen = o->arr_len;
- if (o_constr.datalen > 0)
- o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKBlindedMessagePath), "LDKCVec_BlindedMessagePathZ Elements");
- else
- o_constr.data = NULL;
- int64_t* o_vals = o->elems;
- for (size_t u = 0; u < o_constr.datalen; u++) {
- int64_t o_conv_20 = o_vals[u];
- LDKBlindedMessagePath o_conv_20_conv;
- o_conv_20_conv.inner = untag_ptr(o_conv_20);
- o_conv_20_conv.is_owned = ptr_is_owned(o_conv_20);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv_20_conv);
- o_conv_20_conv = BlindedMessagePath_clone(&o_conv_20_conv);
- o_constr.data[u] = o_conv_20_conv;
- }
- FREE(o);
- LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
- *ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_ok(o_constr);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_err() {
- LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
- *ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_err();
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_is_ok(int64_t o) {
- LDKCResult_CVec_BlindedMessagePathZNoneZ* o_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(o);
- jboolean ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_CVec_BlindedMessagePathZNoneZ _res_conv = *(LDKCResult_CVec_BlindedMessagePathZNoneZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_CVec_BlindedMessagePathZNoneZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_CVec_BlindedMessagePathZNoneZ_clone_ptr(LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR arg) {
- LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
- *ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_clone_ptr(int64_t arg) {
- LDKCResult_CVec_BlindedMessagePathZNoneZ* arg_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_clone(int64_t orig) {
- LDKCResult_CVec_BlindedMessagePathZNoneZ* orig_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(orig);
- LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
- *ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-void CS_LDK_CVec_MessageForwardNodeZ_free(int64_tArray _res) {
- LDKCVec_MessageForwardNodeZ _res_constr;
- _res_constr.datalen = _res->arr_len;
- if (_res_constr.datalen > 0)
- _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKMessageForwardNode), "LDKCVec_MessageForwardNodeZ Elements");
- else
- _res_constr.data = NULL;
- int64_t* _res_vals = _res->elems;
- for (size_t u = 0; u < _res_constr.datalen; u++) {
- int64_t _res_conv_20 = _res_vals[u];
- LDKMessageForwardNode _res_conv_20_conv;
- _res_conv_20_conv.inner = untag_ptr(_res_conv_20);
- _res_conv_20_conv.is_owned = ptr_is_owned(_res_conv_20);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_20_conv);
- _res_constr.data[u] = _res_conv_20_conv;
- }
- FREE(_res);
- CVec_MessageForwardNodeZ_free(_res_constr);
-}
-
int64_t CS_LDK_CResult_InFlightHtlcsDecodeErrorZ_ok(int64_t o) {
LDKInFlightHtlcs o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
+void CS_LDK_CVec_PublicKeyZ_free(ptrArray _res) {
+ LDKCVec_PublicKeyZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
+ else
+ _res_constr.data = NULL;
+ int8_tArray* _res_vals = (void*) _res->elems;
+ for (size_t i = 0; i < _res_constr.datalen; i++) {
+ int8_tArray _res_conv_8 = _res_vals[i];
+ LDKPublicKey _res_conv_8_ref;
+ CHECK(_res_conv_8->arr_len == 33);
+ memcpy(_res_conv_8_ref.compressed_form, _res_conv_8->elems, 33); FREE(_res_conv_8);
+ _res_constr.data[i] = _res_conv_8_ref;
+ }
+ FREE(_res);
+ CVec_PublicKeyZ_free(_res_constr);
+}
+
int64_t CS_LDK_CResult_FixedPenaltyScorerDecodeErrorZ_ok(int64_t o) {
LDKFixedPenaltyScorer o_conv;
o_conv.inner = untag_ptr(o);
CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(_res_constr);
}
-int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_ok(int64_t o) {
- LDKInitFeatures 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 = InitFeatures_clone(&o_conv);
- LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
- *ret_conv = CResult_InitFeaturesDecodeErrorZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_err(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_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
- *ret_conv = CResult_InitFeaturesDecodeErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_InitFeaturesDecodeErrorZ_is_ok(int64_t o) {
- LDKCResult_InitFeaturesDecodeErrorZ* o_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_InitFeaturesDecodeErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_InitFeaturesDecodeErrorZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_InitFeaturesDecodeErrorZ _res_conv = *(LDKCResult_InitFeaturesDecodeErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_InitFeaturesDecodeErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_InitFeaturesDecodeErrorZ_clone_ptr(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR arg) {
- LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
- *ret_conv = CResult_InitFeaturesDecodeErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_InitFeaturesDecodeErrorZ* arg_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_InitFeaturesDecodeErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_clone(int64_t orig) {
- LDKCResult_InitFeaturesDecodeErrorZ* orig_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(orig);
- LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
- *ret_conv = CResult_InitFeaturesDecodeErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_ok(int64_t o) {
- LDKChannelFeatures 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 = ChannelFeatures_clone(&o_conv);
- LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
- *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_err(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_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
- *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_is_ok(int64_t o) {
- LDKCResult_ChannelFeaturesDecodeErrorZ* o_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_ChannelFeaturesDecodeErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_ChannelFeaturesDecodeErrorZ _res_conv = *(LDKCResult_ChannelFeaturesDecodeErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_ChannelFeaturesDecodeErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_ChannelFeaturesDecodeErrorZ_clone_ptr(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR arg) {
- LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
- *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_ChannelFeaturesDecodeErrorZ* arg_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_ChannelFeaturesDecodeErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_clone(int64_t orig) {
- LDKCResult_ChannelFeaturesDecodeErrorZ* orig_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(orig);
- LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
- *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_ok(int64_t o) {
- LDKNodeFeatures 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 = NodeFeatures_clone(&o_conv);
- LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
- *ret_conv = CResult_NodeFeaturesDecodeErrorZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_err(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_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
- *ret_conv = CResult_NodeFeaturesDecodeErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_NodeFeaturesDecodeErrorZ_is_ok(int64_t o) {
- LDKCResult_NodeFeaturesDecodeErrorZ* o_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_NodeFeaturesDecodeErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_NodeFeaturesDecodeErrorZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_NodeFeaturesDecodeErrorZ _res_conv = *(LDKCResult_NodeFeaturesDecodeErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_NodeFeaturesDecodeErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_NodeFeaturesDecodeErrorZ_clone_ptr(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR arg) {
- LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
- *ret_conv = CResult_NodeFeaturesDecodeErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_NodeFeaturesDecodeErrorZ* arg_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_NodeFeaturesDecodeErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_clone(int64_t orig) {
- LDKCResult_NodeFeaturesDecodeErrorZ* orig_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(orig);
- LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
- *ret_conv = CResult_NodeFeaturesDecodeErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(int64_t o) {
- LDKBolt11InvoiceFeatures 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 = Bolt11InvoiceFeatures_clone(&o_conv);
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
- *ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_err(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_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
- *ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_is_ok(int64_t o) {
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* o_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ _res_conv = *(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone_ptr(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR arg) {
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
- *ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* arg_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone(int64_t orig) {
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* orig_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(orig);
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
- *ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(int64_t o) {
- LDKBolt12InvoiceFeatures 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 = Bolt12InvoiceFeatures_clone(&o_conv);
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
- *ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_err(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_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
- *ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_is_ok(int64_t o) {
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* o_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ _res_conv = *(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR arg) {
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
- *ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* arg_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone(int64_t orig) {
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* orig_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(orig);
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
- *ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_ok(int64_t o) {
- LDKBlindedHopFeatures 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 = BlindedHopFeatures_clone(&o_conv);
- LDKCResult_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
- *ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_err(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_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
- *ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_is_ok(int64_t o) {
- LDKCResult_BlindedHopFeaturesDecodeErrorZ* o_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_BlindedHopFeaturesDecodeErrorZ _res_conv = *(LDKCResult_BlindedHopFeaturesDecodeErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_BlindedHopFeaturesDecodeErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_BlindedHopFeaturesDecodeErrorZ_clone_ptr(LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR arg) {
- LDKCResult_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
- *ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_BlindedHopFeaturesDecodeErrorZ* arg_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_clone(int64_t orig) {
- LDKCResult_BlindedHopFeaturesDecodeErrorZ* orig_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(orig);
- LDKCResult_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
- *ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_ok(int64_t o) {
- LDKChannelTypeFeatures 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 = ChannelTypeFeatures_clone(&o_conv);
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
- *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_err(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_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
- *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(int64_t o) {
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ* o_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ _res_conv = *(LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_ChannelTypeFeaturesDecodeErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR arg) {
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
- *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ* arg_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_clone(int64_t orig) {
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ* orig_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(orig);
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
- *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
int64_t CS_LDK_CResult_OfferIdDecodeErrorZ_ok(int64_t o) {
LDKOfferId o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(int64_t o) {
- LDKInvoiceRequestWithDerivedPayerIdBuilder o_conv;
+int64_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_ok(int64_t o) {
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder 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
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder
- LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ");
- *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(o_conv);
+ LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(int32_t e) {
+int64_t CS_LDK_CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_err(int32_t e) {
LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e);
- LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ");
- *ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e_conv);
+ LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
-jboolean CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(int64_t o) {
- LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv);
+jboolean CS_LDK_CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(int64_t o) {
+ LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o_conv);
return ret_conv;
}
-void CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(int64_t _res) {
+void CS_LDK_CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_free(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);
+ LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ _res_conv = *(LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(_res_conv);
-}
-
-int64_t CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(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);
-}
-
-int64_t CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(int32_t e) {
- LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e);
- LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
- *ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(int64_t o) {
- LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* o_conv = (LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(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);
+ CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv);
}
int64_t CS_LDK_CResult_OfferDecodeErrorZ_ok(int64_t o) {
CVec_RecentPaymentDetailsZ_free(_res_constr);
}
-int64_t CS_LDK_CResult_NonePaymentSendFailureZ_ok() {
- LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
- *ret_conv = CResult_NonePaymentSendFailureZ_ok();
+int64_t CS_LDK_CResult_NoneAPIErrorZ_ok() {
+ LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+ *ret_conv = CResult_NoneAPIErrorZ_ok();
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_NonePaymentSendFailureZ_err(int64_t e) {
+int64_t CS_LDK_CResult_NoneAPIErrorZ_err(int64_t e) {
void* e_ptr = untag_ptr(e);
CHECK_ACCESS(e_ptr);
- LDKPaymentSendFailure e_conv = *(LDKPaymentSendFailure*)(e_ptr);
- e_conv = PaymentSendFailure_clone((LDKPaymentSendFailure*)untag_ptr(e));
- LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
- *ret_conv = CResult_NonePaymentSendFailureZ_err(e_conv);
+ LDKAPIError e_conv = *(LDKAPIError*)(e_ptr);
+ e_conv = APIError_clone((LDKAPIError*)untag_ptr(e));
+ LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+ *ret_conv = CResult_NoneAPIErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
-jboolean CS_LDK_CResult_NonePaymentSendFailureZ_is_ok(int64_t o) {
- LDKCResult_NonePaymentSendFailureZ* o_conv = (LDKCResult_NonePaymentSendFailureZ*)untag_ptr(o);
- jboolean ret_conv = CResult_NonePaymentSendFailureZ_is_ok(o_conv);
+jboolean CS_LDK_CResult_NoneAPIErrorZ_is_ok(int64_t o) {
+ LDKCResult_NoneAPIErrorZ* o_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_NoneAPIErrorZ_is_ok(o_conv);
return ret_conv;
}
-void CS_LDK_CResult_NonePaymentSendFailureZ_free(int64_t _res) {
+void CS_LDK_CResult_NoneAPIErrorZ_free(int64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKCResult_NonePaymentSendFailureZ _res_conv = *(LDKCResult_NonePaymentSendFailureZ*)(_res_ptr);
+ LDKCResult_NoneAPIErrorZ _res_conv = *(LDKCResult_NoneAPIErrorZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_NonePaymentSendFailureZ_free(_res_conv);
+ CResult_NoneAPIErrorZ_free(_res_conv);
}
-static inline uint64_t CResult_NonePaymentSendFailureZ_clone_ptr(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR arg) {
- LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
- *ret_conv = CResult_NonePaymentSendFailureZ_clone(arg);
+static inline uint64_t CResult_NoneAPIErrorZ_clone_ptr(LDKCResult_NoneAPIErrorZ *NONNULL_PTR arg) {
+ LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+ *ret_conv = CResult_NoneAPIErrorZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_NonePaymentSendFailureZ_clone_ptr(int64_t arg) {
- LDKCResult_NonePaymentSendFailureZ* arg_conv = (LDKCResult_NonePaymentSendFailureZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_NonePaymentSendFailureZ_clone_ptr(arg_conv);
+int64_t CS_LDK_CResult_NoneAPIErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_NoneAPIErrorZ* arg_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_NoneAPIErrorZ_clone_ptr(arg_conv);
return ret_conv;
}
-int64_t CS_LDK_CResult_NonePaymentSendFailureZ_clone(int64_t orig) {
- LDKCResult_NonePaymentSendFailureZ* orig_conv = (LDKCResult_NonePaymentSendFailureZ*)untag_ptr(orig);
- LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
- *ret_conv = CResult_NonePaymentSendFailureZ_clone(orig_conv);
+int64_t CS_LDK_CResult_NoneAPIErrorZ_clone(int64_t orig) {
+ LDKCResult_NoneAPIErrorZ* orig_conv = (LDKCResult_NoneAPIErrorZ*)untag_ptr(orig);
+ LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+ *ret_conv = CResult_NoneAPIErrorZ_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_ok(int8_tArray o) {
- LDKThirtyTwoBytes o_ref;
- CHECK(o->arr_len == 32);
- memcpy(o_ref.data, o->elems, 32); FREE(o);
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ), "LDKCResult_ThirtyTwoBytesPaymentSendFailureZ");
- *ret_conv = CResult_ThirtyTwoBytesPaymentSendFailureZ_ok(o_ref);
+int64_t CS_LDK_COption_OffersContextZ_some(int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKOffersContext o_conv = *(LDKOffersContext*)(o_ptr);
+ o_conv = OffersContext_clone((LDKOffersContext*)untag_ptr(o));
+ LDKCOption_OffersContextZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersContextZ), "LDKCOption_OffersContextZ");
+ *ret_copy = COption_OffersContextZ_some(o_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_COption_OffersContextZ_none() {
+ LDKCOption_OffersContextZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersContextZ), "LDKCOption_OffersContextZ");
+ *ret_copy = COption_OffersContextZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_COption_OffersContextZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_OffersContextZ _res_conv = *(LDKCOption_OffersContextZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_OffersContextZ_free(_res_conv);
+}
+
+static inline uint64_t COption_OffersContextZ_clone_ptr(LDKCOption_OffersContextZ *NONNULL_PTR arg) {
+ LDKCOption_OffersContextZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersContextZ), "LDKCOption_OffersContextZ");
+ *ret_copy = COption_OffersContextZ_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t CS_LDK_COption_OffersContextZ_clone_ptr(int64_t arg) {
+ LDKCOption_OffersContextZ* arg_conv = (LDKCOption_OffersContextZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_OffersContextZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_COption_OffersContextZ_clone(int64_t orig) {
+ LDKCOption_OffersContextZ* orig_conv = (LDKCOption_OffersContextZ*)untag_ptr(orig);
+ LDKCOption_OffersContextZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersContextZ), "LDKCOption_OffersContextZ");
+ *ret_copy = COption_OffersContextZ_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_CResult_NoneBolt12PaymentErrorZ_ok() {
+ LDKCResult_NoneBolt12PaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12PaymentErrorZ), "LDKCResult_NoneBolt12PaymentErrorZ");
+ *ret_conv = CResult_NoneBolt12PaymentErrorZ_ok();
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_err(int64_t e) {
+int64_t CS_LDK_CResult_NoneBolt12PaymentErrorZ_err(int64_t e) {
void* e_ptr = untag_ptr(e);
CHECK_ACCESS(e_ptr);
- LDKPaymentSendFailure e_conv = *(LDKPaymentSendFailure*)(e_ptr);
- e_conv = PaymentSendFailure_clone((LDKPaymentSendFailure*)untag_ptr(e));
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ), "LDKCResult_ThirtyTwoBytesPaymentSendFailureZ");
- *ret_conv = CResult_ThirtyTwoBytesPaymentSendFailureZ_err(e_conv);
+ LDKBolt12PaymentError e_conv = *(LDKBolt12PaymentError*)(e_ptr);
+ e_conv = Bolt12PaymentError_clone((LDKBolt12PaymentError*)untag_ptr(e));
+ LDKCResult_NoneBolt12PaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12PaymentErrorZ), "LDKCResult_NoneBolt12PaymentErrorZ");
+ *ret_conv = CResult_NoneBolt12PaymentErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
-jboolean CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_is_ok(int64_t o) {
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* o_conv = (LDKCResult_ThirtyTwoBytesPaymentSendFailureZ*)untag_ptr(o);
- jboolean ret_conv = CResult_ThirtyTwoBytesPaymentSendFailureZ_is_ok(o_conv);
+jboolean CS_LDK_CResult_NoneBolt12PaymentErrorZ_is_ok(int64_t o) {
+ LDKCResult_NoneBolt12PaymentErrorZ* o_conv = (LDKCResult_NoneBolt12PaymentErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_NoneBolt12PaymentErrorZ_is_ok(o_conv);
return ret_conv;
}
-void CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_free(int64_t _res) {
+void CS_LDK_CResult_NoneBolt12PaymentErrorZ_free(int64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ _res_conv = *(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ*)(_res_ptr);
+ LDKCResult_NoneBolt12PaymentErrorZ _res_conv = *(LDKCResult_NoneBolt12PaymentErrorZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_ThirtyTwoBytesPaymentSendFailureZ_free(_res_conv);
+ CResult_NoneBolt12PaymentErrorZ_free(_res_conv);
}
-static inline uint64_t CResult_ThirtyTwoBytesPaymentSendFailureZ_clone_ptr(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ *NONNULL_PTR arg) {
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ), "LDKCResult_ThirtyTwoBytesPaymentSendFailureZ");
- *ret_conv = CResult_ThirtyTwoBytesPaymentSendFailureZ_clone(arg);
+static inline uint64_t CResult_NoneBolt12PaymentErrorZ_clone_ptr(LDKCResult_NoneBolt12PaymentErrorZ *NONNULL_PTR arg) {
+ LDKCResult_NoneBolt12PaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12PaymentErrorZ), "LDKCResult_NoneBolt12PaymentErrorZ");
+ *ret_conv = CResult_NoneBolt12PaymentErrorZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_clone_ptr(int64_t arg) {
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* arg_conv = (LDKCResult_ThirtyTwoBytesPaymentSendFailureZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_ThirtyTwoBytesPaymentSendFailureZ_clone_ptr(arg_conv);
+int64_t CS_LDK_CResult_NoneBolt12PaymentErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_NoneBolt12PaymentErrorZ* arg_conv = (LDKCResult_NoneBolt12PaymentErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_NoneBolt12PaymentErrorZ_clone_ptr(arg_conv);
return ret_conv;
}
-int64_t CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_clone(int64_t orig) {
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* orig_conv = (LDKCResult_ThirtyTwoBytesPaymentSendFailureZ*)untag_ptr(orig);
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ), "LDKCResult_ThirtyTwoBytesPaymentSendFailureZ");
- *ret_conv = CResult_ThirtyTwoBytesPaymentSendFailureZ_clone(orig_conv);
+int64_t CS_LDK_CResult_NoneBolt12PaymentErrorZ_clone(int64_t orig) {
+ LDKCResult_NoneBolt12PaymentErrorZ* orig_conv = (LDKCResult_NoneBolt12PaymentErrorZ*)untag_ptr(orig);
+ LDKCResult_NoneBolt12PaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12PaymentErrorZ), "LDKCResult_NoneBolt12PaymentErrorZ");
+ *ret_conv = CResult_NoneBolt12PaymentErrorZ_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_free(_res_conv);
}
-int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_ok(int64_t o) {
+int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_ok(int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ o_conv = *(LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ*)(o_ptr);
o_conv = C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_clone((LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ*)untag_ptr(o));
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ");
- *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_ok(o_conv);
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ");
+ *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_ok(o_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_err(int64_t e) {
+int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_err(int64_t e) {
void* e_ptr = untag_ptr(e);
CHECK_ACCESS(e_ptr);
- LDKPaymentSendFailure e_conv = *(LDKPaymentSendFailure*)(e_ptr);
- e_conv = PaymentSendFailure_clone((LDKPaymentSendFailure*)untag_ptr(e));
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ");
- *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_err(e_conv);
+ LDKProbeSendFailure e_conv = *(LDKProbeSendFailure*)(e_ptr);
+ e_conv = ProbeSendFailure_clone((LDKProbeSendFailure*)untag_ptr(e));
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ");
+ *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
-jboolean CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_is_ok(int64_t o) {
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* o_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ*)untag_ptr(o);
- jboolean ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_is_ok(o_conv);
+jboolean CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_is_ok(int64_t o) {
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* o_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_is_ok(o_conv);
return ret_conv;
}
-void CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_free(int64_t _res) {
+void CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_free(int64_t _res) {
if (!ptr_is_owned(_res)) return;
void* _res_ptr = untag_ptr(_res);
CHECK_ACCESS(_res_ptr);
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ _res_conv = *(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ*)(_res_ptr);
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ _res_conv = *(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_free(_res_conv);
+ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_free(_res_conv);
}
-static inline uint64_t CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone_ptr(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ *NONNULL_PTR arg) {
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ");
- *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone(arg);
+static inline uint64_t CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone_ptr(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ *NONNULL_PTR arg) {
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ");
+ *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone(arg);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone_ptr(int64_t arg) {
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* arg_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone_ptr(arg_conv);
+int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone_ptr(int64_t arg) {
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* arg_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone_ptr(arg_conv);
return ret_conv;
}
-int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone(int64_t orig) {
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* orig_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ*)untag_ptr(orig);
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ");
- *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone(orig_conv);
+int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone(int64_t orig) {
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* orig_conv = (LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ*)untag_ptr(orig);
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ");
+ *ret_conv = CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone(orig_conv);
return tag_ptr(ret_conv, true);
}
CVec_ChannelIdZ_free(_res_constr);
}
+static inline uint64_t C2Tuple_PublicKeyChannelIdZ_clone_ptr(LDKC2Tuple_PublicKeyChannelIdZ *NONNULL_PTR arg) {
+ LDKC2Tuple_PublicKeyChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyChannelIdZ), "LDKC2Tuple_PublicKeyChannelIdZ");
+ *ret_conv = C2Tuple_PublicKeyChannelIdZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_C2Tuple_PublicKeyChannelIdZ_clone_ptr(int64_t arg) {
+ LDKC2Tuple_PublicKeyChannelIdZ* arg_conv = (LDKC2Tuple_PublicKeyChannelIdZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_PublicKeyChannelIdZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_C2Tuple_PublicKeyChannelIdZ_clone(int64_t orig) {
+ LDKC2Tuple_PublicKeyChannelIdZ* orig_conv = (LDKC2Tuple_PublicKeyChannelIdZ*)untag_ptr(orig);
+ LDKC2Tuple_PublicKeyChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyChannelIdZ), "LDKC2Tuple_PublicKeyChannelIdZ");
+ *ret_conv = C2Tuple_PublicKeyChannelIdZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_C2Tuple_PublicKeyChannelIdZ_new(int8_tArray a, int64_t b) {
+ LDKPublicKey a_ref;
+ CHECK(a->arr_len == 33);
+ memcpy(a_ref.compressed_form, a->elems, 33); FREE(a);
+ 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_PublicKeyChannelIdZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_PublicKeyChannelIdZ), "LDKC2Tuple_PublicKeyChannelIdZ");
+ *ret_conv = C2Tuple_PublicKeyChannelIdZ_new(a_ref, b_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_C2Tuple_PublicKeyChannelIdZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_PublicKeyChannelIdZ _res_conv = *(LDKC2Tuple_PublicKeyChannelIdZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_PublicKeyChannelIdZ_free(_res_conv);
+}
+
+int64_t CS_LDK_COption_C2Tuple_PublicKeyChannelIdZZ_some(int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKC2Tuple_PublicKeyChannelIdZ o_conv = *(LDKC2Tuple_PublicKeyChannelIdZ*)(o_ptr);
+ o_conv = C2Tuple_PublicKeyChannelIdZ_clone((LDKC2Tuple_PublicKeyChannelIdZ*)untag_ptr(o));
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_PublicKeyChannelIdZZ), "LDKCOption_C2Tuple_PublicKeyChannelIdZZ");
+ *ret_copy = COption_C2Tuple_PublicKeyChannelIdZZ_some(o_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_COption_C2Tuple_PublicKeyChannelIdZZ_none() {
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_PublicKeyChannelIdZZ), "LDKCOption_C2Tuple_PublicKeyChannelIdZZ");
+ *ret_copy = COption_C2Tuple_PublicKeyChannelIdZZ_none();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_COption_C2Tuple_PublicKeyChannelIdZZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ _res_conv = *(LDKCOption_C2Tuple_PublicKeyChannelIdZZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ COption_C2Tuple_PublicKeyChannelIdZZ_free(_res_conv);
+}
+
+static inline uint64_t COption_C2Tuple_PublicKeyChannelIdZZ_clone_ptr(LDKCOption_C2Tuple_PublicKeyChannelIdZZ *NONNULL_PTR arg) {
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_PublicKeyChannelIdZZ), "LDKCOption_C2Tuple_PublicKeyChannelIdZZ");
+ *ret_copy = COption_C2Tuple_PublicKeyChannelIdZZ_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t CS_LDK_COption_C2Tuple_PublicKeyChannelIdZZ_clone_ptr(int64_t arg) {
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ* arg_conv = (LDKCOption_C2Tuple_PublicKeyChannelIdZZ*)untag_ptr(arg);
+ int64_t ret_conv = COption_C2Tuple_PublicKeyChannelIdZZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_COption_C2Tuple_PublicKeyChannelIdZZ_clone(int64_t orig) {
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ* orig_conv = (LDKCOption_C2Tuple_PublicKeyChannelIdZZ*)untag_ptr(orig);
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_PublicKeyChannelIdZZ), "LDKCOption_C2Tuple_PublicKeyChannelIdZZ");
+ *ret_copy = COption_C2Tuple_PublicKeyChannelIdZZ_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(int64_t o) {
+ LDKBolt11Invoice 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 = Bolt11Invoice_clone(&o_conv);
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
+ *ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_err(int64_t e) {
+ void* e_ptr = untag_ptr(e);
+ CHECK_ACCESS(e_ptr);
+ LDKSignOrCreationError e_conv = *(LDKSignOrCreationError*)(e_ptr);
+ e_conv = SignOrCreationError_clone((LDKSignOrCreationError*)untag_ptr(e));
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
+ *ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_is_ok(int64_t o) {
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* o_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ _res_conv = *(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_Bolt11InvoiceSignOrCreationErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_Bolt11InvoiceSignOrCreationErrorZ_clone_ptr(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR arg) {
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
+ *ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* arg_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_clone(int64_t orig) {
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* orig_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(orig);
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
+ *ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
int64_t CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(int64_t o) {
LDKOfferWithDerivedMetadataBuilder o_conv;
o_conv.inner = untag_ptr(o);
return ret_ref;
}
+void CS_LDK_CVec_DestinationZ_free(int64_tArray _res) {
+ LDKCVec_DestinationZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKDestination), "LDKCVec_DestinationZ Elements");
+ else
+ _res_constr.data = NULL;
+ int64_t* _res_vals = _res->elems;
+ for (size_t n = 0; n < _res_constr.datalen; n++) {
+ int64_t _res_conv_13 = _res_vals[n];
+ void* _res_conv_13_ptr = untag_ptr(_res_conv_13);
+ CHECK_ACCESS(_res_conv_13_ptr);
+ LDKDestination _res_conv_13_conv = *(LDKDestination*)(_res_conv_13_ptr);
+ FREE(untag_ptr(_res_conv_13));
+ _res_constr.data[n] = _res_conv_13_conv;
+ }
+ FREE(_res);
+ CVec_DestinationZ_free(_res_constr);
+}
+
int64_t CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_COption_OffersContextZ_some(int64_t o) {
- void* o_ptr = untag_ptr(o);
- CHECK_ACCESS(o_ptr);
- LDKOffersContext o_conv = *(LDKOffersContext*)(o_ptr);
- o_conv = OffersContext_clone((LDKOffersContext*)untag_ptr(o));
- LDKCOption_OffersContextZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersContextZ), "LDKCOption_OffersContextZ");
- *ret_copy = COption_OffersContextZ_some(o_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_COption_OffersContextZ_none() {
- LDKCOption_OffersContextZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersContextZ), "LDKCOption_OffersContextZ");
- *ret_copy = COption_OffersContextZ_none();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-void CS_LDK_COption_OffersContextZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCOption_OffersContextZ _res_conv = *(LDKCOption_OffersContextZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- COption_OffersContextZ_free(_res_conv);
-}
-
-static inline uint64_t COption_OffersContextZ_clone_ptr(LDKCOption_OffersContextZ *NONNULL_PTR arg) {
- LDKCOption_OffersContextZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersContextZ), "LDKCOption_OffersContextZ");
- *ret_copy = COption_OffersContextZ_clone(arg);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-int64_t CS_LDK_COption_OffersContextZ_clone_ptr(int64_t arg) {
- LDKCOption_OffersContextZ* arg_conv = (LDKCOption_OffersContextZ*)untag_ptr(arg);
- int64_t ret_conv = COption_OffersContextZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_COption_OffersContextZ_clone(int64_t orig) {
- LDKCOption_OffersContextZ* orig_conv = (LDKCOption_OffersContextZ*)untag_ptr(orig);
- LDKCOption_OffersContextZ *ret_copy = MALLOC(sizeof(LDKCOption_OffersContextZ), "LDKCOption_OffersContextZ");
- *ret_copy = COption_OffersContextZ_clone(orig_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
static inline uint64_t C2Tuple_OffersMessageResponseInstructionZ_clone_ptr(LDKC2Tuple_OffersMessageResponseInstructionZ *NONNULL_PTR arg) {
LDKC2Tuple_OffersMessageResponseInstructionZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_OffersMessageResponseInstructionZ), "LDKC2Tuple_OffersMessageResponseInstructionZ");
*ret_conv = C2Tuple_OffersMessageResponseInstructionZ_clone(arg);
CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZZ_free(_res_constr);
}
+static inline uint64_t C2Tuple_boolboolZ_clone_ptr(LDKC2Tuple_boolboolZ *NONNULL_PTR arg) {
+ LDKC2Tuple_boolboolZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_boolboolZ), "LDKC2Tuple_boolboolZ");
+ *ret_conv = C2Tuple_boolboolZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_C2Tuple_boolboolZ_clone_ptr(int64_t arg) {
+ LDKC2Tuple_boolboolZ* arg_conv = (LDKC2Tuple_boolboolZ*)untag_ptr(arg);
+ int64_t ret_conv = C2Tuple_boolboolZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_C2Tuple_boolboolZ_clone(int64_t orig) {
+ LDKC2Tuple_boolboolZ* orig_conv = (LDKC2Tuple_boolboolZ*)untag_ptr(orig);
+ LDKC2Tuple_boolboolZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_boolboolZ), "LDKC2Tuple_boolboolZ");
+ *ret_conv = C2Tuple_boolboolZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_C2Tuple_boolboolZ_new(jboolean a, jboolean b) {
+ LDKC2Tuple_boolboolZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_boolboolZ), "LDKC2Tuple_boolboolZ");
+ *ret_conv = C2Tuple_boolboolZ_new(a, b);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_C2Tuple_boolboolZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC2Tuple_boolboolZ _res_conv = *(LDKC2Tuple_boolboolZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C2Tuple_boolboolZ_free(_res_conv);
+}
+
void CS_LDK_CVec_BalanceZ_free(int64_tArray _res) {
LDKCVec_BalanceZ _res_constr;
_res_constr.datalen = _res->arr_len;
return tag_ptr(ret_conv, true);
}
+static inline uint64_t C3Tuple_StrStrStrZ_clone_ptr(LDKC3Tuple_StrStrStrZ *NONNULL_PTR arg) {
+ LDKC3Tuple_StrStrStrZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_StrStrStrZ), "LDKC3Tuple_StrStrStrZ");
+ *ret_conv = C3Tuple_StrStrStrZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_C3Tuple_StrStrStrZ_clone_ptr(int64_t arg) {
+ LDKC3Tuple_StrStrStrZ* arg_conv = (LDKC3Tuple_StrStrStrZ*)untag_ptr(arg);
+ int64_t ret_conv = C3Tuple_StrStrStrZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_C3Tuple_StrStrStrZ_clone(int64_t orig) {
+ LDKC3Tuple_StrStrStrZ* orig_conv = (LDKC3Tuple_StrStrStrZ*)untag_ptr(orig);
+ LDKC3Tuple_StrStrStrZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_StrStrStrZ), "LDKC3Tuple_StrStrStrZ");
+ *ret_conv = C3Tuple_StrStrStrZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_C3Tuple_StrStrStrZ_new(jstring a, jstring b, jstring c) {
+ LDKStr a_conv = str_ref_to_owned_c(a);
+ LDKStr b_conv = str_ref_to_owned_c(b);
+ LDKStr c_conv = str_ref_to_owned_c(c);
+ LDKC3Tuple_StrStrStrZ* ret_conv = MALLOC(sizeof(LDKC3Tuple_StrStrStrZ), "LDKC3Tuple_StrStrStrZ");
+ *ret_conv = C3Tuple_StrStrStrZ_new(a_conv, b_conv, c_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_C3Tuple_StrStrStrZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKC3Tuple_StrStrStrZ _res_conv = *(LDKC3Tuple_StrStrStrZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ C3Tuple_StrStrStrZ_free(_res_conv);
+}
+
+void CS_LDK_CVec_C3Tuple_StrStrStrZZ_free(int64_tArray _res) {
+ LDKCVec_C3Tuple_StrStrStrZZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_StrStrStrZ), "LDKCVec_C3Tuple_StrStrStrZZ Elements");
+ else
+ _res_constr.data = NULL;
+ int64_t* _res_vals = _res->elems;
+ for (size_t x = 0; x < _res_constr.datalen; x++) {
+ int64_t _res_conv_23 = _res_vals[x];
+ void* _res_conv_23_ptr = untag_ptr(_res_conv_23);
+ CHECK_ACCESS(_res_conv_23_ptr);
+ LDKC3Tuple_StrStrStrZ _res_conv_23_conv = *(LDKC3Tuple_StrStrStrZ*)(_res_conv_23_ptr);
+ FREE(untag_ptr(_res_conv_23));
+ _res_constr.data[x] = _res_conv_23_conv;
+ }
+ FREE(_res);
+ CVec_C3Tuple_StrStrStrZZ_free(_res_constr);
+}
+
+int64_t CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_ok(int64_tArray o) {
+ LDKCVec_C3Tuple_StrStrStrZZ o_constr;
+ o_constr.datalen = o->arr_len;
+ if (o_constr.datalen > 0)
+ o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKC3Tuple_StrStrStrZ), "LDKCVec_C3Tuple_StrStrStrZZ Elements");
+ else
+ o_constr.data = NULL;
+ int64_t* o_vals = o->elems;
+ for (size_t x = 0; x < o_constr.datalen; x++) {
+ int64_t o_conv_23 = o_vals[x];
+ void* o_conv_23_ptr = untag_ptr(o_conv_23);
+ CHECK_ACCESS(o_conv_23_ptr);
+ LDKC3Tuple_StrStrStrZ o_conv_23_conv = *(LDKC3Tuple_StrStrStrZ*)(o_conv_23_ptr);
+ o_conv_23_conv = C3Tuple_StrStrStrZ_clone((LDKC3Tuple_StrStrStrZ*)untag_ptr(o_conv_23));
+ o_constr.data[x] = o_conv_23_conv;
+ }
+ FREE(o);
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ), "LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ");
+ *ret_conv = CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_ok(o_constr);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_err(int32_t e) {
+ LDKIOError e_conv = LDKIOError_from_cs(e);
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ), "LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ");
+ *ret_conv = CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_is_ok(int64_t o) {
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* o_conv = (LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ _res_conv = *(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone_ptr(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ *NONNULL_PTR arg) {
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ), "LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ");
+ *ret_conv = CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* arg_conv = (LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone(int64_t orig) {
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* orig_conv = (LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ*)untag_ptr(orig);
+ LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ), "LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ");
+ *ret_conv = CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
void CS_LDK_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ_free(int64_tArray _res) {
LDKCVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ _res_constr;
_res_constr.datalen = _res->arr_len;
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(int64_t o) {
- LDKUnsignedInvoiceRequest o_conv;
+int64_t CS_LDK_CResult_MonitorNameIOErrorZ_ok(int64_t o) {
+ LDKMonitorName 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);
+ // WARNING: we need a move here but no clone is available for LDKMonitorName
+
+ LDKCResult_MonitorNameIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_MonitorNameIOErrorZ), "LDKCResult_MonitorNameIOErrorZ");
+ *ret_conv = CResult_MonitorNameIOErrorZ_ok(o_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(int32_t e) {
- LDKBolt12SemanticError e_conv = LDKBolt12SemanticError_from_cs(e);
- LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
- *ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e_conv);
+int64_t CS_LDK_CResult_MonitorNameIOErrorZ_err(int32_t e) {
+ LDKIOError e_conv = LDKIOError_from_cs(e);
+ LDKCResult_MonitorNameIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_MonitorNameIOErrorZ), "LDKCResult_MonitorNameIOErrorZ");
+ *ret_conv = CResult_MonitorNameIOErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
-jboolean CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(int64_t o) {
- LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* o_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(o_conv);
+jboolean CS_LDK_CResult_MonitorNameIOErrorZ_is_ok(int64_t o) {
+ LDKCResult_MonitorNameIOErrorZ* o_conv = (LDKCResult_MonitorNameIOErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_MonitorNameIOErrorZ_is_ok(o_conv);
return ret_conv;
}
-void CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(int64_t _res) {
+void CS_LDK_CResult_MonitorNameIOErrorZ_free(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);
+ LDKCResult_MonitorNameIOErrorZ _res_conv = *(LDKCResult_MonitorNameIOErrorZ*)(_res_ptr);
FREE(untag_ptr(_res));
- CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(_res_conv);
+ CResult_MonitorNameIOErrorZ_free(_res_conv);
+}
+
+int64_t CS_LDK_CResult_UpdateNameIOErrorZ_ok(int64_t o) {
+ LDKUpdateName 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 LDKUpdateName
+
+ LDKCResult_UpdateNameIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateNameIOErrorZ), "LDKCResult_UpdateNameIOErrorZ");
+ *ret_conv = CResult_UpdateNameIOErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
}
-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);
+int64_t CS_LDK_CResult_UpdateNameIOErrorZ_err(int32_t e) {
+ LDKIOError e_conv = LDKIOError_from_cs(e);
+ LDKCResult_UpdateNameIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateNameIOErrorZ), "LDKCResult_UpdateNameIOErrorZ");
+ *ret_conv = CResult_UpdateNameIOErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* arg_conv = (LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(arg_conv);
+
+jboolean CS_LDK_CResult_UpdateNameIOErrorZ_is_ok(int64_t o) {
+ LDKCResult_UpdateNameIOErrorZ* o_conv = (LDKCResult_UpdateNameIOErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_UpdateNameIOErrorZ_is_ok(o_conv);
return ret_conv;
}
-int64_t CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(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);
+void CS_LDK_CResult_UpdateNameIOErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_UpdateNameIOErrorZ _res_conv = *(LDKCResult_UpdateNameIOErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_UpdateNameIOErrorZ_free(_res_conv);
}
int64_t CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_ok(int64_t o) {
CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res_conv);
}
+int64_t CS_LDK_CResult_InvoiceRequestDecodeErrorZ_ok(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_InvoiceRequestDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestDecodeErrorZ), "LDKCResult_InvoiceRequestDecodeErrorZ");
+ *ret_conv = CResult_InvoiceRequestDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_InvoiceRequestDecodeErrorZ_err(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_InvoiceRequestDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestDecodeErrorZ), "LDKCResult_InvoiceRequestDecodeErrorZ");
+ *ret_conv = CResult_InvoiceRequestDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_InvoiceRequestDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_InvoiceRequestDecodeErrorZ* o_conv = (LDKCResult_InvoiceRequestDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_InvoiceRequestDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_InvoiceRequestDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_InvoiceRequestDecodeErrorZ _res_conv = *(LDKCResult_InvoiceRequestDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_InvoiceRequestDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_InvoiceRequestDecodeErrorZ_clone_ptr(LDKCResult_InvoiceRequestDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_InvoiceRequestDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestDecodeErrorZ), "LDKCResult_InvoiceRequestDecodeErrorZ");
+ *ret_conv = CResult_InvoiceRequestDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_InvoiceRequestDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_InvoiceRequestDecodeErrorZ* arg_conv = (LDKCResult_InvoiceRequestDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_InvoiceRequestDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_InvoiceRequestDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_InvoiceRequestDecodeErrorZ* orig_conv = (LDKCResult_InvoiceRequestDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_InvoiceRequestDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestDecodeErrorZ), "LDKCResult_InvoiceRequestDecodeErrorZ");
+ *ret_conv = CResult_InvoiceRequestDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
int64_t CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_ok(int64_t o) {
LDKInvoiceRequestFields o_conv;
o_conv.inner = untag_ptr(o);
}
int64_t CS_LDK_CResult_SiPrefixBolt11ParseErrorZ_err(int64_t e) {
- void* e_ptr = untag_ptr(e);
- CHECK_ACCESS(e_ptr);
- LDKBolt11ParseError e_conv = *(LDKBolt11ParseError*)(e_ptr);
- e_conv = Bolt11ParseError_clone((LDKBolt11ParseError*)untag_ptr(e));
+ LDKBolt11ParseError e_conv;
+ e_conv.inner = untag_ptr(e);
+ e_conv.is_owned = ptr_is_owned(e);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
+ e_conv = Bolt11ParseError_clone(&e_conv);
LDKCResult_SiPrefixBolt11ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SiPrefixBolt11ParseErrorZ), "LDKCResult_SiPrefixBolt11ParseErrorZ");
*ret_conv = CResult_SiPrefixBolt11ParseErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
}
int64_t CS_LDK_CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_err(int64_t e) {
- void* e_ptr = untag_ptr(e);
- CHECK_ACCESS(e_ptr);
- LDKBolt11ParseError e_conv = *(LDKBolt11ParseError*)(e_ptr);
- e_conv = Bolt11ParseError_clone((LDKBolt11ParseError*)untag_ptr(e));
+ LDKBolt11ParseError e_conv;
+ e_conv.inner = untag_ptr(e);
+ e_conv.is_owned = ptr_is_owned(e);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(e_conv);
+ e_conv = Bolt11ParseError_clone(&e_conv);
LDKCResult_SignedRawBolt11InvoiceBolt11ParseErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SignedRawBolt11InvoiceBolt11ParseErrorZ), "LDKCResult_SignedRawBolt11InvoiceBolt11ParseErrorZ");
*ret_conv = CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_err(e_conv);
return tag_ptr(ret_conv, true);
return tag_ptr(ret_conv, true);
}
+int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_ok(int64_t o) {
+ LDKInitFeatures 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 = InitFeatures_clone(&o_conv);
+ LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+ *ret_conv = CResult_InitFeaturesDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_err(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_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+ *ret_conv = CResult_InitFeaturesDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_InitFeaturesDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_InitFeaturesDecodeErrorZ* o_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_InitFeaturesDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_InitFeaturesDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_InitFeaturesDecodeErrorZ _res_conv = *(LDKCResult_InitFeaturesDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_InitFeaturesDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_InitFeaturesDecodeErrorZ_clone_ptr(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+ *ret_conv = CResult_InitFeaturesDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_InitFeaturesDecodeErrorZ* arg_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_InitFeaturesDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_InitFeaturesDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_InitFeaturesDecodeErrorZ* orig_conv = (LDKCResult_InitFeaturesDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+ *ret_conv = CResult_InitFeaturesDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_ok(int64_t o) {
+ LDKChannelFeatures 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 = ChannelFeatures_clone(&o_conv);
+ LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+ *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_err(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_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+ *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_ChannelFeaturesDecodeErrorZ* o_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_ChannelFeaturesDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_ChannelFeaturesDecodeErrorZ _res_conv = *(LDKCResult_ChannelFeaturesDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_ChannelFeaturesDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_ChannelFeaturesDecodeErrorZ_clone_ptr(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+ *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_ChannelFeaturesDecodeErrorZ* arg_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_ChannelFeaturesDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_ChannelFeaturesDecodeErrorZ* orig_conv = (LDKCResult_ChannelFeaturesDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+ *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_ok(int64_t o) {
+ LDKNodeFeatures 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 = NodeFeatures_clone(&o_conv);
+ LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+ *ret_conv = CResult_NodeFeaturesDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_err(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_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+ *ret_conv = CResult_NodeFeaturesDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_NodeFeaturesDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_NodeFeaturesDecodeErrorZ* o_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_NodeFeaturesDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_NodeFeaturesDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_NodeFeaturesDecodeErrorZ _res_conv = *(LDKCResult_NodeFeaturesDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_NodeFeaturesDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_NodeFeaturesDecodeErrorZ_clone_ptr(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+ *ret_conv = CResult_NodeFeaturesDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_NodeFeaturesDecodeErrorZ* arg_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_NodeFeaturesDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_NodeFeaturesDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_NodeFeaturesDecodeErrorZ* orig_conv = (LDKCResult_NodeFeaturesDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+ *ret_conv = CResult_NodeFeaturesDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(int64_t o) {
+ LDKBolt11InvoiceFeatures 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 = Bolt11InvoiceFeatures_clone(&o_conv);
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_err(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_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* o_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ _res_conv = *(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone_ptr(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* arg_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* orig_conv = (LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(int64_t o) {
+ LDKBolt12InvoiceFeatures 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 = Bolt12InvoiceFeatures_clone(&o_conv);
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_err(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_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* o_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ _res_conv = *(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* arg_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* orig_conv = (LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_ok(int64_t o) {
+ LDKBlindedHopFeatures 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 = BlindedHopFeatures_clone(&o_conv);
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
+ *ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_err(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_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
+ *ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ* o_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ _res_conv = *(LDKCResult_BlindedHopFeaturesDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_BlindedHopFeaturesDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_BlindedHopFeaturesDecodeErrorZ_clone_ptr(LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
+ *ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ* arg_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ* orig_conv = (LDKCResult_BlindedHopFeaturesDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
+ *ret_conv = CResult_BlindedHopFeaturesDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_ok(int64_t o) {
+ LDKChannelTypeFeatures 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 = ChannelTypeFeatures_clone(&o_conv);
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
+ *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_err(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_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
+ *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ* o_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ _res_conv = *(LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_ChannelTypeFeaturesDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
+ *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ* arg_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ* orig_conv = (LDKCResult_ChannelTypeFeaturesDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
+ *ret_conv = CResult_ChannelTypeFeaturesDecodeErrorZ_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);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_ok(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);
-}
-
-int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_err(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);
-}
-
-jboolean CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_is_ok(int64_t o) {
- LDKCResult_UnknownPaymentContextDecodeErrorZ* o_conv = (LDKCResult_UnknownPaymentContextDecodeErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_UnknownPaymentContextDecodeErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_free(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);
-}
-int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(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;
-}
-
-int64_t CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_clone(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);
-}
-
int64_t CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_ok(int64_t o) {
LDKBolt12OfferContext o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
+int64_t CS_LDK_CResult_OnionMessagePathNoneZ_ok(int64_t o) {
+ LDKOnionMessagePath 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 = OnionMessagePath_clone(&o_conv);
+ LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
+ *ret_conv = CResult_OnionMessagePathNoneZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_OnionMessagePathNoneZ_err() {
+ LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
+ *ret_conv = CResult_OnionMessagePathNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_OnionMessagePathNoneZ_is_ok(int64_t o) {
+ LDKCResult_OnionMessagePathNoneZ* o_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_OnionMessagePathNoneZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_OnionMessagePathNoneZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_OnionMessagePathNoneZ _res_conv = *(LDKCResult_OnionMessagePathNoneZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_OnionMessagePathNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_OnionMessagePathNoneZ_clone_ptr(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR arg) {
+ LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
+ *ret_conv = CResult_OnionMessagePathNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_OnionMessagePathNoneZ_clone_ptr(int64_t arg) {
+ LDKCResult_OnionMessagePathNoneZ* arg_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_OnionMessagePathNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_OnionMessagePathNoneZ_clone(int64_t orig) {
+ LDKCResult_OnionMessagePathNoneZ* orig_conv = (LDKCResult_OnionMessagePathNoneZ*)untag_ptr(orig);
+ LDKCResult_OnionMessagePathNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_OnionMessagePathNoneZ), "LDKCResult_OnionMessagePathNoneZ");
+ *ret_conv = CResult_OnionMessagePathNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_ok(int64_tArray o) {
+ LDKCVec_BlindedMessagePathZ o_constr;
+ o_constr.datalen = o->arr_len;
+ if (o_constr.datalen > 0)
+ o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKBlindedMessagePath), "LDKCVec_BlindedMessagePathZ Elements");
+ else
+ o_constr.data = NULL;
+ int64_t* o_vals = o->elems;
+ for (size_t u = 0; u < o_constr.datalen; u++) {
+ int64_t o_conv_20 = o_vals[u];
+ LDKBlindedMessagePath o_conv_20_conv;
+ o_conv_20_conv.inner = untag_ptr(o_conv_20);
+ o_conv_20_conv.is_owned = ptr_is_owned(o_conv_20);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(o_conv_20_conv);
+ o_conv_20_conv = BlindedMessagePath_clone(&o_conv_20_conv);
+ o_constr.data[u] = o_conv_20_conv;
+ }
+ FREE(o);
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
+ *ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_ok(o_constr);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_err() {
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
+ *ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_err();
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_is_ok(int64_t o) {
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* o_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_CVec_BlindedMessagePathZNoneZ _res_conv = *(LDKCResult_CVec_BlindedMessagePathZNoneZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_CVec_BlindedMessagePathZNoneZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_CVec_BlindedMessagePathZNoneZ_clone_ptr(LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR arg) {
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
+ *ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_clone_ptr(int64_t arg) {
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* arg_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_clone(int64_t orig) {
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* orig_conv = (LDKCResult_CVec_BlindedMessagePathZNoneZ*)untag_ptr(orig);
+ LDKCResult_CVec_BlindedMessagePathZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_BlindedMessagePathZNoneZ), "LDKCResult_CVec_BlindedMessagePathZNoneZ");
+ *ret_conv = CResult_CVec_BlindedMessagePathZNoneZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_CVec_MessageForwardNodeZ_free(int64_tArray _res) {
+ LDKCVec_MessageForwardNodeZ _res_constr;
+ _res_constr.datalen = _res->arr_len;
+ if (_res_constr.datalen > 0)
+ _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKMessageForwardNode), "LDKCVec_MessageForwardNodeZ Elements");
+ else
+ _res_constr.data = NULL;
+ int64_t* _res_vals = _res->elems;
+ for (size_t u = 0; u < _res_constr.datalen; u++) {
+ int64_t _res_conv_20 = _res_vals[u];
+ LDKMessageForwardNode _res_conv_20_conv;
+ _res_conv_20_conv.inner = untag_ptr(_res_conv_20);
+ _res_conv_20_conv.is_owned = ptr_is_owned(_res_conv_20);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(_res_conv_20_conv);
+ _res_constr.data[u] = _res_conv_20_conv;
+ }
+ FREE(_res);
+ CVec_MessageForwardNodeZ_free(_res_constr);
+}
+
int64_t CS_LDK_COption_MessageContextZ_some(int64_t o) {
void* o_ptr = untag_ptr(o);
CHECK_ACCESS(o_ptr);
CVec_PhantomRouteHintsZ_free(_res_constr);
}
-int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(int64_t o) {
- LDKBolt11Invoice 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 = Bolt11Invoice_clone(&o_conv);
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
- *ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(o_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_err(int64_t e) {
- void* e_ptr = untag_ptr(e);
- CHECK_ACCESS(e_ptr);
- LDKSignOrCreationError e_conv = *(LDKSignOrCreationError*)(e_ptr);
- e_conv = SignOrCreationError_clone((LDKSignOrCreationError*)untag_ptr(e));
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
- *ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_err(e_conv);
- return tag_ptr(ret_conv, true);
-}
-
-jboolean CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_is_ok(int64_t o) {
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* o_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(o);
- jboolean ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_is_ok(o_conv);
- return ret_conv;
-}
-
-void CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_free(int64_t _res) {
- if (!ptr_is_owned(_res)) return;
- void* _res_ptr = untag_ptr(_res);
- CHECK_ACCESS(_res_ptr);
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ _res_conv = *(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)(_res_ptr);
- FREE(untag_ptr(_res));
- CResult_Bolt11InvoiceSignOrCreationErrorZ_free(_res_conv);
-}
-
-static inline uint64_t CResult_Bolt11InvoiceSignOrCreationErrorZ_clone_ptr(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR arg) {
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
- *ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_clone(arg);
- return tag_ptr(ret_conv, true);
-}
-int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_clone_ptr(int64_t arg) {
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* arg_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(arg);
- int64_t ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_clone(int64_t orig) {
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* orig_conv = (LDKCResult_Bolt11InvoiceSignOrCreationErrorZ*)untag_ptr(orig);
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
- *ret_conv = CResult_Bolt11InvoiceSignOrCreationErrorZ_clone(orig_conv);
- return tag_ptr(ret_conv, true);
-}
-
int64_t CS_LDK_CResult_InvoiceErrorDecodeErrorZ_ok(int64_t o) {
LDKInvoiceError o_conv;
o_conv.inner = untag_ptr(o);
return tag_ptr(ret_conv, true);
}
+int64_t CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_ok(int64_t o) {
+ void* o_ptr = untag_ptr(o);
+ CHECK_ACCESS(o_ptr);
+ LDKAsyncPaymentsContext o_conv = *(LDKAsyncPaymentsContext*)(o_ptr);
+ o_conv = AsyncPaymentsContext_clone((LDKAsyncPaymentsContext*)untag_ptr(o));
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AsyncPaymentsContextDecodeErrorZ), "LDKCResult_AsyncPaymentsContextDecodeErrorZ");
+ *ret_conv = CResult_AsyncPaymentsContextDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_err(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_AsyncPaymentsContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AsyncPaymentsContextDecodeErrorZ), "LDKCResult_AsyncPaymentsContextDecodeErrorZ");
+ *ret_conv = CResult_AsyncPaymentsContextDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ* o_conv = (LDKCResult_AsyncPaymentsContextDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_AsyncPaymentsContextDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ _res_conv = *(LDKCResult_AsyncPaymentsContextDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_AsyncPaymentsContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_AsyncPaymentsContextDecodeErrorZ_clone_ptr(LDKCResult_AsyncPaymentsContextDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AsyncPaymentsContextDecodeErrorZ), "LDKCResult_AsyncPaymentsContextDecodeErrorZ");
+ *ret_conv = CResult_AsyncPaymentsContextDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ* arg_conv = (LDKCResult_AsyncPaymentsContextDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_AsyncPaymentsContextDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ* orig_conv = (LDKCResult_AsyncPaymentsContextDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AsyncPaymentsContextDecodeErrorZ), "LDKCResult_AsyncPaymentsContextDecodeErrorZ");
+ *ret_conv = CResult_AsyncPaymentsContextDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_DNSResolverContextDecodeErrorZ_ok(int64_t o) {
+ LDKDNSResolverContext 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 = DNSResolverContext_clone(&o_conv);
+ LDKCResult_DNSResolverContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverContextDecodeErrorZ), "LDKCResult_DNSResolverContextDecodeErrorZ");
+ *ret_conv = CResult_DNSResolverContextDecodeErrorZ_ok(o_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_CResult_DNSResolverContextDecodeErrorZ_err(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_DNSResolverContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverContextDecodeErrorZ), "LDKCResult_DNSResolverContextDecodeErrorZ");
+ *ret_conv = CResult_DNSResolverContextDecodeErrorZ_err(e_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jboolean CS_LDK_CResult_DNSResolverContextDecodeErrorZ_is_ok(int64_t o) {
+ LDKCResult_DNSResolverContextDecodeErrorZ* o_conv = (LDKCResult_DNSResolverContextDecodeErrorZ*)untag_ptr(o);
+ jboolean ret_conv = CResult_DNSResolverContextDecodeErrorZ_is_ok(o_conv);
+ return ret_conv;
+}
+
+void CS_LDK_CResult_DNSResolverContextDecodeErrorZ_free(int64_t _res) {
+ if (!ptr_is_owned(_res)) return;
+ void* _res_ptr = untag_ptr(_res);
+ CHECK_ACCESS(_res_ptr);
+ LDKCResult_DNSResolverContextDecodeErrorZ _res_conv = *(LDKCResult_DNSResolverContextDecodeErrorZ*)(_res_ptr);
+ FREE(untag_ptr(_res));
+ CResult_DNSResolverContextDecodeErrorZ_free(_res_conv);
+}
+
+static inline uint64_t CResult_DNSResolverContextDecodeErrorZ_clone_ptr(LDKCResult_DNSResolverContextDecodeErrorZ *NONNULL_PTR arg) {
+ LDKCResult_DNSResolverContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverContextDecodeErrorZ), "LDKCResult_DNSResolverContextDecodeErrorZ");
+ *ret_conv = CResult_DNSResolverContextDecodeErrorZ_clone(arg);
+ return tag_ptr(ret_conv, true);
+}
+int64_t CS_LDK_CResult_DNSResolverContextDecodeErrorZ_clone_ptr(int64_t arg) {
+ LDKCResult_DNSResolverContextDecodeErrorZ* arg_conv = (LDKCResult_DNSResolverContextDecodeErrorZ*)untag_ptr(arg);
+ int64_t ret_conv = CResult_DNSResolverContextDecodeErrorZ_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_CResult_DNSResolverContextDecodeErrorZ_clone(int64_t orig) {
+ LDKCResult_DNSResolverContextDecodeErrorZ* orig_conv = (LDKCResult_DNSResolverContextDecodeErrorZ*)untag_ptr(orig);
+ LDKCResult_DNSResolverContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverContextDecodeErrorZ), "LDKCResult_DNSResolverContextDecodeErrorZ");
+ *ret_conv = CResult_DNSResolverContextDecodeErrorZ_clone(orig_conv);
+ return tag_ptr(ret_conv, true);
+}
+
void CS_LDK_APIError_free(int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
KVStore_free(this_ptr_conv);
}
+void CS_LDK_MigratableKVStore_free(int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKMigratableKVStore this_ptr_conv = *(LDKMigratableKVStore*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ MigratableKVStore_free(this_ptr_conv);
+}
+
+int64_t CS_LDK_migrate_kv_store_data(int64_t source_store, int64_t target_store) {
+ void* source_store_ptr = untag_ptr(source_store);
+ if (ptr_is_owned(source_store)) { CHECK_ACCESS(source_store_ptr); }
+ LDKMigratableKVStore* source_store_conv = (LDKMigratableKVStore*)source_store_ptr;
+ void* target_store_ptr = untag_ptr(target_store);
+ if (ptr_is_owned(target_store)) { CHECK_ACCESS(target_store_ptr); }
+ LDKMigratableKVStore* target_store_conv = (LDKMigratableKVStore*)target_store_ptr;
+ LDKCResult_NoneIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneIOErrorZ), "LDKCResult_NoneIOErrorZ");
+ *ret_conv = migrate_kv_store_data(source_store_conv, target_store_conv);
+ return tag_ptr(ret_conv, true);
+}
+
void CS_LDK_Persister_free(int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return tag_ptr(ret_ret, true);
}
+void CS_LDK_MonitorName_free(int64_t this_obj) {
+ LDKMonitorName 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);
+ MonitorName_free(this_obj_conv);
+}
+
+int64_t CS_LDK_MonitorName_new(jstring name) {
+ LDKStr name_conv = str_ref_to_owned_c(name);
+ LDKCResult_MonitorNameIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_MonitorNameIOErrorZ), "LDKCResult_MonitorNameIOErrorZ");
+ *ret_conv = MonitorName_new(name_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jstring CS_LDK_MonitorName_as_str(int64_t this_arg) {
+ LDKMonitorName 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;
+ LDKStr ret_str = MonitorName_as_str(&this_arg_conv);
+ jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
+ Str_free(ret_str);
+ return ret_conv;
+}
+
+void CS_LDK_UpdateName_free(int64_t this_obj) {
+ LDKUpdateName 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);
+ UpdateName_free(this_obj_conv);
+}
+
+int64_t CS_LDK_UpdateName_get_a(int64_t this_ptr) {
+ LDKUpdateName this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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 = UpdateName_get_a(&this_ptr_conv);
+ return ret_conv;
+}
+
+void CS_LDK_UpdateName_set_a(int64_t this_ptr, int64_t val) {
+ LDKUpdateName this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ UpdateName_set_a(&this_ptr_conv, val);
+}
+
+int64_t CS_LDK_UpdateName_new(jstring name) {
+ LDKStr name_conv = str_ref_to_owned_c(name);
+ LDKCResult_UpdateNameIOErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateNameIOErrorZ), "LDKCResult_UpdateNameIOErrorZ");
+ *ret_conv = UpdateName_new(name_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jstring CS_LDK_UpdateName_as_str(int64_t this_arg) {
+ LDKUpdateName 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;
+ LDKStr ret_str = UpdateName_as_str(&this_arg_conv);
+ jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
+ Str_free(ret_str);
+ return ret_conv;
+}
+
int32_t CS_LDK_ShortChannelIdError_clone(int64_t orig) {
LDKShortChannelIdError* orig_conv = (LDKShortChannelIdError*)untag_ptr(orig);
int32_t ret_conv = LDKShortChannelIdError_to_cs(ShortChannelIdError_clone(orig_conv));
UserConfig_set_accept_intercept_htlcs(&this_ptr_conv, val);
}
-jboolean CS_LDK_UserConfig_get_accept_mpp_keysend(int64_t this_ptr) {
- LDKUserConfig this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_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 = UserConfig_get_accept_mpp_keysend(&this_ptr_conv);
- return ret_conv;
-}
-
-void CS_LDK_UserConfig_set_accept_mpp_keysend(int64_t this_ptr, jboolean val) {
- LDKUserConfig this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
- this_ptr_conv.is_owned = false;
- UserConfig_set_accept_mpp_keysend(&this_ptr_conv, val);
-}
-
jboolean CS_LDK_UserConfig_get_manually_handle_bolt12_invoices(int64_t this_ptr) {
LDKUserConfig this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
UserConfig_set_manually_handle_bolt12_invoices(&this_ptr_conv, val);
}
-int64_t CS_LDK_UserConfig_new(int64_t channel_handshake_config_arg, int64_t channel_handshake_limits_arg, int64_t channel_config_arg, jboolean accept_forwards_to_priv_channels_arg, jboolean accept_inbound_channels_arg, jboolean manually_accept_inbound_channels_arg, jboolean accept_intercept_htlcs_arg, jboolean accept_mpp_keysend_arg, jboolean manually_handle_bolt12_invoices_arg) {
+int64_t CS_LDK_UserConfig_new(int64_t channel_handshake_config_arg, int64_t channel_handshake_limits_arg, int64_t channel_config_arg, jboolean accept_forwards_to_priv_channels_arg, jboolean accept_inbound_channels_arg, jboolean manually_accept_inbound_channels_arg, jboolean accept_intercept_htlcs_arg, jboolean manually_handle_bolt12_invoices_arg) {
LDKChannelHandshakeConfig channel_handshake_config_arg_conv;
channel_handshake_config_arg_conv.inner = untag_ptr(channel_handshake_config_arg);
channel_handshake_config_arg_conv.is_owned = ptr_is_owned(channel_handshake_config_arg);
channel_config_arg_conv.is_owned = ptr_is_owned(channel_config_arg);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_config_arg_conv);
channel_config_arg_conv = ChannelConfig_clone(&channel_config_arg_conv);
- LDKUserConfig ret_var = UserConfig_new(channel_handshake_config_arg_conv, channel_handshake_limits_arg_conv, channel_config_arg_conv, accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg, manually_accept_inbound_channels_arg, accept_intercept_htlcs_arg, accept_mpp_keysend_arg, manually_handle_bolt12_invoices_arg);
+ LDKUserConfig ret_var = UserConfig_new(channel_handshake_config_arg_conv, channel_handshake_limits_arg_conv, channel_config_arg_conv, accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg, manually_accept_inbound_channels_arg, accept_intercept_htlcs_arg, manually_handle_bolt12_invoices_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_arr;
}
-int64_t CS_LDK_ChannelMonitor_process_pending_events(int64_t this_arg, int64_t handler) {
+int64_t CS_LDK_ChannelMonitor_process_pending_events(int64_t this_arg, int64_t handler, 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);
void* handler_ptr = untag_ptr(handler);
if (ptr_is_owned(handler)) { CHECK_ACCESS(handler_ptr); }
LDKEventHandler* handler_conv = (LDKEventHandler*)handler_ptr;
+ void* logger_ptr = untag_ptr(logger);
+ if (ptr_is_owned(logger)) { CHECK_ACCESS(logger_ptr); }
+ LDKLogger* logger_conv = (LDKLogger*)logger_ptr;
LDKCResult_NoneReplayEventZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneReplayEventZ), "LDKCResult_NoneReplayEventZ");
- *ret_conv = ChannelMonitor_process_pending_events(&this_arg_conv, handler_conv);
+ *ret_conv = ChannelMonitor_process_pending_events(&this_arg_conv, handler_conv, logger_conv);
return tag_ptr(ret_conv, true);
}
return ret_arr;
}
-jboolean CS_LDK_ChannelMonitor_is_fully_resolved(int64_t this_arg, int64_t logger) {
+int64_t CS_LDK_ChannelMonitor_check_and_update_full_resolution_status(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);
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;
+ LDKC2Tuple_boolboolZ* ret_conv = MALLOC(sizeof(LDKC2Tuple_boolboolZ), "LDKC2Tuple_boolboolZ");
+ *ret_conv = ChannelMonitor_check_and_update_full_resolution_status(&this_arg_conv, logger_conv);
+ return tag_ptr(ret_conv, true);
}
int64_tArray CS_LDK_ChannelMonitor_get_claimable_balances(int64_t this_arg) {
return ret_conv;
}
-int64_t CS_LDK_peel_payment_onion(int64_t msg, int64_t node_signer, int64_t logger, int32_t cur_height, jboolean accept_mpp_keysend, jboolean allow_skimmed_fees) {
+int64_t CS_LDK_peel_payment_onion(int64_t msg, int64_t node_signer, int64_t logger, int32_t cur_height, jboolean allow_skimmed_fees) {
LDKUpdateAddHTLC msg_conv;
msg_conv.inner = untag_ptr(msg);
msg_conv.is_owned = ptr_is_owned(msg);
LDKLogger_JCalls_cloned(&logger_conv);
}
LDKCResult_PendingHTLCInfoInboundHTLCErrZ* ret_conv = MALLOC(sizeof(LDKCResult_PendingHTLCInfoInboundHTLCErrZ), "LDKCResult_PendingHTLCInfoInboundHTLCErrZ");
- *ret_conv = peel_payment_onion(&msg_conv, node_signer_conv, logger_conv, cur_height, accept_mpp_keysend, allow_skimmed_fees);
+ *ret_conv = peel_payment_onion(&msg_conv, node_signer_conv, logger_conv, cur_height, allow_skimmed_fees);
return tag_ptr(ret_conv, true);
}
return ret_ref;
}
-int64_t CS_LDK_PendingHTLCRouting_receive_keysend(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) {
+int64_t CS_LDK_PendingHTLCRouting_receive_keysend(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, jboolean has_recipient_created_payment_secret) {
LDKFinalOnionHopData payment_data_conv;
payment_data_conv.inner = untag_ptr(payment_data);
payment_data_conv.is_owned = ptr_is_owned(payment_data);
}
FREE(custom_tlvs);
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, requires_blinded_error);
+ *ret_copy = PendingHTLCRouting_receive_keysend(payment_data_conv, payment_preimage_ref, payment_metadata_conv, incoming_cltv_expiry, custom_tlvs_constr, requires_blinded_error, has_recipient_created_payment_secret);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_conv;
}
+void CS_LDK_Verification_free(int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKVerification this_ptr_conv = *(LDKVerification*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ Verification_free(this_ptr_conv);
+}
+
+int64_t CS_LDK_UnauthenticatedReceiveTlvs_as_Verification(int64_t this_arg) {
+ LDKUnauthenticatedReceiveTlvs 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;
+ LDKVerification* ret_ret = MALLOC(sizeof(LDKVerification), "LDKVerification");
+ *ret_ret = UnauthenticatedReceiveTlvs_as_Verification(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
void CS_LDK_FailureCode_free(int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
-int64_t CS_LDK_ChannelManager_new(int64_t fee_est, int64_t chain_monitor, int64_t tx_broadcaster, int64_t router, int64_t logger, int64_t entropy_source, int64_t node_signer, int64_t signer_provider, int64_t config, int64_t params, int32_t current_timestamp) {
+int64_t CS_LDK_ChannelManager_new(int64_t fee_est, int64_t chain_monitor, int64_t tx_broadcaster, int64_t router, int64_t message_router, int64_t logger, int64_t entropy_source, int64_t node_signer, int64_t signer_provider, int64_t config, int64_t params, int32_t current_timestamp) {
void* fee_est_ptr = untag_ptr(fee_est);
CHECK_ACCESS(fee_est_ptr);
LDKFeeEstimator fee_est_conv = *(LDKFeeEstimator*)(fee_est_ptr);
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKRouter_JCalls_cloned(&router_conv);
}
+ void* message_router_ptr = untag_ptr(message_router);
+ CHECK_ACCESS(message_router_ptr);
+ LDKMessageRouter message_router_conv = *(LDKMessageRouter*)(message_router_ptr);
+ if (message_router_conv.free == LDKMessageRouter_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKMessageRouter_JCalls_cloned(&message_router_conv);
+ }
void* logger_ptr = untag_ptr(logger);
CHECK_ACCESS(logger_ptr);
LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
params_conv.is_owned = ptr_is_owned(params);
CHECK_INNER_FIELD_ACCESS_OR_NULL(params_conv);
params_conv = ChainParameters_clone(¶ms_conv);
- LDKChannelManager ret_var = ChannelManager_new(fee_est_conv, chain_monitor_conv, tx_broadcaster_conv, router_conv, logger_conv, entropy_source_conv, node_signer_conv, signer_provider_conv, config_conv, params_conv, current_timestamp);
+ LDKChannelManager ret_var = ChannelManager_new(fee_est_conv, chain_monitor_conv, tx_broadcaster_conv, router_conv, message_router_conv, logger_conv, entropy_source_conv, node_signer_conv, signer_provider_conv, config_conv, params_conv, current_timestamp);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
ChannelManager_force_close_all_channels_without_broadcasting_txn(&this_arg_conv, error_message_conv);
}
-int64_t CS_LDK_ChannelManager_send_payment_with_route(int64_t this_arg, int64_t route, int8_tArray payment_hash, int64_t recipient_onion, int8_tArray payment_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;
- LDKRoute route_conv;
- route_conv.inner = untag_ptr(route);
- route_conv.is_owned = ptr_is_owned(route);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(route_conv);
- route_conv = Route_clone(&route_conv);
- LDKThirtyTwoBytes payment_hash_ref;
- CHECK(payment_hash->arr_len == 32);
- memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash);
- LDKRecipientOnionFields recipient_onion_conv;
- recipient_onion_conv.inner = untag_ptr(recipient_onion);
- recipient_onion_conv.is_owned = ptr_is_owned(recipient_onion);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(recipient_onion_conv);
- recipient_onion_conv = RecipientOnionFields_clone(&recipient_onion_conv);
- LDKThirtyTwoBytes payment_id_ref;
- CHECK(payment_id->arr_len == 32);
- memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
- LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
- *ret_conv = ChannelManager_send_payment_with_route(&this_arg_conv, route_conv, payment_hash_ref, recipient_onion_conv, payment_id_ref);
- return tag_ptr(ret_conv, true);
-}
-
int64_t CS_LDK_ChannelManager_send_payment(int64_t this_arg, int8_tArray payment_hash, int64_t recipient_onion, int8_tArray payment_id, int64_t route_params, int64_t retry_strategy) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return tag_ptr(ret_conv, true);
}
-void CS_LDK_ChannelManager_abandon_payment(int64_t this_arg, int8_tArray payment_id) {
+int64_t CS_LDK_ChannelManager_send_payment_for_bolt12_invoice(int64_t this_arg, int64_t invoice, int64_t context) {
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(payment_id->arr_len == 32);
- memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
- ChannelManager_abandon_payment(&this_arg_conv, payment_id_ref);
+ LDKBolt12Invoice invoice_conv;
+ invoice_conv.inner = untag_ptr(invoice);
+ invoice_conv.is_owned = ptr_is_owned(invoice);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_conv);
+ invoice_conv.is_owned = false;
+ void* context_ptr = untag_ptr(context);
+ CHECK_ACCESS(context_ptr);
+ LDKCOption_OffersContextZ context_conv = *(LDKCOption_OffersContextZ*)(context_ptr);
+ context_conv = COption_OffersContextZ_clone((LDKCOption_OffersContextZ*)untag_ptr(context));
+ LDKCResult_NoneBolt12PaymentErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12PaymentErrorZ), "LDKCResult_NoneBolt12PaymentErrorZ");
+ *ret_conv = ChannelManager_send_payment_for_bolt12_invoice(&this_arg_conv, &invoice_conv, context_conv);
+ return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_ChannelManager_send_spontaneous_payment(int64_t this_arg, int64_t route, int64_t payment_preimage, int64_t recipient_onion, int8_tArray payment_id) {
+void CS_LDK_ChannelManager_abandon_payment(int64_t this_arg, int8_tArray payment_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;
- LDKRoute route_conv;
- route_conv.inner = untag_ptr(route);
- route_conv.is_owned = ptr_is_owned(route);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(route_conv);
- route_conv.is_owned = false;
- 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));
- LDKRecipientOnionFields recipient_onion_conv;
- recipient_onion_conv.inner = untag_ptr(recipient_onion);
- recipient_onion_conv.is_owned = ptr_is_owned(recipient_onion);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(recipient_onion_conv);
- recipient_onion_conv = RecipientOnionFields_clone(&recipient_onion_conv);
LDKThirtyTwoBytes payment_id_ref;
CHECK(payment_id->arr_len == 32);
memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
- LDKCResult_ThirtyTwoBytesPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ), "LDKCResult_ThirtyTwoBytesPaymentSendFailureZ");
- *ret_conv = ChannelManager_send_spontaneous_payment(&this_arg_conv, &route_conv, payment_preimage_conv, recipient_onion_conv, payment_id_ref);
- return tag_ptr(ret_conv, true);
+ ChannelManager_abandon_payment(&this_arg_conv, payment_id_ref);
}
-int64_t CS_LDK_ChannelManager_send_spontaneous_payment_with_retry(int64_t this_arg, int64_t payment_preimage, int64_t recipient_onion, int8_tArray payment_id, int64_t route_params, int64_t retry_strategy) {
+int64_t CS_LDK_ChannelManager_send_spontaneous_payment(int64_t this_arg, int64_t payment_preimage, int64_t recipient_onion, int8_tArray payment_id, int64_t route_params, int64_t retry_strategy) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
this_arg_conv.is_owned = ptr_is_owned(this_arg);
LDKRetry retry_strategy_conv = *(LDKRetry*)(retry_strategy_ptr);
retry_strategy_conv = Retry_clone((LDKRetry*)untag_ptr(retry_strategy));
LDKCResult_ThirtyTwoBytesRetryableSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_ThirtyTwoBytesRetryableSendFailureZ), "LDKCResult_ThirtyTwoBytesRetryableSendFailureZ");
- *ret_conv = ChannelManager_send_spontaneous_payment_with_retry(&this_arg_conv, payment_preimage_conv, recipient_onion_conv, payment_id_ref, route_params_conv, retry_strategy_conv);
+ *ret_conv = ChannelManager_send_spontaneous_payment(&this_arg_conv, payment_preimage_conv, recipient_onion_conv, payment_id_ref, route_params_conv, retry_strategy_conv);
return tag_ptr(ret_conv, true);
}
path_conv.is_owned = ptr_is_owned(path);
CHECK_INNER_FIELD_ACCESS_OR_NULL(path_conv);
path_conv = Path_clone(&path_conv);
- LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ");
+ LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ), "LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ");
*ret_conv = ChannelManager_send_probe(&this_arg_conv, path_conv);
return tag_ptr(ret_conv, true);
}
return tag_ptr(ret_conv, true);
}
+void CS_LDK_ChannelManager_signer_unblocked(int64_t this_arg, int64_t channel_opt) {
+ 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;
+ void* channel_opt_ptr = untag_ptr(channel_opt);
+ CHECK_ACCESS(channel_opt_ptr);
+ LDKCOption_C2Tuple_PublicKeyChannelIdZZ channel_opt_conv = *(LDKCOption_C2Tuple_PublicKeyChannelIdZZ*)(channel_opt_ptr);
+ channel_opt_conv = COption_C2Tuple_PublicKeyChannelIdZZ_clone((LDKCOption_C2Tuple_PublicKeyChannelIdZZ*)untag_ptr(channel_opt));
+ ChannelManager_signer_unblocked(&this_arg_conv, channel_opt_conv);
+}
+
+int64_t CS_LDK_ChannelManager_create_bolt11_invoice(int64_t this_arg, int64_t params) {
+ 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;
+ LDKBolt11InvoiceParameters params_conv;
+ params_conv.inner = untag_ptr(params);
+ params_conv.is_owned = ptr_is_owned(params);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(params_conv);
+ // WARNING: we need a move here but no clone is available for LDKBolt11InvoiceParameters
+
+ LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
+ *ret_conv = ChannelManager_create_bolt11_invoice(&this_arg_conv, params_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_Bolt11InvoiceParameters_free(int64_t this_obj) {
+ LDKBolt11InvoiceParameters 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);
+ Bolt11InvoiceParameters_free(this_obj_conv);
+}
+
+int64_t CS_LDK_Bolt11InvoiceParameters_get_amount_msats(int64_t this_ptr) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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 = Bolt11InvoiceParameters_get_amount_msats(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_Bolt11InvoiceParameters_set_amount_msats(int64_t this_ptr, int64_t val) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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));
+ Bolt11InvoiceParameters_set_amount_msats(&this_ptr_conv, val_conv);
+}
+
+int64_t CS_LDK_Bolt11InvoiceParameters_get_description(int64_t this_ptr) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKBolt11InvoiceDescription *ret_copy = MALLOC(sizeof(LDKBolt11InvoiceDescription), "LDKBolt11InvoiceDescription");
+ *ret_copy = Bolt11InvoiceParameters_get_description(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_Bolt11InvoiceParameters_set_description(int64_t this_ptr, int64_t val) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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);
+ LDKBolt11InvoiceDescription val_conv = *(LDKBolt11InvoiceDescription*)(val_ptr);
+ val_conv = Bolt11InvoiceDescription_clone((LDKBolt11InvoiceDescription*)untag_ptr(val));
+ Bolt11InvoiceParameters_set_description(&this_ptr_conv, val_conv);
+}
+
+int64_t CS_LDK_Bolt11InvoiceParameters_get_invoice_expiry_delta_secs(int64_t this_ptr) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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_u32Z *ret_copy = MALLOC(sizeof(LDKCOption_u32Z), "LDKCOption_u32Z");
+ *ret_copy = Bolt11InvoiceParameters_get_invoice_expiry_delta_secs(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_Bolt11InvoiceParameters_set_invoice_expiry_delta_secs(int64_t this_ptr, int64_t val) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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_u32Z val_conv = *(LDKCOption_u32Z*)(val_ptr);
+ val_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(val));
+ Bolt11InvoiceParameters_set_invoice_expiry_delta_secs(&this_ptr_conv, val_conv);
+}
+
+int64_t CS_LDK_Bolt11InvoiceParameters_get_min_final_cltv_expiry_delta(int64_t this_ptr) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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_u16Z *ret_copy = MALLOC(sizeof(LDKCOption_u16Z), "LDKCOption_u16Z");
+ *ret_copy = Bolt11InvoiceParameters_get_min_final_cltv_expiry_delta(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_Bolt11InvoiceParameters_set_min_final_cltv_expiry_delta(int64_t this_ptr, int64_t val) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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_u16Z val_conv = *(LDKCOption_u16Z*)(val_ptr);
+ val_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(val));
+ Bolt11InvoiceParameters_set_min_final_cltv_expiry_delta(&this_ptr_conv, val_conv);
+}
+
+int64_t CS_LDK_Bolt11InvoiceParameters_get_payment_hash(int64_t this_ptr) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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 = Bolt11InvoiceParameters_get_payment_hash(&this_ptr_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+void CS_LDK_Bolt11InvoiceParameters_set_payment_hash(int64_t this_ptr, int64_t val) {
+ LDKBolt11InvoiceParameters this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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));
+ Bolt11InvoiceParameters_set_payment_hash(&this_ptr_conv, val_conv);
+}
+
+int64_t CS_LDK_Bolt11InvoiceParameters_new(int64_t amount_msats_arg, int64_t description_arg, int64_t invoice_expiry_delta_secs_arg, int64_t min_final_cltv_expiry_delta_arg, int64_t payment_hash_arg) {
+ void* amount_msats_arg_ptr = untag_ptr(amount_msats_arg);
+ CHECK_ACCESS(amount_msats_arg_ptr);
+ LDKCOption_u64Z amount_msats_arg_conv = *(LDKCOption_u64Z*)(amount_msats_arg_ptr);
+ amount_msats_arg_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(amount_msats_arg));
+ void* description_arg_ptr = untag_ptr(description_arg);
+ CHECK_ACCESS(description_arg_ptr);
+ LDKBolt11InvoiceDescription description_arg_conv = *(LDKBolt11InvoiceDescription*)(description_arg_ptr);
+ description_arg_conv = Bolt11InvoiceDescription_clone((LDKBolt11InvoiceDescription*)untag_ptr(description_arg));
+ void* invoice_expiry_delta_secs_arg_ptr = untag_ptr(invoice_expiry_delta_secs_arg);
+ CHECK_ACCESS(invoice_expiry_delta_secs_arg_ptr);
+ LDKCOption_u32Z invoice_expiry_delta_secs_arg_conv = *(LDKCOption_u32Z*)(invoice_expiry_delta_secs_arg_ptr);
+ invoice_expiry_delta_secs_arg_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(invoice_expiry_delta_secs_arg));
+ void* min_final_cltv_expiry_delta_arg_ptr = untag_ptr(min_final_cltv_expiry_delta_arg);
+ CHECK_ACCESS(min_final_cltv_expiry_delta_arg_ptr);
+ LDKCOption_u16Z min_final_cltv_expiry_delta_arg_conv = *(LDKCOption_u16Z*)(min_final_cltv_expiry_delta_arg_ptr);
+ min_final_cltv_expiry_delta_arg_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(min_final_cltv_expiry_delta_arg));
+ void* payment_hash_arg_ptr = untag_ptr(payment_hash_arg);
+ CHECK_ACCESS(payment_hash_arg_ptr);
+ LDKCOption_ThirtyTwoBytesZ payment_hash_arg_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_hash_arg_ptr);
+ payment_hash_arg_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_hash_arg));
+ LDKBolt11InvoiceParameters ret_var = Bolt11InvoiceParameters_new(amount_msats_arg_conv, description_arg_conv, invoice_expiry_delta_secs_arg_conv, min_final_cltv_expiry_delta_arg_conv, payment_hash_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;
+}
+
+int64_t CS_LDK_Bolt11InvoiceParameters_default() {
+ LDKBolt11InvoiceParameters ret_var = Bolt11InvoiceParameters_default();
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
int64_t CS_LDK_ChannelManager_create_offer_builder(int64_t this_arg, int64_t absolute_expiry) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return tag_ptr(ret_conv, true);
}
+int64_t CS_LDK_ChannelManager_pay_for_offer_from_human_readable_name(int64_t this_arg, int64_t name, int64_t amount_msats, int8_tArray payment_id, int64_t retry_strategy, int64_t max_total_routing_fee_msat, int64_tArray dns_resolvers) {
+ 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;
+ LDKHumanReadableName name_conv;
+ name_conv.inner = untag_ptr(name);
+ name_conv.is_owned = ptr_is_owned(name);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(name_conv);
+ name_conv = HumanReadableName_clone(&name_conv);
+ LDKThirtyTwoBytes payment_id_ref;
+ CHECK(payment_id->arr_len == 32);
+ memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
+ 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));
+ LDKCVec_DestinationZ dns_resolvers_constr;
+ dns_resolvers_constr.datalen = dns_resolvers->arr_len;
+ if (dns_resolvers_constr.datalen > 0)
+ dns_resolvers_constr.data = MALLOC(dns_resolvers_constr.datalen * sizeof(LDKDestination), "LDKCVec_DestinationZ Elements");
+ else
+ dns_resolvers_constr.data = NULL;
+ int64_t* dns_resolvers_vals = dns_resolvers->elems;
+ for (size_t n = 0; n < dns_resolvers_constr.datalen; n++) {
+ int64_t dns_resolvers_conv_13 = dns_resolvers_vals[n];
+ void* dns_resolvers_conv_13_ptr = untag_ptr(dns_resolvers_conv_13);
+ CHECK_ACCESS(dns_resolvers_conv_13_ptr);
+ LDKDestination dns_resolvers_conv_13_conv = *(LDKDestination*)(dns_resolvers_conv_13_ptr);
+ dns_resolvers_conv_13_conv = Destination_clone((LDKDestination*)untag_ptr(dns_resolvers_conv_13));
+ dns_resolvers_constr.data[n] = dns_resolvers_conv_13_conv;
+ }
+ FREE(dns_resolvers);
+ LDKCResult_NoneNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneNoneZ), "LDKCResult_NoneNoneZ");
+ *ret_conv = ChannelManager_pay_for_offer_from_human_readable_name(&this_arg_conv, name_conv, amount_msats, payment_id_ref, retry_strategy_conv, max_total_routing_fee_msat_conv, dns_resolvers_constr);
+ return tag_ptr(ret_conv, true);
+}
+
int64_t CS_LDK_ChannelManager_create_inbound_payment(int64_t this_arg, int64_t min_value_msat, int32_t invoice_expiry_delta_secs, int64_t min_final_cltv_expiry_delta) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return tag_ptr(ret_ret, true);
}
+int64_t CS_LDK_ChannelManager_as_DNSResolverMessageHandler(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;
+ LDKDNSResolverMessageHandler* ret_ret = MALLOC(sizeof(LDKDNSResolverMessageHandler), "LDKDNSResolverMessageHandler");
+ *ret_ret = ChannelManager_as_DNSResolverMessageHandler(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
int64_t CS_LDK_ChannelManager_as_NodeIdLookUp(int64_t this_arg) {
LDKChannelManager this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
ChannelManagerReadArgs_set_router(&this_ptr_conv, val_conv);
}
+int64_t CS_LDK_ChannelManagerReadArgs_get_message_router(int64_t this_ptr) {
+ LDKChannelManagerReadArgs this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ // WARNING: This object doesn't live past this scope, needs clone!
+ int64_t ret_ret = tag_ptr(ChannelManagerReadArgs_get_message_router(&this_ptr_conv), false);
+ return ret_ret;
+}
+
+void CS_LDK_ChannelManagerReadArgs_set_message_router(int64_t this_ptr, int64_t val) {
+ LDKChannelManagerReadArgs this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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);
+ LDKMessageRouter val_conv = *(LDKMessageRouter*)(val_ptr);
+ if (val_conv.free == LDKMessageRouter_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKMessageRouter_JCalls_cloned(&val_conv);
+ }
+ ChannelManagerReadArgs_set_message_router(&this_ptr_conv, val_conv);
+}
+
int64_t CS_LDK_ChannelManagerReadArgs_get_logger(int64_t this_ptr) {
LDKChannelManagerReadArgs this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
ChannelManagerReadArgs_set_default_config(&this_ptr_conv, val_conv);
}
-int64_t CS_LDK_ChannelManagerReadArgs_new(int64_t entropy_source, int64_t node_signer, int64_t signer_provider, int64_t fee_estimator, int64_t chain_monitor, int64_t tx_broadcaster, int64_t router, int64_t logger, int64_t default_config, int64_tArray channel_monitors) {
+int64_t CS_LDK_ChannelManagerReadArgs_new(int64_t entropy_source, int64_t node_signer, int64_t signer_provider, int64_t fee_estimator, int64_t chain_monitor, int64_t tx_broadcaster, int64_t router, int64_t message_router, int64_t logger, int64_t default_config, int64_tArray channel_monitors) {
void* entropy_source_ptr = untag_ptr(entropy_source);
CHECK_ACCESS(entropy_source_ptr);
LDKEntropySource entropy_source_conv = *(LDKEntropySource*)(entropy_source_ptr);
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKRouter_JCalls_cloned(&router_conv);
}
+ void* message_router_ptr = untag_ptr(message_router);
+ CHECK_ACCESS(message_router_ptr);
+ LDKMessageRouter message_router_conv = *(LDKMessageRouter*)(message_router_ptr);
+ if (message_router_conv.free == LDKMessageRouter_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKMessageRouter_JCalls_cloned(&message_router_conv);
+ }
void* logger_ptr = untag_ptr(logger);
CHECK_ACCESS(logger_ptr);
LDKLogger logger_conv = *(LDKLogger*)(logger_ptr);
channel_monitors_constr.data[q] = channel_monitors_conv_16_conv;
}
FREE(channel_monitors);
- LDKChannelManagerReadArgs ret_var = ChannelManagerReadArgs_new(entropy_source_conv, node_signer_conv, signer_provider_conv, fee_estimator_conv, chain_monitor_conv, tx_broadcaster_conv, router_conv, logger_conv, default_config_conv, channel_monitors_constr);
+ LDKChannelManagerReadArgs ret_var = ChannelManagerReadArgs_new(entropy_source_conv, node_signer_conv, signer_provider_conv, fee_estimator_conv, chain_monitor_conv, tx_broadcaster_conv, router_conv, message_router_conv, logger_conv, default_config_conv, channel_monitors_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);
ChannelDetails_set_feerate_sat_per_1000_weight(&this_ptr_conv, val_conv);
}
-int64_t CS_LDK_ChannelDetails_get_balance_msat(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;
- int64_t ret_conv = ChannelDetails_get_balance_msat(&this_ptr_conv);
- return ret_conv;
-}
-
-void CS_LDK_ChannelDetails_set_balance_msat(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;
- ChannelDetails_set_balance_msat(&this_ptr_conv, val);
-}
-
int64_t CS_LDK_ChannelDetails_get_outbound_capacity_msat(int64_t this_ptr) {
LDKChannelDetails this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
ChannelDetails_set_pending_outbound_htlcs(&this_ptr_conv, val_constr);
}
-int64_t CS_LDK_ChannelDetails_new(int64_t 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_announced_arg, int64_t inbound_htlc_minimum_msat_arg, int64_t inbound_htlc_maximum_msat_arg, int64_t config_arg, int64_tArray pending_inbound_htlcs_arg, int64_tArray pending_outbound_htlcs_arg) {
+int64_t CS_LDK_ChannelDetails_new(int64_t 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 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_announced_arg, int64_t inbound_htlc_minimum_msat_arg, int64_t inbound_htlc_maximum_msat_arg, int64_t config_arg, int64_tArray pending_inbound_htlcs_arg, int64_tArray pending_outbound_htlcs_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);
pending_outbound_htlcs_arg_constr.data[v] = pending_outbound_htlcs_arg_conv_21_conv;
}
FREE(pending_outbound_htlcs_arg);
- LDKChannelDetails ret_var = ChannelDetails_new(channel_id_arg_conv, 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_announced_arg, inbound_htlc_minimum_msat_arg_conv, inbound_htlc_maximum_msat_arg_conv, config_arg_conv, pending_inbound_htlcs_arg_constr, pending_outbound_htlcs_arg_constr);
+ LDKChannelDetails ret_var = ChannelDetails_new(channel_id_arg_conv, 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, 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_announced_arg, inbound_htlc_minimum_msat_arg_conv, inbound_htlc_maximum_msat_arg_conv, config_arg_conv, pending_inbound_htlcs_arg_constr, pending_outbound_htlcs_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);
ExpandedKey_free(this_obj_conv);
}
+int64_t CS_LDK_ExpandedKey_hash(int64_t o) {
+ LDKExpandedKey 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 = ExpandedKey_hash(&o_conv);
+ return ret_conv;
+}
+
+static inline uint64_t ExpandedKey_clone_ptr(LDKExpandedKey *NONNULL_PTR arg) {
+ LDKExpandedKey ret_var = ExpandedKey_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;
+}
+int64_t CS_LDK_ExpandedKey_clone_ptr(int64_t arg) {
+ LDKExpandedKey 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 = ExpandedKey_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_ExpandedKey_clone(int64_t orig) {
+ LDKExpandedKey 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;
+ LDKExpandedKey ret_var = ExpandedKey_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;
+}
+
+jboolean CS_LDK_ExpandedKey_eq(int64_t a, int64_t b) {
+ LDKExpandedKey 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;
+ LDKExpandedKey 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 = ExpandedKey_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
int64_t CS_LDK_ExpandedKey_new(int8_tArray key_material) {
- uint8_t key_material_arr[32];
+ LDKThirtyTwoBytes key_material_ref;
CHECK(key_material->arr_len == 32);
- memcpy(key_material_arr, key_material->elems, 32); FREE(key_material);
- uint8_t (*key_material_ref)[32] = &key_material_arr;
+ memcpy(key_material_ref.data, key_material->elems, 32); FREE(key_material);
LDKExpandedKey ret_var = ExpandedKey_new(key_material_ref);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
return ret_ref;
}
+jboolean CS_LDK_FinalOnionHopData_eq(int64_t a, int64_t b) {
+ LDKFinalOnionHopData 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;
+ LDKFinalOnionHopData 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 = FinalOnionHopData_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
void CS_LDK_OnionPacket_free(int64_t this_obj) {
LDKOnionPacket this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return tag_ptr(ret_ret, true);
}
+int64_t CS_LDK_IgnoringMessageHandler_as_DNSResolverMessageHandler(int64_t this_arg) {
+ LDKIgnoringMessageHandler 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;
+ LDKDNSResolverMessageHandler* ret_ret = MALLOC(sizeof(LDKDNSResolverMessageHandler), "LDKDNSResolverMessageHandler");
+ *ret_ret = IgnoringMessageHandler_as_DNSResolverMessageHandler(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
int64_t CS_LDK_IgnoringMessageHandler_as_CustomOnionMessageHandler(int64_t this_arg) {
LDKIgnoringMessageHandler this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_conv;
}
-int8_tArray CS_LDK_InitFeatures_write(int64_t obj) {
- LDKInitFeatures 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 = InitFeatures_write(&obj_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-int64_t CS_LDK_InitFeatures_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
- *ret_conv = InitFeatures_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
-}
-
-int8_tArray CS_LDK_ChannelFeatures_write(int64_t obj) {
- LDKChannelFeatures 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 = ChannelFeatures_write(&obj_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-int64_t CS_LDK_ChannelFeatures_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
- *ret_conv = ChannelFeatures_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
-}
-
-int8_tArray CS_LDK_NodeFeatures_write(int64_t obj) {
- LDKNodeFeatures 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 = NodeFeatures_write(&obj_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-int64_t CS_LDK_NodeFeatures_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
- *ret_conv = NodeFeatures_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
-}
-
-int8_tArray CS_LDK_Bolt11InvoiceFeatures_write(int64_t obj) {
- LDKBolt11InvoiceFeatures 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 = Bolt11InvoiceFeatures_write(&obj_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-int64_t CS_LDK_Bolt11InvoiceFeatures_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
- *ret_conv = Bolt11InvoiceFeatures_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
-}
-
-int8_tArray CS_LDK_Bolt12InvoiceFeatures_write(int64_t obj) {
- LDKBolt12InvoiceFeatures 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 = Bolt12InvoiceFeatures_write(&obj_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-int64_t CS_LDK_Bolt12InvoiceFeatures_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
- *ret_conv = Bolt12InvoiceFeatures_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
-}
-
-int8_tArray CS_LDK_BlindedHopFeatures_write(int64_t obj) {
- LDKBlindedHopFeatures 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 = BlindedHopFeatures_write(&obj_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-int64_t CS_LDK_BlindedHopFeatures_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
- *ret_conv = BlindedHopFeatures_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
-}
-
-int8_tArray CS_LDK_ChannelTypeFeatures_write(int64_t obj) {
- LDKChannelTypeFeatures 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 = ChannelTypeFeatures_write(&obj_conv);
- int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-int64_t CS_LDK_ChannelTypeFeatures_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
- *ret_conv = ChannelTypeFeatures_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
-}
-
void CS_LDK_ShutdownScript_free(int64_t this_obj) {
LDKShutdownScript this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return tag_ptr(ret_conv, true);
}
-jstring CS_LDK_ChannelId_to_str(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;
- LDKStr ret_str = ChannelId_to_str(&o_conv);
- jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
- Str_free(ret_str);
- return ret_conv;
-}
-
int64_t CS_LDK_create_phantom_invoice(int64_t amt_msat, int64_t payment_hash, jstring description, int32_t invoice_expiry_delta_secs, int64_tArray phantom_route_hints, int64_t entropy_source, int64_t node_signer, int64_t logger, int32_t network, int64_t min_final_cltv_expiry_delta, int64_t duration_since_epoch) {
void* amt_msat_ptr = untag_ptr(amt_msat);
CHECK_ACCESS(amt_msat_ptr);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_create_invoice_from_channelmanager(int64_t channelmanager, int64_t node_signer, int64_t logger, int32_t network, int64_t amt_msat, jstring description, int32_t invoice_expiry_delta_secs, int64_t min_final_cltv_expiry_delta) {
+int64_t CS_LDK_create_invoice_from_channelmanager(int64_t channelmanager, int64_t amt_msat, jstring description, int32_t invoice_expiry_delta_secs, int64_t min_final_cltv_expiry_delta) {
LDKChannelManager channelmanager_conv;
channelmanager_conv.inner = untag_ptr(channelmanager);
channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channelmanager_conv);
channelmanager_conv.is_owned = false;
- void* node_signer_ptr = untag_ptr(node_signer);
- CHECK_ACCESS(node_signer_ptr);
- LDKNodeSigner node_signer_conv = *(LDKNodeSigner*)(node_signer_ptr);
- if (node_signer_conv.free == LDKNodeSigner_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKNodeSigner_JCalls_cloned(&node_signer_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);
- }
- LDKCurrency network_conv = LDKCurrency_from_cs(network);
void* amt_msat_ptr = untag_ptr(amt_msat);
CHECK_ACCESS(amt_msat_ptr);
LDKCOption_u64Z amt_msat_conv = *(LDKCOption_u64Z*)(amt_msat_ptr);
LDKCOption_u16Z min_final_cltv_expiry_delta_conv = *(LDKCOption_u16Z*)(min_final_cltv_expiry_delta_ptr);
min_final_cltv_expiry_delta_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(min_final_cltv_expiry_delta));
LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
- *ret_conv = create_invoice_from_channelmanager(&channelmanager_conv, node_signer_conv, logger_conv, network_conv, amt_msat_conv, description_conv, invoice_expiry_delta_secs, min_final_cltv_expiry_delta_conv);
+ *ret_conv = create_invoice_from_channelmanager(&channelmanager_conv, amt_msat_conv, description_conv, invoice_expiry_delta_secs, min_final_cltv_expiry_delta_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_create_invoice_from_channelmanager_with_description_hash(int64_t channelmanager, int64_t node_signer, int64_t logger, int32_t network, int64_t amt_msat, int64_t description_hash, int32_t invoice_expiry_delta_secs, int64_t min_final_cltv_expiry_delta) {
+int64_t CS_LDK_create_invoice_from_channelmanager_with_description_hash(int64_t channelmanager, int64_t amt_msat, int64_t description_hash, int32_t invoice_expiry_delta_secs, int64_t min_final_cltv_expiry_delta) {
LDKChannelManager channelmanager_conv;
channelmanager_conv.inner = untag_ptr(channelmanager);
channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channelmanager_conv);
channelmanager_conv.is_owned = false;
- void* node_signer_ptr = untag_ptr(node_signer);
- CHECK_ACCESS(node_signer_ptr);
- LDKNodeSigner node_signer_conv = *(LDKNodeSigner*)(node_signer_ptr);
- if (node_signer_conv.free == LDKNodeSigner_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKNodeSigner_JCalls_cloned(&node_signer_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);
- }
- LDKCurrency network_conv = LDKCurrency_from_cs(network);
void* amt_msat_ptr = untag_ptr(amt_msat);
CHECK_ACCESS(amt_msat_ptr);
LDKCOption_u64Z amt_msat_conv = *(LDKCOption_u64Z*)(amt_msat_ptr);
LDKCOption_u16Z min_final_cltv_expiry_delta_conv = *(LDKCOption_u16Z*)(min_final_cltv_expiry_delta_ptr);
min_final_cltv_expiry_delta_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(min_final_cltv_expiry_delta));
LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
- *ret_conv = create_invoice_from_channelmanager_with_description_hash(&channelmanager_conv, node_signer_conv, logger_conv, network_conv, amt_msat_conv, description_hash_conv, invoice_expiry_delta_secs, min_final_cltv_expiry_delta_conv);
+ *ret_conv = create_invoice_from_channelmanager_with_description_hash(&channelmanager_conv, amt_msat_conv, description_hash_conv, invoice_expiry_delta_secs, min_final_cltv_expiry_delta_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(int64_t channelmanager, int64_t node_signer, int64_t logger, int32_t network, int64_t amt_msat, int64_t description_hash, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs, int64_t min_final_cltv_expiry_delta) {
+int64_t CS_LDK_create_invoice_from_channelmanager_with_description_hash_and_payment_hash(int64_t channelmanager, int64_t amt_msat, int64_t description_hash, int32_t invoice_expiry_delta_secs, int8_tArray payment_hash, int64_t min_final_cltv_expiry_delta) {
LDKChannelManager channelmanager_conv;
channelmanager_conv.inner = untag_ptr(channelmanager);
channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channelmanager_conv);
channelmanager_conv.is_owned = false;
- void* node_signer_ptr = untag_ptr(node_signer);
- CHECK_ACCESS(node_signer_ptr);
- LDKNodeSigner node_signer_conv = *(LDKNodeSigner*)(node_signer_ptr);
- if (node_signer_conv.free == LDKNodeSigner_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKNodeSigner_JCalls_cloned(&node_signer_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);
- }
- LDKCurrency network_conv = LDKCurrency_from_cs(network);
void* amt_msat_ptr = untag_ptr(amt_msat);
CHECK_ACCESS(amt_msat_ptr);
LDKCOption_u64Z amt_msat_conv = *(LDKCOption_u64Z*)(amt_msat_ptr);
description_hash_conv.is_owned = ptr_is_owned(description_hash);
CHECK_INNER_FIELD_ACCESS_OR_NULL(description_hash_conv);
description_hash_conv = Sha256_clone(&description_hash_conv);
+ LDKThirtyTwoBytes payment_hash_ref;
+ CHECK(payment_hash->arr_len == 32);
+ memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash);
void* min_final_cltv_expiry_delta_ptr = untag_ptr(min_final_cltv_expiry_delta);
CHECK_ACCESS(min_final_cltv_expiry_delta_ptr);
LDKCOption_u16Z min_final_cltv_expiry_delta_conv = *(LDKCOption_u16Z*)(min_final_cltv_expiry_delta_ptr);
min_final_cltv_expiry_delta_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(min_final_cltv_expiry_delta));
LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
- *ret_conv = create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(&channelmanager_conv, node_signer_conv, logger_conv, network_conv, amt_msat_conv, description_hash_conv, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta_conv);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_create_invoice_from_channelmanager_and_duration_since_epoch(int64_t channelmanager, int64_t node_signer, int64_t logger, int32_t network, int64_t amt_msat, jstring description, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs, int64_t min_final_cltv_expiry_delta) {
- LDKChannelManager channelmanager_conv;
- channelmanager_conv.inner = untag_ptr(channelmanager);
- channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(channelmanager_conv);
- channelmanager_conv.is_owned = false;
- void* node_signer_ptr = untag_ptr(node_signer);
- CHECK_ACCESS(node_signer_ptr);
- LDKNodeSigner node_signer_conv = *(LDKNodeSigner*)(node_signer_ptr);
- if (node_signer_conv.free == LDKNodeSigner_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKNodeSigner_JCalls_cloned(&node_signer_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);
- }
- LDKCurrency network_conv = LDKCurrency_from_cs(network);
- void* amt_msat_ptr = untag_ptr(amt_msat);
- CHECK_ACCESS(amt_msat_ptr);
- LDKCOption_u64Z amt_msat_conv = *(LDKCOption_u64Z*)(amt_msat_ptr);
- amt_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(amt_msat));
- LDKStr description_conv = str_ref_to_owned_c(description);
- void* min_final_cltv_expiry_delta_ptr = untag_ptr(min_final_cltv_expiry_delta);
- CHECK_ACCESS(min_final_cltv_expiry_delta_ptr);
- LDKCOption_u16Z min_final_cltv_expiry_delta_conv = *(LDKCOption_u16Z*)(min_final_cltv_expiry_delta_ptr);
- min_final_cltv_expiry_delta_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(min_final_cltv_expiry_delta));
- LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
- *ret_conv = create_invoice_from_channelmanager_and_duration_since_epoch(&channelmanager_conv, node_signer_conv, logger_conv, network_conv, amt_msat_conv, description_conv, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta_conv);
+ *ret_conv = create_invoice_from_channelmanager_with_description_hash_and_payment_hash(&channelmanager_conv, amt_msat_conv, description_hash_conv, invoice_expiry_delta_secs, payment_hash_ref, min_final_cltv_expiry_delta_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(int64_t channelmanager, int64_t node_signer, int64_t logger, int32_t network, int64_t amt_msat, jstring description, int64_t duration_since_epoch, int32_t invoice_expiry_delta_secs, int8_tArray payment_hash, int64_t min_final_cltv_expiry_delta) {
+int64_t CS_LDK_create_invoice_from_channelmanager_with_payment_hash(int64_t channelmanager, int64_t amt_msat, jstring description, int32_t invoice_expiry_delta_secs, int8_tArray payment_hash, int64_t min_final_cltv_expiry_delta) {
LDKChannelManager channelmanager_conv;
channelmanager_conv.inner = untag_ptr(channelmanager);
channelmanager_conv.is_owned = ptr_is_owned(channelmanager);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channelmanager_conv);
channelmanager_conv.is_owned = false;
- void* node_signer_ptr = untag_ptr(node_signer);
- CHECK_ACCESS(node_signer_ptr);
- LDKNodeSigner node_signer_conv = *(LDKNodeSigner*)(node_signer_ptr);
- if (node_signer_conv.free == LDKNodeSigner_JCalls_free) {
- // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
- LDKNodeSigner_JCalls_cloned(&node_signer_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);
- }
- LDKCurrency network_conv = LDKCurrency_from_cs(network);
void* amt_msat_ptr = untag_ptr(amt_msat);
CHECK_ACCESS(amt_msat_ptr);
LDKCOption_u64Z amt_msat_conv = *(LDKCOption_u64Z*)(amt_msat_ptr);
LDKCOption_u16Z min_final_cltv_expiry_delta_conv = *(LDKCOption_u16Z*)(min_final_cltv_expiry_delta_ptr);
min_final_cltv_expiry_delta_conv = COption_u16Z_clone((LDKCOption_u16Z*)untag_ptr(min_final_cltv_expiry_delta));
LDKCResult_Bolt11InvoiceSignOrCreationErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ), "LDKCResult_Bolt11InvoiceSignOrCreationErrorZ");
- *ret_conv = create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(&channelmanager_conv, node_signer_conv, logger_conv, network_conv, amt_msat_conv, description_conv, duration_since_epoch, invoice_expiry_delta_secs, payment_hash_ref, min_final_cltv_expiry_delta_conv);
+ *ret_conv = create_invoice_from_channelmanager_with_payment_hash(&channelmanager_conv, amt_msat_conv, description_conv, invoice_expiry_delta_secs, payment_hash_ref, min_final_cltv_expiry_delta_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_payment_parameters_from_zero_amount_invoice(int64_t invoice, int64_t amount_msat) {
+int64_t CS_LDK_payment_parameters_from_variable_amount_invoice(int64_t invoice, int64_t amount_msat) {
LDKBolt11Invoice invoice_conv;
invoice_conv.inner = untag_ptr(invoice);
invoice_conv.is_owned = ptr_is_owned(invoice);
CHECK_INNER_FIELD_ACCESS_OR_NULL(invoice_conv);
invoice_conv.is_owned = false;
LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ), "LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ");
- *ret_conv = payment_parameters_from_zero_amount_invoice(&invoice_conv, amount_msat);
+ *ret_conv = payment_parameters_from_variable_amount_invoice(&invoice_conv, amount_msat);
return tag_ptr(ret_conv, true);
}
return ret_conv;
}
-void CS_LDK_PaymentSendFailure_free(int64_t this_ptr) {
- if (!ptr_is_owned(this_ptr)) return;
- void* this_ptr_ptr = untag_ptr(this_ptr);
- CHECK_ACCESS(this_ptr_ptr);
- LDKPaymentSendFailure this_ptr_conv = *(LDKPaymentSendFailure*)(this_ptr_ptr);
- FREE(untag_ptr(this_ptr));
- PaymentSendFailure_free(this_ptr_conv);
-}
-
-static inline uint64_t PaymentSendFailure_clone_ptr(LDKPaymentSendFailure *NONNULL_PTR arg) {
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = PaymentSendFailure_clone(arg);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-int64_t CS_LDK_PaymentSendFailure_clone_ptr(int64_t arg) {
- LDKPaymentSendFailure* arg_conv = (LDKPaymentSendFailure*)untag_ptr(arg);
- int64_t ret_conv = PaymentSendFailure_clone_ptr(arg_conv);
- return ret_conv;
-}
-
-int64_t CS_LDK_PaymentSendFailure_clone(int64_t orig) {
- LDKPaymentSendFailure* orig_conv = (LDKPaymentSendFailure*)untag_ptr(orig);
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = PaymentSendFailure_clone(orig_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_PaymentSendFailure_parameter_error(int64_t a) {
- void* a_ptr = untag_ptr(a);
- CHECK_ACCESS(a_ptr);
- LDKAPIError a_conv = *(LDKAPIError*)(a_ptr);
- a_conv = APIError_clone((LDKAPIError*)untag_ptr(a));
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = PaymentSendFailure_parameter_error(a_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_PaymentSendFailure_path_parameter_error(int64_tArray a) {
- LDKCVec_CResult_NoneAPIErrorZZ a_constr;
- a_constr.datalen = a->arr_len;
- if (a_constr.datalen > 0)
- a_constr.data = MALLOC(a_constr.datalen * sizeof(LDKCResult_NoneAPIErrorZ), "LDKCVec_CResult_NoneAPIErrorZZ Elements");
- else
- a_constr.data = NULL;
- int64_t* a_vals = a->elems;
- for (size_t w = 0; w < a_constr.datalen; w++) {
- int64_t a_conv_22 = a_vals[w];
- void* a_conv_22_ptr = untag_ptr(a_conv_22);
- CHECK_ACCESS(a_conv_22_ptr);
- LDKCResult_NoneAPIErrorZ a_conv_22_conv = *(LDKCResult_NoneAPIErrorZ*)(a_conv_22_ptr);
- a_conv_22_conv = CResult_NoneAPIErrorZ_clone((LDKCResult_NoneAPIErrorZ*)untag_ptr(a_conv_22));
- a_constr.data[w] = a_conv_22_conv;
- }
- FREE(a);
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = PaymentSendFailure_path_parameter_error(a_constr);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_PaymentSendFailure_all_failed_resend_safe(int64_tArray a) {
- LDKCVec_APIErrorZ a_constr;
- a_constr.datalen = a->arr_len;
- if (a_constr.datalen > 0)
- a_constr.data = MALLOC(a_constr.datalen * sizeof(LDKAPIError), "LDKCVec_APIErrorZ Elements");
- else
- a_constr.data = NULL;
- int64_t* a_vals = a->elems;
- for (size_t k = 0; k < a_constr.datalen; k++) {
- int64_t a_conv_10 = a_vals[k];
- void* a_conv_10_ptr = untag_ptr(a_conv_10);
- CHECK_ACCESS(a_conv_10_ptr);
- LDKAPIError a_conv_10_conv = *(LDKAPIError*)(a_conv_10_ptr);
- a_conv_10_conv = APIError_clone((LDKAPIError*)untag_ptr(a_conv_10));
- a_constr.data[k] = a_conv_10_conv;
- }
- FREE(a);
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = PaymentSendFailure_all_failed_resend_safe(a_constr);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_PaymentSendFailure_duplicate_payment() {
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = PaymentSendFailure_duplicate_payment();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_PaymentSendFailure_partial_failure(int64_tArray results, int64_t failed_paths_retry, int8_tArray payment_id) {
- LDKCVec_CResult_NoneAPIErrorZZ results_constr;
- results_constr.datalen = results->arr_len;
- if (results_constr.datalen > 0)
- results_constr.data = MALLOC(results_constr.datalen * sizeof(LDKCResult_NoneAPIErrorZ), "LDKCVec_CResult_NoneAPIErrorZZ Elements");
- else
- results_constr.data = NULL;
- int64_t* results_vals = results->elems;
- for (size_t w = 0; w < results_constr.datalen; w++) {
- int64_t results_conv_22 = results_vals[w];
- void* results_conv_22_ptr = untag_ptr(results_conv_22);
- CHECK_ACCESS(results_conv_22_ptr);
- LDKCResult_NoneAPIErrorZ results_conv_22_conv = *(LDKCResult_NoneAPIErrorZ*)(results_conv_22_ptr);
- results_conv_22_conv = CResult_NoneAPIErrorZ_clone((LDKCResult_NoneAPIErrorZ*)untag_ptr(results_conv_22));
- results_constr.data[w] = results_conv_22_conv;
- }
- FREE(results);
- LDKRouteParameters failed_paths_retry_conv;
- failed_paths_retry_conv.inner = untag_ptr(failed_paths_retry);
- failed_paths_retry_conv.is_owned = ptr_is_owned(failed_paths_retry);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(failed_paths_retry_conv);
- failed_paths_retry_conv = RouteParameters_clone(&failed_paths_retry_conv);
- LDKThirtyTwoBytes payment_id_ref;
- CHECK(payment_id->arr_len == 32);
- memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
- LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
- *ret_copy = PaymentSendFailure_partial_failure(results_constr, failed_paths_retry_conv, payment_id_ref);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-jboolean CS_LDK_PaymentSendFailure_eq(int64_t a, int64_t b) {
- LDKPaymentSendFailure* a_conv = (LDKPaymentSendFailure*)untag_ptr(a);
- LDKPaymentSendFailure* b_conv = (LDKPaymentSendFailure*)untag_ptr(b);
- jboolean ret_conv = PaymentSendFailure_eq(a_conv, b_conv);
- return ret_conv;
-}
-
void CS_LDK_Bolt12PaymentError_free(int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
-int64_t CS_LDK_ProbeSendFailure_sending_failed(int64_t a) {
+int64_t CS_LDK_ProbeSendFailure_parameter_error(int64_t a) {
void* a_ptr = untag_ptr(a);
CHECK_ACCESS(a_ptr);
- LDKPaymentSendFailure a_conv = *(LDKPaymentSendFailure*)(a_ptr);
- a_conv = PaymentSendFailure_clone((LDKPaymentSendFailure*)untag_ptr(a));
+ LDKAPIError a_conv = *(LDKAPIError*)(a_ptr);
+ a_conv = APIError_clone((LDKAPIError*)untag_ptr(a));
LDKProbeSendFailure *ret_copy = MALLOC(sizeof(LDKProbeSendFailure), "LDKProbeSendFailure");
- *ret_copy = ProbeSendFailure_sending_failed(a_conv);
+ *ret_copy = ProbeSendFailure_parameter_error(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_ProbeSendFailure_duplicate_probe() {
+ LDKProbeSendFailure *ret_copy = MALLOC(sizeof(LDKProbeSendFailure), "LDKProbeSendFailure");
+ *ret_copy = ProbeSendFailure_duplicate_probe();
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
Type_free(this_ptr_conv);
}
+int8_tArray CS_LDK_InitFeatures_write(int64_t obj) {
+ LDKInitFeatures 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 = InitFeatures_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_InitFeatures_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+ *ret_conv = InitFeatures_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int8_tArray CS_LDK_ChannelFeatures_write(int64_t obj) {
+ LDKChannelFeatures 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 = ChannelFeatures_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_ChannelFeatures_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+ *ret_conv = ChannelFeatures_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int8_tArray CS_LDK_NodeFeatures_write(int64_t obj) {
+ LDKNodeFeatures 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 = NodeFeatures_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_NodeFeatures_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+ *ret_conv = NodeFeatures_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int8_tArray CS_LDK_Bolt11InvoiceFeatures_write(int64_t obj) {
+ LDKBolt11InvoiceFeatures 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 = Bolt11InvoiceFeatures_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_Bolt11InvoiceFeatures_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = Bolt11InvoiceFeatures_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int8_tArray CS_LDK_Bolt12InvoiceFeatures_write(int64_t obj) {
+ LDKBolt12InvoiceFeatures 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 = Bolt12InvoiceFeatures_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_Bolt12InvoiceFeatures_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ), "LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ");
+ *ret_conv = Bolt12InvoiceFeatures_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int8_tArray CS_LDK_BlindedHopFeatures_write(int64_t obj) {
+ LDKBlindedHopFeatures 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 = BlindedHopFeatures_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_BlindedHopFeatures_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_BlindedHopFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BlindedHopFeaturesDecodeErrorZ), "LDKCResult_BlindedHopFeaturesDecodeErrorZ");
+ *ret_conv = BlindedHopFeatures_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int8_tArray CS_LDK_ChannelTypeFeatures_write(int64_t obj) {
+ LDKChannelTypeFeatures 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 = ChannelTypeFeatures_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_ChannelTypeFeatures_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_ChannelTypeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTypeFeaturesDecodeErrorZ), "LDKCResult_ChannelTypeFeaturesDecodeErrorZ");
+ *ret_conv = ChannelTypeFeatures_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
void CS_LDK_OfferId_free(int64_t this_obj) {
LDKOfferId this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
-int8_tArray CS_LDK_Offer_signing_pubkey(int64_t this_arg) {
+int8_tArray CS_LDK_Offer_issuer_signing_pubkey(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;
int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, Offer_signing_pubkey(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, Offer_issuer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return ret_conv;
}
-int64_t CS_LDK_Offer_request_invoice_deriving_payer_id(int64_t this_arg, int64_t expanded_key, int64_t nonce, int8_tArray payment_id) {
+int64_t CS_LDK_Offer_request_invoice(int64_t this_arg, int64_t expanded_key, int64_t nonce, 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);
LDKThirtyTwoBytes payment_id_ref;
CHECK(payment_id->arr_len == 32);
memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
- LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ");
- *ret_conv = Offer_request_invoice_deriving_payer_id(&this_arg_conv, &expanded_key_conv, nonce_conv, payment_id_ref);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_Offer_request_invoice_deriving_metadata(int64_t this_arg, int8_tArray payer_id, int64_t expanded_key, int64_t nonce, 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(payer_id->arr_len == 33);
- memcpy(payer_id_ref.compressed_form, payer_id->elems, 33); FREE(payer_id);
- 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;
- LDKNonce nonce_conv;
- nonce_conv.inner = untag_ptr(nonce);
- nonce_conv.is_owned = ptr_is_owned(nonce);
- CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_conv);
- nonce_conv = Nonce_clone(&nonce_conv);
- LDKThirtyTwoBytes payment_id_ref;
- CHECK(payment_id->arr_len == 32);
- memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
- 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, nonce_conv, payment_id_ref);
- return tag_ptr(ret_conv, true);
-}
-
-int64_t CS_LDK_Offer_request_invoice(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 = metadata->arr_len;
- metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes");
- memcpy(metadata_ref.data, metadata->elems, metadata_ref.datalen); FREE(metadata);
- LDKPublicKey payer_id_ref;
- CHECK(payer_id->arr_len == 33);
- memcpy(payer_id_ref.compressed_form, payer_id->elems, 33); FREE(payer_id);
- LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ");
- *ret_conv = Offer_request_invoice(&this_arg_conv, metadata_ref, payer_id_ref);
+ LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ");
+ *ret_conv = Offer_request_invoice(&this_arg_conv, &expanded_key_conv, nonce_conv, payment_id_ref);
return tag_ptr(ret_conv, true);
}
return ret_ref;
}
+int64_tArray CS_LDK_UnsignedBolt12Invoice_payment_paths(int64_t this_arg) {
+ LDKUnsignedBolt12Invoice 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_BlindedPaymentPathZ ret_var = UnsignedBolt12Invoice_payment_paths(&this_arg_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t u = 0; u < ret_var.datalen; u++) {
+ LDKBlindedPaymentPath ret_conv_20_var = ret_var.data[u];
+ int64_t ret_conv_20_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_20_var);
+ ret_conv_20_ref = tag_ptr(ret_conv_20_var.inner, ret_conv_20_var.is_owned);
+ ret_arr_ptr[u] = ret_conv_20_ref;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
int64_t CS_LDK_UnsignedBolt12Invoice_created_at(int64_t this_arg) {
LDKUnsignedBolt12Invoice this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
+int8_tArray CS_LDK_UnsignedBolt12Invoice_issuer_signing_pubkey(int64_t this_arg) {
+ LDKUnsignedBolt12Invoice 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 = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, UnsignedBolt12Invoice_issuer_signing_pubkey(&this_arg_conv).compressed_form, 33);
+ return ret_arr;
+}
+
int8_tArray CS_LDK_UnsignedBolt12Invoice_payer_metadata(int64_t this_arg) {
LDKUnsignedBolt12Invoice this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-int8_tArray CS_LDK_UnsignedBolt12Invoice_payer_id(int64_t this_arg) {
+int8_tArray CS_LDK_UnsignedBolt12Invoice_payer_signing_pubkey(int64_t this_arg) {
LDKUnsignedBolt12Invoice 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 = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, UnsignedBolt12Invoice_payer_id(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, UnsignedBolt12Invoice_payer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return ret_conv;
}
+int64_tArray CS_LDK_Bolt12Invoice_payment_paths(int64_t this_arg) {
+ LDKBolt12Invoice 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_BlindedPaymentPathZ ret_var = Bolt12Invoice_payment_paths(&this_arg_conv);
+ int64_tArray ret_arr = NULL;
+ ret_arr = init_int64_tArray(ret_var.datalen, __LINE__);
+ int64_t *ret_arr_ptr = (int64_t*)(((uint8_t*)ret_arr) + 8);
+ for (size_t u = 0; u < ret_var.datalen; u++) {
+ LDKBlindedPaymentPath ret_conv_20_var = ret_var.data[u];
+ int64_t ret_conv_20_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_conv_20_var);
+ ret_conv_20_ref = tag_ptr(ret_conv_20_var.inner, ret_conv_20_var.is_owned);
+ ret_arr_ptr[u] = ret_conv_20_ref;
+ }
+
+ FREE(ret_var.data);
+ return ret_arr;
+}
+
int64_t CS_LDK_Bolt12Invoice_created_at(int64_t this_arg) {
LDKBolt12Invoice this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
+int8_tArray CS_LDK_Bolt12Invoice_issuer_signing_pubkey(int64_t this_arg) {
+ LDKBolt12Invoice 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 = init_int8_tArray(33, __LINE__);
+ memcpy(ret_arr->elems, Bolt12Invoice_issuer_signing_pubkey(&this_arg_conv).compressed_form, 33);
+ return ret_arr;
+}
+
int8_tArray CS_LDK_Bolt12Invoice_payer_metadata(int64_t this_arg) {
LDKBolt12Invoice this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-int8_tArray CS_LDK_Bolt12Invoice_payer_id(int64_t this_arg) {
+int8_tArray CS_LDK_Bolt12Invoice_payer_signing_pubkey(int64_t this_arg) {
LDKBolt12Invoice 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 = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, Bolt12Invoice_payer_id(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, Bolt12Invoice_payer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return tag_ptr(ret_conv, true);
}
-void CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_free(int64_t this_obj) {
- LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj_conv;
+void CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_free(int64_t this_obj) {
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder 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);
+ InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_free(this_obj_conv);
}
-void CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_free(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);
-}
-
-int64_t CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_build(int64_t this_arg) {
- LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+int64_t CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_build_and_sign(int64_t this_arg) {
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder 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
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder
- LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ), "LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ");
- *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_build(this_arg_conv);
+ LDKCResult_InvoiceRequestBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestBolt12SemanticErrorZ), "LDKCResult_InvoiceRequestBolt12SemanticErrorZ");
+ *ret_conv = InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_build_and_sign(this_arg_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_chain(int64_t this_arg, int32_t network) {
- LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+int64_t CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_chain(int64_t this_arg, int32_t network) {
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder 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
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder
LDKNetwork network_conv = LDKNetwork_from_cs(network);
LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
- *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_chain(this_arg_conv, network_conv);
+ *ret_conv = InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_chain(this_arg_conv, network_conv);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(int64_t this_arg, int64_t amount_msats) {
- LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+int64_t CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_amount_msats(int64_t this_arg, int64_t amount_msats) {
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder 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
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder
LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
- *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(this_arg_conv, amount_msats);
+ *ret_conv = InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_amount_msats(this_arg_conv, amount_msats);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_quantity(int64_t this_arg, int64_t quantity) {
- LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+int64_t CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_quantity(int64_t this_arg, int64_t quantity) {
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder 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
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder
LDKCResult_NoneBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneBolt12SemanticErrorZ), "LDKCResult_NoneBolt12SemanticErrorZ");
- *ret_conv = InvoiceRequestWithExplicitPayerIdBuilder_quantity(this_arg_conv, quantity);
+ *ret_conv = InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_quantity(this_arg_conv, quantity);
return tag_ptr(ret_conv, true);
}
-void CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_payer_note(int64_t this_arg, jstring payer_note) {
- LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg_conv;
+void CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_payer_note(int64_t this_arg, jstring payer_note) {
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder 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
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder
LDKStr payer_note_conv = str_ref_to_owned_c(payer_note);
- InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv);
+ InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_payer_note(this_arg_conv, payer_note_conv);
}
-int64_t CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(int64_t this_arg) {
- LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg_conv;
+void CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_sourced_from_human_readable_name(int64_t this_arg, int64_t hrn) {
+ LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder 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
+ // WARNING: we need a move here but no clone is available for LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder
- 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);
-}
-
-int64_t CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_chain(int64_t this_arg, int32_t 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_cs(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);
-}
-
-int64_t CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(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);
-}
-
-int64_t CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_quantity(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);
-}
-
-void CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_payer_note(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 = str_ref_to_owned_c(payer_note);
- InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this_arg_conv, payer_note_conv);
+ LDKHumanReadableName hrn_conv;
+ hrn_conv.inner = untag_ptr(hrn);
+ hrn_conv.is_owned = ptr_is_owned(hrn);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(hrn_conv);
+ hrn_conv = HumanReadableName_clone(&hrn_conv);
+ InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_sourced_from_human_readable_name(this_arg_conv, hrn_conv);
}
void CS_LDK_UnsignedInvoiceRequest_free(int64_t this_obj) {
return ret_ref;
}
-int8_tArray CS_LDK_UnsignedInvoiceRequest_signing_pubkey(int64_t this_arg) {
+int8_tArray CS_LDK_UnsignedInvoiceRequest_issuer_signing_pubkey(int64_t this_arg) {
LDKUnsignedInvoiceRequest 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 = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, UnsignedInvoiceRequest_signing_pubkey(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, UnsignedInvoiceRequest_issuer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return ret_ref;
}
+jboolean CS_LDK_UnsignedInvoiceRequest_has_amount_msats(int64_t this_arg) {
+ LDKUnsignedInvoiceRequest 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 = UnsignedInvoiceRequest_has_amount_msats(&this_arg_conv);
+ return ret_conv;
+}
+
int64_t CS_LDK_UnsignedInvoiceRequest_invoice_request_features(int64_t this_arg) {
LDKUnsignedInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-int8_tArray CS_LDK_UnsignedInvoiceRequest_payer_id(int64_t this_arg) {
+int8_tArray CS_LDK_UnsignedInvoiceRequest_payer_signing_pubkey(int64_t this_arg) {
LDKUnsignedInvoiceRequest 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 = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, UnsignedInvoiceRequest_payer_id(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, UnsignedInvoiceRequest_payer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return ret_ref;
}
+int64_t CS_LDK_UnsignedInvoiceRequest_offer_from_hrn(int64_t this_arg) {
+ LDKUnsignedInvoiceRequest 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;
+ LDKHumanReadableName ret_var = UnsignedInvoiceRequest_offer_from_hrn(&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;
+}
+
ptrArray CS_LDK_InvoiceRequest_chains(int64_t this_arg) {
LDKInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-int8_tArray CS_LDK_InvoiceRequest_signing_pubkey(int64_t this_arg) {
+int8_tArray CS_LDK_InvoiceRequest_issuer_signing_pubkey(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 = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, InvoiceRequest_signing_pubkey(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, InvoiceRequest_issuer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return ret_ref;
}
+jboolean CS_LDK_InvoiceRequest_has_amount_msats(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;
+ jboolean ret_conv = InvoiceRequest_has_amount_msats(&this_arg_conv);
+ return ret_conv;
+}
+
int64_t CS_LDK_InvoiceRequest_invoice_request_features(int64_t this_arg) {
LDKInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-int8_tArray CS_LDK_InvoiceRequest_payer_id(int64_t this_arg) {
+int8_tArray CS_LDK_InvoiceRequest_payer_signing_pubkey(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 = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, InvoiceRequest_payer_id(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, InvoiceRequest_payer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return ret_ref;
}
+int64_t CS_LDK_InvoiceRequest_offer_from_hrn(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;
+ LDKHumanReadableName ret_var = InvoiceRequest_offer_from_hrn(&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;
+}
+
int64_t CS_LDK_InvoiceRequest_respond_with(int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) {
LDKInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-int8_tArray CS_LDK_VerifiedInvoiceRequest_signing_pubkey(int64_t this_arg) {
+int8_tArray CS_LDK_VerifiedInvoiceRequest_issuer_signing_pubkey(int64_t this_arg) {
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;
int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, VerifiedInvoiceRequest_signing_pubkey(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, VerifiedInvoiceRequest_issuer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return ret_ref;
}
+jboolean CS_LDK_VerifiedInvoiceRequest_has_amount_msats(int64_t this_arg) {
+ 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;
+ jboolean ret_conv = VerifiedInvoiceRequest_has_amount_msats(&this_arg_conv);
+ return ret_conv;
+}
+
int64_t CS_LDK_VerifiedInvoiceRequest_invoice_request_features(int64_t this_arg) {
LDKVerifiedInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_ref;
}
-int8_tArray CS_LDK_VerifiedInvoiceRequest_payer_id(int64_t this_arg) {
+int8_tArray CS_LDK_VerifiedInvoiceRequest_payer_signing_pubkey(int64_t this_arg) {
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;
int8_tArray ret_arr = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, VerifiedInvoiceRequest_payer_id(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, VerifiedInvoiceRequest_payer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return ret_ref;
}
+int64_t CS_LDK_VerifiedInvoiceRequest_offer_from_hrn(int64_t this_arg) {
+ 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;
+ LDKHumanReadableName ret_var = VerifiedInvoiceRequest_offer_from_hrn(&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;
+}
+
int64_t CS_LDK_VerifiedInvoiceRequest_respond_with(int64_t this_arg, int64_tArray payment_paths, int8_tArray payment_hash) {
LDKVerifiedInvoiceRequest this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_arr;
}
+int64_t CS_LDK_InvoiceRequest_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_InvoiceRequestDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InvoiceRequestDecodeErrorZ), "LDKCResult_InvoiceRequestDecodeErrorZ");
+ *ret_conv = InvoiceRequest_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
void CS_LDK_InvoiceRequestFields_free(int64_t this_obj) {
LDKInvoiceRequestFields this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
InvoiceRequestFields_free(this_obj_conv);
}
-int8_tArray CS_LDK_InvoiceRequestFields_get_payer_id(int64_t this_ptr) {
+int8_tArray CS_LDK_InvoiceRequestFields_get_payer_signing_pubkey(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 = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, InvoiceRequestFields_get_payer_id(&this_ptr_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, InvoiceRequestFields_get_payer_signing_pubkey(&this_ptr_conv).compressed_form, 33);
return ret_arr;
}
-void CS_LDK_InvoiceRequestFields_set_payer_id(int64_t this_ptr, int8_tArray val) {
+void CS_LDK_InvoiceRequestFields_set_payer_signing_pubkey(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);
LDKPublicKey val_ref;
CHECK(val->arr_len == 33);
memcpy(val_ref.compressed_form, val->elems, 33); FREE(val);
- InvoiceRequestFields_set_payer_id(&this_ptr_conv, val_ref);
+ InvoiceRequestFields_set_payer_signing_pubkey(&this_ptr_conv, val_ref);
}
int64_t CS_LDK_InvoiceRequestFields_get_quantity(int64_t this_ptr) {
InvoiceRequestFields_set_payer_note_truncated(&this_ptr_conv, val_conv);
}
-int64_t CS_LDK_InvoiceRequestFields_new(int8_tArray payer_id_arg, int64_t quantity_arg, int64_t payer_note_truncated_arg) {
- LDKPublicKey payer_id_arg_ref;
- CHECK(payer_id_arg->arr_len == 33);
- memcpy(payer_id_arg_ref.compressed_form, payer_id_arg->elems, 33); FREE(payer_id_arg);
+int64_t CS_LDK_InvoiceRequestFields_get_human_readable_name(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;
+ LDKHumanReadableName ret_var = InvoiceRequestFields_get_human_readable_name(&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;
+}
+
+void CS_LDK_InvoiceRequestFields_set_human_readable_name(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;
+ LDKHumanReadableName 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 = HumanReadableName_clone(&val_conv);
+ InvoiceRequestFields_set_human_readable_name(&this_ptr_conv, val_conv);
+}
+
+int64_t CS_LDK_InvoiceRequestFields_new(int8_tArray payer_signing_pubkey_arg, int64_t quantity_arg, int64_t payer_note_truncated_arg, int64_t human_readable_name_arg) {
+ LDKPublicKey payer_signing_pubkey_arg_ref;
+ CHECK(payer_signing_pubkey_arg->arr_len == 33);
+ memcpy(payer_signing_pubkey_arg_ref.compressed_form, payer_signing_pubkey_arg->elems, 33); FREE(payer_signing_pubkey_arg);
void* quantity_arg_ptr = untag_ptr(quantity_arg);
CHECK_ACCESS(quantity_arg_ptr);
LDKCOption_u64Z quantity_arg_conv = *(LDKCOption_u64Z*)(quantity_arg_ptr);
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);
+ LDKHumanReadableName human_readable_name_arg_conv;
+ human_readable_name_arg_conv.inner = untag_ptr(human_readable_name_arg);
+ human_readable_name_arg_conv.is_owned = ptr_is_owned(human_readable_name_arg);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(human_readable_name_arg_conv);
+ human_readable_name_arg_conv = HumanReadableName_clone(&human_readable_name_arg_conv);
+ LDKInvoiceRequestFields ret_var = InvoiceRequestFields_new(payer_signing_pubkey_arg_ref, quantity_arg_conv, payer_note_truncated_arg_conv, human_readable_name_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_conv;
}
-int32_t CS_LDK_Bolt12SemanticError_missing_signing_pubkey() {
- int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_missing_signing_pubkey());
+int32_t CS_LDK_Bolt12SemanticError_missing_issuer_signing_pubkey() {
+ int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_missing_issuer_signing_pubkey());
return ret_conv;
}
-int32_t CS_LDK_Bolt12SemanticError_invalid_signing_pubkey() {
- int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_invalid_signing_pubkey());
- return ret_conv;
-}
-
-int32_t CS_LDK_Bolt12SemanticError_unexpected_signing_pubkey() {
- int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_unexpected_signing_pubkey());
+int32_t CS_LDK_Bolt12SemanticError_unexpected_issuer_signing_pubkey() {
+ int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_unexpected_issuer_signing_pubkey());
return ret_conv;
}
return ret_conv;
}
-int32_t CS_LDK_Bolt12SemanticError_missing_payer_id() {
- int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_missing_payer_id());
+int32_t CS_LDK_Bolt12SemanticError_missing_payer_signing_pubkey() {
+ int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_missing_payer_signing_pubkey());
return ret_conv;
}
return ret_conv;
}
+int32_t CS_LDK_Bolt12SemanticError_missing_signing_pubkey() {
+ int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_missing_signing_pubkey());
+ return ret_conv;
+}
+
+int32_t CS_LDK_Bolt12SemanticError_invalid_signing_pubkey() {
+ int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_invalid_signing_pubkey());
+ return ret_conv;
+}
+
int32_t CS_LDK_Bolt12SemanticError_missing_signature() {
int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_missing_signature());
return ret_conv;
}
+int32_t CS_LDK_Bolt12SemanticError_unexpected_human_readable_name() {
+ int32_t ret_conv = LDKBolt12SemanticError_to_cs(Bolt12SemanticError_unexpected_human_readable_name());
+ return ret_conv;
+}
+
void CS_LDK_RefundMaybeWithDerivedMetadataBuilder_free(int64_t this_obj) {
LDKRefundMaybeWithDerivedMetadataBuilder this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
-int64_t CS_LDK_RefundMaybeWithDerivedMetadataBuilder_new(int8_tArray metadata, int8_tArray payer_id, int64_t amount_msats) {
+int64_t CS_LDK_RefundMaybeWithDerivedMetadataBuilder_new(int8_tArray metadata, int8_tArray signing_pubkey, int64_t amount_msats) {
LDKCVec_u8Z metadata_ref;
metadata_ref.datalen = metadata->arr_len;
metadata_ref.data = MALLOC(metadata_ref.datalen, "LDKCVec_u8Z Bytes");
memcpy(metadata_ref.data, metadata->elems, metadata_ref.datalen); FREE(metadata);
- LDKPublicKey payer_id_ref;
- CHECK(payer_id->arr_len == 33);
- memcpy(payer_id_ref.compressed_form, payer_id->elems, 33); FREE(payer_id);
+ LDKPublicKey signing_pubkey_ref;
+ CHECK(signing_pubkey->arr_len == 33);
+ memcpy(signing_pubkey_ref.compressed_form, signing_pubkey->elems, 33); FREE(signing_pubkey);
LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
- *ret_conv = RefundMaybeWithDerivedMetadataBuilder_new(metadata_ref, payer_id_ref, amount_msats);
+ *ret_conv = RefundMaybeWithDerivedMetadataBuilder_new(metadata_ref, signing_pubkey_ref, amount_msats);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(int8_tArray node_id, int64_t expanded_key, int64_t nonce, int64_t amount_msats, int8_tArray payment_id) {
+int64_t CS_LDK_RefundMaybeWithDerivedMetadataBuilder_deriving_signing_pubkey(int8_tArray node_id, int64_t expanded_key, int64_t nonce, int64_t amount_msats, int8_tArray payment_id) {
LDKPublicKey node_id_ref;
CHECK(node_id->arr_len == 33);
memcpy(node_id_ref.compressed_form, node_id->elems, 33); FREE(node_id);
CHECK(payment_id->arr_len == 32);
memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ), "LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ");
- *ret_conv = RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(node_id_ref, &expanded_key_conv, nonce_conv, amount_msats, payment_id_ref);
+ *ret_conv = RefundMaybeWithDerivedMetadataBuilder_deriving_signing_pubkey(node_id_ref, &expanded_key_conv, nonce_conv, amount_msats, payment_id_ref);
return tag_ptr(ret_conv, true);
}
return ret_ref;
}
-int8_tArray CS_LDK_Refund_payer_id(int64_t this_arg) {
+int8_tArray CS_LDK_Refund_payer_signing_pubkey(int64_t this_arg) {
LDKRefund 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 = init_int8_tArray(33, __LINE__);
- memcpy(ret_arr->elems, Refund_payer_id(&this_arg_conv).compressed_form, 33);
+ memcpy(ret_arr->elems, Refund_payer_signing_pubkey(&this_arg_conv).compressed_form, 33);
return ret_arr;
}
return tag_ptr(ret_ret, true);
}
-int64_t CS_LDK_DefaultRouter_as_MessageRouter(int64_t this_arg) {
- LDKDefaultRouter 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;
- LDKMessageRouter* ret_ret = MALLOC(sizeof(LDKMessageRouter), "LDKMessageRouter");
- *ret_ret = DefaultRouter_as_MessageRouter(&this_arg_conv);
- return tag_ptr(ret_ret, true);
-}
-
void CS_LDK_Router_free(int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
-int64_t CS_LDK_ProbabilisticScorer_historical_estimated_payment_success_probability(int64_t this_arg, int64_t scid, int64_t target, int64_t amount_msat, int64_t params) {
+int64_t CS_LDK_ProbabilisticScorer_historical_estimated_payment_success_probability(int64_t this_arg, int64_t scid, int64_t target, int64_t amount_msat, int64_t params, jboolean allow_fallback_estimation) {
+ LDKProbabilisticScorer 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 target_conv;
+ target_conv.inner = untag_ptr(target);
+ target_conv.is_owned = ptr_is_owned(target);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(target_conv);
+ target_conv.is_owned = false;
+ LDKProbabilisticScoringFeeParameters params_conv;
+ params_conv.inner = untag_ptr(params);
+ params_conv.is_owned = ptr_is_owned(params);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(params_conv);
+ params_conv.is_owned = false;
+ LDKCOption_f64Z *ret_copy = MALLOC(sizeof(LDKCOption_f64Z), "LDKCOption_f64Z");
+ *ret_copy = ProbabilisticScorer_historical_estimated_payment_success_probability(&this_arg_conv, scid, &target_conv, amount_msat, ¶ms_conv, allow_fallback_estimation);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_ProbabilisticScorer_live_estimated_payment_success_probability(int64_t this_arg, int64_t scid, int64_t target, int64_t amount_msat, int64_t params) {
LDKProbabilisticScorer 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(params_conv);
params_conv.is_owned = false;
LDKCOption_f64Z *ret_copy = MALLOC(sizeof(LDKCOption_f64Z), "LDKCOption_f64Z");
- *ret_copy = ProbabilisticScorer_historical_estimated_payment_success_probability(&this_arg_conv, scid, &target_conv, amount_msat, ¶ms_conv);
+ *ret_copy = ProbabilisticScorer_live_estimated_payment_success_probability(&this_arg_conv, scid, &target_conv, amount_msat, ¶ms_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
HeldHtlcAvailable_free(this_obj_conv);
}
-int8_tArray CS_LDK_HeldHtlcAvailable_get_payment_release_secret(int64_t this_ptr) {
- LDKHeldHtlcAvailable this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_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 = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, *HeldHtlcAvailable_get_payment_release_secret(&this_ptr_conv), 32);
- return ret_arr;
-}
-
-void CS_LDK_HeldHtlcAvailable_set_payment_release_secret(int64_t this_ptr, int8_tArray val) {
- LDKHeldHtlcAvailable this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_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(val->arr_len == 32);
- memcpy(val_ref.data, val->elems, 32); FREE(val);
- HeldHtlcAvailable_set_payment_release_secret(&this_ptr_conv, val_ref);
-}
-
-int64_t CS_LDK_HeldHtlcAvailable_new(int8_tArray payment_release_secret_arg) {
- LDKThirtyTwoBytes payment_release_secret_arg_ref;
- CHECK(payment_release_secret_arg->arr_len == 32);
- memcpy(payment_release_secret_arg_ref.data, payment_release_secret_arg->elems, 32); FREE(payment_release_secret_arg);
- LDKHeldHtlcAvailable ret_var = HeldHtlcAvailable_new(payment_release_secret_arg_ref);
+int64_t CS_LDK_HeldHtlcAvailable_new() {
+ LDKHeldHtlcAvailable ret_var = HeldHtlcAvailable_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);
ReleaseHeldHtlc_free(this_obj_conv);
}
-int8_tArray CS_LDK_ReleaseHeldHtlc_get_payment_release_secret(int64_t this_ptr) {
- LDKReleaseHeldHtlc this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_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 = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, *ReleaseHeldHtlc_get_payment_release_secret(&this_ptr_conv), 32);
- return ret_arr;
-}
-
-void CS_LDK_ReleaseHeldHtlc_set_payment_release_secret(int64_t this_ptr, int8_tArray val) {
- LDKReleaseHeldHtlc this_ptr_conv;
- this_ptr_conv.inner = untag_ptr(this_ptr);
- this_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(val->arr_len == 32);
- memcpy(val_ref.data, val->elems, 32); FREE(val);
- ReleaseHeldHtlc_set_payment_release_secret(&this_ptr_conv, val_ref);
-}
-
-int64_t CS_LDK_ReleaseHeldHtlc_new(int8_tArray payment_release_secret_arg) {
- LDKThirtyTwoBytes payment_release_secret_arg_ref;
- CHECK(payment_release_secret_arg->arr_len == 32);
- memcpy(payment_release_secret_arg_ref.data, payment_release_secret_arg->elems, 32); FREE(payment_release_secret_arg);
- LDKReleaseHeldHtlc ret_var = ReleaseHeldHtlc_new(payment_release_secret_arg_ref);
+int64_t CS_LDK_ReleaseHeldHtlc_new() {
+ LDKReleaseHeldHtlc ret_var = ReleaseHeldHtlc_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 tag_ptr(ret_conv, true);
}
+void CS_LDK_DNSResolverMessageHandler_free(int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKDNSResolverMessageHandler this_ptr_conv = *(LDKDNSResolverMessageHandler*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ DNSResolverMessageHandler_free(this_ptr_conv);
+}
+
+void CS_LDK_DNSResolverMessage_free(int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKDNSResolverMessage this_ptr_conv = *(LDKDNSResolverMessage*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ DNSResolverMessage_free(this_ptr_conv);
+}
+
+static inline uint64_t DNSResolverMessage_clone_ptr(LDKDNSResolverMessage *NONNULL_PTR arg) {
+ LDKDNSResolverMessage *ret_copy = MALLOC(sizeof(LDKDNSResolverMessage), "LDKDNSResolverMessage");
+ *ret_copy = DNSResolverMessage_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t CS_LDK_DNSResolverMessage_clone_ptr(int64_t arg) {
+ LDKDNSResolverMessage* arg_conv = (LDKDNSResolverMessage*)untag_ptr(arg);
+ int64_t ret_conv = DNSResolverMessage_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_DNSResolverMessage_clone(int64_t orig) {
+ LDKDNSResolverMessage* orig_conv = (LDKDNSResolverMessage*)untag_ptr(orig);
+ LDKDNSResolverMessage *ret_copy = MALLOC(sizeof(LDKDNSResolverMessage), "LDKDNSResolverMessage");
+ *ret_copy = DNSResolverMessage_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_DNSResolverMessage_dnssecquery(int64_t a) {
+ LDKDNSSECQuery 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 = DNSSECQuery_clone(&a_conv);
+ LDKDNSResolverMessage *ret_copy = MALLOC(sizeof(LDKDNSResolverMessage), "LDKDNSResolverMessage");
+ *ret_copy = DNSResolverMessage_dnssecquery(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_DNSResolverMessage_dnssecproof(int64_t a) {
+ LDKDNSSECProof 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 = DNSSECProof_clone(&a_conv);
+ LDKDNSResolverMessage *ret_copy = MALLOC(sizeof(LDKDNSResolverMessage), "LDKDNSResolverMessage");
+ *ret_copy = DNSResolverMessage_dnssecproof(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_DNSResolverMessage_hash(int64_t o) {
+ LDKDNSResolverMessage* o_conv = (LDKDNSResolverMessage*)untag_ptr(o);
+ int64_t ret_conv = DNSResolverMessage_hash(o_conv);
+ return ret_conv;
+}
+
+jboolean CS_LDK_DNSResolverMessage_eq(int64_t a, int64_t b) {
+ LDKDNSResolverMessage* a_conv = (LDKDNSResolverMessage*)untag_ptr(a);
+ LDKDNSResolverMessage* b_conv = (LDKDNSResolverMessage*)untag_ptr(b);
+ jboolean ret_conv = DNSResolverMessage_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
+void CS_LDK_DNSSECQuery_free(int64_t this_obj) {
+ LDKDNSSECQuery 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);
+ DNSSECQuery_free(this_obj_conv);
+}
+
+static inline uint64_t DNSSECQuery_clone_ptr(LDKDNSSECQuery *NONNULL_PTR arg) {
+ LDKDNSSECQuery ret_var = DNSSECQuery_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;
+}
+int64_t CS_LDK_DNSSECQuery_clone_ptr(int64_t arg) {
+ LDKDNSSECQuery 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 = DNSSECQuery_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_DNSSECQuery_clone(int64_t orig) {
+ LDKDNSSECQuery 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;
+ LDKDNSSECQuery ret_var = DNSSECQuery_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;
+}
+
+int64_t CS_LDK_DNSSECQuery_hash(int64_t o) {
+ LDKDNSSECQuery 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 = DNSSECQuery_hash(&o_conv);
+ return ret_conv;
+}
+
+jboolean CS_LDK_DNSSECQuery_eq(int64_t a, int64_t b) {
+ LDKDNSSECQuery 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;
+ LDKDNSSECQuery 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 = DNSSECQuery_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+void CS_LDK_DNSSECProof_free(int64_t this_obj) {
+ LDKDNSSECProof 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);
+ DNSSECProof_free(this_obj_conv);
+}
+
+int8_tArray CS_LDK_DNSSECProof_get_proof(int64_t this_ptr) {
+ LDKDNSSECProof this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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 = DNSSECProof_get_proof(&this_ptr_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+void CS_LDK_DNSSECProof_set_proof(int64_t this_ptr, int8_tArray val) {
+ LDKDNSSECProof this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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 = val->arr_len;
+ val_ref.data = MALLOC(val_ref.datalen, "LDKCVec_u8Z Bytes");
+ memcpy(val_ref.data, val->elems, val_ref.datalen); FREE(val);
+ DNSSECProof_set_proof(&this_ptr_conv, val_ref);
+}
+
+static inline uint64_t DNSSECProof_clone_ptr(LDKDNSSECProof *NONNULL_PTR arg) {
+ LDKDNSSECProof ret_var = DNSSECProof_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;
+}
+int64_t CS_LDK_DNSSECProof_clone_ptr(int64_t arg) {
+ LDKDNSSECProof 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 = DNSSECProof_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_DNSSECProof_clone(int64_t orig) {
+ LDKDNSSECProof 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;
+ LDKDNSSECProof ret_var = DNSSECProof_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;
+}
+
+int64_t CS_LDK_DNSSECProof_hash(int64_t o) {
+ LDKDNSSECProof 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 = DNSSECProof_hash(&o_conv);
+ return ret_conv;
+}
+
+jboolean CS_LDK_DNSSECProof_eq(int64_t a, int64_t b) {
+ LDKDNSSECProof 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;
+ LDKDNSSECProof 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 = DNSSECProof_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+jboolean CS_LDK_DNSResolverMessage_is_known_type(int64_t tlv_type) {
+ jboolean ret_conv = DNSResolverMessage_is_known_type(tlv_type);
+ return ret_conv;
+}
+
+int8_tArray CS_LDK_DNSResolverMessage_write(int64_t obj) {
+ LDKDNSResolverMessage* obj_conv = (LDKDNSResolverMessage*)untag_ptr(obj);
+ LDKCVec_u8Z ret_var = DNSResolverMessage_write(obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_DNSResolverMessage_read(int8_tArray ser, int64_t arg) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_DNSResolverMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverMessageDecodeErrorZ), "LDKCResult_DNSResolverMessageDecodeErrorZ");
+ *ret_conv = DNSResolverMessage_read(ser_ref, arg);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_DNSResolverMessage_as_OnionMessageContents(int64_t this_arg) {
+ LDKDNSResolverMessage* this_arg_conv = (LDKDNSResolverMessage*)untag_ptr(this_arg);
+ LDKOnionMessageContents* ret_ret = MALLOC(sizeof(LDKOnionMessageContents), "LDKOnionMessageContents");
+ *ret_ret = DNSResolverMessage_as_OnionMessageContents(this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
+void CS_LDK_HumanReadableName_free(int64_t this_obj) {
+ LDKHumanReadableName 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);
+ HumanReadableName_free(this_obj_conv);
+}
+
+static inline uint64_t HumanReadableName_clone_ptr(LDKHumanReadableName *NONNULL_PTR arg) {
+ LDKHumanReadableName ret_var = HumanReadableName_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;
+}
+int64_t CS_LDK_HumanReadableName_clone_ptr(int64_t arg) {
+ LDKHumanReadableName 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 = HumanReadableName_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_HumanReadableName_clone(int64_t orig) {
+ LDKHumanReadableName 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;
+ LDKHumanReadableName ret_var = HumanReadableName_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;
+}
+
+int64_t CS_LDK_HumanReadableName_hash(int64_t o) {
+ LDKHumanReadableName 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 = HumanReadableName_hash(&o_conv);
+ return ret_conv;
+}
+
+jboolean CS_LDK_HumanReadableName_eq(int64_t a, int64_t b) {
+ LDKHumanReadableName 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;
+ LDKHumanReadableName 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 = HumanReadableName_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_HumanReadableName_new(jstring user, jstring domain) {
+ LDKStr user_conv = str_ref_to_owned_c(user);
+ LDKStr domain_conv = str_ref_to_owned_c(domain);
+ LDKCResult_HumanReadableNameNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameNoneZ), "LDKCResult_HumanReadableNameNoneZ");
+ *ret_conv = HumanReadableName_new(user_conv, domain_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_HumanReadableName_from_encoded(jstring encoded) {
+ LDKStr encoded_conv = str_ref_to_owned_c(encoded);
+ LDKCResult_HumanReadableNameNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameNoneZ), "LDKCResult_HumanReadableNameNoneZ");
+ *ret_conv = HumanReadableName_from_encoded(encoded_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+jstring CS_LDK_HumanReadableName_user(int64_t this_arg) {
+ LDKHumanReadableName 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;
+ LDKStr ret_str = HumanReadableName_user(&this_arg_conv);
+ jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
+ Str_free(ret_str);
+ return ret_conv;
+}
+
+jstring CS_LDK_HumanReadableName_domain(int64_t this_arg) {
+ LDKHumanReadableName 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;
+ LDKStr ret_str = HumanReadableName_domain(&this_arg_conv);
+ jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
+ Str_free(ret_str);
+ return ret_conv;
+}
+
+int8_tArray CS_LDK_HumanReadableName_write(int64_t obj) {
+ LDKHumanReadableName 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 = HumanReadableName_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_HumanReadableName_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_HumanReadableNameDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HumanReadableNameDecodeErrorZ), "LDKCResult_HumanReadableNameDecodeErrorZ");
+ *ret_conv = HumanReadableName_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_OMNameResolver_free(int64_t this_obj) {
+ LDKOMNameResolver 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);
+ OMNameResolver_free(this_obj_conv);
+}
+
+int64_t CS_LDK_OMNameResolver_new(int32_t latest_block_time, int32_t latest_block_height) {
+ LDKOMNameResolver ret_var = OMNameResolver_new(latest_block_time, latest_block_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;
+}
+
+void CS_LDK_OMNameResolver_new_best_block(int64_t this_arg, int32_t height, int32_t time) {
+ LDKOMNameResolver 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;
+ OMNameResolver_new_best_block(&this_arg_conv, height, time);
+}
+
+int64_t CS_LDK_OMNameResolver_resolve_name(int64_t this_arg, int8_tArray payment_id, int64_t name, int64_t entropy_source) {
+ LDKOMNameResolver 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(payment_id->arr_len == 32);
+ memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
+ LDKHumanReadableName name_conv;
+ name_conv.inner = untag_ptr(name);
+ name_conv.is_owned = ptr_is_owned(name);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(name_conv);
+ name_conv = HumanReadableName_clone(&name_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;
+ LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ), "LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ");
+ *ret_conv = OMNameResolver_resolve_name(&this_arg_conv, payment_id_ref, name_conv, entropy_source_conv);
+ return tag_ptr(ret_conv, true);
+}
+
+int64_t CS_LDK_OMNameResolver_handle_dnssec_proof_for_offer(int64_t this_arg, int64_t msg, int64_t context) {
+ LDKOMNameResolver 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;
+ LDKDNSSECProof 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 = DNSSECProof_clone(&msg_conv);
+ LDKDNSResolverContext context_conv;
+ context_conv.inner = untag_ptr(context);
+ context_conv.is_owned = ptr_is_owned(context);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(context_conv);
+ context_conv = DNSResolverContext_clone(&context_conv);
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ");
+ *ret_copy = OMNameResolver_handle_dnssec_proof_for_offer(&this_arg_conv, msg_conv, context_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_OMNameResolver_handle_dnssec_proof_for_uri(int64_t this_arg, int64_t msg, int64_t context) {
+ LDKOMNameResolver 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;
+ LDKDNSSECProof 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 = DNSSECProof_clone(&msg_conv);
+ LDKDNSResolverContext context_conv;
+ context_conv.inner = untag_ptr(context);
+ context_conv.is_owned = ptr_is_owned(context);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(context_conv);
+ context_conv = DNSResolverContext_clone(&context_conv);
+ LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ *ret_copy = MALLOC(sizeof(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ), "LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ");
+ *ret_copy = OMNameResolver_handle_dnssec_proof_for_uri(&this_arg_conv, msg_conv, context_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
void CS_LDK_OnionMessenger_free(int64_t this_obj) {
LDKOnionMessenger this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_ref;
}
+int64_t CS_LDK_ResponseInstruction_into_instructions(int64_t this_arg) {
+ LDKResponseInstruction 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 = ResponseInstruction_clone(&this_arg_conv);
+ LDKMessageSendInstructions *ret_copy = MALLOC(sizeof(LDKMessageSendInstructions), "LDKMessageSendInstructions");
+ *ret_copy = ResponseInstruction_into_instructions(this_arg_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
void CS_LDK_MessageSendInstructions_free(int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return tag_ptr(ret_conv, true);
}
-int64_t CS_LDK_OnionMessenger_new(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 async_payments_handler, int64_t custom_handler) {
+int64_t CS_LDK_OnionMessenger_new(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 async_payments_handler, int64_t dns_resolver, 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);
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKAsyncPaymentsMessageHandler_JCalls_cloned(&async_payments_handler_conv);
}
+ void* dns_resolver_ptr = untag_ptr(dns_resolver);
+ CHECK_ACCESS(dns_resolver_ptr);
+ LDKDNSResolverMessageHandler dns_resolver_conv = *(LDKDNSResolverMessageHandler*)(dns_resolver_ptr);
+ if (dns_resolver_conv.free == LDKDNSResolverMessageHandler_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKDNSResolverMessageHandler_JCalls_cloned(&dns_resolver_conv);
+ }
void* custom_handler_ptr = untag_ptr(custom_handler);
CHECK_ACCESS(custom_handler_ptr);
LDKCustomOnionMessageHandler custom_handler_conv = *(LDKCustomOnionMessageHandler*)(custom_handler_ptr);
// 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, node_id_lookup_conv, message_router_conv, offers_handler_conv, async_payments_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, async_payments_handler_conv, dns_resolver_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);
return ret_ref;
}
-int64_t CS_LDK_OnionMessenger_new_with_offline_peer_interception(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 async_payments_handler, int64_t custom_handler) {
+int64_t CS_LDK_OnionMessenger_new_with_offline_peer_interception(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 async_payments_handler, int64_t dns_resolver, 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);
// If this_arg is a JCalls struct, then we need to increment the refcnt in it.
LDKAsyncPaymentsMessageHandler_JCalls_cloned(&async_payments_handler_conv);
}
+ void* dns_resolver_ptr = untag_ptr(dns_resolver);
+ CHECK_ACCESS(dns_resolver_ptr);
+ LDKDNSResolverMessageHandler dns_resolver_conv = *(LDKDNSResolverMessageHandler*)(dns_resolver_ptr);
+ if (dns_resolver_conv.free == LDKDNSResolverMessageHandler_JCalls_free) {
+ // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
+ LDKDNSResolverMessageHandler_JCalls_cloned(&dns_resolver_conv);
+ }
void* custom_handler_ptr = untag_ptr(custom_handler);
CHECK_ACCESS(custom_handler_ptr);
LDKCustomOnionMessageHandler custom_handler_conv = *(LDKCustomOnionMessageHandler*)(custom_handler_ptr);
// 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_with_offline_peer_interception(entropy_source_conv, node_signer_conv, logger_conv, node_id_lookup_conv, message_router_conv, offers_handler_conv, async_payments_handler_conv, custom_handler_conv);
+ LDKOnionMessenger ret_var = OnionMessenger_new_with_offline_peer_interception(entropy_source_conv, node_signer_conv, logger_conv, node_id_lookup_conv, message_router_conv, offers_handler_conv, async_payments_handler_conv, dns_resolver_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);
return ret_ref;
}
+int64_t CS_LDK_ParsedOnionMessageContents_dnsresolver(int64_t a) {
+ void* a_ptr = untag_ptr(a);
+ CHECK_ACCESS(a_ptr);
+ LDKDNSResolverMessage a_conv = *(LDKDNSResolverMessage*)(a_ptr);
+ a_conv = DNSResolverMessage_clone((LDKDNSResolverMessage*)untag_ptr(a));
+ LDKParsedOnionMessageContents *ret_copy = MALLOC(sizeof(LDKParsedOnionMessageContents), "LDKParsedOnionMessageContents");
+ *ret_copy = ParsedOnionMessageContents_dnsresolver(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
int64_t CS_LDK_ParsedOnionMessageContents_custom(int64_t a) {
void* a_ptr = untag_ptr(a);
CHECK_ACCESS(a_ptr);
ReceiveTlvs_free(this_obj_conv);
}
-int8_tArray CS_LDK_ReceiveTlvs_get_payment_secret(int64_t this_ptr) {
- LDKReceiveTlvs this_ptr_conv;
+static inline uint64_t ReceiveTlvs_clone_ptr(LDKReceiveTlvs *NONNULL_PTR arg) {
+ LDKReceiveTlvs ret_var = ReceiveTlvs_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;
+}
+int64_t CS_LDK_ReceiveTlvs_clone_ptr(int64_t arg) {
+ LDKReceiveTlvs 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 = ReceiveTlvs_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_ReceiveTlvs_clone(int64_t orig) {
+ LDKReceiveTlvs 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;
+ LDKReceiveTlvs ret_var = ReceiveTlvs_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;
+}
+
+int64_t CS_LDK_ReceiveTlvs_tlvs(int64_t this_arg) {
+ LDKReceiveTlvs 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;
+ LDKUnauthenticatedReceiveTlvs ret_var = ReceiveTlvs_tlvs(&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;
+}
+
+void CS_LDK_UnauthenticatedReceiveTlvs_free(int64_t this_obj) {
+ LDKUnauthenticatedReceiveTlvs 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);
+ UnauthenticatedReceiveTlvs_free(this_obj_conv);
+}
+
+int8_tArray CS_LDK_UnauthenticatedReceiveTlvs_get_payment_secret(int64_t this_ptr) {
+ LDKUnauthenticatedReceiveTlvs this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_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 = init_int8_tArray(32, __LINE__);
- memcpy(ret_arr->elems, *ReceiveTlvs_get_payment_secret(&this_ptr_conv), 32);
+ memcpy(ret_arr->elems, *UnauthenticatedReceiveTlvs_get_payment_secret(&this_ptr_conv), 32);
return ret_arr;
}
-void CS_LDK_ReceiveTlvs_set_payment_secret(int64_t this_ptr, int8_tArray val) {
- LDKReceiveTlvs this_ptr_conv;
+void CS_LDK_UnauthenticatedReceiveTlvs_set_payment_secret(int64_t this_ptr, int8_tArray val) {
+ LDKUnauthenticatedReceiveTlvs this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
LDKThirtyTwoBytes val_ref;
CHECK(val->arr_len == 32);
memcpy(val_ref.data, val->elems, 32); FREE(val);
- ReceiveTlvs_set_payment_secret(&this_ptr_conv, val_ref);
+ UnauthenticatedReceiveTlvs_set_payment_secret(&this_ptr_conv, val_ref);
}
-int64_t CS_LDK_ReceiveTlvs_get_payment_constraints(int64_t this_ptr) {
- LDKReceiveTlvs this_ptr_conv;
+int64_t CS_LDK_UnauthenticatedReceiveTlvs_get_payment_constraints(int64_t this_ptr) {
+ LDKUnauthenticatedReceiveTlvs this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
this_ptr_conv.is_owned = false;
- LDKPaymentConstraints ret_var = ReceiveTlvs_get_payment_constraints(&this_ptr_conv);
+ LDKPaymentConstraints ret_var = UnauthenticatedReceiveTlvs_get_payment_constraints(&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;
}
-void CS_LDK_ReceiveTlvs_set_payment_constraints(int64_t this_ptr, int64_t val) {
- LDKReceiveTlvs this_ptr_conv;
+void CS_LDK_UnauthenticatedReceiveTlvs_set_payment_constraints(int64_t this_ptr, int64_t val) {
+ LDKUnauthenticatedReceiveTlvs this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
val_conv.is_owned = ptr_is_owned(val);
CHECK_INNER_FIELD_ACCESS_OR_NULL(val_conv);
val_conv = PaymentConstraints_clone(&val_conv);
- ReceiveTlvs_set_payment_constraints(&this_ptr_conv, val_conv);
+ UnauthenticatedReceiveTlvs_set_payment_constraints(&this_ptr_conv, val_conv);
}
-int64_t CS_LDK_ReceiveTlvs_get_payment_context(int64_t this_ptr) {
- LDKReceiveTlvs this_ptr_conv;
+int64_t CS_LDK_UnauthenticatedReceiveTlvs_get_payment_context(int64_t this_ptr) {
+ LDKUnauthenticatedReceiveTlvs this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_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);
+ *ret_copy = UnauthenticatedReceiveTlvs_get_payment_context(&this_ptr_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-void CS_LDK_ReceiveTlvs_set_payment_context(int64_t this_ptr, int64_t val) {
- LDKReceiveTlvs this_ptr_conv;
+void CS_LDK_UnauthenticatedReceiveTlvs_set_payment_context(int64_t this_ptr, int64_t val) {
+ LDKUnauthenticatedReceiveTlvs this_ptr_conv;
this_ptr_conv.inner = untag_ptr(this_ptr);
this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
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);
+ UnauthenticatedReceiveTlvs_set_payment_context(&this_ptr_conv, val_conv);
}
-int64_t CS_LDK_ReceiveTlvs_new(int8_tArray payment_secret_arg, int64_t payment_constraints_arg, int64_t payment_context_arg) {
+int64_t CS_LDK_UnauthenticatedReceiveTlvs_new(int8_tArray payment_secret_arg, int64_t payment_constraints_arg, int64_t payment_context_arg) {
LDKThirtyTwoBytes payment_secret_arg_ref;
CHECK(payment_secret_arg->arr_len == 32);
memcpy(payment_secret_arg_ref.data, payment_secret_arg->elems, 32); FREE(payment_secret_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);
+ LDKUnauthenticatedReceiveTlvs ret_var = UnauthenticatedReceiveTlvs_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);
return ret_ref;
}
-static inline uint64_t ReceiveTlvs_clone_ptr(LDKReceiveTlvs *NONNULL_PTR arg) {
- LDKReceiveTlvs ret_var = ReceiveTlvs_clone(arg);
+static inline uint64_t UnauthenticatedReceiveTlvs_clone_ptr(LDKUnauthenticatedReceiveTlvs *NONNULL_PTR arg) {
+ LDKUnauthenticatedReceiveTlvs ret_var = UnauthenticatedReceiveTlvs_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;
}
-int64_t CS_LDK_ReceiveTlvs_clone_ptr(int64_t arg) {
- LDKReceiveTlvs arg_conv;
+int64_t CS_LDK_UnauthenticatedReceiveTlvs_clone_ptr(int64_t arg) {
+ LDKUnauthenticatedReceiveTlvs 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 = ReceiveTlvs_clone_ptr(&arg_conv);
+ int64_t ret_conv = UnauthenticatedReceiveTlvs_clone_ptr(&arg_conv);
return ret_conv;
}
-int64_t CS_LDK_ReceiveTlvs_clone(int64_t orig) {
- LDKReceiveTlvs orig_conv;
+int64_t CS_LDK_UnauthenticatedReceiveTlvs_clone(int64_t orig) {
+ LDKUnauthenticatedReceiveTlvs 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;
- LDKReceiveTlvs ret_var = ReceiveTlvs_clone(&orig_conv);
+ LDKUnauthenticatedReceiveTlvs ret_var = UnauthenticatedReceiveTlvs_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;
+}
+
+int64_t CS_LDK_UnauthenticatedReceiveTlvs_authenticate(int64_t this_arg, int64_t nonce, int64_t expanded_key) {
+ LDKUnauthenticatedReceiveTlvs 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 = UnauthenticatedReceiveTlvs_clone(&this_arg_conv);
+ LDKNonce nonce_conv;
+ nonce_conv.inner = untag_ptr(nonce);
+ nonce_conv.is_owned = ptr_is_owned(nonce);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_conv);
+ nonce_conv = Nonce_clone(&nonce_conv);
+ 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;
+ LDKReceiveTlvs ret_var = UnauthenticatedReceiveTlvs_authenticate(this_arg_conv, nonce_conv, &expanded_key_conv);
int64_t ret_ref = 0;
CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
return ret_ref;
}
-int64_t CS_LDK_PaymentContext_unknown(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;
-}
-
int64_t CS_LDK_PaymentContext_bolt12_offer(int64_t a) {
LDKBolt12OfferContext a_conv;
a_conv.inner = untag_ptr(a);
return ret_conv;
}
-void CS_LDK_UnknownPaymentContext_free(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;
-}
-int64_t CS_LDK_UnknownPaymentContext_clone_ptr(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;
-}
-
-int64_t CS_LDK_UnknownPaymentContext_clone(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;
-}
-
-jboolean CS_LDK_UnknownPaymentContext_eq(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;
-}
-
void CS_LDK_Bolt12OfferContext_free(int64_t this_obj) {
LDKBolt12OfferContext this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return ret_arr;
}
+int8_tArray CS_LDK_UnauthenticatedReceiveTlvs_write(int64_t obj) {
+ LDKUnauthenticatedReceiveTlvs 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 = UnauthenticatedReceiveTlvs_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
int8_tArray CS_LDK_PaymentRelay_write(int64_t obj) {
LDKPaymentRelay obj_conv;
obj_conv.inner = untag_ptr(obj);
return tag_ptr(ret_conv, true);
}
-int8_tArray CS_LDK_UnknownPaymentContext_write(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 = init_int8_tArray(ret_var.datalen, __LINE__);
- memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
- CVec_u8Z_free(ret_var);
- return ret_arr;
-}
-
-int64_t CS_LDK_UnknownPaymentContext_read(int8_tArray ser) {
- LDKu8slice ser_ref;
- ser_ref.datalen = ser->arr_len;
- ser_ref.data = ser->elems;
- LDKCResult_UnknownPaymentContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnknownPaymentContextDecodeErrorZ), "LDKCResult_UnknownPaymentContextDecodeErrorZ");
- *ret_conv = UnknownPaymentContext_read(ser_ref);
- FREE(ser);
- return tag_ptr(ret_conv, true);
-}
-
int8_tArray CS_LDK_Bolt12OfferContext_write(int64_t obj) {
LDKBolt12OfferContext obj_conv;
obj_conv.inner = untag_ptr(obj);
return ret_ref;
}
+int64_t CS_LDK_MessageContext_async_payments(int64_t a) {
+ void* a_ptr = untag_ptr(a);
+ CHECK_ACCESS(a_ptr);
+ LDKAsyncPaymentsContext a_conv = *(LDKAsyncPaymentsContext*)(a_ptr);
+ a_conv = AsyncPaymentsContext_clone((LDKAsyncPaymentsContext*)untag_ptr(a));
+ LDKMessageContext *ret_copy = MALLOC(sizeof(LDKMessageContext), "LDKMessageContext");
+ *ret_copy = MessageContext_async_payments(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_MessageContext_dnsresolver(int64_t a) {
+ LDKDNSResolverContext 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 = DNSResolverContext_clone(&a_conv);
+ LDKMessageContext *ret_copy = MALLOC(sizeof(LDKMessageContext), "LDKMessageContext");
+ *ret_copy = MessageContext_dnsresolver(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
int64_t CS_LDK_MessageContext_custom(int8_tArray a) {
LDKCVec_u8Z a_ref;
a_ref.datalen = a->arr_len;
return ret_ref;
}
-int64_t CS_LDK_OffersContext_inbound_payment(int8_tArray payment_hash) {
+int64_t CS_LDK_OffersContext_inbound_payment(int8_tArray payment_hash, int64_t nonce, int8_tArray hmac) {
LDKThirtyTwoBytes payment_hash_ref;
CHECK(payment_hash->arr_len == 32);
memcpy(payment_hash_ref.data, payment_hash->elems, 32); FREE(payment_hash);
+ LDKNonce nonce_conv;
+ nonce_conv.inner = untag_ptr(nonce);
+ nonce_conv.is_owned = ptr_is_owned(nonce);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_conv);
+ nonce_conv = Nonce_clone(&nonce_conv);
+ LDKThirtyTwoBytes hmac_ref;
+ CHECK(hmac->arr_len == 32);
+ memcpy(hmac_ref.data, hmac->elems, 32); FREE(hmac);
LDKOffersContext *ret_copy = MALLOC(sizeof(LDKOffersContext), "LDKOffersContext");
- *ret_copy = OffersContext_inbound_payment(payment_hash_ref);
+ *ret_copy = OffersContext_inbound_payment(payment_hash_ref, nonce_conv, hmac_ref);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_conv;
}
+void CS_LDK_AsyncPaymentsContext_free(int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKAsyncPaymentsContext this_ptr_conv = *(LDKAsyncPaymentsContext*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ AsyncPaymentsContext_free(this_ptr_conv);
+}
+
+static inline uint64_t AsyncPaymentsContext_clone_ptr(LDKAsyncPaymentsContext *NONNULL_PTR arg) {
+ LDKAsyncPaymentsContext *ret_copy = MALLOC(sizeof(LDKAsyncPaymentsContext), "LDKAsyncPaymentsContext");
+ *ret_copy = AsyncPaymentsContext_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t CS_LDK_AsyncPaymentsContext_clone_ptr(int64_t arg) {
+ LDKAsyncPaymentsContext* arg_conv = (LDKAsyncPaymentsContext*)untag_ptr(arg);
+ int64_t ret_conv = AsyncPaymentsContext_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_AsyncPaymentsContext_clone(int64_t orig) {
+ LDKAsyncPaymentsContext* orig_conv = (LDKAsyncPaymentsContext*)untag_ptr(orig);
+ LDKAsyncPaymentsContext *ret_copy = MALLOC(sizeof(LDKAsyncPaymentsContext), "LDKAsyncPaymentsContext");
+ *ret_copy = AsyncPaymentsContext_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_AsyncPaymentsContext_outbound_payment(int8_tArray payment_id, int64_t nonce, int8_tArray hmac) {
+ LDKThirtyTwoBytes payment_id_ref;
+ CHECK(payment_id->arr_len == 32);
+ memcpy(payment_id_ref.data, payment_id->elems, 32); FREE(payment_id);
+ LDKNonce nonce_conv;
+ nonce_conv.inner = untag_ptr(nonce);
+ nonce_conv.is_owned = ptr_is_owned(nonce);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(nonce_conv);
+ nonce_conv = Nonce_clone(&nonce_conv);
+ LDKThirtyTwoBytes hmac_ref;
+ CHECK(hmac->arr_len == 32);
+ memcpy(hmac_ref.data, hmac->elems, 32); FREE(hmac);
+ LDKAsyncPaymentsContext *ret_copy = MALLOC(sizeof(LDKAsyncPaymentsContext), "LDKAsyncPaymentsContext");
+ *ret_copy = AsyncPaymentsContext_outbound_payment(payment_id_ref, nonce_conv, hmac_ref);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
int8_tArray CS_LDK_MessageContext_write(int64_t obj) {
LDKMessageContext* obj_conv = (LDKMessageContext*)untag_ptr(obj);
LDKCVec_u8Z ret_var = MessageContext_write(obj_conv);
return tag_ptr(ret_conv, true);
}
+int8_tArray CS_LDK_AsyncPaymentsContext_write(int64_t obj) {
+ LDKAsyncPaymentsContext* obj_conv = (LDKAsyncPaymentsContext*)untag_ptr(obj);
+ LDKCVec_u8Z ret_var = AsyncPaymentsContext_write(obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_AsyncPaymentsContext_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_AsyncPaymentsContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AsyncPaymentsContextDecodeErrorZ), "LDKCResult_AsyncPaymentsContextDecodeErrorZ");
+ *ret_conv = AsyncPaymentsContext_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
+void CS_LDK_DNSResolverContext_free(int64_t this_obj) {
+ LDKDNSResolverContext 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);
+ DNSResolverContext_free(this_obj_conv);
+}
+
+int8_tArray CS_LDK_DNSResolverContext_get_nonce(int64_t this_ptr) {
+ LDKDNSResolverContext this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_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 = init_int8_tArray(16, __LINE__);
+ memcpy(ret_arr->elems, *DNSResolverContext_get_nonce(&this_ptr_conv), 16);
+ return ret_arr;
+}
+
+void CS_LDK_DNSResolverContext_set_nonce(int64_t this_ptr, int8_tArray val) {
+ LDKDNSResolverContext this_ptr_conv;
+ this_ptr_conv.inner = untag_ptr(this_ptr);
+ this_ptr_conv.is_owned = ptr_is_owned(this_ptr);
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(this_ptr_conv);
+ this_ptr_conv.is_owned = false;
+ LDKSixteenBytes val_ref;
+ CHECK(val->arr_len == 16);
+ memcpy(val_ref.data, val->elems, 16); FREE(val);
+ DNSResolverContext_set_nonce(&this_ptr_conv, val_ref);
+}
+
+int64_t CS_LDK_DNSResolverContext_new(int8_tArray nonce_arg) {
+ LDKSixteenBytes nonce_arg_ref;
+ CHECK(nonce_arg->arr_len == 16);
+ memcpy(nonce_arg_ref.data, nonce_arg->elems, 16); FREE(nonce_arg);
+ LDKDNSResolverContext ret_var = DNSResolverContext_new(nonce_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 DNSResolverContext_clone_ptr(LDKDNSResolverContext *NONNULL_PTR arg) {
+ LDKDNSResolverContext ret_var = DNSResolverContext_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;
+}
+int64_t CS_LDK_DNSResolverContext_clone_ptr(int64_t arg) {
+ LDKDNSResolverContext 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 = DNSResolverContext_clone_ptr(&arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_DNSResolverContext_clone(int64_t orig) {
+ LDKDNSResolverContext 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;
+ LDKDNSResolverContext ret_var = DNSResolverContext_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;
+}
+
+int64_t CS_LDK_DNSResolverContext_hash(int64_t o) {
+ LDKDNSResolverContext 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 = DNSResolverContext_hash(&o_conv);
+ return ret_conv;
+}
+
+jboolean CS_LDK_DNSResolverContext_eq(int64_t a, int64_t b) {
+ LDKDNSResolverContext 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;
+ LDKDNSResolverContext 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 = DNSResolverContext_eq(&a_conv, &b_conv);
+ return ret_conv;
+}
+
+int8_tArray CS_LDK_DNSResolverContext_write(int64_t obj) {
+ LDKDNSResolverContext 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 = DNSResolverContext_write(&obj_conv);
+ int8_tArray ret_arr = init_int8_tArray(ret_var.datalen, __LINE__);
+ memcpy(ret_arr->elems, ret_var.data, ret_var.datalen);
+ CVec_u8Z_free(ret_var);
+ return ret_arr;
+}
+
+int64_t CS_LDK_DNSResolverContext_read(int8_tArray ser) {
+ LDKu8slice ser_ref;
+ ser_ref.datalen = ser->arr_len;
+ ser_ref.data = ser->elems;
+ LDKCResult_DNSResolverContextDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DNSResolverContextDecodeErrorZ), "LDKCResult_DNSResolverContextDecodeErrorZ");
+ *ret_conv = DNSResolverContext_read(ser_ref);
+ FREE(ser);
+ return tag_ptr(ret_conv, true);
+}
+
void CS_LDK_FundingInfo_free(int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_conv;
}
+int32_t CS_LDK_PaymentFailureReason_blinded_path_creation_failed() {
+ int32_t ret_conv = LDKPaymentFailureReason_to_cs(PaymentFailureReason_blinded_path_creation_failed());
+ return ret_conv;
+}
+
jboolean CS_LDK_PaymentFailureReason_eq(int64_t a, int64_t b) {
LDKPaymentFailureReason* a_conv = (LDKPaymentFailureReason*)untag_ptr(a);
LDKPaymentFailureReason* b_conv = (LDKPaymentFailureReason*)untag_ptr(b);
return tag_ptr(ret_conv, true);
}
+void CS_LDK_InboundChannelFunds_free(int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKInboundChannelFunds this_ptr_conv = *(LDKInboundChannelFunds*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ InboundChannelFunds_free(this_ptr_conv);
+}
+
+static inline uint64_t InboundChannelFunds_clone_ptr(LDKInboundChannelFunds *NONNULL_PTR arg) {
+ LDKInboundChannelFunds *ret_copy = MALLOC(sizeof(LDKInboundChannelFunds), "LDKInboundChannelFunds");
+ *ret_copy = InboundChannelFunds_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t CS_LDK_InboundChannelFunds_clone_ptr(int64_t arg) {
+ LDKInboundChannelFunds* arg_conv = (LDKInboundChannelFunds*)untag_ptr(arg);
+ int64_t ret_conv = InboundChannelFunds_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_InboundChannelFunds_clone(int64_t orig) {
+ LDKInboundChannelFunds* orig_conv = (LDKInboundChannelFunds*)untag_ptr(orig);
+ LDKInboundChannelFunds *ret_copy = MALLOC(sizeof(LDKInboundChannelFunds), "LDKInboundChannelFunds");
+ *ret_copy = InboundChannelFunds_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_InboundChannelFunds_push_msat(int64_t a) {
+ LDKInboundChannelFunds *ret_copy = MALLOC(sizeof(LDKInboundChannelFunds), "LDKInboundChannelFunds");
+ *ret_copy = InboundChannelFunds_push_msat(a);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_InboundChannelFunds_dual_funded() {
+ LDKInboundChannelFunds *ret_copy = MALLOC(sizeof(LDKInboundChannelFunds), "LDKInboundChannelFunds");
+ *ret_copy = InboundChannelFunds_dual_funded();
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+jboolean CS_LDK_InboundChannelFunds_eq(int64_t a, int64_t b) {
+ LDKInboundChannelFunds* a_conv = (LDKInboundChannelFunds*)untag_ptr(a);
+ LDKInboundChannelFunds* b_conv = (LDKInboundChannelFunds*)untag_ptr(b);
+ jboolean ret_conv = InboundChannelFunds_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
void CS_LDK_Event_free(int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
return ret_ref;
}
-int64_t CS_LDK_Event_payment_claimable(int8_tArray receiver_node_id, int8_tArray payment_hash, int64_t onion_fields, int64_t amount_msat, int64_t counterparty_skimmed_fee_msat, int64_t purpose, int64_t via_channel_id, int64_t via_user_channel_id, int64_t claim_deadline) {
+int64_t CS_LDK_Event_payment_claimable(int8_tArray receiver_node_id, int8_tArray payment_hash, int64_t onion_fields, int64_t amount_msat, int64_t counterparty_skimmed_fee_msat, int64_t purpose, int64_t via_channel_id, int64_t via_user_channel_id, int64_t claim_deadline, int64_t payment_id) {
LDKPublicKey receiver_node_id_ref;
CHECK(receiver_node_id->arr_len == 33);
memcpy(receiver_node_id_ref.compressed_form, receiver_node_id->elems, 33); FREE(receiver_node_id);
CHECK_ACCESS(claim_deadline_ptr);
LDKCOption_u32Z claim_deadline_conv = *(LDKCOption_u32Z*)(claim_deadline_ptr);
claim_deadline_conv = COption_u32Z_clone((LDKCOption_u32Z*)untag_ptr(claim_deadline));
+ void* payment_id_ptr = untag_ptr(payment_id);
+ CHECK_ACCESS(payment_id_ptr);
+ LDKCOption_ThirtyTwoBytesZ payment_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_id_ptr);
+ payment_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_id));
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_payment_claimable(receiver_node_id_ref, payment_hash_ref, onion_fields_conv, amount_msat, counterparty_skimmed_fee_msat, purpose_conv, via_channel_id_conv, via_user_channel_id_conv, claim_deadline_conv);
+ *ret_copy = Event_payment_claimable(receiver_node_id_ref, payment_hash_ref, onion_fields_conv, amount_msat, counterparty_skimmed_fee_msat, purpose_conv, via_channel_id_conv, via_user_channel_id_conv, claim_deadline_conv, payment_id_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
-int64_t CS_LDK_Event_payment_claimed(int8_tArray receiver_node_id, int8_tArray payment_hash, int64_t amount_msat, int64_t purpose, int64_tArray htlcs, int64_t sender_intended_total_msat, int64_t onion_fields) {
+int64_t CS_LDK_Event_payment_claimed(int8_tArray receiver_node_id, int8_tArray payment_hash, int64_t amount_msat, int64_t purpose, int64_tArray htlcs, int64_t sender_intended_total_msat, int64_t onion_fields, int64_t payment_id) {
LDKPublicKey receiver_node_id_ref;
CHECK(receiver_node_id->arr_len == 33);
memcpy(receiver_node_id_ref.compressed_form, receiver_node_id->elems, 33); FREE(receiver_node_id);
onion_fields_conv.is_owned = ptr_is_owned(onion_fields);
CHECK_INNER_FIELD_ACCESS_OR_NULL(onion_fields_conv);
onion_fields_conv = RecipientOnionFields_clone(&onion_fields_conv);
+ void* payment_id_ptr = untag_ptr(payment_id);
+ CHECK_ACCESS(payment_id_ptr);
+ LDKCOption_ThirtyTwoBytesZ payment_id_conv = *(LDKCOption_ThirtyTwoBytesZ*)(payment_id_ptr);
+ payment_id_conv = COption_ThirtyTwoBytesZ_clone((LDKCOption_ThirtyTwoBytesZ*)untag_ptr(payment_id));
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_payment_claimed(receiver_node_id_ref, payment_hash_ref, amount_msat, purpose_conv, htlcs_constr, sender_intended_total_msat_conv, onion_fields_conv);
+ *ret_copy = Event_payment_claimed(receiver_node_id_ref, payment_hash_ref, amount_msat, purpose_conv, htlcs_constr, sender_intended_total_msat_conv, onion_fields_conv, payment_id_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
-int64_t CS_LDK_Event_payment_forwarded(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) {
+int64_t CS_LDK_Event_payment_forwarded(int64_t prev_channel_id, int64_t next_channel_id, int64_t prev_user_channel_id, int64_t next_user_channel_id, int8_tArray prev_node_id, int8_tArray next_node_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_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));
+ LDKPublicKey prev_node_id_ref;
+ CHECK(prev_node_id->arr_len == 33);
+ memcpy(prev_node_id_ref.compressed_form, prev_node_id->elems, 33); FREE(prev_node_id);
+ LDKPublicKey next_node_id_ref;
+ CHECK(next_node_id->arr_len == 33);
+ memcpy(next_node_id_ref.compressed_form, next_node_id->elems, 33); FREE(next_node_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);
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, 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);
+ *ret_copy = Event_payment_forwarded(prev_channel_id_conv, next_channel_id_conv, prev_user_channel_id_conv, next_user_channel_id_conv, prev_node_id_ref, next_node_id_ref, 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;
}
return ret_ref;
}
-int64_t CS_LDK_Event_channel_closed(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) {
+int64_t CS_LDK_Event_channel_closed(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, int64_t last_local_balance_msat) {
LDKChannelId channel_id_conv;
channel_id_conv.inner = untag_ptr(channel_id);
channel_id_conv.is_owned = ptr_is_owned(channel_id);
channel_funding_txo_conv.is_owned = ptr_is_owned(channel_funding_txo);
CHECK_INNER_FIELD_ACCESS_OR_NULL(channel_funding_txo_conv);
channel_funding_txo_conv = OutPoint_clone(&channel_funding_txo_conv);
+ void* last_local_balance_msat_ptr = untag_ptr(last_local_balance_msat);
+ CHECK_ACCESS(last_local_balance_msat_ptr);
+ LDKCOption_u64Z last_local_balance_msat_conv = *(LDKCOption_u64Z*)(last_local_balance_msat_ptr);
+ last_local_balance_msat_conv = COption_u64Z_clone((LDKCOption_u64Z*)untag_ptr(last_local_balance_msat));
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *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);
+ *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, last_local_balance_msat_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_ref;
}
-int64_t CS_LDK_Event_open_channel_request(int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t push_msat, int64_t channel_type, jboolean is_announced, int64_t params) {
+int64_t CS_LDK_Event_open_channel_request(int64_t temporary_channel_id, int8_tArray counterparty_node_id, int64_t funding_satoshis, int64_t channel_negotiation_type, int64_t channel_type, jboolean is_announced, int64_t params) {
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);
LDKPublicKey counterparty_node_id_ref;
CHECK(counterparty_node_id->arr_len == 33);
memcpy(counterparty_node_id_ref.compressed_form, counterparty_node_id->elems, 33); FREE(counterparty_node_id);
+ void* channel_negotiation_type_ptr = untag_ptr(channel_negotiation_type);
+ CHECK_ACCESS(channel_negotiation_type_ptr);
+ LDKInboundChannelFunds channel_negotiation_type_conv = *(LDKInboundChannelFunds*)(channel_negotiation_type_ptr);
+ channel_negotiation_type_conv = InboundChannelFunds_clone((LDKInboundChannelFunds*)untag_ptr(channel_negotiation_type));
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(params_conv);
params_conv = ChannelParameters_clone(¶ms_conv);
LDKEvent *ret_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
- *ret_copy = Event_open_channel_request(temporary_channel_id_conv, counterparty_node_id_ref, funding_satoshis, push_msat, channel_type_conv, is_announced, params_conv);
+ *ret_copy = Event_open_channel_request(temporary_channel_id_conv, counterparty_node_id_ref, funding_satoshis, channel_negotiation_type_conv, channel_type_conv, is_announced, params_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_ref;
}
return ret_conv;
}
+void CS_LDK_InitFeatures_set_dual_fund_optional(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_dual_fund_optional(&this_arg_conv);
+}
+
+void CS_LDK_InitFeatures_set_dual_fund_required(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_dual_fund_required(&this_arg_conv);
+}
+
+jboolean CS_LDK_InitFeatures_supports_dual_fund(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_dual_fund(&this_arg_conv);
+ return ret_conv;
+}
+
+void CS_LDK_NodeFeatures_set_dual_fund_optional(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_dual_fund_optional(&this_arg_conv);
+}
+
+void CS_LDK_NodeFeatures_set_dual_fund_required(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_dual_fund_required(&this_arg_conv);
+}
+
+jboolean CS_LDK_NodeFeatures_supports_dual_fund(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_dual_fund(&this_arg_conv);
+ return ret_conv;
+}
+
+jboolean CS_LDK_InitFeatures_requires_dual_fund(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_dual_fund(&this_arg_conv);
+ return ret_conv;
+}
+
+jboolean CS_LDK_NodeFeatures_requires_dual_fund(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_dual_fund(&this_arg_conv);
+ return ret_conv;
+}
+
void CS_LDK_InitFeatures_set_taproot_optional(int64_t this_arg) {
LDKInitFeatures this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_conv;
}
+void CS_LDK_Bolt12InvoiceFeatures_set_trampoline_routing_optional(int64_t this_arg) {
+ LDKBolt12InvoiceFeatures 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;
+ Bolt12InvoiceFeatures_set_trampoline_routing_optional(&this_arg_conv);
+}
+
+void CS_LDK_Bolt12InvoiceFeatures_set_trampoline_routing_required(int64_t this_arg) {
+ LDKBolt12InvoiceFeatures 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;
+ Bolt12InvoiceFeatures_set_trampoline_routing_required(&this_arg_conv);
+}
+
+jboolean CS_LDK_Bolt12InvoiceFeatures_supports_trampoline_routing(int64_t this_arg) {
+ LDKBolt12InvoiceFeatures 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 = Bolt12InvoiceFeatures_supports_trampoline_routing(&this_arg_conv);
+ return ret_conv;
+}
+
jboolean CS_LDK_InitFeatures_requires_trampoline_routing(int64_t this_arg) {
LDKInitFeatures this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
return ret_conv;
}
+jboolean CS_LDK_Bolt12InvoiceFeatures_requires_trampoline_routing(int64_t this_arg) {
+ LDKBolt12InvoiceFeatures 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 = Bolt12InvoiceFeatures_requires_trampoline_routing(&this_arg_conv);
+ return ret_conv;
+}
+
+void CS_LDK_NodeFeatures_set_dns_resolution_optional(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_dns_resolution_optional(&this_arg_conv);
+}
+
+void CS_LDK_NodeFeatures_set_dns_resolution_required(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_dns_resolution_required(&this_arg_conv);
+}
+
+jboolean CS_LDK_NodeFeatures_supports_dns_resolution(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_dns_resolution(&this_arg_conv);
+ return ret_conv;
+}
+
+jboolean CS_LDK_NodeFeatures_requires_dns_resolution(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_dns_resolution(&this_arg_conv);
+ return ret_conv;
+}
+
void CS_LDK_RoutingFees_free(int64_t this_obj) {
LDKRoutingFees this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return tag_ptr(ret_ret, true);
}
+int64_t CS_LDK_FilesystemStore_as_MigratableKVStore(int64_t this_arg) {
+ LDKFilesystemStore 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;
+ LDKMigratableKVStore* ret_ret = MALLOC(sizeof(LDKMigratableKVStore), "LDKMigratableKVStore");
+ *ret_ret = FilesystemStore_as_MigratableKVStore(&this_arg_conv);
+ return tag_ptr(ret_ret, true);
+}
+
void CS_LDK_BackgroundProcessor_free(int64_t this_obj) {
LDKBackgroundProcessor this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return tag_ptr(ret_conv, true);
}
-void CS_LDK_Bolt11ParseError_free(int64_t this_ptr) {
- if (!ptr_is_owned(this_ptr)) return;
- void* this_ptr_ptr = untag_ptr(this_ptr);
- CHECK_ACCESS(this_ptr_ptr);
- LDKBolt11ParseError this_ptr_conv = *(LDKBolt11ParseError*)(this_ptr_ptr);
- FREE(untag_ptr(this_ptr));
- Bolt11ParseError_free(this_ptr_conv);
+void CS_LDK_Bolt11ParseError_free(int64_t this_obj) {
+ LDKBolt11ParseError 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);
+ Bolt11ParseError_free(this_obj_conv);
+}
+
+jboolean CS_LDK_Bolt11ParseError_eq(int64_t a, int64_t b) {
+ LDKBolt11ParseError 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;
+ LDKBolt11ParseError 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 = Bolt11ParseError_eq(&a_conv, &b_conv);
+ return ret_conv;
}
static inline uint64_t Bolt11ParseError_clone_ptr(LDKBolt11ParseError *NONNULL_PTR arg) {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_clone(arg);
- int64_t ret_ref = tag_ptr(ret_copy, true);
+ LDKBolt11ParseError ret_var = Bolt11ParseError_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;
}
int64_t CS_LDK_Bolt11ParseError_clone_ptr(int64_t arg) {
- LDKBolt11ParseError* arg_conv = (LDKBolt11ParseError*)untag_ptr(arg);
- int64_t ret_conv = Bolt11ParseError_clone_ptr(arg_conv);
+ LDKBolt11ParseError 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 = Bolt11ParseError_clone_ptr(&arg_conv);
return ret_conv;
}
int64_t CS_LDK_Bolt11ParseError_clone(int64_t orig) {
- LDKBolt11ParseError* orig_conv = (LDKBolt11ParseError*)untag_ptr(orig);
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_clone(orig_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_bech32_error(int64_t a) {
- void* a_ptr = untag_ptr(a);
- CHECK_ACCESS(a_ptr);
- LDKBech32Error a_conv = *(LDKBech32Error*)(a_ptr);
- a_conv = Bech32Error_clone((LDKBech32Error*)untag_ptr(a));
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_bech32_error(a_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_parse_amount_error(int32_t a) {
-
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_parse_amount_error((LDKError){ ._dummy = 0 });
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_malformed_signature(int32_t a) {
- LDKSecp256k1Error a_conv = LDKSecp256k1Error_from_cs(a);
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_malformed_signature(a_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_bad_prefix() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_bad_prefix();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_unknown_currency() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_unknown_currency();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_unknown_si_prefix() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_unknown_si_prefix();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_malformed_hrp() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_malformed_hrp();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_too_short_data_part() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_too_short_data_part();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_unexpected_end_of_tagged_fields() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_unexpected_end_of_tagged_fields();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_description_decode_error(int32_t a) {
-
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_description_decode_error((LDKError){ ._dummy = 0 });
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_padding_error() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_padding_error();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_integer_overflow_error() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_integer_overflow_error();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_invalid_seg_wit_program_length() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_invalid_seg_wit_program_length();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_invalid_pub_key_hash_length() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_invalid_pub_key_hash_length();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_invalid_script_hash_length() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_invalid_script_hash_length();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_invalid_recovery_id() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_invalid_recovery_id();
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_invalid_slice_length(jstring a) {
- LDKStr a_conv = str_ref_to_owned_c(a);
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_invalid_slice_length(a_conv);
- int64_t ret_ref = tag_ptr(ret_copy, true);
- return ret_ref;
-}
-
-int64_t CS_LDK_Bolt11ParseError_skip() {
- LDKBolt11ParseError *ret_copy = MALLOC(sizeof(LDKBolt11ParseError), "LDKBolt11ParseError");
- *ret_copy = Bolt11ParseError_skip();
- int64_t ret_ref = tag_ptr(ret_copy, true);
+ LDKBolt11ParseError 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;
+ LDKBolt11ParseError ret_var = Bolt11ParseError_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;
}
-jboolean CS_LDK_Bolt11ParseError_eq(int64_t a, int64_t b) {
- LDKBolt11ParseError* a_conv = (LDKBolt11ParseError*)untag_ptr(a);
- LDKBolt11ParseError* b_conv = (LDKBolt11ParseError*)untag_ptr(b);
- jboolean ret_conv = Bolt11ParseError_eq(a_conv, b_conv);
- return ret_conv;
-}
-
void CS_LDK_ParseOrSemanticError_free(int64_t this_ptr) {
if (!ptr_is_owned(this_ptr)) return;
void* this_ptr_ptr = untag_ptr(this_ptr);
}
int64_t CS_LDK_ParseOrSemanticError_parse_error(int64_t a) {
- void* a_ptr = untag_ptr(a);
- CHECK_ACCESS(a_ptr);
- LDKBolt11ParseError a_conv = *(LDKBolt11ParseError*)(a_ptr);
- a_conv = Bolt11ParseError_clone((LDKBolt11ParseError*)untag_ptr(a));
+ LDKBolt11ParseError 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 = Bolt11ParseError_clone(&a_conv);
LDKParseOrSemanticError *ret_copy = MALLOC(sizeof(LDKParseOrSemanticError), "LDKParseOrSemanticError");
*ret_copy = ParseOrSemanticError_parse_error(a_conv);
int64_t ret_ref = tag_ptr(ret_copy, true);
return ret_conv;
}
+void CS_LDK_Bolt11InvoiceDescription_free(int64_t this_ptr) {
+ if (!ptr_is_owned(this_ptr)) return;
+ void* this_ptr_ptr = untag_ptr(this_ptr);
+ CHECK_ACCESS(this_ptr_ptr);
+ LDKBolt11InvoiceDescription this_ptr_conv = *(LDKBolt11InvoiceDescription*)(this_ptr_ptr);
+ FREE(untag_ptr(this_ptr));
+ Bolt11InvoiceDescription_free(this_ptr_conv);
+}
+
+static inline uint64_t Bolt11InvoiceDescription_clone_ptr(LDKBolt11InvoiceDescription *NONNULL_PTR arg) {
+ LDKBolt11InvoiceDescription *ret_copy = MALLOC(sizeof(LDKBolt11InvoiceDescription), "LDKBolt11InvoiceDescription");
+ *ret_copy = Bolt11InvoiceDescription_clone(arg);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+int64_t CS_LDK_Bolt11InvoiceDescription_clone_ptr(int64_t arg) {
+ LDKBolt11InvoiceDescription* arg_conv = (LDKBolt11InvoiceDescription*)untag_ptr(arg);
+ int64_t ret_conv = Bolt11InvoiceDescription_clone_ptr(arg_conv);
+ return ret_conv;
+}
+
+int64_t CS_LDK_Bolt11InvoiceDescription_clone(int64_t orig) {
+ LDKBolt11InvoiceDescription* orig_conv = (LDKBolt11InvoiceDescription*)untag_ptr(orig);
+ LDKBolt11InvoiceDescription *ret_copy = MALLOC(sizeof(LDKBolt11InvoiceDescription), "LDKBolt11InvoiceDescription");
+ *ret_copy = Bolt11InvoiceDescription_clone(orig_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_Bolt11InvoiceDescription_direct(int64_t a) {
+ LDKDescription 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 = Description_clone(&a_conv);
+ LDKBolt11InvoiceDescription *ret_copy = MALLOC(sizeof(LDKBolt11InvoiceDescription), "LDKBolt11InvoiceDescription");
+ *ret_copy = Bolt11InvoiceDescription_direct(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+int64_t CS_LDK_Bolt11InvoiceDescription_hash(int64_t a) {
+ LDKSha256 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 = Sha256_clone(&a_conv);
+ LDKBolt11InvoiceDescription *ret_copy = MALLOC(sizeof(LDKBolt11InvoiceDescription), "LDKBolt11InvoiceDescription");
+ *ret_copy = Bolt11InvoiceDescription_hash(a_conv);
+ int64_t ret_ref = tag_ptr(ret_copy, true);
+ return ret_ref;
+}
+
+jboolean CS_LDK_Bolt11InvoiceDescription_eq(int64_t a, int64_t b) {
+ LDKBolt11InvoiceDescription* a_conv = (LDKBolt11InvoiceDescription*)untag_ptr(a);
+ LDKBolt11InvoiceDescription* b_conv = (LDKBolt11InvoiceDescription*)untag_ptr(b);
+ jboolean ret_conv = Bolt11InvoiceDescription_eq(a_conv, b_conv);
+ return ret_conv;
+}
+
+jstring CS_LDK_Bolt11InvoiceDescription_to_str(int64_t o) {
+ LDKBolt11InvoiceDescription* o_conv = (LDKBolt11InvoiceDescription*)untag_ptr(o);
+ LDKStr ret_str = Bolt11InvoiceDescription_to_str(o_conv);
+ jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
+ Str_free(ret_str);
+ return ret_conv;
+}
+
void CS_LDK_SignedRawBolt11Invoice_free(int64_t this_obj) {
LDKSignedRawBolt11Invoice this_obj_conv;
this_obj_conv.inner = untag_ptr(this_obj);
return tag_ptr(ret_conv, true);
}
+int64_t CS_LDK_Description_empty() {
+ LDKDescription ret_var = Description_empty();
+ int64_t ret_ref = 0;
+ CHECK_INNER_FIELD_ACCESS_OR_NULL(ret_var);
+ ret_ref = tag_ptr(ret_var.inner, ret_var.is_owned);
+ return ret_ref;
+}
+
int64_t CS_LDK_Description_into_inner(int64_t this_arg) {
LDKDescription this_arg_conv;
this_arg_conv.inner = untag_ptr(this_arg);
}
jstring CS_LDK_Bolt11ParseError_to_str(int64_t o) {
- LDKBolt11ParseError* o_conv = (LDKBolt11ParseError*)untag_ptr(o);
- LDKStr ret_str = Bolt11ParseError_to_str(o_conv);
+ LDKBolt11ParseError 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;
+ LDKStr ret_str = Bolt11ParseError_to_str(&o_conv);
jstring ret_conv = str_ref_to_cs(ret_str.chars, ret_str.len);
Str_free(ret_str);
return ret_conv;
*/
public enum Bolt12SemanticError {
/**
- * The current [`std::time::SystemTime`] is past the offer or invoice's expiration.
+ * The current system time is past the offer or invoice's expiration.
*/
LDKBolt12SemanticError_AlreadyExpired,
/**
*/
LDKBolt12SemanticError_MissingAmount,
/**
- * The amount exceeded the total bitcoin supply.
+ * The amount exceeded the total bitcoin supply or didn't match an expected amount.
*/
LDKBolt12SemanticError_InvalidAmount,
/**
*/
LDKBolt12SemanticError_MissingDescription,
/**
- * A signing pubkey was not provided.
- */
- LDKBolt12SemanticError_MissingSigningPubkey,
- /**
- * A signing pubkey was provided but a different one was expected.
+ * An issuer's signing pubkey was not provided.
*/
- LDKBolt12SemanticError_InvalidSigningPubkey,
+ LDKBolt12SemanticError_MissingIssuerSigningPubkey,
/**
- * A signing pubkey was provided but was not expected.
+ * An issuer's signing pubkey was provided but was not expected.
*/
- LDKBolt12SemanticError_UnexpectedSigningPubkey,
+ LDKBolt12SemanticError_UnexpectedIssuerSigningPubkey,
/**
* A quantity was expected but was missing.
*/
*/
LDKBolt12SemanticError_MissingPayerMetadata,
/**
- * A payer id was expected but was missing.
+ * A payer signing pubkey was expected but was missing.
*/
- LDKBolt12SemanticError_MissingPayerId,
+ LDKBolt12SemanticError_MissingPayerSigningPubkey,
/**
* The payment id for a refund or request is already in use.
*/
* An invoice payment hash was provided but was not expected.
*/
LDKBolt12SemanticError_UnexpectedPaymentHash,
+ /**
+ * A signing pubkey was not provided.
+ */
+ LDKBolt12SemanticError_MissingSigningPubkey,
+ /**
+ * A signing pubkey was provided but a different one was expected.
+ */
+ LDKBolt12SemanticError_InvalidSigningPubkey,
/**
* A signature was expected but was missing.
*/
LDKBolt12SemanticError_MissingSignature,
+ /**
+ * A Human Readable Name was provided but was not expected (i.e. was included in a
+ * [`Refund`]).
+ *
+ * [`Refund`]: super::refund::Refund
+ */
+ LDKBolt12SemanticError_UnexpectedHumanReadableName,
}} } }
LDKPaymentFailureReason_UserAbandoned,
/**
* We exhausted all of our retry attempts while trying to send the payment, or we
- * exhausted the [`Retry::Timeout`] if the user set one. If at any point a retry
- * attempt failed while being forwarded along the path, an [`Event::PaymentPathFailed`] will
+ * exhausted the [`Retry::Timeout`] if the user set one.
+ * If at any point a retry attempt failed while being forwarded along the path, an [`Event::PaymentPathFailed`] will
* have come before this.
*
* [`Retry::Timeout`]: crate::ln::channelmanager::Retry::Timeout
*/
LDKPaymentFailureReason_PaymentExpired,
/**
- * We failed to find a route while retrying the payment.
+ * We failed to find a route while sending or 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.
+ *
+ * Also used for [`BlindedPathCreationFailed`] when downgrading to versions prior to 0.0.124.
+ *
+ * [`BlindedPathCreationFailed`]: Self::BlindedPathCreationFailed
*/
LDKPaymentFailureReason_RouteNotFound,
/**
* [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
*/
LDKPaymentFailureReason_InvoiceRequestRejected,
+ /**
+ * Failed to create a blinded path back to ourselves.
+ * We attempted to initiate payment to a static invoice but failed to create a reply path for our
+ * [`HeldHtlcAvailable`] message.
+ *
+ * [`HeldHtlcAvailable`]: crate::onion_message::async_payments::HeldHtlcAvailable
+ */
+ LDKPaymentFailureReason_BlindedPathCreationFailed,
}} } }
*/
public enum RetryableSendFailure {
/**
- * The provided [`PaymentParameters::expiry_time`] indicated that the payment has expired. Note
- * that this error is *not* caused by [`Retry::Timeout`].
+ * The provided [`PaymentParameters::expiry_time`] indicated that the payment has expired.
+ *
+ * Note that this error is *not* caused by [`Retry::Timeout`].
*
* [`PaymentParameters::expiry_time`]: crate::routing::router::PaymentParameters::expiry_time
*/
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RetryDecodeErrorZ_get_ok")] public static extern long CResult_RetryDecodeErrorZ_get_ok(long _owner);
// struct LDKDecodeError CResult_RetryDecodeErrorZ_get_err(LDKCResult_RetryDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RetryDecodeErrorZ_get_err")] public static extern long CResult_RetryDecodeErrorZ_get_err(long _owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAPIError_ty_from_ptr")] public static extern long LDKAPIError_ty_from_ptr(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAPIError_APIMisuseError_get_err")] public static extern long LDKAPIError_APIMisuseError_get_err(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAPIError_FeeRateTooHigh_get_err")] public static extern long LDKAPIError_FeeRateTooHigh_get_err(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAPIError_FeeRateTooHigh_get_feerate")] public static extern int LDKAPIError_FeeRateTooHigh_get_feerate(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAPIError_InvalidRoute_get_err")] public static extern long LDKAPIError_InvalidRoute_get_err(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAPIError_ChannelUnavailable_get_err")] public static extern long LDKAPIError_ChannelUnavailable_get_err(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAPIError_IncompatibleShutdownScript_get_script")] public static extern long LDKAPIError_IncompatibleShutdownScript_get_script(long ptr);
- // void CResult_NoneAPIErrorZ_get_ok(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneAPIErrorZ_get_ok")] public static extern void CResult_NoneAPIErrorZ_get_ok(long _owner);
- // struct LDKAPIError CResult_NoneAPIErrorZ_get_err(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneAPIErrorZ_get_err")] public static extern long CResult_NoneAPIErrorZ_get_err(long _owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_ThirtyTwoBytesZ_ty_from_ptr")] public static extern long LDKCOption_ThirtyTwoBytesZ_ty_from_ptr(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_ThirtyTwoBytesZ_Some_get_some")] public static extern long LDKCOption_ThirtyTwoBytesZ_Some_get_some(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_CVec_u8ZZ_ty_from_ptr")] public static extern long LDKCOption_CVec_u8ZZ_ty_from_ptr(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RecipientOnionFieldsNoneZ_get_ok")] public static extern long CResult_RecipientOnionFieldsNoneZ_get_ok(long _owner);
// void CResult_RecipientOnionFieldsNoneZ_get_err(LDKCResult_RecipientOnionFieldsNoneZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RecipientOnionFieldsNoneZ_get_err")] public static extern void CResult_RecipientOnionFieldsNoneZ_get_err(long _owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKDNSResolverMessage_ty_from_ptr")] public static extern long LDKDNSResolverMessage_ty_from_ptr(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKDNSResolverMessage_DNSSECQuery_get_dnssec_query")] public static extern long LDKDNSResolverMessage_DNSSECQuery_get_dnssec_query(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKDNSResolverMessage_DNSSECProof_get_dnssec_proof")] public static extern long LDKDNSResolverMessage_DNSSECProof_get_dnssec_proof(long ptr);
+ // struct LDKDNSResolverMessage C2Tuple_DNSResolverMessageResponseInstructionZ_get_a(LDKC2Tuple_DNSResolverMessageResponseInstructionZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_DNSResolverMessageResponseInstructionZ_get_a")] public static extern long C2Tuple_DNSResolverMessageResponseInstructionZ_get_a(long _owner);
+ // struct LDKResponseInstruction C2Tuple_DNSResolverMessageResponseInstructionZ_get_b(LDKC2Tuple_DNSResolverMessageResponseInstructionZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_DNSResolverMessageResponseInstructionZ_get_b")] public static extern long C2Tuple_DNSResolverMessageResponseInstructionZ_get_b(long _owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ_ty_from_ptr")] public static extern long LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ_ty_from_ptr(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ_Some_get_some")] public static extern long LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ_Some_get_some(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKDestination_ty_from_ptr")] public static extern long LDKDestination_ty_from_ptr(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKDestination_Node_get_node")] public static extern long LDKDestination_Node_get_node(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKDestination_BlindedPath_get_blinded_path")] public static extern long LDKDestination_BlindedPath_get_blinded_path(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersContext_ty_from_ptr")] public static extern long LDKOffersContext_ty_from_ptr(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersContext_InvoiceRequest_get_nonce")] public static extern long LDKOffersContext_InvoiceRequest_get_nonce(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersContext_OutboundPayment_get_payment_id")] public static extern long LDKOffersContext_OutboundPayment_get_payment_id(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersContext_OutboundPayment_get_nonce")] public static extern long LDKOffersContext_OutboundPayment_get_nonce(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersContext_OutboundPayment_get_hmac")] public static extern long LDKOffersContext_OutboundPayment_get_hmac(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersContext_InboundPayment_get_payment_hash")] public static extern long LDKOffersContext_InboundPayment_get_payment_hash(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersContext_InboundPayment_get_nonce")] public static extern long LDKOffersContext_InboundPayment_get_nonce(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersContext_InboundPayment_get_hmac")] public static extern long LDKOffersContext_InboundPayment_get_hmac(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAsyncPaymentsContext_ty_from_ptr")] public static extern long LDKAsyncPaymentsContext_ty_from_ptr(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAsyncPaymentsContext_OutboundPayment_get_payment_id")] public static extern long LDKAsyncPaymentsContext_OutboundPayment_get_payment_id(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAsyncPaymentsContext_OutboundPayment_get_nonce")] public static extern long LDKAsyncPaymentsContext_OutboundPayment_get_nonce(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAsyncPaymentsContext_OutboundPayment_get_hmac")] public static extern long LDKAsyncPaymentsContext_OutboundPayment_get_hmac(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageContext_ty_from_ptr")] public static extern long LDKMessageContext_ty_from_ptr(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageContext_Offers_get_offers")] public static extern long LDKMessageContext_Offers_get_offers(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageContext_AsyncPayments_get_async_payments")] public static extern long LDKMessageContext_AsyncPayments_get_async_payments(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageContext_DNSResolver_get_dns_resolver")] public static extern long LDKMessageContext_DNSResolver_get_dns_resolver(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageContext_Custom_get_custom")] public static extern long LDKMessageContext_Custom_get_custom(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageSendInstructions_ty_from_ptr")] public static extern long LDKMessageSendInstructions_ty_from_ptr(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageSendInstructions_WithSpecifiedReplyPath_get_destination")] public static extern long LDKMessageSendInstructions_WithSpecifiedReplyPath_get_destination(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageSendInstructions_WithSpecifiedReplyPath_get_reply_path")] public static extern long LDKMessageSendInstructions_WithSpecifiedReplyPath_get_reply_path(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageSendInstructions_WithReplyPath_get_destination")] public static extern long LDKMessageSendInstructions_WithReplyPath_get_destination(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageSendInstructions_WithReplyPath_get_context")] public static extern long LDKMessageSendInstructions_WithReplyPath_get_context(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageSendInstructions_WithoutReplyPath_get_destination")] public static extern long LDKMessageSendInstructions_WithoutReplyPath_get_destination(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageSendInstructions_ForReply_get_instructions")] public static extern long LDKMessageSendInstructions_ForReply_get_instructions(long ptr);
+ // struct LDKDNSResolverMessage C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_a(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_a")] public static extern long C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_a(long _owner);
+ // struct LDKMessageSendInstructions C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_b(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_b")] public static extern long C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_b(long _owner);
+ // struct LDKDNSResolverMessage CResult_DNSResolverMessageDecodeErrorZ_get_ok(LDKCResult_DNSResolverMessageDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_get_ok")] public static extern long CResult_DNSResolverMessageDecodeErrorZ_get_ok(long _owner);
+ // struct LDKDecodeError CResult_DNSResolverMessageDecodeErrorZ_get_err(LDKCResult_DNSResolverMessageDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_get_err")] public static extern long CResult_DNSResolverMessageDecodeErrorZ_get_err(long _owner);
+ // struct LDKHumanReadableName CResult_HumanReadableNameNoneZ_get_ok(LDKCResult_HumanReadableNameNoneZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HumanReadableNameNoneZ_get_ok")] public static extern long CResult_HumanReadableNameNoneZ_get_ok(long _owner);
+ // void CResult_HumanReadableNameNoneZ_get_err(LDKCResult_HumanReadableNameNoneZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HumanReadableNameNoneZ_get_err")] public static extern void CResult_HumanReadableNameNoneZ_get_err(long _owner);
+ // struct LDKHumanReadableName CResult_HumanReadableNameDecodeErrorZ_get_ok(LDKCResult_HumanReadableNameDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HumanReadableNameDecodeErrorZ_get_ok")] public static extern long CResult_HumanReadableNameDecodeErrorZ_get_ok(long _owner);
+ // struct LDKDecodeError CResult_HumanReadableNameDecodeErrorZ_get_err(LDKCResult_HumanReadableNameDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HumanReadableNameDecodeErrorZ_get_err")] public static extern long CResult_HumanReadableNameDecodeErrorZ_get_err(long _owner);
+ // struct LDKDNSSECQuery C2Tuple_DNSSECQueryDNSResolverContextZ_get_a(LDKC2Tuple_DNSSECQueryDNSResolverContextZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_DNSSECQueryDNSResolverContextZ_get_a")] public static extern long C2Tuple_DNSSECQueryDNSResolverContextZ_get_a(long _owner);
+ // struct LDKDNSResolverContext C2Tuple_DNSSECQueryDNSResolverContextZ_get_b(LDKC2Tuple_DNSSECQueryDNSResolverContextZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_DNSSECQueryDNSResolverContextZ_get_b")] public static extern long C2Tuple_DNSSECQueryDNSResolverContextZ_get_b(long _owner);
+ // struct LDKC2Tuple_DNSSECQueryDNSResolverContextZ CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_get_ok(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_get_ok")] public static extern long CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_get_ok(long _owner);
+ // void CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_get_err(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_get_err")] public static extern void CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_get_err(long _owner);
+ // struct LDKHumanReadableName C2Tuple_HumanReadableNameThirtyTwoBytesZ_get_a(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_HumanReadableNameThirtyTwoBytesZ_get_a")] public static extern long C2Tuple_HumanReadableNameThirtyTwoBytesZ_get_a(long _owner);
+ // struct LDKThirtyTwoBytes C2Tuple_HumanReadableNameThirtyTwoBytesZ_get_b(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_HumanReadableNameThirtyTwoBytesZ_get_b")] public static extern long C2Tuple_HumanReadableNameThirtyTwoBytesZ_get_b(long _owner);
+ // struct LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_get_a(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_get_a")] public static extern long C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_get_a(long _owner);
+ // struct LDKOffer C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_get_b(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_get_b")] public static extern long C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_get_b(long _owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_ty_from_ptr")] public static extern long LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_ty_from_ptr(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_Some_get_some")] public static extern long LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_Some_get_some(long ptr);
+ // struct LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_a(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_a")] public static extern long C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_a(long _owner);
+ // struct LDKStr C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_b(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_b")] public static extern long C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_b(long _owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_ty_from_ptr")] public static extern long LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_ty_from_ptr(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_Some_get_some")] public static extern long LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_Some_get_some(long ptr);
// struct LDKUnsignedBolt12Invoice CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok")] public static extern long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_ok(long _owner);
// enum LDKBolt12SemanticError CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR owner);
long sign_closing_transaction(long closing_tx);
long sign_holder_anchor_input(long anchor_tx, long input);
long sign_channel_announcement_with_funding_key(long msg);
+ long sign_splicing_funding_input(long tx, long input_index, long input_value);
}
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEcdsaChannelSigner_new")] public static extern long LDKEcdsaChannelSigner_new_native(long impl_idx, long ChannelSigner, long pubkeys);
public static long[] LDKEcdsaChannelSigner_new(LDKEcdsaChannelSigner impl, long ChannelSigner, long pubkeys) {
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_EcdsaChannelSigner_sign_holder_anchor_input")] public static extern long EcdsaChannelSigner_sign_holder_anchor_input(long _this_arg, long _anchor_tx, long _input);
// LDKCResult_ECDSASignatureNoneZ EcdsaChannelSigner_sign_channel_announcement_with_funding_key LDKEcdsaChannelSigner *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_EcdsaChannelSigner_sign_channel_announcement_with_funding_key")] public static extern long EcdsaChannelSigner_sign_channel_announcement_with_funding_key(long _this_arg, long _msg);
+ // LDKCResult_ECDSASignatureNoneZ EcdsaChannelSigner_sign_splicing_funding_input LDKEcdsaChannelSigner *NONNULL_PTR this_arg, struct LDKTransaction tx, uintptr_t input_index, uint64_t input_value
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_EcdsaChannelSigner_sign_splicing_funding_input")] public static extern long EcdsaChannelSigner_sign_splicing_funding_input(long _this_arg, long _tx, long _input_index, long _input_value);
// struct LDKEcdsaChannelSigner CResult_EcdsaChannelSignerDecodeErrorZ_get_ok(LDKCResult_EcdsaChannelSignerDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_EcdsaChannelSignerDecodeErrorZ_get_ok")] public static extern long CResult_EcdsaChannelSignerDecodeErrorZ_get_ok(long _owner);
// struct LDKDecodeError CResult_EcdsaChannelSignerDecodeErrorZ_get_err(LDKCResult_EcdsaChannelSignerDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedPaymentPathZNoneZ_get_ok")] public static extern long CResult_CVec_BlindedPaymentPathZNoneZ_get_ok(long _owner);
// void CResult_CVec_BlindedPaymentPathZNoneZ_get_err(LDKCResult_CVec_BlindedPaymentPathZNoneZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedPaymentPathZNoneZ_get_err")] public static extern void CResult_CVec_BlindedPaymentPathZNoneZ_get_err(long _owner);
- // struct LDKOnionMessagePath CResult_OnionMessagePathNoneZ_get_ok(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OnionMessagePathNoneZ_get_ok")] public static extern long CResult_OnionMessagePathNoneZ_get_ok(long _owner);
- // void CResult_OnionMessagePathNoneZ_get_err(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OnionMessagePathNoneZ_get_err")] public static extern void CResult_OnionMessagePathNoneZ_get_err(long _owner);
- // struct LDKCVec_BlindedMessagePathZ CResult_CVec_BlindedMessagePathZNoneZ_get_ok(LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_get_ok")] public static extern long CResult_CVec_BlindedMessagePathZNoneZ_get_ok(long _owner);
- // void CResult_CVec_BlindedMessagePathZNoneZ_get_err(LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_get_err")] public static extern void CResult_CVec_BlindedMessagePathZNoneZ_get_err(long _owner);
// struct LDKInFlightHtlcs CResult_InFlightHtlcsDecodeErrorZ_get_ok(LDKCResult_InFlightHtlcsDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InFlightHtlcsDecodeErrorZ_get_ok")] public static extern long CResult_InFlightHtlcsDecodeErrorZ_get_ok(long _owner);
// struct LDKDecodeError CResult_InFlightHtlcsDecodeErrorZ_get_err(LDKCResult_InFlightHtlcsDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c")] public static extern long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_c(long _owner);
// struct LDKPublicKey C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d")] public static extern long C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_get_d(long _owner);
- // struct LDKInitFeatures CResult_InitFeaturesDecodeErrorZ_get_ok(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InitFeaturesDecodeErrorZ_get_ok")] public static extern long CResult_InitFeaturesDecodeErrorZ_get_ok(long _owner);
- // struct LDKDecodeError CResult_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InitFeaturesDecodeErrorZ_get_err")] public static extern long CResult_InitFeaturesDecodeErrorZ_get_err(long _owner);
- // struct LDKChannelFeatures CResult_ChannelFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_get_ok")] public static extern long CResult_ChannelFeaturesDecodeErrorZ_get_ok(long _owner);
- // struct LDKDecodeError CResult_ChannelFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_get_err")] public static extern long CResult_ChannelFeaturesDecodeErrorZ_get_err(long _owner);
- // struct LDKNodeFeatures CResult_NodeFeaturesDecodeErrorZ_get_ok(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeFeaturesDecodeErrorZ_get_ok")] public static extern long CResult_NodeFeaturesDecodeErrorZ_get_ok(long _owner);
- // struct LDKDecodeError CResult_NodeFeaturesDecodeErrorZ_get_err(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeFeaturesDecodeErrorZ_get_err")] public static extern long CResult_NodeFeaturesDecodeErrorZ_get_err(long _owner);
- // struct LDKBolt11InvoiceFeatures CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_ok(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_ok")] public static extern long CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_ok(long _owner);
- // struct LDKDecodeError CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_err")] public static extern long CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_err(long _owner);
- // struct LDKBolt12InvoiceFeatures CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_ok(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_ok")] public static extern long CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_ok(long _owner);
- // struct LDKDecodeError CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_err")] public static extern long CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_err(long _owner);
- // struct LDKBlindedHopFeatures CResult_BlindedHopFeaturesDecodeErrorZ_get_ok(LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_get_ok")] public static extern long CResult_BlindedHopFeaturesDecodeErrorZ_get_ok(long _owner);
- // struct LDKDecodeError CResult_BlindedHopFeaturesDecodeErrorZ_get_err(LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_get_err")] public static extern long CResult_BlindedHopFeaturesDecodeErrorZ_get_err(long _owner);
- // struct LDKChannelTypeFeatures CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok")] public static extern long CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(long _owner);
- // struct LDKDecodeError CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err")] public static extern long CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(long _owner);
// struct LDKOfferId CResult_OfferIdDecodeErrorZ_get_ok(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferIdDecodeErrorZ_get_ok")] public static extern long CResult_OfferIdDecodeErrorZ_get_ok(long _owner);
// struct LDKDecodeError CResult_OfferIdDecodeErrorZ_get_err(LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferBolt12SemanticErrorZ_get_ok")] public static extern long CResult_OfferBolt12SemanticErrorZ_get_ok(long _owner);
// enum LDKBolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_OfferBolt12SemanticErrorZ_get_err(long _owner);
- // struct LDKInvoiceRequestWithDerivedPayerIdBuilder CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok")] public static extern long CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_ok(long _owner);
- // enum LDKBolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_get_err(long _owner);
- // struct LDKInvoiceRequestWithExplicitPayerIdBuilder CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok")] public static extern long CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_ok(long _owner);
- // enum LDKBolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_get_err(long _owner);
+ // struct LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok")] public static extern long CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(long _owner);
+ // enum LDKBolt12SemanticError CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(long _owner);
// struct LDKOffer CResult_OfferDecodeErrorZ_get_ok(LDKCResult_OfferDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferDecodeErrorZ_get_ok")] public static extern long CResult_OfferDecodeErrorZ_get_ok(long _owner);
// struct LDKDecodeError CResult_OfferDecodeErrorZ_get_err(LDKCResult_OfferDecodeErrorZ *NONNULL_PTR owner);
// void CResult_CVec_UtxoZNoneZ_get_err(LDKCResult_CVec_UtxoZNoneZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_UtxoZNoneZ_get_err")] public static extern void CResult_CVec_UtxoZNoneZ_get_err(long _owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentContext_ty_from_ptr")] public static extern long LDKPaymentContext_ty_from_ptr(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentContext_Unknown_get_unknown")] public static extern long LDKPaymentContext_Unknown_get_unknown(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentContext_Bolt12Offer_get_bolt12_offer")] public static extern long LDKPaymentContext_Bolt12Offer_get_bolt12_offer(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentContext_Bolt12Refund_get_bolt12_refund")] public static extern long LDKPaymentContext_Bolt12Refund_get_bolt12_refund(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_PaymentContextZ_ty_from_ptr")] public static extern long LDKCOption_PaymentContextZ_ty_from_ptr(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_u64u16Z_get_b")] public static extern short C2Tuple_u64u16Z_get_b(long _owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_C2Tuple_u64u16ZZ_ty_from_ptr")] public static extern long LDKCOption_C2Tuple_u64u16ZZ_ty_from_ptr(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_C2Tuple_u64u16ZZ_Some_get_some")] public static extern long LDKCOption_C2Tuple_u64u16ZZ_Some_get_some(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAPIError_ty_from_ptr")] public static extern long LDKAPIError_ty_from_ptr(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAPIError_APIMisuseError_get_err")] public static extern long LDKAPIError_APIMisuseError_get_err(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAPIError_FeeRateTooHigh_get_err")] public static extern long LDKAPIError_FeeRateTooHigh_get_err(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAPIError_FeeRateTooHigh_get_feerate")] public static extern int LDKAPIError_FeeRateTooHigh_get_feerate(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAPIError_InvalidRoute_get_err")] public static extern long LDKAPIError_InvalidRoute_get_err(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAPIError_ChannelUnavailable_get_err")] public static extern long LDKAPIError_ChannelUnavailable_get_err(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAPIError_IncompatibleShutdownScript_get_script")] public static extern long LDKAPIError_IncompatibleShutdownScript_get_script(long ptr);
// struct LDKChannelId CResult_ChannelIdAPIErrorZ_get_ok(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdAPIErrorZ_get_ok")] public static extern long CResult_ChannelIdAPIErrorZ_get_ok(long _owner);
// struct LDKAPIError CResult_ChannelIdAPIErrorZ_get_err(LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKRecentPaymentDetails_Fulfilled_get_payment_hash")] public static extern long LDKRecentPaymentDetails_Fulfilled_get_payment_hash(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKRecentPaymentDetails_Abandoned_get_payment_id")] public static extern long LDKRecentPaymentDetails_Abandoned_get_payment_id(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKRecentPaymentDetails_Abandoned_get_payment_hash")] public static extern long LDKRecentPaymentDetails_Abandoned_get_payment_hash(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentSendFailure_ty_from_ptr")] public static extern long LDKPaymentSendFailure_ty_from_ptr(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentSendFailure_ParameterError_get_parameter_error")] public static extern long LDKPaymentSendFailure_ParameterError_get_parameter_error(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentSendFailure_PathParameterError_get_path_parameter_error")] public static extern long LDKPaymentSendFailure_PathParameterError_get_path_parameter_error(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentSendFailure_AllFailedResendSafe_get_all_failed_resend_safe")] public static extern long LDKPaymentSendFailure_AllFailedResendSafe_get_all_failed_resend_safe(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentSendFailure_PartialFailure_get_results")] public static extern long LDKPaymentSendFailure_PartialFailure_get_results(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentSendFailure_PartialFailure_get_failed_paths_retry")] public static extern long LDKPaymentSendFailure_PartialFailure_get_failed_paths_retry(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPaymentSendFailure_PartialFailure_get_payment_id")] public static extern long LDKPaymentSendFailure_PartialFailure_get_payment_id(long ptr);
- // void CResult_NonePaymentSendFailureZ_get_ok(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NonePaymentSendFailureZ_get_ok")] public static extern void CResult_NonePaymentSendFailureZ_get_ok(long _owner);
- // struct LDKPaymentSendFailure CResult_NonePaymentSendFailureZ_get_err(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NonePaymentSendFailureZ_get_err")] public static extern long CResult_NonePaymentSendFailureZ_get_err(long _owner);
+ // void CResult_NoneAPIErrorZ_get_ok(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneAPIErrorZ_get_ok")] public static extern void CResult_NoneAPIErrorZ_get_ok(long _owner);
+ // struct LDKAPIError CResult_NoneAPIErrorZ_get_err(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneAPIErrorZ_get_err")] public static extern long CResult_NoneAPIErrorZ_get_err(long _owner);
// void CResult_NoneRetryableSendFailureZ_get_ok(LDKCResult_NoneRetryableSendFailureZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneRetryableSendFailureZ_get_ok")] public static extern void CResult_NoneRetryableSendFailureZ_get_ok(long _owner);
// enum LDKRetryableSendFailure CResult_NoneRetryableSendFailureZ_get_err(LDKCResult_NoneRetryableSendFailureZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneRetryableSendFailureZ_get_err")] public static extern RetryableSendFailure CResult_NoneRetryableSendFailureZ_get_err(long _owner);
- // struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesPaymentSendFailureZ_get_ok(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_get_ok")] public static extern long CResult_ThirtyTwoBytesPaymentSendFailureZ_get_ok(long _owner);
- // struct LDKPaymentSendFailure CResult_ThirtyTwoBytesPaymentSendFailureZ_get_err(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_get_err")] public static extern long CResult_ThirtyTwoBytesPaymentSendFailureZ_get_err(long _owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_OffersContextZ_ty_from_ptr")] public static extern long LDKCOption_OffersContextZ_ty_from_ptr(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_OffersContextZ_Some_get_some")] public static extern long LDKCOption_OffersContextZ_Some_get_some(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBolt12PaymentError_ty_from_ptr")] public static extern long LDKBolt12PaymentError_ty_from_ptr(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBolt12PaymentError_SendingFailed_get_sending_failed")] public static extern RetryableSendFailure LDKBolt12PaymentError_SendingFailed_get_sending_failed(long ptr);
+ // void CResult_NoneBolt12PaymentErrorZ_get_ok(LDKCResult_NoneBolt12PaymentErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12PaymentErrorZ_get_ok")] public static extern void CResult_NoneBolt12PaymentErrorZ_get_ok(long _owner);
+ // struct LDKBolt12PaymentError CResult_NoneBolt12PaymentErrorZ_get_err(LDKCResult_NoneBolt12PaymentErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12PaymentErrorZ_get_err")] public static extern long CResult_NoneBolt12PaymentErrorZ_get_err(long _owner);
// struct LDKThirtyTwoBytes CResult_ThirtyTwoBytesRetryableSendFailureZ_get_ok(LDKCResult_ThirtyTwoBytesRetryableSendFailureZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesRetryableSendFailureZ_get_ok")] public static extern long CResult_ThirtyTwoBytesRetryableSendFailureZ_get_ok(long _owner);
// enum LDKRetryableSendFailure CResult_ThirtyTwoBytesRetryableSendFailureZ_get_err(LDKCResult_ThirtyTwoBytesRetryableSendFailureZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_get_a")] public static extern long C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_get_a(long _owner);
// struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_get_b(LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_get_b")] public static extern long C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_get_b(long _owner);
- // struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_ok")] public static extern long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_ok(long _owner);
- // struct LDKPaymentSendFailure CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_err(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_err")] public static extern long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_err(long _owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKProbeSendFailure_ty_from_ptr")] public static extern long LDKProbeSendFailure_ty_from_ptr(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKProbeSendFailure_SendingFailed_get_sending_failed")] public static extern long LDKProbeSendFailure_SendingFailed_get_sending_failed(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKProbeSendFailure_ParameterError_get_parameter_error")] public static extern long LDKProbeSendFailure_ParameterError_get_parameter_error(long ptr);
+ // struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_ok(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_ok")] public static extern long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_ok(long _owner);
+ // struct LDKProbeSendFailure CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_err(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_err")] public static extern long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_err(long _owner);
// struct LDKCVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_ok(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_ok")] public static extern long CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_ok(long _owner);
// struct LDKProbeSendFailure CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_get_err(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ChannelIdPublicKeyZ_get_a")] public static extern long C2Tuple_ChannelIdPublicKeyZ_get_a(long _owner);
// struct LDKPublicKey C2Tuple_ChannelIdPublicKeyZ_get_b(LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ChannelIdPublicKeyZ_get_b")] public static extern long C2Tuple_ChannelIdPublicKeyZ_get_b(long _owner);
+ // struct LDKPublicKey C2Tuple_PublicKeyChannelIdZ_get_a(LDKC2Tuple_PublicKeyChannelIdZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_PublicKeyChannelIdZ_get_a")] public static extern long C2Tuple_PublicKeyChannelIdZ_get_a(long _owner);
+ // struct LDKChannelId C2Tuple_PublicKeyChannelIdZ_get_b(LDKC2Tuple_PublicKeyChannelIdZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_PublicKeyChannelIdZ_get_b")] public static extern long C2Tuple_PublicKeyChannelIdZ_get_b(long _owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_C2Tuple_PublicKeyChannelIdZZ_ty_from_ptr")] public static extern long LDKCOption_C2Tuple_PublicKeyChannelIdZZ_ty_from_ptr(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_C2Tuple_PublicKeyChannelIdZZ_Some_get_some")] public static extern long LDKCOption_C2Tuple_PublicKeyChannelIdZZ_Some_get_some(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKSignOrCreationError_ty_from_ptr")] public static extern long LDKSignOrCreationError_ty_from_ptr(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKSignOrCreationError_CreationError_get_creation_error")] public static extern CreationError LDKSignOrCreationError_CreationError_get_creation_error(long ptr);
+ // struct LDKBolt11Invoice CResult_Bolt11InvoiceSignOrCreationErrorZ_get_ok(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_get_ok")] public static extern long CResult_Bolt11InvoiceSignOrCreationErrorZ_get_ok(long _owner);
+ // struct LDKSignOrCreationError CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err")] public static extern long CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err(long _owner);
// struct LDKOfferWithDerivedMetadataBuilder CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok")] public static extern long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_ok(long _owner);
// enum LDKBolt12SemanticError CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_get_err(LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_get_ok")] public static extern long CResult_ThirtyTwoBytesAPIErrorZ_get_ok(long _owner);
// struct LDKAPIError CResult_ThirtyTwoBytesAPIErrorZ_get_err(LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_get_err")] public static extern long CResult_ThirtyTwoBytesAPIErrorZ_get_err(long _owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersContext_ty_from_ptr")] public static extern long LDKOffersContext_ty_from_ptr(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersContext_InvoiceRequest_get_nonce")] public static extern long LDKOffersContext_InvoiceRequest_get_nonce(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersContext_OutboundPayment_get_payment_id")] public static extern long LDKOffersContext_OutboundPayment_get_payment_id(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersContext_OutboundPayment_get_nonce")] public static extern long LDKOffersContext_OutboundPayment_get_nonce(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersContext_OutboundPayment_get_hmac")] public static extern long LDKOffersContext_OutboundPayment_get_hmac(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersContext_InboundPayment_get_payment_hash")] public static extern long LDKOffersContext_InboundPayment_get_payment_hash(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_OffersContextZ_ty_from_ptr")] public static extern long LDKCOption_OffersContextZ_ty_from_ptr(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_OffersContextZ_Some_get_some")] public static extern long LDKCOption_OffersContextZ_Some_get_some(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersMessage_ty_from_ptr")] public static extern long LDKOffersMessage_ty_from_ptr(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersMessage_InvoiceRequest_get_invoice_request")] public static extern long LDKOffersMessage_InvoiceRequest_get_invoice_request(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKOffersMessage_Invoice_get_invoice")] public static extern long LDKOffersMessage_Invoice_get_invoice(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_OffersMessageResponseInstructionZ_get_b")] public static extern long C2Tuple_OffersMessageResponseInstructionZ_get_b(long _owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_C2Tuple_OffersMessageResponseInstructionZZ_ty_from_ptr")] public static extern long LDKCOption_C2Tuple_OffersMessageResponseInstructionZZ_ty_from_ptr(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_C2Tuple_OffersMessageResponseInstructionZZ_Some_get_some")] public static extern long LDKCOption_C2Tuple_OffersMessageResponseInstructionZZ_Some_get_some(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKDestination_ty_from_ptr")] public static extern long LDKDestination_ty_from_ptr(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKDestination_Node_get_node")] public static extern long LDKDestination_Node_get_node(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKDestination_BlindedPath_get_blinded_path")] public static extern long LDKDestination_BlindedPath_get_blinded_path(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageContext_ty_from_ptr")] public static extern long LDKMessageContext_ty_from_ptr(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageContext_Offers_get_offers")] public static extern long LDKMessageContext_Offers_get_offers(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageContext_Custom_get_custom")] public static extern long LDKMessageContext_Custom_get_custom(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageSendInstructions_ty_from_ptr")] public static extern long LDKMessageSendInstructions_ty_from_ptr(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageSendInstructions_WithSpecifiedReplyPath_get_destination")] public static extern long LDKMessageSendInstructions_WithSpecifiedReplyPath_get_destination(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageSendInstructions_WithSpecifiedReplyPath_get_reply_path")] public static extern long LDKMessageSendInstructions_WithSpecifiedReplyPath_get_reply_path(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageSendInstructions_WithReplyPath_get_destination")] public static extern long LDKMessageSendInstructions_WithReplyPath_get_destination(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageSendInstructions_WithReplyPath_get_context")] public static extern long LDKMessageSendInstructions_WithReplyPath_get_context(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageSendInstructions_WithoutReplyPath_get_destination")] public static extern long LDKMessageSendInstructions_WithoutReplyPath_get_destination(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageSendInstructions_ForReply_get_instructions")] public static extern long LDKMessageSendInstructions_ForReply_get_instructions(long ptr);
// struct LDKOffersMessage C2Tuple_OffersMessageMessageSendInstructionsZ_get_a(LDKC2Tuple_OffersMessageMessageSendInstructionsZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_OffersMessageMessageSendInstructionsZ_get_a")] public static extern long C2Tuple_OffersMessageMessageSendInstructionsZ_get_a(long _owner);
// struct LDKMessageSendInstructions C2Tuple_OffersMessageMessageSendInstructionsZ_get_b(LDKC2Tuple_OffersMessageMessageSendInstructionsZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPendingHTLCRouting_ReceiveKeysend_get_incoming_cltv_expiry")] public static extern int LDKPendingHTLCRouting_ReceiveKeysend_get_incoming_cltv_expiry(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPendingHTLCRouting_ReceiveKeysend_get_custom_tlvs")] public static extern long LDKPendingHTLCRouting_ReceiveKeysend_get_custom_tlvs(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPendingHTLCRouting_ReceiveKeysend_get_requires_blinded_error")] public static extern bool LDKPendingHTLCRouting_ReceiveKeysend_get_requires_blinded_error(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPendingHTLCRouting_ReceiveKeysend_get_has_recipient_created_payment_secret")] public static extern bool LDKPendingHTLCRouting_ReceiveKeysend_get_has_recipient_created_payment_secret(long ptr);
// struct LDKPendingHTLCRouting CResult_PendingHTLCRoutingDecodeErrorZ_get_ok(LDKCResult_PendingHTLCRoutingDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PendingHTLCRoutingDecodeErrorZ_get_ok")] public static extern long CResult_PendingHTLCRoutingDecodeErrorZ_get_ok(long _owner);
// struct LDKDecodeError CResult_PendingHTLCRoutingDecodeErrorZ_get_err(LDKCResult_PendingHTLCRoutingDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKUnsignedGossipMessage_ChannelUpdate_get_channel_update")] public static extern long LDKUnsignedGossipMessage_ChannelUpdate_get_channel_update(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKUnsignedGossipMessage_NodeAnnouncement_get_node_announcement")] public static extern long LDKUnsignedGossipMessage_NodeAnnouncement_get_node_announcement(long ptr);
public interface LDKNodeSigner {
- long get_inbound_payment_key_material();
+ long get_inbound_payment_key();
long get_node_id(Recipient recipient);
long ecdh(Recipient recipient, long other_key, long tweak);
long sign_invoice(long invoice, Recipient recipient);
- long sign_bolt12_invoice_request(long invoice_request);
long sign_bolt12_invoice(long invoice);
long sign_gossip_message(long msg);
}
ret[1] = i;
return ret;
}
- // LDKThirtyTwoBytes NodeSigner_get_inbound_payment_key_material LDKNodeSigner *NONNULL_PTR this_arg
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeSigner_get_inbound_payment_key_material")] public static extern long NodeSigner_get_inbound_payment_key_material(long _this_arg);
+ // LDKExpandedKey NodeSigner_get_inbound_payment_key LDKNodeSigner *NONNULL_PTR this_arg
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeSigner_get_inbound_payment_key")] public static extern long NodeSigner_get_inbound_payment_key(long _this_arg);
// LDKCResult_PublicKeyNoneZ NodeSigner_get_node_id LDKNodeSigner *NONNULL_PTR this_arg, enum LDKRecipient recipient
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeSigner_get_node_id")] public static extern long NodeSigner_get_node_id(long _this_arg, Recipient _recipient);
// LDKCResult_ThirtyTwoBytesNoneZ NodeSigner_ecdh LDKNodeSigner *NONNULL_PTR this_arg, enum LDKRecipient recipient, struct LDKPublicKey other_key, struct LDKCOption_BigEndianScalarZ tweak
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeSigner_ecdh")] public static extern long NodeSigner_ecdh(long _this_arg, Recipient _recipient, long _other_key, long _tweak);
// LDKCResult_RecoverableSignatureNoneZ NodeSigner_sign_invoice LDKNodeSigner *NONNULL_PTR this_arg, const struct LDKRawBolt11Invoice *NONNULL_PTR invoice, enum LDKRecipient recipient
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeSigner_sign_invoice")] public static extern long NodeSigner_sign_invoice(long _this_arg, long _invoice, Recipient _recipient);
- // LDKCResult_SchnorrSignatureNoneZ NodeSigner_sign_bolt12_invoice_request LDKNodeSigner *NONNULL_PTR this_arg, const struct LDKUnsignedInvoiceRequest *NONNULL_PTR invoice_request
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeSigner_sign_bolt12_invoice_request")] public static extern long NodeSigner_sign_bolt12_invoice_request(long _this_arg, long _invoice_request);
// LDKCResult_SchnorrSignatureNoneZ NodeSigner_sign_bolt12_invoice LDKNodeSigner *NONNULL_PTR this_arg, const struct LDKUnsignedBolt12Invoice *NONNULL_PTR invoice
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeSigner_sign_bolt12_invoice")] public static extern long NodeSigner_sign_bolt12_invoice(long _this_arg, long _invoice);
// LDKCResult_ECDSASignatureNoneZ NodeSigner_sign_gossip_message LDKNodeSigner *NONNULL_PTR this_arg, struct LDKUnsignedGossipMessage msg
}
// uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_FeeEstimator_get_est_sat_per_1000_weight")] public static extern int FeeEstimator_get_est_sat_per_1000_weight(long _this_arg, ConfirmationTarget _confirmation_target);
- public interface LDKMessageRouter {
- long find_path(long sender, long peers, long destination);
- long create_blinded_paths(long recipient, long context, long peers);
- long create_compact_blinded_paths(long recipient, long context, long peers);
+ public interface LDKRouter {
+ long find_route(long payer, long route_params, long first_hops, long inflight_htlcs);
+ long find_route_with_id(long payer, long route_params, long first_hops, long inflight_htlcs, long _payment_hash, long _payment_id);
+ long create_blinded_payment_paths(long recipient, long first_hops, long tlvs, long amount_msats);
}
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageRouter_new")] public static extern long LDKMessageRouter_new_native(long impl_idx);
- public static long[] LDKMessageRouter_new(LDKMessageRouter impl) {
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKRouter_new")] public static extern long LDKRouter_new_native(long impl_idx);
+ public static long[] LDKRouter_new(LDKRouter impl) {
long new_obj_idx = js_objs.Count;
int i = 0;
for (; i < js_objs.Count; i++) {
js_objs[i] = new WeakReference(impl);
}
long[] ret = new long[2];
- ret[0] = LDKMessageRouter_new_native(i);
+ ret[0] = LDKRouter_new_native(i);
ret[1] = i;
return ret;
}
- // LDKCResult_OnionMessagePathNoneZ MessageRouter_find_path LDKMessageRouter *NONNULL_PTR this_arg, struct LDKPublicKey sender, struct LDKCVec_PublicKeyZ peers, struct LDKDestination destination
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MessageRouter_find_path")] public static extern long MessageRouter_find_path(long _this_arg, long _sender, long _peers, long _destination);
- // LDKCResult_CVec_BlindedMessagePathZNoneZ MessageRouter_create_blinded_paths LDKMessageRouter *NONNULL_PTR this_arg, struct LDKPublicKey recipient, struct LDKMessageContext context, struct LDKCVec_PublicKeyZ peers
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MessageRouter_create_blinded_paths")] public static extern long MessageRouter_create_blinded_paths(long _this_arg, long _recipient, long _context, long _peers);
- // LDKCResult_CVec_BlindedMessagePathZNoneZ MessageRouter_create_compact_blinded_paths LDKMessageRouter *NONNULL_PTR this_arg, struct LDKPublicKey recipient, struct LDKMessageContext context, struct LDKCVec_MessageForwardNodeZ peers
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MessageRouter_create_compact_blinded_paths")] public static extern long MessageRouter_create_compact_blinded_paths(long _this_arg, long _recipient, long _context, long _peers);
- public interface LDKRouter {
- long find_route(long payer, long route_params, long first_hops, long inflight_htlcs);
- long find_route_with_id(long payer, long route_params, long first_hops, long inflight_htlcs, long _payment_hash, long _payment_id);
- long create_blinded_payment_paths(long recipient, long first_hops, long tlvs, long amount_msats);
+ // LDKCResult_RouteLightningErrorZ Router_find_route LDKRouter *NONNULL_PTR this_arg, struct LDKPublicKey payer, const struct LDKRouteParameters *NONNULL_PTR route_params, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKInFlightHtlcs inflight_htlcs
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Router_find_route")] public static extern long Router_find_route(long _this_arg, long _payer, long _route_params, long _first_hops, long _inflight_htlcs);
+ // LDKCResult_RouteLightningErrorZ Router_find_route_with_id LDKRouter *NONNULL_PTR this_arg, struct LDKPublicKey payer, const struct LDKRouteParameters *NONNULL_PTR route_params, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKInFlightHtlcs inflight_htlcs, struct LDKThirtyTwoBytes _payment_hash, struct LDKThirtyTwoBytes _payment_id
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Router_find_route_with_id")] public static extern long Router_find_route_with_id(long _this_arg, long _payer, long _route_params, long _first_hops, long _inflight_htlcs, long __payment_hash, long __payment_id);
+ // LDKCResult_CVec_BlindedPaymentPathZNoneZ Router_create_blinded_payment_paths LDKRouter *NONNULL_PTR this_arg, struct LDKPublicKey recipient, struct LDKCVec_ChannelDetailsZ first_hops, struct LDKReceiveTlvs tlvs, uint64_t amount_msats
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Router_create_blinded_payment_paths")] public static extern long Router_create_blinded_payment_paths(long _this_arg, long _recipient, long _first_hops, long _tlvs, long _amount_msats);
+ // struct LDKOnionMessagePath CResult_OnionMessagePathNoneZ_get_ok(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OnionMessagePathNoneZ_get_ok")] public static extern long CResult_OnionMessagePathNoneZ_get_ok(long _owner);
+ // void CResult_OnionMessagePathNoneZ_get_err(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OnionMessagePathNoneZ_get_err")] public static extern void CResult_OnionMessagePathNoneZ_get_err(long _owner);
+ // struct LDKCVec_BlindedMessagePathZ CResult_CVec_BlindedMessagePathZNoneZ_get_ok(LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_get_ok")] public static extern long CResult_CVec_BlindedMessagePathZNoneZ_get_ok(long _owner);
+ // void CResult_CVec_BlindedMessagePathZNoneZ_get_err(LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_get_err")] public static extern void CResult_CVec_BlindedMessagePathZNoneZ_get_err(long _owner);
+ public interface LDKMessageRouter {
+ long find_path(long sender, long peers, long destination);
+ long create_blinded_paths(long recipient, long context, long peers);
+ long create_compact_blinded_paths(long recipient, long context, long peers);
}
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKRouter_new")] public static extern long LDKRouter_new_native(long impl_idx, long MessageRouter);
- public static long[] LDKRouter_new(LDKRouter impl, long MessageRouter) {
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMessageRouter_new")] public static extern long LDKMessageRouter_new_native(long impl_idx);
+ public static long[] LDKMessageRouter_new(LDKMessageRouter impl) {
long new_obj_idx = js_objs.Count;
int i = 0;
for (; i < js_objs.Count; i++) {
js_objs[i] = new WeakReference(impl);
}
long[] ret = new long[2];
- ret[0] = LDKRouter_new_native(i, MessageRouter);
+ ret[0] = LDKMessageRouter_new_native(i);
ret[1] = i;
return ret;
}
- // LDKCResult_RouteLightningErrorZ Router_find_route LDKRouter *NONNULL_PTR this_arg, struct LDKPublicKey payer, const struct LDKRouteParameters *NONNULL_PTR route_params, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKInFlightHtlcs inflight_htlcs
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Router_find_route")] public static extern long Router_find_route(long _this_arg, long _payer, long _route_params, long _first_hops, long _inflight_htlcs);
- // LDKCResult_RouteLightningErrorZ Router_find_route_with_id LDKRouter *NONNULL_PTR this_arg, struct LDKPublicKey payer, const struct LDKRouteParameters *NONNULL_PTR route_params, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKInFlightHtlcs inflight_htlcs, struct LDKThirtyTwoBytes _payment_hash, struct LDKThirtyTwoBytes _payment_id
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Router_find_route_with_id")] public static extern long Router_find_route_with_id(long _this_arg, long _payer, long _route_params, long _first_hops, long _inflight_htlcs, long __payment_hash, long __payment_id);
- // LDKCResult_CVec_BlindedPaymentPathZNoneZ Router_create_blinded_payment_paths LDKRouter *NONNULL_PTR this_arg, struct LDKPublicKey recipient, struct LDKCVec_ChannelDetailsZ first_hops, struct LDKReceiveTlvs tlvs, uint64_t amount_msats
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Router_create_blinded_payment_paths")] public static extern long Router_create_blinded_payment_paths(long _this_arg, long _recipient, long _first_hops, long _tlvs, long _amount_msats);
+ // LDKCResult_OnionMessagePathNoneZ MessageRouter_find_path LDKMessageRouter *NONNULL_PTR this_arg, struct LDKPublicKey sender, struct LDKCVec_PublicKeyZ peers, struct LDKDestination destination
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MessageRouter_find_path")] public static extern long MessageRouter_find_path(long _this_arg, long _sender, long _peers, long _destination);
+ // LDKCResult_CVec_BlindedMessagePathZNoneZ MessageRouter_create_blinded_paths LDKMessageRouter *NONNULL_PTR this_arg, struct LDKPublicKey recipient, struct LDKMessageContext context, struct LDKCVec_PublicKeyZ peers
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MessageRouter_create_blinded_paths")] public static extern long MessageRouter_create_blinded_paths(long _this_arg, long _recipient, long _context, long _peers);
+ // LDKCResult_CVec_BlindedMessagePathZNoneZ MessageRouter_create_compact_blinded_paths LDKMessageRouter *NONNULL_PTR this_arg, struct LDKPublicKey recipient, struct LDKMessageContext context, struct LDKCVec_MessageForwardNodeZ peers
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MessageRouter_create_compact_blinded_paths")] public static extern long MessageRouter_create_compact_blinded_paths(long _this_arg, long _recipient, long _context, long _peers);
// struct LDKThirtyTwoBytes C2Tuple_ThirtyTwoBytesChannelManagerZ_get_a(LDKC2Tuple_ThirtyTwoBytesChannelManagerZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ThirtyTwoBytesChannelManagerZ_get_a")] public static extern long C2Tuple_ThirtyTwoBytesChannelManagerZ_get_a(long _owner);
// struct LDKChannelManager C2Tuple_ThirtyTwoBytesChannelManagerZ_get_b(LDKC2Tuple_ThirtyTwoBytesChannelManagerZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_get_a")] public static extern long C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_get_a(long _owner);
// struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_get_b")] public static extern long C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_get_b(long _owner);
+ // bool C2Tuple_boolboolZ_get_a(LDKC2Tuple_boolboolZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_boolboolZ_get_a")] public static extern bool C2Tuple_boolboolZ_get_a(long _owner);
+ // bool C2Tuple_boolboolZ_get_b(LDKC2Tuple_boolboolZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_boolboolZ_get_b")] public static extern bool C2Tuple_boolboolZ_get_b(long _owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBalance_ty_from_ptr")] public static extern long LDKBalance_ty_from_ptr(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBalance_ClaimableOnChannelClose_get_amount_satoshis")] public static extern long LDKBalance_ClaimableOnChannelClose_get_amount_satoshis(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBalance_ClaimableOnChannelClose_get_transaction_fee_satoshis")] public static extern long LDKBalance_ClaimableOnChannelClose_get_transaction_fee_satoshis(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_StrZIOErrorZ_get_ok")] public static extern long CResult_CVec_StrZIOErrorZ_get_ok(long _owner);
// enum LDKIOError CResult_CVec_StrZIOErrorZ_get_err(LDKCResult_CVec_StrZIOErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_StrZIOErrorZ_get_err")] public static extern IOError CResult_CVec_StrZIOErrorZ_get_err(long _owner);
+ // struct LDKStr C3Tuple_StrStrStrZ_get_a(LDKC3Tuple_StrStrStrZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C3Tuple_StrStrStrZ_get_a")] public static extern long C3Tuple_StrStrStrZ_get_a(long _owner);
+ // struct LDKStr C3Tuple_StrStrStrZ_get_b(LDKC3Tuple_StrStrStrZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C3Tuple_StrStrStrZ_get_b")] public static extern long C3Tuple_StrStrStrZ_get_b(long _owner);
+ // struct LDKStr C3Tuple_StrStrStrZ_get_c(LDKC3Tuple_StrStrStrZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C3Tuple_StrStrStrZ_get_c")] public static extern long C3Tuple_StrStrStrZ_get_c(long _owner);
+ // struct LDKCVec_C3Tuple_StrStrStrZZ CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_ok(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_ok")] public static extern long CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_ok(long _owner);
+ // enum LDKIOError CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_err(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_err")] public static extern IOError CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_err(long _owner);
// struct LDKCVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_get_ok(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_get_ok")] public static extern long CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_get_ok(long _owner);
// enum LDKIOError CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_get_err(LDKCResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_ok")] public static extern long CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_ok(long _owner);
// enum LDKIOError CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_err(LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_err")] public static extern IOError CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_err(long _owner);
- // struct LDKUnsignedInvoiceRequest CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok")] public static extern long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_ok(long _owner);
- // enum LDKBolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_get_err(long _owner);
+ // struct LDKMonitorName CResult_MonitorNameIOErrorZ_get_ok(LDKCResult_MonitorNameIOErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_MonitorNameIOErrorZ_get_ok")] public static extern long CResult_MonitorNameIOErrorZ_get_ok(long _owner);
+ // enum LDKIOError CResult_MonitorNameIOErrorZ_get_err(LDKCResult_MonitorNameIOErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_MonitorNameIOErrorZ_get_err")] public static extern IOError CResult_MonitorNameIOErrorZ_get_err(long _owner);
+ // struct LDKUpdateName CResult_UpdateNameIOErrorZ_get_ok(LDKCResult_UpdateNameIOErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UpdateNameIOErrorZ_get_ok")] public static extern long CResult_UpdateNameIOErrorZ_get_ok(long _owner);
+ // enum LDKIOError CResult_UpdateNameIOErrorZ_get_err(LDKCResult_UpdateNameIOErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UpdateNameIOErrorZ_get_err")] public static extern IOError CResult_UpdateNameIOErrorZ_get_err(long _owner);
// struct LDKInvoiceRequest CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok")] public static extern long CResult_InvoiceRequestBolt12SemanticErrorZ_get_ok(long _owner);
// enum LDKBolt12SemanticError CResult_InvoiceRequestBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok")] public static extern long CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(long _owner);
// enum LDKBolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err")] public static extern Bolt12SemanticError CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(long _owner);
+ // struct LDKInvoiceRequest CResult_InvoiceRequestDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestDecodeErrorZ_get_ok")] public static extern long CResult_InvoiceRequestDecodeErrorZ_get_ok(long _owner);
+ // struct LDKDecodeError CResult_InvoiceRequestDecodeErrorZ_get_err(LDKCResult_InvoiceRequestDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestDecodeErrorZ_get_err")] public static extern long CResult_InvoiceRequestDecodeErrorZ_get_err(long _owner);
// struct LDKInvoiceRequestFields CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok")] public static extern long CResult_InvoiceRequestFieldsDecodeErrorZ_get_ok(long _owner);
// struct LDKDecodeError CResult_InvoiceRequestFieldsDecodeErrorZ_get_err(LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_COption_PaymentFailureReasonZDecodeErrorZ_get_err")] public static extern long CResult_COption_PaymentFailureReasonZDecodeErrorZ_get_err(long _owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_U128Z_ty_from_ptr")] public static extern long LDKCOption_U128Z_ty_from_ptr(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKCOption_U128Z_Some_get_some")] public static extern long LDKCOption_U128Z_Some_get_some(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKInboundChannelFunds_ty_from_ptr")] public static extern long LDKInboundChannelFunds_ty_from_ptr(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKInboundChannelFunds_PushMsat_get_push_msat")] public static extern long LDKInboundChannelFunds_PushMsat_get_push_msat(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBumpTransactionEvent_ty_from_ptr")] public static extern long LDKBumpTransactionEvent_ty_from_ptr(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBumpTransactionEvent_ChannelClose_get_channel_id")] public static extern long LDKBumpTransactionEvent_ChannelClose_get_channel_id(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBumpTransactionEvent_ChannelClose_get_counterparty_node_id")] public static extern long LDKBumpTransactionEvent_ChannelClose_get_counterparty_node_id(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentClaimable_get_via_channel_id")] public static extern long LDKEvent_PaymentClaimable_get_via_channel_id(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentClaimable_get_via_user_channel_id")] public static extern long LDKEvent_PaymentClaimable_get_via_user_channel_id(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentClaimable_get_claim_deadline")] public static extern long LDKEvent_PaymentClaimable_get_claim_deadline(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentClaimable_get_payment_id")] public static extern long LDKEvent_PaymentClaimable_get_payment_id(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentClaimed_get_receiver_node_id")] public static extern long LDKEvent_PaymentClaimed_get_receiver_node_id(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentClaimed_get_payment_hash")] public static extern long LDKEvent_PaymentClaimed_get_payment_hash(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentClaimed_get_amount_msat")] public static extern long LDKEvent_PaymentClaimed_get_amount_msat(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentClaimed_get_htlcs")] public static extern long LDKEvent_PaymentClaimed_get_htlcs(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentClaimed_get_sender_intended_total_msat")] public static extern long LDKEvent_PaymentClaimed_get_sender_intended_total_msat(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentClaimed_get_onion_fields")] public static extern long LDKEvent_PaymentClaimed_get_onion_fields(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentClaimed_get_payment_id")] public static extern long LDKEvent_PaymentClaimed_get_payment_id(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_ConnectionNeeded_get_node_id")] public static extern long LDKEvent_ConnectionNeeded_get_node_id(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_ConnectionNeeded_get_addresses")] public static extern long LDKEvent_ConnectionNeeded_get_addresses(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_InvoiceReceived_get_payment_id")] public static extern long LDKEvent_InvoiceReceived_get_payment_id(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentForwarded_get_next_channel_id")] public static extern long LDKEvent_PaymentForwarded_get_next_channel_id(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentForwarded_get_prev_user_channel_id")] public static extern long LDKEvent_PaymentForwarded_get_prev_user_channel_id(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentForwarded_get_next_user_channel_id")] public static extern long LDKEvent_PaymentForwarded_get_next_user_channel_id(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentForwarded_get_prev_node_id")] public static extern long LDKEvent_PaymentForwarded_get_prev_node_id(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentForwarded_get_next_node_id")] public static extern long LDKEvent_PaymentForwarded_get_next_node_id(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentForwarded_get_total_fee_earned_msat")] public static extern long LDKEvent_PaymentForwarded_get_total_fee_earned_msat(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentForwarded_get_skimmed_fee_msat")] public static extern long LDKEvent_PaymentForwarded_get_skimmed_fee_msat(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_PaymentForwarded_get_claim_from_onchain_tx")] public static extern bool LDKEvent_PaymentForwarded_get_claim_from_onchain_tx(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_ChannelClosed_get_counterparty_node_id")] public static extern long LDKEvent_ChannelClosed_get_counterparty_node_id(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_ChannelClosed_get_channel_capacity_sats")] public static extern long LDKEvent_ChannelClosed_get_channel_capacity_sats(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_ChannelClosed_get_channel_funding_txo")] public static extern long LDKEvent_ChannelClosed_get_channel_funding_txo(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_ChannelClosed_get_last_local_balance_msat")] public static extern long LDKEvent_ChannelClosed_get_last_local_balance_msat(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_DiscardFunding_get_channel_id")] public static extern long LDKEvent_DiscardFunding_get_channel_id(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_DiscardFunding_get_funding_info")] public static extern long LDKEvent_DiscardFunding_get_funding_info(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_OpenChannelRequest_get_temporary_channel_id")] public static extern long LDKEvent_OpenChannelRequest_get_temporary_channel_id(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_OpenChannelRequest_get_counterparty_node_id")] public static extern long LDKEvent_OpenChannelRequest_get_counterparty_node_id(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_OpenChannelRequest_get_funding_satoshis")] public static extern long LDKEvent_OpenChannelRequest_get_funding_satoshis(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_OpenChannelRequest_get_push_msat")] public static extern long LDKEvent_OpenChannelRequest_get_push_msat(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_OpenChannelRequest_get_channel_negotiation_type")] public static extern long LDKEvent_OpenChannelRequest_get_channel_negotiation_type(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_OpenChannelRequest_get_channel_type")] public static extern long LDKEvent_OpenChannelRequest_get_channel_type(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_OpenChannelRequest_get_is_announced")] public static extern bool LDKEvent_OpenChannelRequest_get_is_announced(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKEvent_OpenChannelRequest_get_params")] public static extern long LDKEvent_OpenChannelRequest_get_params(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NonceDecodeErrorZ_get_ok")] public static extern long CResult_NonceDecodeErrorZ_get_ok(long _owner);
// struct LDKDecodeError CResult_NonceDecodeErrorZ_get_err(LDKCResult_NonceDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NonceDecodeErrorZ_get_err")] public static extern long CResult_NonceDecodeErrorZ_get_err(long _owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBolt11ParseError_ty_from_ptr")] public static extern long LDKBolt11ParseError_ty_from_ptr(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBolt11ParseError_Bech32Error_get_bech32_error")] public static extern long LDKBolt11ParseError_Bech32Error_get_bech32_error(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBolt11ParseError_ParseAmountError_get_parse_amount_error")] public static extern int LDKBolt11ParseError_ParseAmountError_get_parse_amount_error(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBolt11ParseError_MalformedSignature_get_malformed_signature")] public static extern Secp256k1Error LDKBolt11ParseError_MalformedSignature_get_malformed_signature(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBolt11ParseError_DescriptionDecodeError_get_description_decode_error")] public static extern int LDKBolt11ParseError_DescriptionDecodeError_get_description_decode_error(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBolt11ParseError_InvalidSliceLength_get_invalid_slice_length")] public static extern long LDKBolt11ParseError_InvalidSliceLength_get_invalid_slice_length(long ptr);
// enum LDKSiPrefix CResult_SiPrefixBolt11ParseErrorZ_get_ok(LDKCResult_SiPrefixBolt11ParseErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SiPrefixBolt11ParseErrorZ_get_ok")] public static extern SiPrefix CResult_SiPrefixBolt11ParseErrorZ_get_ok(long _owner);
// struct LDKBolt11ParseError CResult_SiPrefixBolt11ParseErrorZ_get_err(LDKCResult_SiPrefixBolt11ParseErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdDecodeErrorZ_get_ok")] public static extern long CResult_ChannelIdDecodeErrorZ_get_ok(long _owner);
// struct LDKDecodeError CResult_ChannelIdDecodeErrorZ_get_err(LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdDecodeErrorZ_get_err")] public static extern long CResult_ChannelIdDecodeErrorZ_get_err(long _owner);
+ // struct LDKInitFeatures CResult_InitFeaturesDecodeErrorZ_get_ok(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InitFeaturesDecodeErrorZ_get_ok")] public static extern long CResult_InitFeaturesDecodeErrorZ_get_ok(long _owner);
+ // struct LDKDecodeError CResult_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InitFeaturesDecodeErrorZ_get_err")] public static extern long CResult_InitFeaturesDecodeErrorZ_get_err(long _owner);
+ // struct LDKChannelFeatures CResult_ChannelFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_get_ok")] public static extern long CResult_ChannelFeaturesDecodeErrorZ_get_ok(long _owner);
+ // struct LDKDecodeError CResult_ChannelFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_get_err")] public static extern long CResult_ChannelFeaturesDecodeErrorZ_get_err(long _owner);
+ // struct LDKNodeFeatures CResult_NodeFeaturesDecodeErrorZ_get_ok(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeFeaturesDecodeErrorZ_get_ok")] public static extern long CResult_NodeFeaturesDecodeErrorZ_get_ok(long _owner);
+ // struct LDKDecodeError CResult_NodeFeaturesDecodeErrorZ_get_err(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeFeaturesDecodeErrorZ_get_err")] public static extern long CResult_NodeFeaturesDecodeErrorZ_get_err(long _owner);
+ // struct LDKBolt11InvoiceFeatures CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_ok(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_ok")] public static extern long CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_ok(long _owner);
+ // struct LDKDecodeError CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_err")] public static extern long CResult_Bolt11InvoiceFeaturesDecodeErrorZ_get_err(long _owner);
+ // struct LDKBolt12InvoiceFeatures CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_ok(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_ok")] public static extern long CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_ok(long _owner);
+ // struct LDKDecodeError CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_err")] public static extern long CResult_Bolt12InvoiceFeaturesDecodeErrorZ_get_err(long _owner);
+ // struct LDKBlindedHopFeatures CResult_BlindedHopFeaturesDecodeErrorZ_get_ok(LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_get_ok")] public static extern long CResult_BlindedHopFeaturesDecodeErrorZ_get_ok(long _owner);
+ // struct LDKDecodeError CResult_BlindedHopFeaturesDecodeErrorZ_get_err(LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_get_err")] public static extern long CResult_BlindedHopFeaturesDecodeErrorZ_get_err(long _owner);
+ // struct LDKChannelTypeFeatures CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok")] public static extern long CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(long _owner);
+ // struct LDKDecodeError CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err")] public static extern long CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(long _owner);
// struct LDKThirtyTwoBytes C2Tuple__u832u16Z_get_a(LDKC2Tuple__u832u16Z *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple__u832u16Z_get_a")] public static extern long C2Tuple__u832u16Z_get_a(long _owner);
// uint16_t C2Tuple__u832u16Z_get_b(LDKC2Tuple__u832u16Z *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PaymentContextDecodeErrorZ_get_ok")] public static extern long CResult_PaymentContextDecodeErrorZ_get_ok(long _owner);
// struct LDKDecodeError CResult_PaymentContextDecodeErrorZ_get_err(LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PaymentContextDecodeErrorZ_get_err")] public static extern long CResult_PaymentContextDecodeErrorZ_get_err(long _owner);
- // struct LDKUnknownPaymentContext CResult_UnknownPaymentContextDecodeErrorZ_get_ok(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_get_ok")] public static extern long CResult_UnknownPaymentContextDecodeErrorZ_get_ok(long _owner);
- // struct LDKDecodeError CResult_UnknownPaymentContextDecodeErrorZ_get_err(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_get_err")] public static extern long CResult_UnknownPaymentContextDecodeErrorZ_get_err(long _owner);
// struct LDKBolt12OfferContext CResult_Bolt12OfferContextDecodeErrorZ_get_ok(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_get_ok")] public static extern long CResult_Bolt12OfferContextDecodeErrorZ_get_ok(long _owner);
// struct LDKDecodeError CResult_Bolt12OfferContextDecodeErrorZ_get_err(LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKNextMessageHop_ShortChannelId_get_short_channel_id")] public static extern long LDKNextMessageHop_ShortChannelId_get_short_channel_id(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKParsedOnionMessageContents_ty_from_ptr")] public static extern long LDKParsedOnionMessageContents_ty_from_ptr(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKParsedOnionMessageContents_Offers_get_offers")] public static extern long LDKParsedOnionMessageContents_Offers_get_offers(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKParsedOnionMessageContents_DNSResolver_get_dns_resolver")] public static extern long LDKParsedOnionMessageContents_DNSResolver_get_dns_resolver(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKParsedOnionMessageContents_Custom_get_custom")] public static extern long LDKParsedOnionMessageContents_Custom_get_custom(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPeeledOnion_ty_from_ptr")] public static extern long LDKPeeledOnion_ty_from_ptr(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKPeeledOnion_Forward_get__0")] public static extern long LDKPeeledOnion_Forward_get__0(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedHopDecodeErrorZ_get_ok")] public static extern long CResult_BlindedHopDecodeErrorZ_get_ok(long _owner);
// struct LDKDecodeError CResult_BlindedHopDecodeErrorZ_get_err(LDKCResult_BlindedHopDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedHopDecodeErrorZ_get_err")] public static extern long CResult_BlindedHopDecodeErrorZ_get_err(long _owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKSignOrCreationError_ty_from_ptr")] public static extern long LDKSignOrCreationError_ty_from_ptr(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKSignOrCreationError_CreationError_get_creation_error")] public static extern CreationError LDKSignOrCreationError_CreationError_get_creation_error(long ptr);
- // struct LDKBolt11Invoice CResult_Bolt11InvoiceSignOrCreationErrorZ_get_ok(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_get_ok")] public static extern long CResult_Bolt11InvoiceSignOrCreationErrorZ_get_ok(long _owner);
- // struct LDKSignOrCreationError CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR owner);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err")] public static extern long CResult_Bolt11InvoiceSignOrCreationErrorZ_get_err(long _owner);
// struct LDKInvoiceError CResult_InvoiceErrorDecodeErrorZ_get_ok(LDKCResult_InvoiceErrorDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceErrorDecodeErrorZ_get_ok")] public static extern long CResult_InvoiceErrorDecodeErrorZ_get_ok(long _owner);
// struct LDKDecodeError CResult_InvoiceErrorDecodeErrorZ_get_err(LDKCResult_InvoiceErrorDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OffersContextDecodeErrorZ_get_ok")] public static extern long CResult_OffersContextDecodeErrorZ_get_ok(long _owner);
// struct LDKDecodeError CResult_OffersContextDecodeErrorZ_get_err(LDKCResult_OffersContextDecodeErrorZ *NONNULL_PTR owner);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OffersContextDecodeErrorZ_get_err")] public static extern long CResult_OffersContextDecodeErrorZ_get_err(long _owner);
+ // struct LDKAsyncPaymentsContext CResult_AsyncPaymentsContextDecodeErrorZ_get_ok(LDKCResult_AsyncPaymentsContextDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_get_ok")] public static extern long CResult_AsyncPaymentsContextDecodeErrorZ_get_ok(long _owner);
+ // struct LDKDecodeError CResult_AsyncPaymentsContextDecodeErrorZ_get_err(LDKCResult_AsyncPaymentsContextDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_get_err")] public static extern long CResult_AsyncPaymentsContextDecodeErrorZ_get_err(long _owner);
+ // struct LDKDNSResolverContext CResult_DNSResolverContextDecodeErrorZ_get_ok(LDKCResult_DNSResolverContextDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DNSResolverContextDecodeErrorZ_get_ok")] public static extern long CResult_DNSResolverContextDecodeErrorZ_get_ok(long _owner);
+ // struct LDKDecodeError CResult_DNSResolverContextDecodeErrorZ_get_err(LDKCResult_DNSResolverContextDecodeErrorZ *NONNULL_PTR owner);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DNSResolverContextDecodeErrorZ_get_err")] public static extern long CResult_DNSResolverContextDecodeErrorZ_get_err(long _owner);
+ public interface LDKMigratableKVStore {
+ long list_all_keys();
+ }
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKMigratableKVStore_new")] public static extern long LDKMigratableKVStore_new_native(long impl_idx, long KVStore);
+ public static long[] LDKMigratableKVStore_new(LDKMigratableKVStore impl, long KVStore) {
+ long new_obj_idx = js_objs.Count;
+ int i = 0;
+ for (; i < js_objs.Count; i++) {
+ if (js_objs[i] == null || !js_objs[i].IsAlive) { new_obj_idx = i; break; }
+ }
+ if (i == js_objs.Count) {
+ js_objs.Add(new WeakReference(impl));
+ } else {
+ js_objs[i] = new WeakReference(impl);
+ }
+ long[] ret = new long[2];
+ ret[0] = LDKMigratableKVStore_new_native(i, KVStore);
+ ret[1] = i;
+ return ret;
+ }
+ // LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ MigratableKVStore_list_all_keys LDKMigratableKVStore *NONNULL_PTR this_arg
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MigratableKVStore_list_all_keys")] public static extern long MigratableKVStore_list_all_keys(long _this_arg);
public interface LDKPersister {
long persist_manager(long channel_manager);
long persist_graph(long network_graph);
}
// void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_EventsProvider_process_pending_events")] public static extern void EventsProvider_process_pending_events(long _this_arg, long _handler);
+ public interface LDKVerification {
+ long hmac_for_offer_payment(long nonce, long expanded_key);
+ long verify_for_offer_payment(long hmac, long nonce, long expanded_key);
+ }
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKVerification_new")] public static extern long LDKVerification_new_native(long impl_idx);
+ public static long[] LDKVerification_new(LDKVerification impl) {
+ long new_obj_idx = js_objs.Count;
+ int i = 0;
+ for (; i < js_objs.Count; i++) {
+ if (js_objs[i] == null || !js_objs[i].IsAlive) { new_obj_idx = i; break; }
+ }
+ if (i == js_objs.Count) {
+ js_objs.Add(new WeakReference(impl));
+ } else {
+ js_objs[i] = new WeakReference(impl);
+ }
+ long[] ret = new long[2];
+ ret[0] = LDKVerification_new_native(i);
+ ret[1] = i;
+ return ret;
+ }
+ // LDKThirtyTwoBytes Verification_hmac_for_offer_payment LDKVerification *NONNULL_PTR this_arg, struct LDKNonce nonce, const struct LDKExpandedKey *NONNULL_PTR expanded_key
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Verification_hmac_for_offer_payment")] public static extern long Verification_hmac_for_offer_payment(long _this_arg, long _nonce, long _expanded_key);
+ // LDKCResult_NoneNoneZ Verification_verify_for_offer_payment LDKVerification *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes hmac, struct LDKNonce nonce, const struct LDKExpandedKey *NONNULL_PTR expanded_key
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Verification_verify_for_offer_payment")] public static extern long Verification_verify_for_offer_payment(long _this_arg, long _hmac, long _nonce, long _expanded_key);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKFailureCode_ty_from_ptr")] public static extern long LDKFailureCode_ty_from_ptr(long ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKFailureCode_InvalidOnionPayload_get_invalid_onion_payload")] public static extern long LDKFailureCode_InvalidOnionPayload_get_invalid_onion_payload(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBolt11InvoiceDescription_ty_from_ptr")] public static extern long LDKBolt11InvoiceDescription_ty_from_ptr(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBolt11InvoiceDescription_Direct_get_direct")] public static extern long LDKBolt11InvoiceDescription_Direct_get_direct(long ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBolt11InvoiceDescription_Hash_get_hash")] public static extern long LDKBolt11InvoiceDescription_Hash_get_hash(long ptr);
public interface LDKMessageSendEventsProvider {
long get_and_clear_pending_msg_events();
}
long provided_node_features();
long provided_init_features(long their_node_id);
long get_chain_hashes();
+ void message_received();
}
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKChannelMessageHandler_new")] public static extern long LDKChannelMessageHandler_new_native(long impl_idx, long MessageSendEventsProvider);
public static long[] LDKChannelMessageHandler_new(LDKChannelMessageHandler impl, long MessageSendEventsProvider) {
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMessageHandler_provided_init_features")] public static extern long ChannelMessageHandler_provided_init_features(long _this_arg, long _their_node_id);
// LDKCOption_CVec_ThirtyTwoBytesZZ ChannelMessageHandler_get_chain_hashes LDKChannelMessageHandler *NONNULL_PTR this_arg
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMessageHandler_get_chain_hashes")] public static extern long ChannelMessageHandler_get_chain_hashes(long _this_arg);
+ // void ChannelMessageHandler_message_received LDKChannelMessageHandler *NONNULL_PTR this_arg
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMessageHandler_message_received")] public static extern void ChannelMessageHandler_message_received(long _this_arg);
public interface LDKOffersMessageHandler {
long handle_message(long message, long context, long responder);
long release_pending_messages();
// LDKCVec_C2Tuple_OffersMessageMessageSendInstructionsZZ OffersMessageHandler_release_pending_messages LDKOffersMessageHandler *NONNULL_PTR this_arg
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_OffersMessageHandler_release_pending_messages")] public static extern long OffersMessageHandler_release_pending_messages(long _this_arg);
public interface LDKAsyncPaymentsMessageHandler {
- long held_htlc_available(long message, long responder);
- void release_held_htlc(long message);
+ long handle_held_htlc_available(long message, long responder);
+ void handle_release_held_htlc(long message, long context);
long release_pending_messages();
}
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKAsyncPaymentsMessageHandler_new")] public static extern long LDKAsyncPaymentsMessageHandler_new_native(long impl_idx);
ret[1] = i;
return ret;
}
- // LDKCOption_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ AsyncPaymentsMessageHandler_held_htlc_available LDKAsyncPaymentsMessageHandler *NONNULL_PTR this_arg, struct LDKHeldHtlcAvailable message, struct LDKResponder responder
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AsyncPaymentsMessageHandler_held_htlc_available")] public static extern long AsyncPaymentsMessageHandler_held_htlc_available(long _this_arg, long _message, long _responder);
- // void AsyncPaymentsMessageHandler_release_held_htlc LDKAsyncPaymentsMessageHandler *NONNULL_PTR this_arg, struct LDKReleaseHeldHtlc message
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AsyncPaymentsMessageHandler_release_held_htlc")] public static extern void AsyncPaymentsMessageHandler_release_held_htlc(long _this_arg, long _message);
+ // LDKCOption_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ AsyncPaymentsMessageHandler_handle_held_htlc_available LDKAsyncPaymentsMessageHandler *NONNULL_PTR this_arg, struct LDKHeldHtlcAvailable message, struct LDKResponder responder
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AsyncPaymentsMessageHandler_handle_held_htlc_available")] public static extern long AsyncPaymentsMessageHandler_handle_held_htlc_available(long _this_arg, long _message, long _responder);
+ // void AsyncPaymentsMessageHandler_handle_release_held_htlc LDKAsyncPaymentsMessageHandler *NONNULL_PTR this_arg, struct LDKReleaseHeldHtlc message, struct LDKAsyncPaymentsContext context
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AsyncPaymentsMessageHandler_handle_release_held_htlc")] public static extern void AsyncPaymentsMessageHandler_handle_release_held_htlc(long _this_arg, long _message, long _context);
// LDKCVec_C2Tuple_AsyncPaymentsMessageMessageSendInstructionsZZ AsyncPaymentsMessageHandler_release_pending_messages LDKAsyncPaymentsMessageHandler *NONNULL_PTR this_arg
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_AsyncPaymentsMessageHandler_release_pending_messages")] public static extern long AsyncPaymentsMessageHandler_release_pending_messages(long _this_arg);
+ public interface LDKDNSResolverMessageHandler {
+ long handle_dnssec_query(long message, long responder);
+ void handle_dnssec_proof(long message, long context);
+ long provided_node_features();
+ long release_pending_messages();
+ }
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKDNSResolverMessageHandler_new")] public static extern long LDKDNSResolverMessageHandler_new_native(long impl_idx);
+ public static long[] LDKDNSResolverMessageHandler_new(LDKDNSResolverMessageHandler impl) {
+ long new_obj_idx = js_objs.Count;
+ int i = 0;
+ for (; i < js_objs.Count; i++) {
+ if (js_objs[i] == null || !js_objs[i].IsAlive) { new_obj_idx = i; break; }
+ }
+ if (i == js_objs.Count) {
+ js_objs.Add(new WeakReference(impl));
+ } else {
+ js_objs[i] = new WeakReference(impl);
+ }
+ long[] ret = new long[2];
+ ret[0] = LDKDNSResolverMessageHandler_new_native(i);
+ ret[1] = i;
+ return ret;
+ }
+ // LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ DNSResolverMessageHandler_handle_dnssec_query LDKDNSResolverMessageHandler *NONNULL_PTR this_arg, struct LDKDNSSECQuery message, struct LDKResponder responder
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverMessageHandler_handle_dnssec_query")] public static extern long DNSResolverMessageHandler_handle_dnssec_query(long _this_arg, long _message, long _responder);
+ // void DNSResolverMessageHandler_handle_dnssec_proof LDKDNSResolverMessageHandler *NONNULL_PTR this_arg, struct LDKDNSSECProof message, struct LDKDNSResolverContext context
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverMessageHandler_handle_dnssec_proof")] public static extern void DNSResolverMessageHandler_handle_dnssec_proof(long _this_arg, long _message, long _context);
+ // LDKNodeFeatures DNSResolverMessageHandler_provided_node_features LDKDNSResolverMessageHandler *NONNULL_PTR this_arg
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverMessageHandler_provided_node_features")] public static extern long DNSResolverMessageHandler_provided_node_features(long _this_arg);
+ // LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ DNSResolverMessageHandler_release_pending_messages LDKDNSResolverMessageHandler *NONNULL_PTR this_arg
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverMessageHandler_release_pending_messages")] public static extern long DNSResolverMessageHandler_release_pending_messages(long _this_arg);
public interface LDKNodeIdLookUp {
long next_node_id(long short_channel_id);
}
// LDKPublicKey NodeIdLookUp_next_node_id LDKNodeIdLookUp *NONNULL_PTR this_arg, uint64_t short_channel_id
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeIdLookUp_next_node_id")] public static extern long 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);
- long handle_channel_update(long msg);
+ long handle_node_announcement(long their_node_id, long msg);
+ long handle_channel_announcement(long their_node_id, long msg);
+ long handle_channel_update(long their_node_id, long msg);
long get_next_channel_announcement(long starting_point);
long get_next_node_announcement(long starting_point);
long peer_connected(long their_node_id, long init, bool inbound);
ret[1] = i;
return ret;
}
- // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RoutingMessageHandler_handle_node_announcement")] public static extern long RoutingMessageHandler_handle_node_announcement(long _this_arg, long _msg);
- // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RoutingMessageHandler_handle_channel_announcement")] public static extern long RoutingMessageHandler_handle_channel_announcement(long _this_arg, long _msg);
- // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RoutingMessageHandler_handle_channel_update")] public static extern long RoutingMessageHandler_handle_channel_update(long _this_arg, long _msg);
+ // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKNodeAnnouncement *NONNULL_PTR msg
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RoutingMessageHandler_handle_node_announcement")] public static extern long RoutingMessageHandler_handle_node_announcement(long _this_arg, long _their_node_id, long _msg);
+ // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelAnnouncement *NONNULL_PTR msg
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RoutingMessageHandler_handle_channel_announcement")] public static extern long RoutingMessageHandler_handle_channel_announcement(long _this_arg, long _their_node_id, long _msg);
+ // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RoutingMessageHandler_handle_channel_update")] public static extern long RoutingMessageHandler_handle_channel_update(long _this_arg, long _their_node_id, long _msg);
// LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_RoutingMessageHandler_get_next_channel_announcement")] public static extern long RoutingMessageHandler_get_next_channel_announcement(long _this_arg, long _starting_point);
// LDKNodeAnnouncement RoutingMessageHandler_get_next_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKNodeId starting_point
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_SocketDescriptor_disconnect_socket")] public static extern void SocketDescriptor_disconnect_socket(long _this_arg);
// uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_SocketDescriptor_hash")] public static extern long SocketDescriptor_hash(long _this_arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBolt12PaymentError_ty_from_ptr")] public static extern long LDKBolt12PaymentError_ty_from_ptr(long ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_LDKBolt12PaymentError_SendingFailed_get_sending_failed")] public static extern RetryableSendFailure LDKBolt12PaymentError_SendingFailed_get_sending_failed(long ptr);
public interface LDKSignBolt12InvoiceFn {
long sign_invoice(long message);
}
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RetryDecodeErrorZ_clone_ptr")] public static extern long CResult_RetryDecodeErrorZ_clone_ptr(long _arg);
// struct LDKCResult_RetryDecodeErrorZ CResult_RetryDecodeErrorZ_clone(const struct LDKCResult_RetryDecodeErrorZ *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RetryDecodeErrorZ_clone")] public static extern long CResult_RetryDecodeErrorZ_clone(long _orig);
- // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneAPIErrorZ_ok")] public static extern long CResult_NoneAPIErrorZ_ok();
- // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneAPIErrorZ_err")] public static extern long CResult_NoneAPIErrorZ_err(long _e);
- // bool CResult_NoneAPIErrorZ_is_ok(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneAPIErrorZ_is_ok")] public static extern bool CResult_NoneAPIErrorZ_is_ok(long _o);
- // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneAPIErrorZ_free")] public static extern void CResult_NoneAPIErrorZ_free(long __res);
- // uint64_t CResult_NoneAPIErrorZ_clone_ptr(LDKCResult_NoneAPIErrorZ *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneAPIErrorZ_clone_ptr")] public static extern long CResult_NoneAPIErrorZ_clone_ptr(long _arg);
- // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneAPIErrorZ_clone")] public static extern long CResult_NoneAPIErrorZ_clone(long _orig);
- // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_CResult_NoneAPIErrorZZ_free")] public static extern void CVec_CResult_NoneAPIErrorZZ_free(long __res);
- // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_APIErrorZ_free")] public static extern void CVec_APIErrorZ_free(long __res);
// struct LDKCOption_ThirtyTwoBytesZ COption_ThirtyTwoBytesZ_some(struct LDKThirtyTwoBytes o);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_ThirtyTwoBytesZ_some")] public static extern long COption_ThirtyTwoBytesZ_some(long _o);
// struct LDKCOption_ThirtyTwoBytesZ COption_ThirtyTwoBytesZ_none(void);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RecipientOnionFieldsNoneZ_clone_ptr")] public static extern long CResult_RecipientOnionFieldsNoneZ_clone_ptr(long _arg);
// struct LDKCResult_RecipientOnionFieldsNoneZ CResult_RecipientOnionFieldsNoneZ_clone(const struct LDKCResult_RecipientOnionFieldsNoneZ *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RecipientOnionFieldsNoneZ_clone")] public static extern long CResult_RecipientOnionFieldsNoneZ_clone(long _orig);
+ // uint64_t C2Tuple_DNSResolverMessageResponseInstructionZ_clone_ptr(LDKC2Tuple_DNSResolverMessageResponseInstructionZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_DNSResolverMessageResponseInstructionZ_clone_ptr")] public static extern long C2Tuple_DNSResolverMessageResponseInstructionZ_clone_ptr(long _arg);
+ // struct LDKC2Tuple_DNSResolverMessageResponseInstructionZ C2Tuple_DNSResolverMessageResponseInstructionZ_clone(const struct LDKC2Tuple_DNSResolverMessageResponseInstructionZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_DNSResolverMessageResponseInstructionZ_clone")] public static extern long C2Tuple_DNSResolverMessageResponseInstructionZ_clone(long _orig);
+ // struct LDKC2Tuple_DNSResolverMessageResponseInstructionZ C2Tuple_DNSResolverMessageResponseInstructionZ_new(struct LDKDNSResolverMessage a, struct LDKResponseInstruction b);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_DNSResolverMessageResponseInstructionZ_new")] public static extern long C2Tuple_DNSResolverMessageResponseInstructionZ_new(long _a, long _b);
+ // void C2Tuple_DNSResolverMessageResponseInstructionZ_free(struct LDKC2Tuple_DNSResolverMessageResponseInstructionZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_DNSResolverMessageResponseInstructionZ_free")] public static extern void C2Tuple_DNSResolverMessageResponseInstructionZ_free(long __res);
+ // struct LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_some(struct LDKC2Tuple_DNSResolverMessageResponseInstructionZ o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_some")] public static extern long COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_some(long _o);
+ // struct LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_none(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_none")] public static extern long COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_none();
+ // void COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_free(struct LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_free")] public static extern void COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_free(long __res);
+ // uint64_t COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone_ptr(LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone_ptr")] public static extern long COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone_ptr(long _arg);
+ // struct LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone(const struct LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone")] public static extern long COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone(long _orig);
+ // uint64_t C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone_ptr(LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone_ptr")] public static extern long C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone_ptr(long _arg);
+ // struct LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone(const struct LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone")] public static extern long C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone(long _orig);
+ // struct LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ C2Tuple_DNSResolverMessageMessageSendInstructionsZ_new(struct LDKDNSResolverMessage a, struct LDKMessageSendInstructions b);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_DNSResolverMessageMessageSendInstructionsZ_new")] public static extern long C2Tuple_DNSResolverMessageMessageSendInstructionsZ_new(long _a, long _b);
+ // void C2Tuple_DNSResolverMessageMessageSendInstructionsZ_free(struct LDKC2Tuple_DNSResolverMessageMessageSendInstructionsZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_DNSResolverMessageMessageSendInstructionsZ_free")] public static extern void C2Tuple_DNSResolverMessageMessageSendInstructionsZ_free(long __res);
+ // void CVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ_free(struct LDKCVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ_free")] public static extern void CVec_C2Tuple_DNSResolverMessageMessageSendInstructionsZZ_free(long __res);
+ // struct LDKCResult_DNSResolverMessageDecodeErrorZ CResult_DNSResolverMessageDecodeErrorZ_ok(struct LDKDNSResolverMessage o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_ok")] public static extern long CResult_DNSResolverMessageDecodeErrorZ_ok(long _o);
+ // struct LDKCResult_DNSResolverMessageDecodeErrorZ CResult_DNSResolverMessageDecodeErrorZ_err(struct LDKDecodeError e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_err")] public static extern long CResult_DNSResolverMessageDecodeErrorZ_err(long _e);
+ // bool CResult_DNSResolverMessageDecodeErrorZ_is_ok(const struct LDKCResult_DNSResolverMessageDecodeErrorZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_is_ok")] public static extern bool CResult_DNSResolverMessageDecodeErrorZ_is_ok(long _o);
+ // void CResult_DNSResolverMessageDecodeErrorZ_free(struct LDKCResult_DNSResolverMessageDecodeErrorZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_free")] public static extern void CResult_DNSResolverMessageDecodeErrorZ_free(long __res);
+ // uint64_t CResult_DNSResolverMessageDecodeErrorZ_clone_ptr(LDKCResult_DNSResolverMessageDecodeErrorZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_clone_ptr")] public static extern long CResult_DNSResolverMessageDecodeErrorZ_clone_ptr(long _arg);
+ // struct LDKCResult_DNSResolverMessageDecodeErrorZ CResult_DNSResolverMessageDecodeErrorZ_clone(const struct LDKCResult_DNSResolverMessageDecodeErrorZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DNSResolverMessageDecodeErrorZ_clone")] public static extern long CResult_DNSResolverMessageDecodeErrorZ_clone(long _orig);
+ // struct LDKCResult_HumanReadableNameNoneZ CResult_HumanReadableNameNoneZ_ok(struct LDKHumanReadableName o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HumanReadableNameNoneZ_ok")] public static extern long CResult_HumanReadableNameNoneZ_ok(long _o);
+ // struct LDKCResult_HumanReadableNameNoneZ CResult_HumanReadableNameNoneZ_err(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HumanReadableNameNoneZ_err")] public static extern long CResult_HumanReadableNameNoneZ_err();
+ // bool CResult_HumanReadableNameNoneZ_is_ok(const struct LDKCResult_HumanReadableNameNoneZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HumanReadableNameNoneZ_is_ok")] public static extern bool CResult_HumanReadableNameNoneZ_is_ok(long _o);
+ // void CResult_HumanReadableNameNoneZ_free(struct LDKCResult_HumanReadableNameNoneZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HumanReadableNameNoneZ_free")] public static extern void CResult_HumanReadableNameNoneZ_free(long __res);
+ // uint64_t CResult_HumanReadableNameNoneZ_clone_ptr(LDKCResult_HumanReadableNameNoneZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HumanReadableNameNoneZ_clone_ptr")] public static extern long CResult_HumanReadableNameNoneZ_clone_ptr(long _arg);
+ // struct LDKCResult_HumanReadableNameNoneZ CResult_HumanReadableNameNoneZ_clone(const struct LDKCResult_HumanReadableNameNoneZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HumanReadableNameNoneZ_clone")] public static extern long CResult_HumanReadableNameNoneZ_clone(long _orig);
+ // struct LDKCResult_HumanReadableNameDecodeErrorZ CResult_HumanReadableNameDecodeErrorZ_ok(struct LDKHumanReadableName o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HumanReadableNameDecodeErrorZ_ok")] public static extern long CResult_HumanReadableNameDecodeErrorZ_ok(long _o);
+ // struct LDKCResult_HumanReadableNameDecodeErrorZ CResult_HumanReadableNameDecodeErrorZ_err(struct LDKDecodeError e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HumanReadableNameDecodeErrorZ_err")] public static extern long CResult_HumanReadableNameDecodeErrorZ_err(long _e);
+ // bool CResult_HumanReadableNameDecodeErrorZ_is_ok(const struct LDKCResult_HumanReadableNameDecodeErrorZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HumanReadableNameDecodeErrorZ_is_ok")] public static extern bool CResult_HumanReadableNameDecodeErrorZ_is_ok(long _o);
+ // void CResult_HumanReadableNameDecodeErrorZ_free(struct LDKCResult_HumanReadableNameDecodeErrorZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HumanReadableNameDecodeErrorZ_free")] public static extern void CResult_HumanReadableNameDecodeErrorZ_free(long __res);
+ // uint64_t CResult_HumanReadableNameDecodeErrorZ_clone_ptr(LDKCResult_HumanReadableNameDecodeErrorZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HumanReadableNameDecodeErrorZ_clone_ptr")] public static extern long CResult_HumanReadableNameDecodeErrorZ_clone_ptr(long _arg);
+ // struct LDKCResult_HumanReadableNameDecodeErrorZ CResult_HumanReadableNameDecodeErrorZ_clone(const struct LDKCResult_HumanReadableNameDecodeErrorZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_HumanReadableNameDecodeErrorZ_clone")] public static extern long CResult_HumanReadableNameDecodeErrorZ_clone(long _orig);
+ // uint64_t C2Tuple_DNSSECQueryDNSResolverContextZ_clone_ptr(LDKC2Tuple_DNSSECQueryDNSResolverContextZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_DNSSECQueryDNSResolverContextZ_clone_ptr")] public static extern long C2Tuple_DNSSECQueryDNSResolverContextZ_clone_ptr(long _arg);
+ // struct LDKC2Tuple_DNSSECQueryDNSResolverContextZ C2Tuple_DNSSECQueryDNSResolverContextZ_clone(const struct LDKC2Tuple_DNSSECQueryDNSResolverContextZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_DNSSECQueryDNSResolverContextZ_clone")] public static extern long C2Tuple_DNSSECQueryDNSResolverContextZ_clone(long _orig);
+ // struct LDKC2Tuple_DNSSECQueryDNSResolverContextZ C2Tuple_DNSSECQueryDNSResolverContextZ_new(struct LDKDNSSECQuery a, struct LDKDNSResolverContext b);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_DNSSECQueryDNSResolverContextZ_new")] public static extern long C2Tuple_DNSSECQueryDNSResolverContextZ_new(long _a, long _b);
+ // void C2Tuple_DNSSECQueryDNSResolverContextZ_free(struct LDKC2Tuple_DNSSECQueryDNSResolverContextZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_DNSSECQueryDNSResolverContextZ_free")] public static extern void C2Tuple_DNSSECQueryDNSResolverContextZ_free(long __res);
+ // struct LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_ok(struct LDKC2Tuple_DNSSECQueryDNSResolverContextZ o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_ok")] public static extern long CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_ok(long _o);
+ // struct LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_err(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_err")] public static extern long CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_err();
+ // bool CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_is_ok(const struct LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_is_ok")] public static extern bool CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_is_ok(long _o);
+ // void CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_free(struct LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_free")] public static extern void CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_free(long __res);
+ // uint64_t CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone_ptr(LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone_ptr")] public static extern long CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone_ptr(long _arg);
+ // struct LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone(const struct LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone")] public static extern long CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone(long _orig);
+ // uint64_t C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone_ptr(LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone_ptr")] public static extern long C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone_ptr(long _arg);
+ // struct LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone(const struct LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone")] public static extern long C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone(long _orig);
+ // struct LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ C2Tuple_HumanReadableNameThirtyTwoBytesZ_new(struct LDKHumanReadableName a, struct LDKThirtyTwoBytes b);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_HumanReadableNameThirtyTwoBytesZ_new")] public static extern long C2Tuple_HumanReadableNameThirtyTwoBytesZ_new(long _a, long _b);
+ // void C2Tuple_HumanReadableNameThirtyTwoBytesZ_free(struct LDKC2Tuple_HumanReadableNameThirtyTwoBytesZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_HumanReadableNameThirtyTwoBytesZ_free")] public static extern void C2Tuple_HumanReadableNameThirtyTwoBytesZ_free(long __res);
+ // void CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ_free(struct LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ_free")] public static extern void CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ_free(long __res);
+ // uint64_t C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone_ptr(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone_ptr")] public static extern long C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone_ptr(long _arg);
+ // struct LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone(const struct LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone")] public static extern long C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone(long _orig);
+ // struct LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_new(struct LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ a, struct LDKOffer b);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_new")] public static extern long C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_new(long _a, long _b);
+ // void C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_free(struct LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_free")] public static extern void C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_free(long __res);
+ // struct LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_some(struct LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_some")] public static extern long COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_some(long _o);
+ // struct LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_none(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_none")] public static extern long COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_none();
+ // void COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_free(struct LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_free")] public static extern void COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_free(long __res);
+ // uint64_t COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone_ptr(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone_ptr")] public static extern long COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone_ptr(long _arg);
+ // struct LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone(const struct LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone")] public static extern long COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone(long _orig);
+ // uint64_t C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone_ptr(LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone_ptr")] public static extern long C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone_ptr(long _arg);
+ // struct LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone(const struct LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone")] public static extern long C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone(long _orig);
+ // struct LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_new(struct LDKCVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZ a, struct LDKStr b);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_new")] public static extern long C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_new(long _a, long _b);
+ // void C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_free(struct LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_free")] public static extern void C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_free(long __res);
+ // struct LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_some(struct LDKC2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_some")] public static extern long COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_some(long _o);
+ // struct LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_none(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_none")] public static extern long COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_none();
+ // void COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_free(struct LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_free")] public static extern void COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_free(long __res);
+ // uint64_t COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone_ptr(LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone_ptr")] public static extern long COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone_ptr(long _arg);
+ // struct LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone(const struct LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone")] public static extern long COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone(long _orig);
// struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(struct LDKUnsignedBolt12Invoice o);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok")] public static extern long CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(long _o);
// struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SchnorrSignatureNoneZ_clone_ptr")] public static extern long CResult_SchnorrSignatureNoneZ_clone_ptr(long _arg);
// struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_clone(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_SchnorrSignatureNoneZ_clone")] public static extern long CResult_SchnorrSignatureNoneZ_clone(long _orig);
+ // void CVec_BlindedPaymentPathZ_free(struct LDKCVec_BlindedPaymentPathZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_BlindedPaymentPathZ_free")] public static extern void CVec_BlindedPaymentPathZ_free(long __res);
// void CVec_StrZ_free(struct LDKCVec_StrZ _res);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_StrZ_free")] public static extern void CVec_StrZ_free(long __res);
// void CVec_ThirtyTwoBytesZ_free(struct LDKCVec_ThirtyTwoBytesZ _res);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RouteLightningErrorZ_clone_ptr")] public static extern long CResult_RouteLightningErrorZ_clone_ptr(long _arg);
// struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RouteLightningErrorZ_clone")] public static extern long CResult_RouteLightningErrorZ_clone(long _orig);
- // void CVec_BlindedPaymentPathZ_free(struct LDKCVec_BlindedPaymentPathZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_BlindedPaymentPathZ_free")] public static extern void CVec_BlindedPaymentPathZ_free(long __res);
// struct LDKCResult_CVec_BlindedPaymentPathZNoneZ CResult_CVec_BlindedPaymentPathZNoneZ_ok(struct LDKCVec_BlindedPaymentPathZ o);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedPaymentPathZNoneZ_ok")] public static extern long CResult_CVec_BlindedPaymentPathZNoneZ_ok(long _o);
// struct LDKCResult_CVec_BlindedPaymentPathZNoneZ CResult_CVec_BlindedPaymentPathZNoneZ_err(void);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedPaymentPathZNoneZ_clone_ptr")] public static extern long CResult_CVec_BlindedPaymentPathZNoneZ_clone_ptr(long _arg);
// struct LDKCResult_CVec_BlindedPaymentPathZNoneZ CResult_CVec_BlindedPaymentPathZNoneZ_clone(const struct LDKCResult_CVec_BlindedPaymentPathZNoneZ *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedPaymentPathZNoneZ_clone")] public static extern long CResult_CVec_BlindedPaymentPathZNoneZ_clone(long _orig);
- // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_PublicKeyZ_free")] public static extern void CVec_PublicKeyZ_free(long __res);
- // struct LDKCResult_OnionMessagePathNoneZ CResult_OnionMessagePathNoneZ_ok(struct LDKOnionMessagePath o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OnionMessagePathNoneZ_ok")] public static extern long CResult_OnionMessagePathNoneZ_ok(long _o);
- // struct LDKCResult_OnionMessagePathNoneZ CResult_OnionMessagePathNoneZ_err(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OnionMessagePathNoneZ_err")] public static extern long CResult_OnionMessagePathNoneZ_err();
- // bool CResult_OnionMessagePathNoneZ_is_ok(const struct LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OnionMessagePathNoneZ_is_ok")] public static extern bool CResult_OnionMessagePathNoneZ_is_ok(long _o);
- // void CResult_OnionMessagePathNoneZ_free(struct LDKCResult_OnionMessagePathNoneZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OnionMessagePathNoneZ_free")] public static extern void CResult_OnionMessagePathNoneZ_free(long __res);
- // uint64_t CResult_OnionMessagePathNoneZ_clone_ptr(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OnionMessagePathNoneZ_clone_ptr")] public static extern long CResult_OnionMessagePathNoneZ_clone_ptr(long _arg);
- // struct LDKCResult_OnionMessagePathNoneZ CResult_OnionMessagePathNoneZ_clone(const struct LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR orig);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OnionMessagePathNoneZ_clone")] public static extern long CResult_OnionMessagePathNoneZ_clone(long _orig);
- // struct LDKCResult_CVec_BlindedMessagePathZNoneZ CResult_CVec_BlindedMessagePathZNoneZ_ok(struct LDKCVec_BlindedMessagePathZ o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_ok")] public static extern long CResult_CVec_BlindedMessagePathZNoneZ_ok(long _o);
- // struct LDKCResult_CVec_BlindedMessagePathZNoneZ CResult_CVec_BlindedMessagePathZNoneZ_err(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_err")] public static extern long CResult_CVec_BlindedMessagePathZNoneZ_err();
- // bool CResult_CVec_BlindedMessagePathZNoneZ_is_ok(const struct LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_is_ok")] public static extern bool CResult_CVec_BlindedMessagePathZNoneZ_is_ok(long _o);
- // void CResult_CVec_BlindedMessagePathZNoneZ_free(struct LDKCResult_CVec_BlindedMessagePathZNoneZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_free")] public static extern void CResult_CVec_BlindedMessagePathZNoneZ_free(long __res);
- // uint64_t CResult_CVec_BlindedMessagePathZNoneZ_clone_ptr(LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_clone_ptr")] public static extern long CResult_CVec_BlindedMessagePathZNoneZ_clone_ptr(long _arg);
- // struct LDKCResult_CVec_BlindedMessagePathZNoneZ CResult_CVec_BlindedMessagePathZNoneZ_clone(const struct LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR orig);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_clone")] public static extern long CResult_CVec_BlindedMessagePathZNoneZ_clone(long _orig);
- // void CVec_MessageForwardNodeZ_free(struct LDKCVec_MessageForwardNodeZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_MessageForwardNodeZ_free")] public static extern void CVec_MessageForwardNodeZ_free(long __res);
// struct LDKCResult_InFlightHtlcsDecodeErrorZ CResult_InFlightHtlcsDecodeErrorZ_ok(struct LDKInFlightHtlcs o);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InFlightHtlcsDecodeErrorZ_ok")] public static extern long CResult_InFlightHtlcsDecodeErrorZ_ok(long _o);
// struct LDKCResult_InFlightHtlcsDecodeErrorZ CResult_InFlightHtlcsDecodeErrorZ_err(struct LDKDecodeError e);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RouteHintHopDecodeErrorZ_clone_ptr")] public static extern long CResult_RouteHintHopDecodeErrorZ_clone_ptr(long _arg);
// struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_clone(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_RouteHintHopDecodeErrorZ_clone")] public static extern long CResult_RouteHintHopDecodeErrorZ_clone(long _orig);
+ // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_PublicKeyZ_free")] public static extern void CVec_PublicKeyZ_free(long __res);
// struct LDKCResult_FixedPenaltyScorerDecodeErrorZ CResult_FixedPenaltyScorerDecodeErrorZ_ok(struct LDKFixedPenaltyScorer o);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_FixedPenaltyScorerDecodeErrorZ_ok")] public static extern long CResult_FixedPenaltyScorerDecodeErrorZ_ok(long _o);
// struct LDKCResult_FixedPenaltyScorerDecodeErrorZ CResult_FixedPenaltyScorerDecodeErrorZ_err(struct LDKDecodeError e);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free")] public static extern void C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(long __res);
// void CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(struct LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ _res);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free")] public static extern void CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(long __res);
- // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InitFeaturesDecodeErrorZ_ok")] public static extern long CResult_InitFeaturesDecodeErrorZ_ok(long _o);
- // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InitFeaturesDecodeErrorZ_err")] public static extern long CResult_InitFeaturesDecodeErrorZ_err(long _e);
- // bool CResult_InitFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InitFeaturesDecodeErrorZ_is_ok")] public static extern bool CResult_InitFeaturesDecodeErrorZ_is_ok(long _o);
- // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InitFeaturesDecodeErrorZ_free")] public static extern void CResult_InitFeaturesDecodeErrorZ_free(long __res);
- // uint64_t CResult_InitFeaturesDecodeErrorZ_clone_ptr(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InitFeaturesDecodeErrorZ_clone_ptr")] public static extern long CResult_InitFeaturesDecodeErrorZ_clone_ptr(long _arg);
- // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_clone(const struct LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR orig);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InitFeaturesDecodeErrorZ_clone")] public static extern long CResult_InitFeaturesDecodeErrorZ_clone(long _orig);
- // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_ok")] public static extern long CResult_ChannelFeaturesDecodeErrorZ_ok(long _o);
- // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_err")] public static extern long CResult_ChannelFeaturesDecodeErrorZ_err(long _e);
- // bool CResult_ChannelFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_is_ok")] public static extern bool CResult_ChannelFeaturesDecodeErrorZ_is_ok(long _o);
- // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_free")] public static extern void CResult_ChannelFeaturesDecodeErrorZ_free(long __res);
- // uint64_t CResult_ChannelFeaturesDecodeErrorZ_clone_ptr(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_clone_ptr")] public static extern long CResult_ChannelFeaturesDecodeErrorZ_clone_ptr(long _arg);
- // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_clone(const struct LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR orig);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_clone")] public static extern long CResult_ChannelFeaturesDecodeErrorZ_clone(long _orig);
- // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeFeaturesDecodeErrorZ_ok")] public static extern long CResult_NodeFeaturesDecodeErrorZ_ok(long _o);
- // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeFeaturesDecodeErrorZ_err")] public static extern long CResult_NodeFeaturesDecodeErrorZ_err(long _e);
- // bool CResult_NodeFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeFeaturesDecodeErrorZ_is_ok")] public static extern bool CResult_NodeFeaturesDecodeErrorZ_is_ok(long _o);
- // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeFeaturesDecodeErrorZ_free")] public static extern void CResult_NodeFeaturesDecodeErrorZ_free(long __res);
- // uint64_t CResult_NodeFeaturesDecodeErrorZ_clone_ptr(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeFeaturesDecodeErrorZ_clone_ptr")] public static extern long CResult_NodeFeaturesDecodeErrorZ_clone_ptr(long _arg);
- // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_clone(const struct LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR orig);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeFeaturesDecodeErrorZ_clone")] public static extern long CResult_NodeFeaturesDecodeErrorZ_clone(long _orig);
- // struct LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(struct LDKBolt11InvoiceFeatures o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok")] public static extern long CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(long _o);
- // struct LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ CResult_Bolt11InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_err")] public static extern long CResult_Bolt11InvoiceFeaturesDecodeErrorZ_err(long _e);
- // bool CResult_Bolt11InvoiceFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_is_ok")] public static extern bool CResult_Bolt11InvoiceFeaturesDecodeErrorZ_is_ok(long _o);
- // void CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free")] public static extern void CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free(long __res);
- // uint64_t CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone_ptr(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone_ptr")] public static extern long CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone_ptr(long _arg);
- // struct LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone(const struct LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR orig);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone")] public static extern long CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone(long _orig);
- // struct LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(struct LDKBolt12InvoiceFeatures o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok")] public static extern long CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(long _o);
- // struct LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ CResult_Bolt12InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_err")] public static extern long CResult_Bolt12InvoiceFeaturesDecodeErrorZ_err(long _e);
- // bool CResult_Bolt12InvoiceFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_is_ok")] public static extern bool CResult_Bolt12InvoiceFeaturesDecodeErrorZ_is_ok(long _o);
- // void CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free")] public static extern void CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free(long __res);
- // uint64_t CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone_ptr")] public static extern long CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone_ptr(long _arg);
- // struct LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone(const struct LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR orig);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone")] public static extern long CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone(long _orig);
- // struct LDKCResult_BlindedHopFeaturesDecodeErrorZ CResult_BlindedHopFeaturesDecodeErrorZ_ok(struct LDKBlindedHopFeatures o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_ok")] public static extern long CResult_BlindedHopFeaturesDecodeErrorZ_ok(long _o);
- // struct LDKCResult_BlindedHopFeaturesDecodeErrorZ CResult_BlindedHopFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_err")] public static extern long CResult_BlindedHopFeaturesDecodeErrorZ_err(long _e);
- // bool CResult_BlindedHopFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_is_ok")] public static extern bool CResult_BlindedHopFeaturesDecodeErrorZ_is_ok(long _o);
- // void CResult_BlindedHopFeaturesDecodeErrorZ_free(struct LDKCResult_BlindedHopFeaturesDecodeErrorZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_free")] public static extern void CResult_BlindedHopFeaturesDecodeErrorZ_free(long __res);
- // uint64_t CResult_BlindedHopFeaturesDecodeErrorZ_clone_ptr(LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_clone_ptr")] public static extern long CResult_BlindedHopFeaturesDecodeErrorZ_clone_ptr(long _arg);
- // struct LDKCResult_BlindedHopFeaturesDecodeErrorZ CResult_BlindedHopFeaturesDecodeErrorZ_clone(const struct LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR orig);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_clone")] public static extern long CResult_BlindedHopFeaturesDecodeErrorZ_clone(long _orig);
- // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_ok(struct LDKChannelTypeFeatures o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_ok")] public static extern long CResult_ChannelTypeFeaturesDecodeErrorZ_ok(long _o);
- // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_err")] public static extern long CResult_ChannelTypeFeaturesDecodeErrorZ_err(long _e);
- // bool CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok")] public static extern bool CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(long _o);
- // void CResult_ChannelTypeFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_free")] public static extern void CResult_ChannelTypeFeaturesDecodeErrorZ_free(long __res);
- // uint64_t CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr")] public static extern long CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(long _arg);
- // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_clone(const struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR orig);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_clone")] public static extern long CResult_ChannelTypeFeaturesDecodeErrorZ_clone(long _orig);
// struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_ok(struct LDKOfferId o);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferIdDecodeErrorZ_ok")] public static extern long CResult_OfferIdDecodeErrorZ_ok(long _o);
// struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_err(struct LDKDecodeError e);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferBolt12SemanticErrorZ_clone_ptr")] public static extern long CResult_OfferBolt12SemanticErrorZ_clone_ptr(long _arg);
// struct LDKCResult_OfferBolt12SemanticErrorZ CResult_OfferBolt12SemanticErrorZ_clone(const struct LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferBolt12SemanticErrorZ_clone")] public static extern long CResult_OfferBolt12SemanticErrorZ_clone(long _orig);
- // struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceRequestWithDerivedPayerIdBuilder o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok")] public static extern long CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(long _o);
- // struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err")] public static extern long CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError _e);
- // bool CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok")] public static extern bool CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(long _o);
- // void CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free")] public static extern void CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(long __res);
- // struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceRequestWithExplicitPayerIdBuilder o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok")] public static extern long CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(long _o);
- // struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err")] public static extern long CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError _e);
- // bool CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok")] public static extern bool CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(long _o);
- // void CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free")] public static extern void CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(long __res);
+ // struct LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_ok")] public static extern long CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_ok(long _o);
+ // struct LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_err")] public static extern long CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_err(Bolt12SemanticError _e);
+ // bool CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok")] public static extern bool CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(long _o);
+ // void CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_free")] public static extern void CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_free(long __res);
// struct LDKCResult_OfferDecodeErrorZ CResult_OfferDecodeErrorZ_ok(struct LDKOffer o);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferDecodeErrorZ_ok")] public static extern long CResult_OfferDecodeErrorZ_ok(long _o);
// struct LDKCResult_OfferDecodeErrorZ CResult_OfferDecodeErrorZ_err(struct LDKDecodeError e);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdAPIErrorZ_clone")] public static extern long CResult_ChannelIdAPIErrorZ_clone(long _orig);
// void CVec_RecentPaymentDetailsZ_free(struct LDKCVec_RecentPaymentDetailsZ _res);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_RecentPaymentDetailsZ_free")] public static extern void CVec_RecentPaymentDetailsZ_free(long __res);
- // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NonePaymentSendFailureZ_ok")] public static extern long CResult_NonePaymentSendFailureZ_ok();
- // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NonePaymentSendFailureZ_err")] public static extern long CResult_NonePaymentSendFailureZ_err(long _e);
- // bool CResult_NonePaymentSendFailureZ_is_ok(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NonePaymentSendFailureZ_is_ok")] public static extern bool CResult_NonePaymentSendFailureZ_is_ok(long _o);
- // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NonePaymentSendFailureZ_free")] public static extern void CResult_NonePaymentSendFailureZ_free(long __res);
- // uint64_t CResult_NonePaymentSendFailureZ_clone_ptr(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NonePaymentSendFailureZ_clone_ptr")] public static extern long CResult_NonePaymentSendFailureZ_clone_ptr(long _arg);
- // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NonePaymentSendFailureZ_clone")] public static extern long CResult_NonePaymentSendFailureZ_clone(long _orig);
+ // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneAPIErrorZ_ok")] public static extern long CResult_NoneAPIErrorZ_ok();
+ // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneAPIErrorZ_err")] public static extern long CResult_NoneAPIErrorZ_err(long _e);
+ // bool CResult_NoneAPIErrorZ_is_ok(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneAPIErrorZ_is_ok")] public static extern bool CResult_NoneAPIErrorZ_is_ok(long _o);
+ // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneAPIErrorZ_free")] public static extern void CResult_NoneAPIErrorZ_free(long __res);
+ // uint64_t CResult_NoneAPIErrorZ_clone_ptr(LDKCResult_NoneAPIErrorZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneAPIErrorZ_clone_ptr")] public static extern long CResult_NoneAPIErrorZ_clone_ptr(long _arg);
+ // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneAPIErrorZ_clone")] public static extern long CResult_NoneAPIErrorZ_clone(long _orig);
// struct LDKCResult_NoneRetryableSendFailureZ CResult_NoneRetryableSendFailureZ_ok(void);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneRetryableSendFailureZ_ok")] public static extern long CResult_NoneRetryableSendFailureZ_ok();
// struct LDKCResult_NoneRetryableSendFailureZ CResult_NoneRetryableSendFailureZ_err(enum LDKRetryableSendFailure e);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneRetryableSendFailureZ_clone_ptr")] public static extern long CResult_NoneRetryableSendFailureZ_clone_ptr(long _arg);
// struct LDKCResult_NoneRetryableSendFailureZ CResult_NoneRetryableSendFailureZ_clone(const struct LDKCResult_NoneRetryableSendFailureZ *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneRetryableSendFailureZ_clone")] public static extern long CResult_NoneRetryableSendFailureZ_clone(long _orig);
- // struct LDKCResult_ThirtyTwoBytesPaymentSendFailureZ CResult_ThirtyTwoBytesPaymentSendFailureZ_ok(struct LDKThirtyTwoBytes o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_ok")] public static extern long CResult_ThirtyTwoBytesPaymentSendFailureZ_ok(long _o);
- // struct LDKCResult_ThirtyTwoBytesPaymentSendFailureZ CResult_ThirtyTwoBytesPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_err")] public static extern long CResult_ThirtyTwoBytesPaymentSendFailureZ_err(long _e);
- // bool CResult_ThirtyTwoBytesPaymentSendFailureZ_is_ok(const struct LDKCResult_ThirtyTwoBytesPaymentSendFailureZ *NONNULL_PTR o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_is_ok")] public static extern bool CResult_ThirtyTwoBytesPaymentSendFailureZ_is_ok(long _o);
- // void CResult_ThirtyTwoBytesPaymentSendFailureZ_free(struct LDKCResult_ThirtyTwoBytesPaymentSendFailureZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_free")] public static extern void CResult_ThirtyTwoBytesPaymentSendFailureZ_free(long __res);
- // uint64_t CResult_ThirtyTwoBytesPaymentSendFailureZ_clone_ptr(LDKCResult_ThirtyTwoBytesPaymentSendFailureZ *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_clone_ptr")] public static extern long CResult_ThirtyTwoBytesPaymentSendFailureZ_clone_ptr(long _arg);
- // struct LDKCResult_ThirtyTwoBytesPaymentSendFailureZ CResult_ThirtyTwoBytesPaymentSendFailureZ_clone(const struct LDKCResult_ThirtyTwoBytesPaymentSendFailureZ *NONNULL_PTR orig);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesPaymentSendFailureZ_clone")] public static extern long CResult_ThirtyTwoBytesPaymentSendFailureZ_clone(long _orig);
+ // struct LDKCOption_OffersContextZ COption_OffersContextZ_some(struct LDKOffersContext o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_OffersContextZ_some")] public static extern long COption_OffersContextZ_some(long _o);
+ // struct LDKCOption_OffersContextZ COption_OffersContextZ_none(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_OffersContextZ_none")] public static extern long COption_OffersContextZ_none();
+ // void COption_OffersContextZ_free(struct LDKCOption_OffersContextZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_OffersContextZ_free")] public static extern void COption_OffersContextZ_free(long __res);
+ // uint64_t COption_OffersContextZ_clone_ptr(LDKCOption_OffersContextZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_OffersContextZ_clone_ptr")] public static extern long COption_OffersContextZ_clone_ptr(long _arg);
+ // struct LDKCOption_OffersContextZ COption_OffersContextZ_clone(const struct LDKCOption_OffersContextZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_OffersContextZ_clone")] public static extern long COption_OffersContextZ_clone(long _orig);
+ // struct LDKCResult_NoneBolt12PaymentErrorZ CResult_NoneBolt12PaymentErrorZ_ok(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12PaymentErrorZ_ok")] public static extern long CResult_NoneBolt12PaymentErrorZ_ok();
+ // struct LDKCResult_NoneBolt12PaymentErrorZ CResult_NoneBolt12PaymentErrorZ_err(struct LDKBolt12PaymentError e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12PaymentErrorZ_err")] public static extern long CResult_NoneBolt12PaymentErrorZ_err(long _e);
+ // bool CResult_NoneBolt12PaymentErrorZ_is_ok(const struct LDKCResult_NoneBolt12PaymentErrorZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12PaymentErrorZ_is_ok")] public static extern bool CResult_NoneBolt12PaymentErrorZ_is_ok(long _o);
+ // void CResult_NoneBolt12PaymentErrorZ_free(struct LDKCResult_NoneBolt12PaymentErrorZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12PaymentErrorZ_free")] public static extern void CResult_NoneBolt12PaymentErrorZ_free(long __res);
+ // uint64_t CResult_NoneBolt12PaymentErrorZ_clone_ptr(LDKCResult_NoneBolt12PaymentErrorZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12PaymentErrorZ_clone_ptr")] public static extern long CResult_NoneBolt12PaymentErrorZ_clone_ptr(long _arg);
+ // struct LDKCResult_NoneBolt12PaymentErrorZ CResult_NoneBolt12PaymentErrorZ_clone(const struct LDKCResult_NoneBolt12PaymentErrorZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NoneBolt12PaymentErrorZ_clone")] public static extern long CResult_NoneBolt12PaymentErrorZ_clone(long _orig);
// struct LDKCResult_ThirtyTwoBytesRetryableSendFailureZ CResult_ThirtyTwoBytesRetryableSendFailureZ_ok(struct LDKThirtyTwoBytes o);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesRetryableSendFailureZ_ok")] public static extern long CResult_ThirtyTwoBytesRetryableSendFailureZ_ok(long _o);
// struct LDKCResult_ThirtyTwoBytesRetryableSendFailureZ CResult_ThirtyTwoBytesRetryableSendFailureZ_err(enum LDKRetryableSendFailure e);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_new")] public static extern long C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_new(long _a, long _b);
// void C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_free(struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ _res);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_free")] public static extern void C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_free(long __res);
- // struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_ok(struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_ok")] public static extern long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_ok(long _o);
- // struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_err")] public static extern long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_err(long _e);
- // bool CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_is_ok(const struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ *NONNULL_PTR o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_is_ok")] public static extern bool CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_is_ok(long _o);
- // void CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_free(struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_free")] public static extern void CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_free(long __res);
- // uint64_t CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone_ptr(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone_ptr")] public static extern long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone_ptr(long _arg);
- // struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone(const struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ *NONNULL_PTR orig);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone")] public static extern long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone(long _orig);
+ // struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_ok(struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_ok")] public static extern long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_ok(long _o);
+ // struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_err(struct LDKProbeSendFailure e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_err")] public static extern long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_err(long _e);
+ // bool CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_is_ok(const struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_is_ok")] public static extern bool CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_is_ok(long _o);
+ // void CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_free(struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_free")] public static extern void CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_free(long __res);
+ // uint64_t CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone_ptr(LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone_ptr")] public static extern long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone_ptr(long _arg);
+ // struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone(const struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone")] public static extern long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone(long _orig);
// void CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ_free(struct LDKCVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ _res);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ_free")] public static extern void CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ_free(long __res);
// struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_ok(struct LDKCVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ o);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_C2Tuple_ChannelIdPublicKeyZZ_free")] public static extern void CVec_C2Tuple_ChannelIdPublicKeyZZ_free(long __res);
// void CVec_ChannelIdZ_free(struct LDKCVec_ChannelIdZ _res);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_ChannelIdZ_free")] public static extern void CVec_ChannelIdZ_free(long __res);
+ // uint64_t C2Tuple_PublicKeyChannelIdZ_clone_ptr(LDKC2Tuple_PublicKeyChannelIdZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_PublicKeyChannelIdZ_clone_ptr")] public static extern long C2Tuple_PublicKeyChannelIdZ_clone_ptr(long _arg);
+ // struct LDKC2Tuple_PublicKeyChannelIdZ C2Tuple_PublicKeyChannelIdZ_clone(const struct LDKC2Tuple_PublicKeyChannelIdZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_PublicKeyChannelIdZ_clone")] public static extern long C2Tuple_PublicKeyChannelIdZ_clone(long _orig);
+ // struct LDKC2Tuple_PublicKeyChannelIdZ C2Tuple_PublicKeyChannelIdZ_new(struct LDKPublicKey a, struct LDKChannelId b);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_PublicKeyChannelIdZ_new")] public static extern long C2Tuple_PublicKeyChannelIdZ_new(long _a, long _b);
+ // void C2Tuple_PublicKeyChannelIdZ_free(struct LDKC2Tuple_PublicKeyChannelIdZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_PublicKeyChannelIdZ_free")] public static extern void C2Tuple_PublicKeyChannelIdZ_free(long __res);
+ // struct LDKCOption_C2Tuple_PublicKeyChannelIdZZ COption_C2Tuple_PublicKeyChannelIdZZ_some(struct LDKC2Tuple_PublicKeyChannelIdZ o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_PublicKeyChannelIdZZ_some")] public static extern long COption_C2Tuple_PublicKeyChannelIdZZ_some(long _o);
+ // struct LDKCOption_C2Tuple_PublicKeyChannelIdZZ COption_C2Tuple_PublicKeyChannelIdZZ_none(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_PublicKeyChannelIdZZ_none")] public static extern long COption_C2Tuple_PublicKeyChannelIdZZ_none();
+ // void COption_C2Tuple_PublicKeyChannelIdZZ_free(struct LDKCOption_C2Tuple_PublicKeyChannelIdZZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_PublicKeyChannelIdZZ_free")] public static extern void COption_C2Tuple_PublicKeyChannelIdZZ_free(long __res);
+ // uint64_t COption_C2Tuple_PublicKeyChannelIdZZ_clone_ptr(LDKCOption_C2Tuple_PublicKeyChannelIdZZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_PublicKeyChannelIdZZ_clone_ptr")] public static extern long COption_C2Tuple_PublicKeyChannelIdZZ_clone_ptr(long _arg);
+ // struct LDKCOption_C2Tuple_PublicKeyChannelIdZZ COption_C2Tuple_PublicKeyChannelIdZZ_clone(const struct LDKCOption_C2Tuple_PublicKeyChannelIdZZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_C2Tuple_PublicKeyChannelIdZZ_clone")] public static extern long COption_C2Tuple_PublicKeyChannelIdZZ_clone(long _orig);
+ // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(struct LDKBolt11Invoice o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_ok")] public static extern long CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(long _o);
+ // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ CResult_Bolt11InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_err")] public static extern long CResult_Bolt11InvoiceSignOrCreationErrorZ_err(long _e);
+ // bool CResult_Bolt11InvoiceSignOrCreationErrorZ_is_ok(const struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_is_ok")] public static extern bool CResult_Bolt11InvoiceSignOrCreationErrorZ_is_ok(long _o);
+ // void CResult_Bolt11InvoiceSignOrCreationErrorZ_free(struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_free")] public static extern void CResult_Bolt11InvoiceSignOrCreationErrorZ_free(long __res);
+ // uint64_t CResult_Bolt11InvoiceSignOrCreationErrorZ_clone_ptr(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_clone_ptr")] public static extern long CResult_Bolt11InvoiceSignOrCreationErrorZ_clone_ptr(long _arg);
+ // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ CResult_Bolt11InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_clone")] public static extern long CResult_Bolt11InvoiceSignOrCreationErrorZ_clone(long _orig);
// struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(struct LDKOfferWithDerivedMetadataBuilder o);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok")] public static extern long CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(long _o);
// struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_StrZ_clone_ptr")] public static extern long COption_StrZ_clone_ptr(long _arg);
// struct LDKCOption_StrZ COption_StrZ_clone(const struct LDKCOption_StrZ *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_StrZ_clone")] public static extern long COption_StrZ_clone(long _orig);
+ // void CVec_DestinationZ_free(struct LDKCVec_DestinationZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_DestinationZ_free")] public static extern void CVec_DestinationZ_free(long __res);
// struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ o);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok")] public static extern long CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(long _o);
// struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_err(void);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr")] public static extern long CResult_ThirtyTwoBytesAPIErrorZ_clone_ptr(long _arg);
// struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_clone(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ThirtyTwoBytesAPIErrorZ_clone")] public static extern long CResult_ThirtyTwoBytesAPIErrorZ_clone(long _orig);
- // struct LDKCOption_OffersContextZ COption_OffersContextZ_some(struct LDKOffersContext o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_OffersContextZ_some")] public static extern long COption_OffersContextZ_some(long _o);
- // struct LDKCOption_OffersContextZ COption_OffersContextZ_none(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_OffersContextZ_none")] public static extern long COption_OffersContextZ_none();
- // void COption_OffersContextZ_free(struct LDKCOption_OffersContextZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_OffersContextZ_free")] public static extern void COption_OffersContextZ_free(long __res);
- // uint64_t COption_OffersContextZ_clone_ptr(LDKCOption_OffersContextZ *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_OffersContextZ_clone_ptr")] public static extern long COption_OffersContextZ_clone_ptr(long _arg);
- // struct LDKCOption_OffersContextZ COption_OffersContextZ_clone(const struct LDKCOption_OffersContextZ *NONNULL_PTR orig);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_OffersContextZ_clone")] public static extern long COption_OffersContextZ_clone(long _orig);
// uint64_t C2Tuple_OffersMessageResponseInstructionZ_clone_ptr(LDKC2Tuple_OffersMessageResponseInstructionZ *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_OffersMessageResponseInstructionZ_clone_ptr")] public static extern long C2Tuple_OffersMessageResponseInstructionZ_clone_ptr(long _arg);
// struct LDKC2Tuple_OffersMessageResponseInstructionZ C2Tuple_OffersMessageResponseInstructionZ_clone(const struct LDKC2Tuple_OffersMessageResponseInstructionZ *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_free")] public static extern void C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_free(long __res);
// void CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZZ _res);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZZ_free")] public static extern void CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZZ_free(long __res);
+ // uint64_t C2Tuple_boolboolZ_clone_ptr(LDKC2Tuple_boolboolZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_boolboolZ_clone_ptr")] public static extern long C2Tuple_boolboolZ_clone_ptr(long _arg);
+ // struct LDKC2Tuple_boolboolZ C2Tuple_boolboolZ_clone(const struct LDKC2Tuple_boolboolZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_boolboolZ_clone")] public static extern long C2Tuple_boolboolZ_clone(long _orig);
+ // struct LDKC2Tuple_boolboolZ C2Tuple_boolboolZ_new(bool a, bool b);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_boolboolZ_new")] public static extern long C2Tuple_boolboolZ_new(bool _a, bool _b);
+ // void C2Tuple_boolboolZ_free(struct LDKC2Tuple_boolboolZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_boolboolZ_free")] public static extern void C2Tuple_boolboolZ_free(long __res);
// void CVec_BalanceZ_free(struct LDKCVec_BalanceZ _res);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_BalanceZ_free")] public static extern void CVec_BalanceZ_free(long __res);
// uint64_t C2Tuple_ThirtyTwoBytesChannelMonitorZ_clone_ptr(LDKC2Tuple_ThirtyTwoBytesChannelMonitorZ *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_StrZIOErrorZ_clone_ptr")] public static extern long CResult_CVec_StrZIOErrorZ_clone_ptr(long _arg);
// struct LDKCResult_CVec_StrZIOErrorZ CResult_CVec_StrZIOErrorZ_clone(const struct LDKCResult_CVec_StrZIOErrorZ *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_StrZIOErrorZ_clone")] public static extern long CResult_CVec_StrZIOErrorZ_clone(long _orig);
+ // uint64_t C3Tuple_StrStrStrZ_clone_ptr(LDKC3Tuple_StrStrStrZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C3Tuple_StrStrStrZ_clone_ptr")] public static extern long C3Tuple_StrStrStrZ_clone_ptr(long _arg);
+ // struct LDKC3Tuple_StrStrStrZ C3Tuple_StrStrStrZ_clone(const struct LDKC3Tuple_StrStrStrZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C3Tuple_StrStrStrZ_clone")] public static extern long C3Tuple_StrStrStrZ_clone(long _orig);
+ // struct LDKC3Tuple_StrStrStrZ C3Tuple_StrStrStrZ_new(struct LDKStr a, struct LDKStr b, struct LDKStr c);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C3Tuple_StrStrStrZ_new")] public static extern long C3Tuple_StrStrStrZ_new(long _a, long _b, long _c);
+ // void C3Tuple_StrStrStrZ_free(struct LDKC3Tuple_StrStrStrZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_C3Tuple_StrStrStrZ_free")] public static extern void C3Tuple_StrStrStrZ_free(long __res);
+ // void CVec_C3Tuple_StrStrStrZZ_free(struct LDKCVec_C3Tuple_StrStrStrZZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_C3Tuple_StrStrStrZZ_free")] public static extern void CVec_C3Tuple_StrStrStrZZ_free(long __res);
+ // struct LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_ok(struct LDKCVec_C3Tuple_StrStrStrZZ o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_ok")] public static extern long CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_ok(long _o);
+ // struct LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_err(enum LDKIOError e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_err")] public static extern long CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_err(IOError _e);
+ // bool CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_is_ok(const struct LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_is_ok")] public static extern bool CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_is_ok(long _o);
+ // void CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_free(struct LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_free")] public static extern void CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_free(long __res);
+ // uint64_t CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone_ptr(LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone_ptr")] public static extern long CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone_ptr(long _arg);
+ // struct LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone(const struct LDKCResult_CVec_C3Tuple_StrStrStrZZIOErrorZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone")] public static extern long CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone(long _orig);
// void CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ_free(struct LDKCVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ _res);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ_free")] public static extern void CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ_free(long __res);
// struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_ok(struct LDKCVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ o);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone_ptr")] public static extern long CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone_ptr(long _arg);
// struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone(const struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone")] public static extern long CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone(long _orig);
- // struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(struct LDKUnsignedInvoiceRequest o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok")] public static extern long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(long _o);
- // struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err")] public static extern long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(Bolt12SemanticError _e);
- // bool CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(const struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok")] public static extern bool CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(long _o);
- // void CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free")] public static extern void CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(long __res);
- // uint64_t CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr")] public static extern long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(long _arg);
- // struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(const struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR orig);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone")] public static extern long CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(long _orig);
+ // struct LDKCResult_MonitorNameIOErrorZ CResult_MonitorNameIOErrorZ_ok(struct LDKMonitorName o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_MonitorNameIOErrorZ_ok")] public static extern long CResult_MonitorNameIOErrorZ_ok(long _o);
+ // struct LDKCResult_MonitorNameIOErrorZ CResult_MonitorNameIOErrorZ_err(enum LDKIOError e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_MonitorNameIOErrorZ_err")] public static extern long CResult_MonitorNameIOErrorZ_err(IOError _e);
+ // bool CResult_MonitorNameIOErrorZ_is_ok(const struct LDKCResult_MonitorNameIOErrorZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_MonitorNameIOErrorZ_is_ok")] public static extern bool CResult_MonitorNameIOErrorZ_is_ok(long _o);
+ // void CResult_MonitorNameIOErrorZ_free(struct LDKCResult_MonitorNameIOErrorZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_MonitorNameIOErrorZ_free")] public static extern void CResult_MonitorNameIOErrorZ_free(long __res);
+ // struct LDKCResult_UpdateNameIOErrorZ CResult_UpdateNameIOErrorZ_ok(struct LDKUpdateName o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UpdateNameIOErrorZ_ok")] public static extern long CResult_UpdateNameIOErrorZ_ok(long _o);
+ // struct LDKCResult_UpdateNameIOErrorZ CResult_UpdateNameIOErrorZ_err(enum LDKIOError e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UpdateNameIOErrorZ_err")] public static extern long CResult_UpdateNameIOErrorZ_err(IOError _e);
+ // bool CResult_UpdateNameIOErrorZ_is_ok(const struct LDKCResult_UpdateNameIOErrorZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UpdateNameIOErrorZ_is_ok")] public static extern bool CResult_UpdateNameIOErrorZ_is_ok(long _o);
+ // void CResult_UpdateNameIOErrorZ_free(struct LDKCResult_UpdateNameIOErrorZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UpdateNameIOErrorZ_free")] public static extern void CResult_UpdateNameIOErrorZ_free(long __res);
// struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_ok(struct LDKInvoiceRequest o);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestBolt12SemanticErrorZ_ok")] public static extern long CResult_InvoiceRequestBolt12SemanticErrorZ_ok(long _o);
// struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok")] public static extern bool CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(long _o);
// void CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ _res);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free")] public static extern void CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(long __res);
+ // struct LDKCResult_InvoiceRequestDecodeErrorZ CResult_InvoiceRequestDecodeErrorZ_ok(struct LDKInvoiceRequest o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestDecodeErrorZ_ok")] public static extern long CResult_InvoiceRequestDecodeErrorZ_ok(long _o);
+ // struct LDKCResult_InvoiceRequestDecodeErrorZ CResult_InvoiceRequestDecodeErrorZ_err(struct LDKDecodeError e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestDecodeErrorZ_err")] public static extern long CResult_InvoiceRequestDecodeErrorZ_err(long _e);
+ // bool CResult_InvoiceRequestDecodeErrorZ_is_ok(const struct LDKCResult_InvoiceRequestDecodeErrorZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestDecodeErrorZ_is_ok")] public static extern bool CResult_InvoiceRequestDecodeErrorZ_is_ok(long _o);
+ // void CResult_InvoiceRequestDecodeErrorZ_free(struct LDKCResult_InvoiceRequestDecodeErrorZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestDecodeErrorZ_free")] public static extern void CResult_InvoiceRequestDecodeErrorZ_free(long __res);
+ // uint64_t CResult_InvoiceRequestDecodeErrorZ_clone_ptr(LDKCResult_InvoiceRequestDecodeErrorZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestDecodeErrorZ_clone_ptr")] public static extern long CResult_InvoiceRequestDecodeErrorZ_clone_ptr(long _arg);
+ // struct LDKCResult_InvoiceRequestDecodeErrorZ CResult_InvoiceRequestDecodeErrorZ_clone(const struct LDKCResult_InvoiceRequestDecodeErrorZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestDecodeErrorZ_clone")] public static extern long CResult_InvoiceRequestDecodeErrorZ_clone(long _orig);
// struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_ok(struct LDKInvoiceRequestFields o);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceRequestFieldsDecodeErrorZ_ok")] public static extern long CResult_InvoiceRequestFieldsDecodeErrorZ_ok(long _o);
// struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_err(struct LDKDecodeError e);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdDecodeErrorZ_clone_ptr")] public static extern long CResult_ChannelIdDecodeErrorZ_clone_ptr(long _arg);
// struct LDKCResult_ChannelIdDecodeErrorZ CResult_ChannelIdDecodeErrorZ_clone(const struct LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelIdDecodeErrorZ_clone")] public static extern long CResult_ChannelIdDecodeErrorZ_clone(long _orig);
+ // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InitFeaturesDecodeErrorZ_ok")] public static extern long CResult_InitFeaturesDecodeErrorZ_ok(long _o);
+ // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InitFeaturesDecodeErrorZ_err")] public static extern long CResult_InitFeaturesDecodeErrorZ_err(long _e);
+ // bool CResult_InitFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InitFeaturesDecodeErrorZ_is_ok")] public static extern bool CResult_InitFeaturesDecodeErrorZ_is_ok(long _o);
+ // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InitFeaturesDecodeErrorZ_free")] public static extern void CResult_InitFeaturesDecodeErrorZ_free(long __res);
+ // uint64_t CResult_InitFeaturesDecodeErrorZ_clone_ptr(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InitFeaturesDecodeErrorZ_clone_ptr")] public static extern long CResult_InitFeaturesDecodeErrorZ_clone_ptr(long _arg);
+ // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_clone(const struct LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InitFeaturesDecodeErrorZ_clone")] public static extern long CResult_InitFeaturesDecodeErrorZ_clone(long _orig);
+ // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_ok")] public static extern long CResult_ChannelFeaturesDecodeErrorZ_ok(long _o);
+ // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_err")] public static extern long CResult_ChannelFeaturesDecodeErrorZ_err(long _e);
+ // bool CResult_ChannelFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_is_ok")] public static extern bool CResult_ChannelFeaturesDecodeErrorZ_is_ok(long _o);
+ // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_free")] public static extern void CResult_ChannelFeaturesDecodeErrorZ_free(long __res);
+ // uint64_t CResult_ChannelFeaturesDecodeErrorZ_clone_ptr(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_clone_ptr")] public static extern long CResult_ChannelFeaturesDecodeErrorZ_clone_ptr(long _arg);
+ // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_clone(const struct LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelFeaturesDecodeErrorZ_clone")] public static extern long CResult_ChannelFeaturesDecodeErrorZ_clone(long _orig);
+ // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeFeaturesDecodeErrorZ_ok")] public static extern long CResult_NodeFeaturesDecodeErrorZ_ok(long _o);
+ // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeFeaturesDecodeErrorZ_err")] public static extern long CResult_NodeFeaturesDecodeErrorZ_err(long _e);
+ // bool CResult_NodeFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeFeaturesDecodeErrorZ_is_ok")] public static extern bool CResult_NodeFeaturesDecodeErrorZ_is_ok(long _o);
+ // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeFeaturesDecodeErrorZ_free")] public static extern void CResult_NodeFeaturesDecodeErrorZ_free(long __res);
+ // uint64_t CResult_NodeFeaturesDecodeErrorZ_clone_ptr(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeFeaturesDecodeErrorZ_clone_ptr")] public static extern long CResult_NodeFeaturesDecodeErrorZ_clone_ptr(long _arg);
+ // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_clone(const struct LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_NodeFeaturesDecodeErrorZ_clone")] public static extern long CResult_NodeFeaturesDecodeErrorZ_clone(long _orig);
+ // struct LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(struct LDKBolt11InvoiceFeatures o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok")] public static extern long CResult_Bolt11InvoiceFeaturesDecodeErrorZ_ok(long _o);
+ // struct LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ CResult_Bolt11InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_err")] public static extern long CResult_Bolt11InvoiceFeaturesDecodeErrorZ_err(long _e);
+ // bool CResult_Bolt11InvoiceFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_is_ok")] public static extern bool CResult_Bolt11InvoiceFeaturesDecodeErrorZ_is_ok(long _o);
+ // void CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free")] public static extern void CResult_Bolt11InvoiceFeaturesDecodeErrorZ_free(long __res);
+ // uint64_t CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone_ptr(LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone_ptr")] public static extern long CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone_ptr(long _arg);
+ // struct LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone(const struct LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone")] public static extern long CResult_Bolt11InvoiceFeaturesDecodeErrorZ_clone(long _orig);
+ // struct LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(struct LDKBolt12InvoiceFeatures o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok")] public static extern long CResult_Bolt12InvoiceFeaturesDecodeErrorZ_ok(long _o);
+ // struct LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ CResult_Bolt12InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_err")] public static extern long CResult_Bolt12InvoiceFeaturesDecodeErrorZ_err(long _e);
+ // bool CResult_Bolt12InvoiceFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_is_ok")] public static extern bool CResult_Bolt12InvoiceFeaturesDecodeErrorZ_is_ok(long _o);
+ // void CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free")] public static extern void CResult_Bolt12InvoiceFeaturesDecodeErrorZ_free(long __res);
+ // uint64_t CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone_ptr(LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone_ptr")] public static extern long CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone_ptr(long _arg);
+ // struct LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone(const struct LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone")] public static extern long CResult_Bolt12InvoiceFeaturesDecodeErrorZ_clone(long _orig);
+ // struct LDKCResult_BlindedHopFeaturesDecodeErrorZ CResult_BlindedHopFeaturesDecodeErrorZ_ok(struct LDKBlindedHopFeatures o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_ok")] public static extern long CResult_BlindedHopFeaturesDecodeErrorZ_ok(long _o);
+ // struct LDKCResult_BlindedHopFeaturesDecodeErrorZ CResult_BlindedHopFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_err")] public static extern long CResult_BlindedHopFeaturesDecodeErrorZ_err(long _e);
+ // bool CResult_BlindedHopFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_is_ok")] public static extern bool CResult_BlindedHopFeaturesDecodeErrorZ_is_ok(long _o);
+ // void CResult_BlindedHopFeaturesDecodeErrorZ_free(struct LDKCResult_BlindedHopFeaturesDecodeErrorZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_free")] public static extern void CResult_BlindedHopFeaturesDecodeErrorZ_free(long __res);
+ // uint64_t CResult_BlindedHopFeaturesDecodeErrorZ_clone_ptr(LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_clone_ptr")] public static extern long CResult_BlindedHopFeaturesDecodeErrorZ_clone_ptr(long _arg);
+ // struct LDKCResult_BlindedHopFeaturesDecodeErrorZ CResult_BlindedHopFeaturesDecodeErrorZ_clone(const struct LDKCResult_BlindedHopFeaturesDecodeErrorZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedHopFeaturesDecodeErrorZ_clone")] public static extern long CResult_BlindedHopFeaturesDecodeErrorZ_clone(long _orig);
+ // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_ok(struct LDKChannelTypeFeatures o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_ok")] public static extern long CResult_ChannelTypeFeaturesDecodeErrorZ_ok(long _o);
+ // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_err")] public static extern long CResult_ChannelTypeFeaturesDecodeErrorZ_err(long _e);
+ // bool CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok")] public static extern bool CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(long _o);
+ // void CResult_ChannelTypeFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_free")] public static extern void CResult_ChannelTypeFeaturesDecodeErrorZ_free(long __res);
+ // uint64_t CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr")] public static extern long CResult_ChannelTypeFeaturesDecodeErrorZ_clone_ptr(long _arg);
+ // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_clone(const struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ChannelTypeFeaturesDecodeErrorZ_clone")] public static extern long CResult_ChannelTypeFeaturesDecodeErrorZ_clone(long _orig);
// uint64_t C2Tuple__u832u16Z_clone_ptr(LDKC2Tuple__u832u16Z *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple__u832u16Z_clone_ptr")] public static extern long C2Tuple__u832u16Z_clone_ptr(long _arg);
// struct LDKC2Tuple__u832u16Z C2Tuple__u832u16Z_clone(const struct LDKC2Tuple__u832u16Z *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PaymentContextDecodeErrorZ_clone_ptr")] public static extern long CResult_PaymentContextDecodeErrorZ_clone_ptr(long _arg);
// struct LDKCResult_PaymentContextDecodeErrorZ CResult_PaymentContextDecodeErrorZ_clone(const struct LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_PaymentContextDecodeErrorZ_clone")] public static extern long CResult_PaymentContextDecodeErrorZ_clone(long _orig);
- // struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_ok(struct LDKUnknownPaymentContext o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_ok")] public static extern long CResult_UnknownPaymentContextDecodeErrorZ_ok(long _o);
- // struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_err(struct LDKDecodeError e);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_err")] public static extern long CResult_UnknownPaymentContextDecodeErrorZ_err(long _e);
- // bool CResult_UnknownPaymentContextDecodeErrorZ_is_ok(const struct LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_is_ok")] public static extern bool CResult_UnknownPaymentContextDecodeErrorZ_is_ok(long _o);
- // void CResult_UnknownPaymentContextDecodeErrorZ_free(struct LDKCResult_UnknownPaymentContextDecodeErrorZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_free")] public static extern void CResult_UnknownPaymentContextDecodeErrorZ_free(long __res);
- // uint64_t CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr")] public static extern long CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(long _arg);
- // struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_clone(const struct LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR orig);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_UnknownPaymentContextDecodeErrorZ_clone")] public static extern long CResult_UnknownPaymentContextDecodeErrorZ_clone(long _orig);
// struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_ok(struct LDKBolt12OfferContext o);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt12OfferContextDecodeErrorZ_ok")] public static extern long CResult_Bolt12OfferContextDecodeErrorZ_ok(long _o);
// struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_err(struct LDKDecodeError e);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ResponderDecodeErrorZ_clone_ptr")] public static extern long CResult_ResponderDecodeErrorZ_clone_ptr(long _arg);
// struct LDKCResult_ResponderDecodeErrorZ CResult_ResponderDecodeErrorZ_clone(const struct LDKCResult_ResponderDecodeErrorZ *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_ResponderDecodeErrorZ_clone")] public static extern long CResult_ResponderDecodeErrorZ_clone(long _orig);
- // struct LDKCOption_MessageContextZ COption_MessageContextZ_some(struct LDKMessageContext o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_MessageContextZ_some")] public static extern long COption_MessageContextZ_some(long _o);
- // struct LDKCOption_MessageContextZ COption_MessageContextZ_none(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_MessageContextZ_none")] public static extern long COption_MessageContextZ_none();
- // void COption_MessageContextZ_free(struct LDKCOption_MessageContextZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_MessageContextZ_free")] public static extern void COption_MessageContextZ_free(long __res);
- // uint64_t COption_MessageContextZ_clone_ptr(LDKCOption_MessageContextZ *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_MessageContextZ_clone_ptr")] public static extern long COption_MessageContextZ_clone_ptr(long _arg);
- // struct LDKCOption_MessageContextZ COption_MessageContextZ_clone(const struct LDKCOption_MessageContextZ *NONNULL_PTR orig);
+ // struct LDKCResult_OnionMessagePathNoneZ CResult_OnionMessagePathNoneZ_ok(struct LDKOnionMessagePath o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OnionMessagePathNoneZ_ok")] public static extern long CResult_OnionMessagePathNoneZ_ok(long _o);
+ // struct LDKCResult_OnionMessagePathNoneZ CResult_OnionMessagePathNoneZ_err(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OnionMessagePathNoneZ_err")] public static extern long CResult_OnionMessagePathNoneZ_err();
+ // bool CResult_OnionMessagePathNoneZ_is_ok(const struct LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OnionMessagePathNoneZ_is_ok")] public static extern bool CResult_OnionMessagePathNoneZ_is_ok(long _o);
+ // void CResult_OnionMessagePathNoneZ_free(struct LDKCResult_OnionMessagePathNoneZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OnionMessagePathNoneZ_free")] public static extern void CResult_OnionMessagePathNoneZ_free(long __res);
+ // uint64_t CResult_OnionMessagePathNoneZ_clone_ptr(LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OnionMessagePathNoneZ_clone_ptr")] public static extern long CResult_OnionMessagePathNoneZ_clone_ptr(long _arg);
+ // struct LDKCResult_OnionMessagePathNoneZ CResult_OnionMessagePathNoneZ_clone(const struct LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OnionMessagePathNoneZ_clone")] public static extern long CResult_OnionMessagePathNoneZ_clone(long _orig);
+ // struct LDKCResult_CVec_BlindedMessagePathZNoneZ CResult_CVec_BlindedMessagePathZNoneZ_ok(struct LDKCVec_BlindedMessagePathZ o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_ok")] public static extern long CResult_CVec_BlindedMessagePathZNoneZ_ok(long _o);
+ // struct LDKCResult_CVec_BlindedMessagePathZNoneZ CResult_CVec_BlindedMessagePathZNoneZ_err(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_err")] public static extern long CResult_CVec_BlindedMessagePathZNoneZ_err();
+ // bool CResult_CVec_BlindedMessagePathZNoneZ_is_ok(const struct LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_is_ok")] public static extern bool CResult_CVec_BlindedMessagePathZNoneZ_is_ok(long _o);
+ // void CResult_CVec_BlindedMessagePathZNoneZ_free(struct LDKCResult_CVec_BlindedMessagePathZNoneZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_free")] public static extern void CResult_CVec_BlindedMessagePathZNoneZ_free(long __res);
+ // uint64_t CResult_CVec_BlindedMessagePathZNoneZ_clone_ptr(LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_clone_ptr")] public static extern long CResult_CVec_BlindedMessagePathZNoneZ_clone_ptr(long _arg);
+ // struct LDKCResult_CVec_BlindedMessagePathZNoneZ CResult_CVec_BlindedMessagePathZNoneZ_clone(const struct LDKCResult_CVec_BlindedMessagePathZNoneZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_CVec_BlindedMessagePathZNoneZ_clone")] public static extern long CResult_CVec_BlindedMessagePathZNoneZ_clone(long _orig);
+ // void CVec_MessageForwardNodeZ_free(struct LDKCVec_MessageForwardNodeZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_MessageForwardNodeZ_free")] public static extern void CVec_MessageForwardNodeZ_free(long __res);
+ // struct LDKCOption_MessageContextZ COption_MessageContextZ_some(struct LDKMessageContext o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_MessageContextZ_some")] public static extern long COption_MessageContextZ_some(long _o);
+ // struct LDKCOption_MessageContextZ COption_MessageContextZ_none(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_MessageContextZ_none")] public static extern long COption_MessageContextZ_none();
+ // void COption_MessageContextZ_free(struct LDKCOption_MessageContextZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_MessageContextZ_free")] public static extern void COption_MessageContextZ_free(long __res);
+ // uint64_t COption_MessageContextZ_clone_ptr(LDKCOption_MessageContextZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_MessageContextZ_clone_ptr")] public static extern long COption_MessageContextZ_clone_ptr(long _arg);
+ // struct LDKCOption_MessageContextZ COption_MessageContextZ_clone(const struct LDKCOption_MessageContextZ *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_COption_MessageContextZ_clone")] public static extern long COption_MessageContextZ_clone(long _orig);
// uint64_t C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_clone_ptr(LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_clone_ptr")] public static extern long C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_clone_ptr(long _arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_BlindedHopDecodeErrorZ_clone")] public static extern long CResult_BlindedHopDecodeErrorZ_clone(long _orig);
// void CVec_PhantomRouteHintsZ_free(struct LDKCVec_PhantomRouteHintsZ _res);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CVec_PhantomRouteHintsZ_free")] public static extern void CVec_PhantomRouteHintsZ_free(long __res);
- // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(struct LDKBolt11Invoice o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_ok")] public static extern long CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(long _o);
- // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ CResult_Bolt11InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_err")] public static extern long CResult_Bolt11InvoiceSignOrCreationErrorZ_err(long _e);
- // bool CResult_Bolt11InvoiceSignOrCreationErrorZ_is_ok(const struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_is_ok")] public static extern bool CResult_Bolt11InvoiceSignOrCreationErrorZ_is_ok(long _o);
- // void CResult_Bolt11InvoiceSignOrCreationErrorZ_free(struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ _res);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_free")] public static extern void CResult_Bolt11InvoiceSignOrCreationErrorZ_free(long __res);
- // uint64_t CResult_Bolt11InvoiceSignOrCreationErrorZ_clone_ptr(LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_clone_ptr")] public static extern long CResult_Bolt11InvoiceSignOrCreationErrorZ_clone_ptr(long _arg);
- // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ CResult_Bolt11InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ *NONNULL_PTR orig);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_Bolt11InvoiceSignOrCreationErrorZ_clone")] public static extern long CResult_Bolt11InvoiceSignOrCreationErrorZ_clone(long _orig);
// struct LDKCResult_InvoiceErrorDecodeErrorZ CResult_InvoiceErrorDecodeErrorZ_ok(struct LDKInvoiceError o);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_InvoiceErrorDecodeErrorZ_ok")] public static extern long CResult_InvoiceErrorDecodeErrorZ_ok(long _o);
// struct LDKCResult_InvoiceErrorDecodeErrorZ CResult_InvoiceErrorDecodeErrorZ_err(struct LDKDecodeError e);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OffersContextDecodeErrorZ_clone_ptr")] public static extern long CResult_OffersContextDecodeErrorZ_clone_ptr(long _arg);
// struct LDKCResult_OffersContextDecodeErrorZ CResult_OffersContextDecodeErrorZ_clone(const struct LDKCResult_OffersContextDecodeErrorZ *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_OffersContextDecodeErrorZ_clone")] public static extern long CResult_OffersContextDecodeErrorZ_clone(long _orig);
+ // struct LDKCResult_AsyncPaymentsContextDecodeErrorZ CResult_AsyncPaymentsContextDecodeErrorZ_ok(struct LDKAsyncPaymentsContext o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_ok")] public static extern long CResult_AsyncPaymentsContextDecodeErrorZ_ok(long _o);
+ // struct LDKCResult_AsyncPaymentsContextDecodeErrorZ CResult_AsyncPaymentsContextDecodeErrorZ_err(struct LDKDecodeError e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_err")] public static extern long CResult_AsyncPaymentsContextDecodeErrorZ_err(long _e);
+ // bool CResult_AsyncPaymentsContextDecodeErrorZ_is_ok(const struct LDKCResult_AsyncPaymentsContextDecodeErrorZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_is_ok")] public static extern bool CResult_AsyncPaymentsContextDecodeErrorZ_is_ok(long _o);
+ // void CResult_AsyncPaymentsContextDecodeErrorZ_free(struct LDKCResult_AsyncPaymentsContextDecodeErrorZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_free")] public static extern void CResult_AsyncPaymentsContextDecodeErrorZ_free(long __res);
+ // uint64_t CResult_AsyncPaymentsContextDecodeErrorZ_clone_ptr(LDKCResult_AsyncPaymentsContextDecodeErrorZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_clone_ptr")] public static extern long CResult_AsyncPaymentsContextDecodeErrorZ_clone_ptr(long _arg);
+ // struct LDKCResult_AsyncPaymentsContextDecodeErrorZ CResult_AsyncPaymentsContextDecodeErrorZ_clone(const struct LDKCResult_AsyncPaymentsContextDecodeErrorZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_AsyncPaymentsContextDecodeErrorZ_clone")] public static extern long CResult_AsyncPaymentsContextDecodeErrorZ_clone(long _orig);
+ // struct LDKCResult_DNSResolverContextDecodeErrorZ CResult_DNSResolverContextDecodeErrorZ_ok(struct LDKDNSResolverContext o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DNSResolverContextDecodeErrorZ_ok")] public static extern long CResult_DNSResolverContextDecodeErrorZ_ok(long _o);
+ // struct LDKCResult_DNSResolverContextDecodeErrorZ CResult_DNSResolverContextDecodeErrorZ_err(struct LDKDecodeError e);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DNSResolverContextDecodeErrorZ_err")] public static extern long CResult_DNSResolverContextDecodeErrorZ_err(long _e);
+ // bool CResult_DNSResolverContextDecodeErrorZ_is_ok(const struct LDKCResult_DNSResolverContextDecodeErrorZ *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DNSResolverContextDecodeErrorZ_is_ok")] public static extern bool CResult_DNSResolverContextDecodeErrorZ_is_ok(long _o);
+ // void CResult_DNSResolverContextDecodeErrorZ_free(struct LDKCResult_DNSResolverContextDecodeErrorZ _res);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DNSResolverContextDecodeErrorZ_free")] public static extern void CResult_DNSResolverContextDecodeErrorZ_free(long __res);
+ // uint64_t CResult_DNSResolverContextDecodeErrorZ_clone_ptr(LDKCResult_DNSResolverContextDecodeErrorZ *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DNSResolverContextDecodeErrorZ_clone_ptr")] public static extern long CResult_DNSResolverContextDecodeErrorZ_clone_ptr(long _arg);
+ // struct LDKCResult_DNSResolverContextDecodeErrorZ CResult_DNSResolverContextDecodeErrorZ_clone(const struct LDKCResult_DNSResolverContextDecodeErrorZ *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_CResult_DNSResolverContextDecodeErrorZ_clone")] public static extern long CResult_DNSResolverContextDecodeErrorZ_clone(long _orig);
// void APIError_free(struct LDKAPIError this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_APIError_free")] public static extern void APIError_free(long _this_ptr);
// uint64_t APIError_clone_ptr(LDKAPIError *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_verify")] public static extern bool verify(long _msg, long _sig, long _pk);
// void KVStore_free(struct LDKKVStore this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_KVStore_free")] public static extern void KVStore_free(long _this_ptr);
+ // void MigratableKVStore_free(struct LDKMigratableKVStore this_ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MigratableKVStore_free")] public static extern void MigratableKVStore_free(long _this_ptr);
+ // struct LDKCResult_NoneIOErrorZ migrate_kv_store_data(struct LDKMigratableKVStore *NONNULL_PTR source_store, struct LDKMigratableKVStore *NONNULL_PTR target_store);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_migrate_kv_store_data")] public static extern long migrate_kv_store_data(long _source_store, long _target_store);
// void Persister_free(struct LDKPersister this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Persister_free")] public static extern void Persister_free(long _this_ptr);
// struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ read_channel_monitors(struct LDKKVStore kv_store, struct LDKEntropySource entropy_source, struct LDKSignerProvider signer_provider);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_MonitorUpdatingPersister_cleanup_stale_updates")] public static extern long MonitorUpdatingPersister_cleanup_stale_updates(long _this_arg, bool _lazy);
// struct LDKPersist MonitorUpdatingPersister_as_Persist(const struct LDKMonitorUpdatingPersister *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_MonitorUpdatingPersister_as_Persist")] public static extern long MonitorUpdatingPersister_as_Persist(long _this_arg);
+ // void MonitorName_free(struct LDKMonitorName this_obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MonitorName_free")] public static extern void MonitorName_free(long _this_obj);
+ // MUST_USE_RES struct LDKCResult_MonitorNameIOErrorZ MonitorName_new(struct LDKStr name);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MonitorName_new")] public static extern long MonitorName_new(long _name);
+ // MUST_USE_RES struct LDKStr MonitorName_as_str(const struct LDKMonitorName *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MonitorName_as_str")] public static extern long MonitorName_as_str(long _this_arg);
+ // void UpdateName_free(struct LDKUpdateName this_obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateName_free")] public static extern void UpdateName_free(long _this_obj);
+ // uint64_t UpdateName_get_a(const struct LDKUpdateName *NONNULL_PTR this_ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateName_get_a")] public static extern long UpdateName_get_a(long _this_ptr);
+ // void UpdateName_set_a(struct LDKUpdateName *NONNULL_PTR this_ptr, uint64_t val);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateName_set_a")] public static extern void UpdateName_set_a(long _this_ptr, long _val);
+ // MUST_USE_RES struct LDKCResult_UpdateNameIOErrorZ UpdateName_new(struct LDKStr name);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateName_new")] public static extern long UpdateName_new(long _name);
+ // MUST_USE_RES struct LDKStr UpdateName_as_str(const struct LDKUpdateName *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UpdateName_as_str")] public static extern long UpdateName_as_str(long _this_arg);
// enum LDKShortChannelIdError ShortChannelIdError_clone(const enum LDKShortChannelIdError *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ShortChannelIdError_clone")] public static extern ShortChannelIdError ShortChannelIdError_clone(long _orig);
// enum LDKShortChannelIdError ShortChannelIdError_block_overflow(void);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UserConfig_get_accept_intercept_htlcs")] public static extern bool UserConfig_get_accept_intercept_htlcs(long _this_ptr);
// void UserConfig_set_accept_intercept_htlcs(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UserConfig_set_accept_intercept_htlcs")] public static extern void UserConfig_set_accept_intercept_htlcs(long _this_ptr, bool _val);
- // bool UserConfig_get_accept_mpp_keysend(const struct LDKUserConfig *NONNULL_PTR this_ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UserConfig_get_accept_mpp_keysend")] public static extern bool UserConfig_get_accept_mpp_keysend(long _this_ptr);
- // void UserConfig_set_accept_mpp_keysend(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UserConfig_set_accept_mpp_keysend")] public static extern void UserConfig_set_accept_mpp_keysend(long _this_ptr, bool _val);
// bool UserConfig_get_manually_handle_bolt12_invoices(const struct LDKUserConfig *NONNULL_PTR this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UserConfig_get_manually_handle_bolt12_invoices")] public static extern bool UserConfig_get_manually_handle_bolt12_invoices(long _this_ptr);
// void UserConfig_set_manually_handle_bolt12_invoices(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UserConfig_set_manually_handle_bolt12_invoices")] public static extern void UserConfig_set_manually_handle_bolt12_invoices(long _this_ptr, bool _val);
- // MUST_USE_RES struct LDKUserConfig UserConfig_new(struct LDKChannelHandshakeConfig channel_handshake_config_arg, struct LDKChannelHandshakeLimits channel_handshake_limits_arg, struct LDKChannelConfig channel_config_arg, bool accept_forwards_to_priv_channels_arg, bool accept_inbound_channels_arg, bool manually_accept_inbound_channels_arg, bool accept_intercept_htlcs_arg, bool accept_mpp_keysend_arg, bool manually_handle_bolt12_invoices_arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UserConfig_new")] public static extern long UserConfig_new(long _channel_handshake_config_arg, long _channel_handshake_limits_arg, long _channel_config_arg, bool _accept_forwards_to_priv_channels_arg, bool _accept_inbound_channels_arg, bool _manually_accept_inbound_channels_arg, bool _accept_intercept_htlcs_arg, bool _accept_mpp_keysend_arg, bool _manually_handle_bolt12_invoices_arg);
+ // MUST_USE_RES struct LDKUserConfig UserConfig_new(struct LDKChannelHandshakeConfig channel_handshake_config_arg, struct LDKChannelHandshakeLimits channel_handshake_limits_arg, struct LDKChannelConfig channel_config_arg, bool accept_forwards_to_priv_channels_arg, bool accept_inbound_channels_arg, bool manually_accept_inbound_channels_arg, bool accept_intercept_htlcs_arg, bool manually_handle_bolt12_invoices_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UserConfig_new")] public static extern long UserConfig_new(long _channel_handshake_config_arg, long _channel_handshake_limits_arg, long _channel_config_arg, bool _accept_forwards_to_priv_channels_arg, bool _accept_inbound_channels_arg, bool _manually_accept_inbound_channels_arg, bool _accept_intercept_htlcs_arg, bool _manually_handle_bolt12_invoices_arg);
// uint64_t UserConfig_clone_ptr(LDKUserConfig *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UserConfig_clone_ptr")] public static extern long UserConfig_clone_ptr(long _arg);
// struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_load_outputs_to_watch")] public static extern void ChannelMonitor_load_outputs_to_watch(long _this_arg, long _filter, long _logger);
// MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_get_and_clear_pending_monitor_events")] public static extern long ChannelMonitor_get_and_clear_pending_monitor_events(long _this_arg);
- // MUST_USE_RES struct LDKCResult_NoneReplayEventZ ChannelMonitor_process_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKEventHandler *NONNULL_PTR handler);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_process_pending_events")] public static extern long ChannelMonitor_process_pending_events(long _this_arg, long _handler);
+ // MUST_USE_RES struct LDKCResult_NoneReplayEventZ ChannelMonitor_process_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKEventHandler *NONNULL_PTR handler, const struct LDKLogger *NONNULL_PTR logger);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_process_pending_events")] public static extern long ChannelMonitor_process_pending_events(long _this_arg, long _handler, long _logger);
// MUST_USE_RES struct LDKCommitmentTransaction ChannelMonitor_initial_counterparty_commitment_tx(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_initial_counterparty_commitment_tx")] public static extern long ChannelMonitor_initial_counterparty_commitment_tx(long _this_arg);
// MUST_USE_RES struct LDKCVec_CommitmentTransactionZ ChannelMonitor_counterparty_commitment_txs_from_update(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKChannelMonitorUpdate *NONNULL_PTR update);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_signer_unblocked")] public static extern 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);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_get_spendable_outputs")] public static extern long ChannelMonitor_get_spendable_outputs(long _this_arg, long _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);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_is_fully_resolved")] public static extern bool ChannelMonitor_is_fully_resolved(long _this_arg, long _logger);
+ // MUST_USE_RES struct LDKC2Tuple_boolboolZ ChannelMonitor_check_and_update_full_resolution_status(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_check_and_update_full_resolution_status")] public static extern long ChannelMonitor_check_and_update_full_resolution_status(long _this_arg, long _logger);
// MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelMonitor_get_claimable_balances")] public static extern 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);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InboundHTLCErr_hash")] public static extern long InboundHTLCErr_hash(long _o);
// bool InboundHTLCErr_eq(const struct LDKInboundHTLCErr *NONNULL_PTR a, const struct LDKInboundHTLCErr *NONNULL_PTR b);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InboundHTLCErr_eq")] public static extern bool InboundHTLCErr_eq(long _a, long _b);
- // struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ peel_payment_onion(const struct LDKUpdateAddHTLC *NONNULL_PTR msg, struct LDKNodeSigner node_signer, struct LDKLogger logger, uint32_t cur_height, bool accept_mpp_keysend, bool allow_skimmed_fees);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_peel_payment_onion")] public static extern long peel_payment_onion(long _msg, long _node_signer, long _logger, int _cur_height, bool _accept_mpp_keysend, bool _allow_skimmed_fees);
+ // struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ peel_payment_onion(const struct LDKUpdateAddHTLC *NONNULL_PTR msg, struct LDKNodeSigner node_signer, struct LDKLogger logger, uint32_t cur_height, bool allow_skimmed_fees);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_peel_payment_onion")] public static extern long peel_payment_onion(long _msg, long _node_signer, long _logger, int _cur_height, bool _allow_skimmed_fees);
// void PendingHTLCRouting_free(struct LDKPendingHTLCRouting this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_PendingHTLCRouting_free")] public static extern void PendingHTLCRouting_free(long _this_ptr);
// uint64_t PendingHTLCRouting_clone_ptr(LDKPendingHTLCRouting *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_PendingHTLCRouting_forward")] public static extern 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, 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);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_PendingHTLCRouting_receive")] public static extern long PendingHTLCRouting_receive(long _payment_data, long _payment_metadata, long _payment_context, int _incoming_cltv_expiry, long _phantom_shared_secret, long _custom_tlvs, bool _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);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PendingHTLCRouting_receive_keysend")] public static extern long PendingHTLCRouting_receive_keysend(long _payment_data, long _payment_preimage, long _payment_metadata, int _incoming_cltv_expiry, long _custom_tlvs, bool _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, bool has_recipient_created_payment_secret);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PendingHTLCRouting_receive_keysend")] public static extern long PendingHTLCRouting_receive_keysend(long _payment_data, long _payment_preimage, long _payment_metadata, int _incoming_cltv_expiry, long _custom_tlvs, bool _requires_blinded_error, bool _has_recipient_created_payment_secret);
// void BlindedForward_free(struct LDKBlindedForward this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedForward_free")] public static extern void BlindedForward_free(long _this_obj);
// struct LDKPublicKey BlindedForward_get_inbound_blinding_point(const struct LDKBlindedForward *NONNULL_PTR this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedFailure_hash")] public static extern long BlindedFailure_hash(long _o);
// bool BlindedFailure_eq(const enum LDKBlindedFailure *NONNULL_PTR a, const enum LDKBlindedFailure *NONNULL_PTR b);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedFailure_eq")] public static extern bool BlindedFailure_eq(long _a, long _b);
+ // void Verification_free(struct LDKVerification this_ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Verification_free")] public static extern void Verification_free(long _this_ptr);
+ // struct LDKVerification UnauthenticatedReceiveTlvs_as_Verification(const struct LDKUnauthenticatedReceiveTlvs *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnauthenticatedReceiveTlvs_as_Verification")] public static extern long UnauthenticatedReceiveTlvs_as_Verification(long _this_arg);
// void FailureCode_free(struct LDKFailureCode this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_FailureCode_free")] public static extern void FailureCode_free(long _this_ptr);
// uint64_t FailureCode_clone_ptr(LDKFailureCode *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_PhantomRouteHints_clone_ptr")] public static extern long PhantomRouteHints_clone_ptr(long _arg);
// struct LDKPhantomRouteHints PhantomRouteHints_clone(const struct LDKPhantomRouteHints *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_PhantomRouteHints_clone")] public static extern long PhantomRouteHints_clone(long _orig);
- // MUST_USE_RES struct LDKChannelManager ChannelManager_new(struct LDKFeeEstimator fee_est, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKRouter router, struct LDKLogger logger, struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKSignerProvider signer_provider, struct LDKUserConfig config, struct LDKChainParameters params, uint32_t current_timestamp);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_new")] public static extern 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 LDKChannelManager ChannelManager_new(struct LDKFeeEstimator fee_est, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKRouter router, struct LDKMessageRouter message_router, struct LDKLogger logger, struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKSignerProvider signer_provider, struct LDKUserConfig config, struct LDKChainParameters params, uint32_t current_timestamp);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_new")] public static extern long ChannelManager_new(long _fee_est, long _chain_monitor, long _tx_broadcaster, long _router, long _message_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);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_get_current_default_configuration")] public static extern long ChannelManager_get_current_default_configuration(long _this_arg);
// 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);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_force_close_all_channels_broadcasting_latest_txn")] public static extern void ChannelManager_force_close_all_channels_broadcasting_latest_txn(long _this_arg, long _error_message);
// void ChannelManager_force_close_all_channels_without_broadcasting_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKStr error_message);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_force_close_all_channels_without_broadcasting_txn")] public static extern void ChannelManager_force_close_all_channels_without_broadcasting_txn(long _this_arg, long _error_message);
- // MUST_USE_RES struct LDKCResult_NonePaymentSendFailureZ ChannelManager_send_payment_with_route(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKRoute route, struct LDKThirtyTwoBytes payment_hash, struct LDKRecipientOnionFields recipient_onion, struct LDKThirtyTwoBytes payment_id);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_send_payment_with_route")] public static extern long ChannelManager_send_payment_with_route(long _this_arg, long _route, long _payment_hash, long _recipient_onion, long _payment_id);
// MUST_USE_RES struct LDKCResult_NoneRetryableSendFailureZ ChannelManager_send_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKRecipientOnionFields recipient_onion, struct LDKThirtyTwoBytes payment_id, struct LDKRouteParameters route_params, struct LDKRetry retry_strategy);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_send_payment")] public static extern long ChannelManager_send_payment(long _this_arg, long _payment_hash, long _recipient_onion, long _payment_id, long _route_params, long _retry_strategy);
+ // MUST_USE_RES struct LDKCResult_NoneBolt12PaymentErrorZ ChannelManager_send_payment_for_bolt12_invoice(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKBolt12Invoice *NONNULL_PTR invoice, struct LDKCOption_OffersContextZ context);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_send_payment_for_bolt12_invoice")] public static extern long ChannelManager_send_payment_for_bolt12_invoice(long _this_arg, long _invoice, long _context);
// void ChannelManager_abandon_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_id);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_abandon_payment")] public static extern void ChannelManager_abandon_payment(long _this_arg, long _payment_id);
- // MUST_USE_RES struct LDKCResult_ThirtyTwoBytesPaymentSendFailureZ ChannelManager_send_spontaneous_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKRecipientOnionFields recipient_onion, struct LDKThirtyTwoBytes payment_id);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_send_spontaneous_payment")] public static extern long ChannelManager_send_spontaneous_payment(long _this_arg, long _route, long _payment_preimage, long _recipient_onion, long _payment_id);
- // MUST_USE_RES struct LDKCResult_ThirtyTwoBytesRetryableSendFailureZ ChannelManager_send_spontaneous_payment_with_retry(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKRecipientOnionFields recipient_onion, struct LDKThirtyTwoBytes payment_id, struct LDKRouteParameters route_params, struct LDKRetry retry_strategy);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_send_spontaneous_payment_with_retry")] public static extern long ChannelManager_send_spontaneous_payment_with_retry(long _this_arg, long _payment_preimage, long _recipient_onion, long _payment_id, long _route_params, long _retry_strategy);
- // MUST_USE_RES struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ ChannelManager_send_probe(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPath path);
+ // MUST_USE_RES struct LDKCResult_ThirtyTwoBytesRetryableSendFailureZ ChannelManager_send_spontaneous_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKRecipientOnionFields recipient_onion, struct LDKThirtyTwoBytes payment_id, struct LDKRouteParameters route_params, struct LDKRetry retry_strategy);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_send_spontaneous_payment")] public static extern long ChannelManager_send_spontaneous_payment(long _this_arg, long _payment_preimage, long _recipient_onion, long _payment_id, long _route_params, long _retry_strategy);
+ // MUST_USE_RES struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ ChannelManager_send_probe(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPath path);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_send_probe")] public static extern long ChannelManager_send_probe(long _this_arg, long _path);
// MUST_USE_RES struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ ChannelManager_send_spontaneous_preflight_probes(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, uint64_t amount_msat, uint32_t final_cltv_expiry_delta, struct LDKCOption_u64Z liquidity_limit_multiplier);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_send_spontaneous_preflight_probes")] public static extern long ChannelManager_send_spontaneous_preflight_probes(long _this_arg, long _node_id, long _amount_msat, int _final_cltv_expiry_delta, long _liquidity_limit_multiplier);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_accept_inbound_channel")] public static extern long ChannelManager_accept_inbound_channel(long _this_arg, long _temporary_channel_id, long _counterparty_node_id, long _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);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_accept_inbound_channel_from_trusted_peer_0conf")] public static extern long ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(long _this_arg, long _temporary_channel_id, long _counterparty_node_id, long _user_channel_id);
+ // void ChannelManager_signer_unblocked(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_C2Tuple_PublicKeyChannelIdZZ channel_opt);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_signer_unblocked")] public static extern void ChannelManager_signer_unblocked(long _this_arg, long _channel_opt);
+ // MUST_USE_RES struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ ChannelManager_create_bolt11_invoice(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKBolt11InvoiceParameters params);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_create_bolt11_invoice")] public static extern long ChannelManager_create_bolt11_invoice(long _this_arg, long _params);
+ // void Bolt11InvoiceParameters_free(struct LDKBolt11InvoiceParameters this_obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceParameters_free")] public static extern void Bolt11InvoiceParameters_free(long _this_obj);
+ // struct LDKCOption_u64Z Bolt11InvoiceParameters_get_amount_msats(const struct LDKBolt11InvoiceParameters *NONNULL_PTR this_ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceParameters_get_amount_msats")] public static extern long Bolt11InvoiceParameters_get_amount_msats(long _this_ptr);
+ // void Bolt11InvoiceParameters_set_amount_msats(struct LDKBolt11InvoiceParameters *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceParameters_set_amount_msats")] public static extern void Bolt11InvoiceParameters_set_amount_msats(long _this_ptr, long _val);
+ // struct LDKBolt11InvoiceDescription Bolt11InvoiceParameters_get_description(const struct LDKBolt11InvoiceParameters *NONNULL_PTR this_ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceParameters_get_description")] public static extern long Bolt11InvoiceParameters_get_description(long _this_ptr);
+ // void Bolt11InvoiceParameters_set_description(struct LDKBolt11InvoiceParameters *NONNULL_PTR this_ptr, struct LDKBolt11InvoiceDescription val);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceParameters_set_description")] public static extern void Bolt11InvoiceParameters_set_description(long _this_ptr, long _val);
+ // struct LDKCOption_u32Z Bolt11InvoiceParameters_get_invoice_expiry_delta_secs(const struct LDKBolt11InvoiceParameters *NONNULL_PTR this_ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceParameters_get_invoice_expiry_delta_secs")] public static extern long Bolt11InvoiceParameters_get_invoice_expiry_delta_secs(long _this_ptr);
+ // void Bolt11InvoiceParameters_set_invoice_expiry_delta_secs(struct LDKBolt11InvoiceParameters *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceParameters_set_invoice_expiry_delta_secs")] public static extern void Bolt11InvoiceParameters_set_invoice_expiry_delta_secs(long _this_ptr, long _val);
+ // struct LDKCOption_u16Z Bolt11InvoiceParameters_get_min_final_cltv_expiry_delta(const struct LDKBolt11InvoiceParameters *NONNULL_PTR this_ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceParameters_get_min_final_cltv_expiry_delta")] public static extern long Bolt11InvoiceParameters_get_min_final_cltv_expiry_delta(long _this_ptr);
+ // void Bolt11InvoiceParameters_set_min_final_cltv_expiry_delta(struct LDKBolt11InvoiceParameters *NONNULL_PTR this_ptr, struct LDKCOption_u16Z val);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceParameters_set_min_final_cltv_expiry_delta")] public static extern void Bolt11InvoiceParameters_set_min_final_cltv_expiry_delta(long _this_ptr, long _val);
+ // struct LDKCOption_ThirtyTwoBytesZ Bolt11InvoiceParameters_get_payment_hash(const struct LDKBolt11InvoiceParameters *NONNULL_PTR this_ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceParameters_get_payment_hash")] public static extern long Bolt11InvoiceParameters_get_payment_hash(long _this_ptr);
+ // void Bolt11InvoiceParameters_set_payment_hash(struct LDKBolt11InvoiceParameters *NONNULL_PTR this_ptr, struct LDKCOption_ThirtyTwoBytesZ val);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceParameters_set_payment_hash")] public static extern void Bolt11InvoiceParameters_set_payment_hash(long _this_ptr, long _val);
+ // MUST_USE_RES struct LDKBolt11InvoiceParameters Bolt11InvoiceParameters_new(struct LDKCOption_u64Z amount_msats_arg, struct LDKBolt11InvoiceDescription description_arg, struct LDKCOption_u32Z invoice_expiry_delta_secs_arg, struct LDKCOption_u16Z min_final_cltv_expiry_delta_arg, struct LDKCOption_ThirtyTwoBytesZ payment_hash_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceParameters_new")] public static extern long Bolt11InvoiceParameters_new(long _amount_msats_arg, long _description_arg, long _invoice_expiry_delta_secs_arg, long _min_final_cltv_expiry_delta_arg, long _payment_hash_arg);
+ // MUST_USE_RES struct LDKBolt11InvoiceParameters Bolt11InvoiceParameters_default(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceParameters_default")] public static extern long Bolt11InvoiceParameters_default();
// MUST_USE_RES struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ChannelManager_create_offer_builder(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_u64Z absolute_expiry);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_create_offer_builder")] public static extern long ChannelManager_create_offer_builder(long _this_arg, long _absolute_expiry);
// 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);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_pay_for_offer")] public static extern long ChannelManager_pay_for_offer(long _this_arg, long _offer, long _quantity, long _amount_msats, long _payer_note, long _payment_id, long _retry_strategy, long _max_total_routing_fee_msat);
// MUST_USE_RES struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ ChannelManager_request_refund_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRefund *NONNULL_PTR refund);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_request_refund_payment")] public static extern long ChannelManager_request_refund_payment(long _this_arg, long _refund);
+ // MUST_USE_RES struct LDKCResult_NoneNoneZ ChannelManager_pay_for_offer_from_human_readable_name(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKHumanReadableName name, uint64_t amount_msats, struct LDKThirtyTwoBytes payment_id, struct LDKRetry retry_strategy, struct LDKCOption_u64Z max_total_routing_fee_msat, struct LDKCVec_DestinationZ dns_resolvers);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_pay_for_offer_from_human_readable_name")] public static extern long ChannelManager_pay_for_offer_from_human_readable_name(long _this_arg, long _name, long _amount_msats, long _payment_id, long _retry_strategy, long _max_total_routing_fee_msat, long _dns_resolvers);
// 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);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_create_inbound_payment")] public static extern long ChannelManager_create_inbound_payment(long _this_arg, long _min_value_msat, int _invoice_expiry_delta_secs, long _min_final_cltv_expiry_delta);
// MUST_USE_RES struct LDKCResult_ThirtyTwoBytesNoneZ ChannelManager_create_inbound_payment_for_hash(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, struct LDKCOption_u16Z min_final_cltv_expiry);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_as_OffersMessageHandler")] public static extern long ChannelManager_as_OffersMessageHandler(long _this_arg);
// struct LDKAsyncPaymentsMessageHandler ChannelManager_as_AsyncPaymentsMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_as_AsyncPaymentsMessageHandler")] public static extern long ChannelManager_as_AsyncPaymentsMessageHandler(long _this_arg);
+ // struct LDKDNSResolverMessageHandler ChannelManager_as_DNSResolverMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_as_DNSResolverMessageHandler")] public static extern long ChannelManager_as_DNSResolverMessageHandler(long _this_arg);
// struct LDKNodeIdLookUp ChannelManager_as_NodeIdLookUp(const struct LDKChannelManager *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManager_as_NodeIdLookUp")] public static extern long ChannelManager_as_NodeIdLookUp(long _this_arg);
// struct LDKInitFeatures provided_init_features(const struct LDKUserConfig *NONNULL_PTR config);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManagerReadArgs_get_router")] public static extern long ChannelManagerReadArgs_get_router(long _this_ptr);
// void ChannelManagerReadArgs_set_router(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKRouter val);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManagerReadArgs_set_router")] public static extern void ChannelManagerReadArgs_set_router(long _this_ptr, long _val);
+ // const struct LDKMessageRouter *ChannelManagerReadArgs_get_message_router(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManagerReadArgs_get_message_router")] public static extern long ChannelManagerReadArgs_get_message_router(long _this_ptr);
+ // void ChannelManagerReadArgs_set_message_router(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKMessageRouter val);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManagerReadArgs_set_message_router")] public static extern void ChannelManagerReadArgs_set_message_router(long _this_ptr, long _val);
// const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManagerReadArgs_get_logger")] public static extern long ChannelManagerReadArgs_get_logger(long _this_ptr);
// void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManagerReadArgs_get_default_config")] public static extern long ChannelManagerReadArgs_get_default_config(long _this_ptr);
// void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManagerReadArgs_set_default_config")] public static extern void ChannelManagerReadArgs_set_default_config(long _this_ptr, long _val);
- // MUST_USE_RES struct LDKChannelManagerReadArgs ChannelManagerReadArgs_new(struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKSignerProvider signer_provider, struct LDKFeeEstimator fee_estimator, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKRouter router, struct LDKLogger logger, struct LDKUserConfig default_config, struct LDKCVec_ChannelMonitorZ channel_monitors);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManagerReadArgs_new")] public static extern long ChannelManagerReadArgs_new(long _entropy_source, long _node_signer, long _signer_provider, long _fee_estimator, long _chain_monitor, long _tx_broadcaster, long _router, long _logger, long _default_config, long _channel_monitors);
+ // MUST_USE_RES struct LDKChannelManagerReadArgs ChannelManagerReadArgs_new(struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKSignerProvider signer_provider, struct LDKFeeEstimator fee_estimator, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKRouter router, struct LDKMessageRouter message_router, struct LDKLogger logger, struct LDKUserConfig default_config, struct LDKCVec_ChannelMonitorZ channel_monitors);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelManagerReadArgs_new")] public static extern long ChannelManagerReadArgs_new(long _entropy_source, long _node_signer, long _signer_provider, long _fee_estimator, long _chain_monitor, long _tx_broadcaster, long _router, long _message_router, long _logger, long _default_config, long _channel_monitors);
// struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ C2Tuple_ThirtyTwoBytesChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_C2Tuple_ThirtyTwoBytesChannelManagerZ_read")] public static extern long C2Tuple_ThirtyTwoBytesChannelManagerZ_read(long _ser, long _arg);
// void DelayedPaymentBasepoint_free(struct LDKDelayedPaymentBasepoint this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelDetails_get_feerate_sat_per_1000_weight")] public static extern long ChannelDetails_get_feerate_sat_per_1000_weight(long _this_ptr);
// void ChannelDetails_set_feerate_sat_per_1000_weight(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelDetails_set_feerate_sat_per_1000_weight")] public static extern void ChannelDetails_set_feerate_sat_per_1000_weight(long _this_ptr, long _val);
- // uint64_t ChannelDetails_get_balance_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelDetails_get_balance_msat")] public static extern long ChannelDetails_get_balance_msat(long _this_ptr);
- // void ChannelDetails_set_balance_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelDetails_set_balance_msat")] public static extern void ChannelDetails_set_balance_msat(long _this_ptr, long _val);
// uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelDetails_get_outbound_capacity_msat")] public static extern long ChannelDetails_get_outbound_capacity_msat(long _this_ptr);
// void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelDetails_get_pending_outbound_htlcs")] public static extern long ChannelDetails_get_pending_outbound_htlcs(long _this_ptr);
// void ChannelDetails_set_pending_outbound_htlcs(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCVec_OutboundHTLCDetailsZ val);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelDetails_set_pending_outbound_htlcs")] public static extern void ChannelDetails_set_pending_outbound_htlcs(long _this_ptr, long _val);
- // MUST_USE_RES struct LDKChannelDetails ChannelDetails_new(struct LDKChannelId 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_announced_arg, struct LDKCOption_u64Z inbound_htlc_minimum_msat_arg, struct LDKCOption_u64Z inbound_htlc_maximum_msat_arg, struct LDKChannelConfig config_arg, struct LDKCVec_InboundHTLCDetailsZ pending_inbound_htlcs_arg, struct LDKCVec_OutboundHTLCDetailsZ pending_outbound_htlcs_arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelDetails_new")] public static extern long ChannelDetails_new(long _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, long _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, bool _is_outbound_arg, bool _is_channel_ready_arg, long _channel_shutdown_state_arg, bool _is_usable_arg, bool _is_announced_arg, long _inbound_htlc_minimum_msat_arg, long _inbound_htlc_maximum_msat_arg, long _config_arg, long _pending_inbound_htlcs_arg, long _pending_outbound_htlcs_arg);
+ // MUST_USE_RES struct LDKChannelDetails ChannelDetails_new(struct LDKChannelId 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 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_announced_arg, struct LDKCOption_u64Z inbound_htlc_minimum_msat_arg, struct LDKCOption_u64Z inbound_htlc_maximum_msat_arg, struct LDKChannelConfig config_arg, struct LDKCVec_InboundHTLCDetailsZ pending_inbound_htlcs_arg, struct LDKCVec_OutboundHTLCDetailsZ pending_outbound_htlcs_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelDetails_new")] public static extern long ChannelDetails_new(long _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, long _user_channel_id_arg, long _feerate_sat_per_1000_weight_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, bool _is_outbound_arg, bool _is_channel_ready_arg, long _channel_shutdown_state_arg, bool _is_usable_arg, bool _is_announced_arg, long _inbound_htlc_minimum_msat_arg, long _inbound_htlc_maximum_msat_arg, long _config_arg, long _pending_inbound_htlcs_arg, long _pending_outbound_htlcs_arg);
// uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelDetails_clone_ptr")] public static extern long ChannelDetails_clone_ptr(long _arg);
// struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelShutdownState_read")] public static extern long ChannelShutdownState_read(long _ser);
// void ExpandedKey_free(struct LDKExpandedKey this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ExpandedKey_free")] public static extern void ExpandedKey_free(long _this_obj);
- // MUST_USE_RES struct LDKExpandedKey ExpandedKey_new(const uint8_t (*key_material)[32]);
+ // uint64_t ExpandedKey_hash(const struct LDKExpandedKey *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ExpandedKey_hash")] public static extern long ExpandedKey_hash(long _o);
+ // uint64_t ExpandedKey_clone_ptr(LDKExpandedKey *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ExpandedKey_clone_ptr")] public static extern long ExpandedKey_clone_ptr(long _arg);
+ // struct LDKExpandedKey ExpandedKey_clone(const struct LDKExpandedKey *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ExpandedKey_clone")] public static extern long ExpandedKey_clone(long _orig);
+ // bool ExpandedKey_eq(const struct LDKExpandedKey *NONNULL_PTR a, const struct LDKExpandedKey *NONNULL_PTR b);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ExpandedKey_eq")] public static extern bool ExpandedKey_eq(long _a, long _b);
+ // MUST_USE_RES struct LDKExpandedKey ExpandedKey_new(struct LDKThirtyTwoBytes key_material);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ExpandedKey_new")] public static extern long ExpandedKey_new(long _key_material);
// struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ create(const struct LDKExpandedKey *NONNULL_PTR keys, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, const struct LDKEntropySource *NONNULL_PTR entropy_source, uint64_t current_time, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_create")] public static extern long create(long _keys, long _min_value_msat, int _invoice_expiry_delta_secs, long _entropy_source, long _current_time, long _min_final_cltv_expiry_delta);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_FinalOnionHopData_clone_ptr")] public static extern long FinalOnionHopData_clone_ptr(long _arg);
// struct LDKFinalOnionHopData FinalOnionHopData_clone(const struct LDKFinalOnionHopData *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_FinalOnionHopData_clone")] public static extern long FinalOnionHopData_clone(long _orig);
+ // bool FinalOnionHopData_eq(const struct LDKFinalOnionHopData *NONNULL_PTR a, const struct LDKFinalOnionHopData *NONNULL_PTR b);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FinalOnionHopData_eq")] public static extern bool FinalOnionHopData_eq(long _a, long _b);
// void OnionPacket_free(struct LDKOnionPacket this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_OnionPacket_free")] public static extern void OnionPacket_free(long _this_obj);
// uint8_t OnionPacket_get_version(const struct LDKOnionPacket *NONNULL_PTR this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_IgnoringMessageHandler_as_OffersMessageHandler")] public static extern long IgnoringMessageHandler_as_OffersMessageHandler(long _this_arg);
// struct LDKAsyncPaymentsMessageHandler IgnoringMessageHandler_as_AsyncPaymentsMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_IgnoringMessageHandler_as_AsyncPaymentsMessageHandler")] public static extern long IgnoringMessageHandler_as_AsyncPaymentsMessageHandler(long _this_arg);
+ // struct LDKDNSResolverMessageHandler IgnoringMessageHandler_as_DNSResolverMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_IgnoringMessageHandler_as_DNSResolverMessageHandler")] public static extern long IgnoringMessageHandler_as_DNSResolverMessageHandler(long _this_arg);
// struct LDKCustomOnionMessageHandler IgnoringMessageHandler_as_CustomOnionMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_IgnoringMessageHandler_as_CustomOnionMessageHandler")] public static extern long IgnoringMessageHandler_as_CustomOnionMessageHandler(long _this_arg);
// struct LDKCustomMessageReader IgnoringMessageHandler_as_CustomMessageReader(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_TrustedCommitmentTransaction_build_to_local_justice_tx")] public static extern long TrustedCommitmentTransaction_build_to_local_justice_tx(long _this_arg, long _feerate_per_kw, long _destination_script);
// uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_get_commitment_transaction_number_obscure_factor")] public static extern long get_commitment_transaction_number_obscure_factor(long _broadcaster_payment_basepoint, long _countersignatory_payment_basepoint, bool _outbound_from_broadcaster);
- // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InitFeatures_write")] public static extern long InitFeatures_write(long _obj);
- // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InitFeatures_read")] public static extern long InitFeatures_read(long _ser);
- // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelFeatures_write")] public static extern long ChannelFeatures_write(long _obj);
- // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelFeatures_read")] public static extern long ChannelFeatures_read(long _ser);
- // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_write")] public static extern long NodeFeatures_write(long _obj);
- // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_read")] public static extern long NodeFeatures_read(long _ser);
- // struct LDKCVec_u8Z Bolt11InvoiceFeatures_write(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR obj);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceFeatures_write")] public static extern long Bolt11InvoiceFeatures_write(long _obj);
- // struct LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ Bolt11InvoiceFeatures_read(struct LDKu8slice ser);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceFeatures_read")] public static extern long Bolt11InvoiceFeatures_read(long _ser);
- // struct LDKCVec_u8Z Bolt12InvoiceFeatures_write(const struct LDKBolt12InvoiceFeatures *NONNULL_PTR obj);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12InvoiceFeatures_write")] public static extern long Bolt12InvoiceFeatures_write(long _obj);
- // struct LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ Bolt12InvoiceFeatures_read(struct LDKu8slice ser);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12InvoiceFeatures_read")] public static extern long Bolt12InvoiceFeatures_read(long _ser);
- // struct LDKCVec_u8Z BlindedHopFeatures_write(const struct LDKBlindedHopFeatures *NONNULL_PTR obj);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedHopFeatures_write")] public static extern long BlindedHopFeatures_write(long _obj);
- // struct LDKCResult_BlindedHopFeaturesDecodeErrorZ BlindedHopFeatures_read(struct LDKu8slice ser);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedHopFeatures_read")] public static extern long BlindedHopFeatures_read(long _ser);
- // struct LDKCVec_u8Z ChannelTypeFeatures_write(const struct LDKChannelTypeFeatures *NONNULL_PTR obj);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelTypeFeatures_write")] public static extern long ChannelTypeFeatures_write(long _obj);
- // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ ChannelTypeFeatures_read(struct LDKu8slice ser);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelTypeFeatures_read")] public static extern long ChannelTypeFeatures_read(long _ser);
// void ShutdownScript_free(struct LDKShutdownScript this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ShutdownScript_free")] public static extern void ShutdownScript_free(long _this_obj);
// uint64_t ShutdownScript_clone_ptr(LDKShutdownScript *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_write")] public static extern long ChannelId_write(long _obj);
// struct LDKCResult_ChannelIdDecodeErrorZ ChannelId_read(struct LDKu8slice ser);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_read")] public static extern long ChannelId_read(long _ser);
- // struct LDKStr ChannelId_to_str(const struct LDKChannelId *NONNULL_PTR o);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelId_to_str")] public static extern long ChannelId_to_str(long _o);
// struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_phantom_invoice(struct LDKCOption_u64Z amt_msat, struct LDKCOption_ThirtyTwoBytesZ payment_hash, struct LDKStr description, uint32_t invoice_expiry_delta_secs, struct LDKCVec_PhantomRouteHintsZ phantom_route_hints, struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u16Z min_final_cltv_expiry_delta, uint64_t duration_since_epoch);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_create_phantom_invoice")] public static extern long create_phantom_invoice(long _amt_msat, long _payment_hash, long _description, int _invoice_expiry_delta_secs, long _phantom_route_hints, long _entropy_source, long _node_signer, long _logger, Currency _network, long _min_final_cltv_expiry_delta, long _duration_since_epoch);
// struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_phantom_invoice_with_description_hash(struct LDKCOption_u64Z amt_msat, struct LDKCOption_ThirtyTwoBytesZ payment_hash, uint32_t invoice_expiry_delta_secs, struct LDKSha256 description_hash, struct LDKCVec_PhantomRouteHintsZ phantom_route_hints, struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u16Z min_final_cltv_expiry_delta, uint64_t duration_since_epoch);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_create_phantom_invoice_with_description_hash")] public static extern long create_phantom_invoice_with_description_hash(long _amt_msat, long _payment_hash, int _invoice_expiry_delta_secs, long _description_hash, long _phantom_route_hints, long _entropy_source, long _node_signer, long _logger, Currency _network, long _min_final_cltv_expiry_delta, long _duration_since_epoch);
- // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKNodeSigner node_signer, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description, uint32_t invoice_expiry_delta_secs, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_create_invoice_from_channelmanager")] public static extern long create_invoice_from_channelmanager(long _channelmanager, long _node_signer, long _logger, Currency _network, long _amt_msat, long _description, int _invoice_expiry_delta_secs, long _min_final_cltv_expiry_delta);
- // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKNodeSigner node_signer, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKSha256 description_hash, uint32_t invoice_expiry_delta_secs, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_create_invoice_from_channelmanager_with_description_hash")] public static extern long create_invoice_from_channelmanager_with_description_hash(long _channelmanager, long _node_signer, long _logger, Currency _network, long _amt_msat, long _description_hash, int _invoice_expiry_delta_secs, long _min_final_cltv_expiry_delta);
- // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKNodeSigner node_signer, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKSha256 description_hash, uint64_t duration_since_epoch, uint32_t invoice_expiry_delta_secs, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch")] public static extern long create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(long _channelmanager, long _node_signer, long _logger, Currency _network, long _amt_msat, long _description_hash, long _duration_since_epoch, int _invoice_expiry_delta_secs, long _min_final_cltv_expiry_delta);
- // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKNodeSigner node_signer, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description, uint64_t duration_since_epoch, uint32_t invoice_expiry_delta_secs, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_create_invoice_from_channelmanager_and_duration_since_epoch")] public static extern long create_invoice_from_channelmanager_and_duration_since_epoch(long _channelmanager, long _node_signer, long _logger, Currency _network, long _amt_msat, long _description, long _duration_since_epoch, int _invoice_expiry_delta_secs, long _min_final_cltv_expiry_delta);
- // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKNodeSigner node_signer, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description, uint64_t duration_since_epoch, uint32_t invoice_expiry_delta_secs, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash")] public static extern long create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(long _channelmanager, long _node_signer, long _logger, Currency _network, long _amt_msat, long _description, long _duration_since_epoch, int _invoice_expiry_delta_secs, long _payment_hash, long _min_final_cltv_expiry_delta);
- // struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ payment_parameters_from_zero_amount_invoice(const struct LDKBolt11Invoice *NONNULL_PTR invoice, uint64_t amount_msat);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_payment_parameters_from_zero_amount_invoice")] public static extern long payment_parameters_from_zero_amount_invoice(long _invoice, long _amount_msat);
+ // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKCOption_u64Z amt_msat, struct LDKStr description, uint32_t invoice_expiry_delta_secs, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_create_invoice_from_channelmanager")] public static extern long create_invoice_from_channelmanager(long _channelmanager, long _amt_msat, long _description, int _invoice_expiry_delta_secs, long _min_final_cltv_expiry_delta);
+ // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKCOption_u64Z amt_msat, struct LDKSha256 description_hash, uint32_t invoice_expiry_delta_secs, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_create_invoice_from_channelmanager_with_description_hash")] public static extern long create_invoice_from_channelmanager_with_description_hash(long _channelmanager, long _amt_msat, long _description_hash, int _invoice_expiry_delta_secs, long _min_final_cltv_expiry_delta);
+ // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash_and_payment_hash(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKCOption_u64Z amt_msat, struct LDKSha256 description_hash, uint32_t invoice_expiry_delta_secs, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_create_invoice_from_channelmanager_with_description_hash_and_payment_hash")] public static extern long create_invoice_from_channelmanager_with_description_hash_and_payment_hash(long _channelmanager, long _amt_msat, long _description_hash, int _invoice_expiry_delta_secs, long _payment_hash, long _min_final_cltv_expiry_delta);
+ // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_payment_hash(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKCOption_u64Z amt_msat, struct LDKStr description, uint32_t invoice_expiry_delta_secs, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_create_invoice_from_channelmanager_with_payment_hash")] public static extern long create_invoice_from_channelmanager_with_payment_hash(long _channelmanager, long _amt_msat, long _description, int _invoice_expiry_delta_secs, long _payment_hash, long _min_final_cltv_expiry_delta);
+ // struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ payment_parameters_from_variable_amount_invoice(const struct LDKBolt11Invoice *NONNULL_PTR invoice, uint64_t amount_msat);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_payment_parameters_from_variable_amount_invoice")] public static extern long payment_parameters_from_variable_amount_invoice(long _invoice, long _amount_msat);
// struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ payment_parameters_from_invoice(const struct LDKBolt11Invoice *NONNULL_PTR invoice);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_payment_parameters_from_invoice")] public static extern long payment_parameters_from_invoice(long _invoice);
// void Retry_free(struct LDKRetry this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_RetryableSendFailure_onion_packet_size_exceeded")] public static extern RetryableSendFailure RetryableSendFailure_onion_packet_size_exceeded();
// bool RetryableSendFailure_eq(const enum LDKRetryableSendFailure *NONNULL_PTR a, const enum LDKRetryableSendFailure *NONNULL_PTR b);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_RetryableSendFailure_eq")] public static extern bool RetryableSendFailure_eq(long _a, long _b);
- // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentSendFailure_free")] public static extern void PaymentSendFailure_free(long _this_ptr);
- // uint64_t PaymentSendFailure_clone_ptr(LDKPaymentSendFailure *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentSendFailure_clone_ptr")] public static extern long PaymentSendFailure_clone_ptr(long _arg);
- // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentSendFailure_clone")] public static extern long PaymentSendFailure_clone(long _orig);
- // struct LDKPaymentSendFailure PaymentSendFailure_parameter_error(struct LDKAPIError a);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentSendFailure_parameter_error")] public static extern long PaymentSendFailure_parameter_error(long _a);
- // struct LDKPaymentSendFailure PaymentSendFailure_path_parameter_error(struct LDKCVec_CResult_NoneAPIErrorZZ a);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentSendFailure_path_parameter_error")] public static extern long PaymentSendFailure_path_parameter_error(long _a);
- // struct LDKPaymentSendFailure PaymentSendFailure_all_failed_resend_safe(struct LDKCVec_APIErrorZ a);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentSendFailure_all_failed_resend_safe")] public static extern long PaymentSendFailure_all_failed_resend_safe(long _a);
- // struct LDKPaymentSendFailure PaymentSendFailure_duplicate_payment(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentSendFailure_duplicate_payment")] public static extern long PaymentSendFailure_duplicate_payment();
- // struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ results, struct LDKRouteParameters failed_paths_retry, struct LDKThirtyTwoBytes payment_id);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentSendFailure_partial_failure")] public static extern long PaymentSendFailure_partial_failure(long _results, long _failed_paths_retry, long _payment_id);
- // bool PaymentSendFailure_eq(const struct LDKPaymentSendFailure *NONNULL_PTR a, const struct LDKPaymentSendFailure *NONNULL_PTR b);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentSendFailure_eq")] public static extern bool PaymentSendFailure_eq(long _a, long _b);
// void Bolt12PaymentError_free(struct LDKBolt12PaymentError this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12PaymentError_free")] public static extern void Bolt12PaymentError_free(long _this_ptr);
// uint64_t Bolt12PaymentError_clone_ptr(LDKBolt12PaymentError *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ProbeSendFailure_clone")] public static extern long ProbeSendFailure_clone(long _orig);
// struct LDKProbeSendFailure ProbeSendFailure_route_not_found(void);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ProbeSendFailure_route_not_found")] public static extern long ProbeSendFailure_route_not_found();
- // struct LDKProbeSendFailure ProbeSendFailure_sending_failed(struct LDKPaymentSendFailure a);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ProbeSendFailure_sending_failed")] public static extern long ProbeSendFailure_sending_failed(long _a);
+ // struct LDKProbeSendFailure ProbeSendFailure_parameter_error(struct LDKAPIError a);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ProbeSendFailure_parameter_error")] public static extern long ProbeSendFailure_parameter_error(long _a);
+ // struct LDKProbeSendFailure ProbeSendFailure_duplicate_probe(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ProbeSendFailure_duplicate_probe")] public static extern long ProbeSendFailure_duplicate_probe();
// bool ProbeSendFailure_eq(const struct LDKProbeSendFailure *NONNULL_PTR a, const struct LDKProbeSendFailure *NONNULL_PTR b);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ProbeSendFailure_eq")] public static extern bool ProbeSendFailure_eq(long _a, long _b);
// void RecipientOnionFields_free(struct LDKRecipientOnionFields this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Type_clone")] public static extern long Type_clone(long _orig);
// void Type_free(struct LDKType this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Type_free")] public static extern void Type_free(long _this_ptr);
+ // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InitFeatures_write")] public static extern long InitFeatures_write(long _obj);
+ // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InitFeatures_read")] public static extern long InitFeatures_read(long _ser);
+ // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelFeatures_write")] public static extern long ChannelFeatures_write(long _obj);
+ // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelFeatures_read")] public static extern long ChannelFeatures_read(long _ser);
+ // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_write")] public static extern long NodeFeatures_write(long _obj);
+ // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_read")] public static extern long NodeFeatures_read(long _ser);
+ // struct LDKCVec_u8Z Bolt11InvoiceFeatures_write(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceFeatures_write")] public static extern long Bolt11InvoiceFeatures_write(long _obj);
+ // struct LDKCResult_Bolt11InvoiceFeaturesDecodeErrorZ Bolt11InvoiceFeatures_read(struct LDKu8slice ser);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceFeatures_read")] public static extern long Bolt11InvoiceFeatures_read(long _ser);
+ // struct LDKCVec_u8Z Bolt12InvoiceFeatures_write(const struct LDKBolt12InvoiceFeatures *NONNULL_PTR obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12InvoiceFeatures_write")] public static extern long Bolt12InvoiceFeatures_write(long _obj);
+ // struct LDKCResult_Bolt12InvoiceFeaturesDecodeErrorZ Bolt12InvoiceFeatures_read(struct LDKu8slice ser);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12InvoiceFeatures_read")] public static extern long Bolt12InvoiceFeatures_read(long _ser);
+ // struct LDKCVec_u8Z BlindedHopFeatures_write(const struct LDKBlindedHopFeatures *NONNULL_PTR obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedHopFeatures_write")] public static extern long BlindedHopFeatures_write(long _obj);
+ // struct LDKCResult_BlindedHopFeaturesDecodeErrorZ BlindedHopFeatures_read(struct LDKu8slice ser);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_BlindedHopFeatures_read")] public static extern long BlindedHopFeatures_read(long _ser);
+ // struct LDKCVec_u8Z ChannelTypeFeatures_write(const struct LDKChannelTypeFeatures *NONNULL_PTR obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelTypeFeatures_write")] public static extern long ChannelTypeFeatures_write(long _obj);
+ // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ ChannelTypeFeatures_read(struct LDKu8slice ser);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ChannelTypeFeatures_read")] public static extern long ChannelTypeFeatures_read(long _ser);
// void OfferId_free(struct LDKOfferId this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_OfferId_free")] public static extern void OfferId_free(long _this_obj);
// const uint8_t (*OfferId_get_a(const struct LDKOfferId *NONNULL_PTR this_ptr))[32];
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_paths")] public static extern long Offer_paths(long _this_arg);
// MUST_USE_RES struct LDKQuantity Offer_supported_quantity(const struct LDKOffer *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_supported_quantity")] public static extern long Offer_supported_quantity(long _this_arg);
- // MUST_USE_RES struct LDKPublicKey Offer_signing_pubkey(const struct LDKOffer *NONNULL_PTR this_arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_signing_pubkey")] public static extern long Offer_signing_pubkey(long _this_arg);
+ // MUST_USE_RES struct LDKPublicKey Offer_issuer_signing_pubkey(const struct LDKOffer *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_issuer_signing_pubkey")] public static extern long Offer_issuer_signing_pubkey(long _this_arg);
// MUST_USE_RES struct LDKOfferId Offer_id(const struct LDKOffer *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_id")] public static extern long Offer_id(long _this_arg);
// MUST_USE_RES bool Offer_supports_chain(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes chain);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_is_valid_quantity")] public static extern bool Offer_is_valid_quantity(long _this_arg, long _quantity);
// MUST_USE_RES bool Offer_expects_quantity(const struct LDKOffer *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_expects_quantity")] public static extern bool 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 LDKNonce nonce, struct LDKThirtyTwoBytes payment_id);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_request_invoice_deriving_payer_id")] public static extern long Offer_request_invoice_deriving_payer_id(long _this_arg, long _expanded_key, long _nonce, long _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 LDKNonce nonce, struct LDKThirtyTwoBytes payment_id);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_request_invoice_deriving_metadata")] public static extern long Offer_request_invoice_deriving_metadata(long _this_arg, long _payer_id, long _expanded_key, long _nonce, long _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);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_request_invoice")] public static extern long Offer_request_invoice(long _this_arg, long _metadata, long _payer_id);
+ // MUST_USE_RES struct LDKCResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ Offer_request_invoice(const struct LDKOffer *NONNULL_PTR this_arg, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKNonce nonce, struct LDKThirtyTwoBytes payment_id);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_request_invoice")] public static extern long Offer_request_invoice(long _this_arg, long _expanded_key, long _nonce, long _payment_id);
// uint64_t Offer_hash(const struct LDKOffer *NONNULL_PTR o);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Offer_hash")] public static extern long Offer_hash(long _o);
// struct LDKCResult_OfferDecodeErrorZ Offer_read(struct LDKu8slice ser);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_clone_ptr")] public static extern long Bolt12Invoice_clone_ptr(long _arg);
// struct LDKBolt12Invoice Bolt12Invoice_clone(const struct LDKBolt12Invoice *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_clone")] public static extern long Bolt12Invoice_clone(long _orig);
+ // MUST_USE_RES struct LDKCVec_BlindedPaymentPathZ UnsignedBolt12Invoice_payment_paths(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_payment_paths")] public static extern long UnsignedBolt12Invoice_payment_paths(long _this_arg);
// MUST_USE_RES uint64_t UnsignedBolt12Invoice_created_at(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_created_at")] public static extern long UnsignedBolt12Invoice_created_at(long _this_arg);
// MUST_USE_RES uint64_t UnsignedBolt12Invoice_relative_expiry(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_message_paths")] public static extern long UnsignedBolt12Invoice_message_paths(long _this_arg);
// MUST_USE_RES struct LDKCOption_QuantityZ UnsignedBolt12Invoice_supported_quantity(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_supported_quantity")] public static extern long UnsignedBolt12Invoice_supported_quantity(long _this_arg);
+ // MUST_USE_RES struct LDKPublicKey UnsignedBolt12Invoice_issuer_signing_pubkey(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_issuer_signing_pubkey")] public static extern long UnsignedBolt12Invoice_issuer_signing_pubkey(long _this_arg);
// MUST_USE_RES struct LDKu8slice UnsignedBolt12Invoice_payer_metadata(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_payer_metadata")] public static extern long UnsignedBolt12Invoice_payer_metadata(long _this_arg);
// MUST_USE_RES struct LDKInvoiceRequestFeatures UnsignedBolt12Invoice_invoice_request_features(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_invoice_request_features")] public static extern long UnsignedBolt12Invoice_invoice_request_features(long _this_arg);
// MUST_USE_RES struct LDKCOption_u64Z UnsignedBolt12Invoice_quantity(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_quantity")] public static extern long UnsignedBolt12Invoice_quantity(long _this_arg);
- // MUST_USE_RES struct LDKPublicKey UnsignedBolt12Invoice_payer_id(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_payer_id")] public static extern long UnsignedBolt12Invoice_payer_id(long _this_arg);
+ // MUST_USE_RES struct LDKPublicKey UnsignedBolt12Invoice_payer_signing_pubkey(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_payer_signing_pubkey")] public static extern long UnsignedBolt12Invoice_payer_signing_pubkey(long _this_arg);
// MUST_USE_RES struct LDKPrintableString UnsignedBolt12Invoice_payer_note(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_payer_note")] public static extern long UnsignedBolt12Invoice_payer_note(long _this_arg);
// MUST_USE_RES struct LDKThirtyTwoBytes UnsignedBolt12Invoice_payment_hash(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_payment_hash")] public static extern long UnsignedBolt12Invoice_payment_hash(long _this_arg);
// MUST_USE_RES uint64_t UnsignedBolt12Invoice_amount_msats(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedBolt12Invoice_amount_msats")] public static extern long UnsignedBolt12Invoice_amount_msats(long _this_arg);
+ // MUST_USE_RES struct LDKCVec_BlindedPaymentPathZ Bolt12Invoice_payment_paths(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_payment_paths")] public static extern long Bolt12Invoice_payment_paths(long _this_arg);
// MUST_USE_RES uint64_t Bolt12Invoice_created_at(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_created_at")] public static extern long Bolt12Invoice_created_at(long _this_arg);
// MUST_USE_RES uint64_t Bolt12Invoice_relative_expiry(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_message_paths")] public static extern long Bolt12Invoice_message_paths(long _this_arg);
// MUST_USE_RES struct LDKCOption_QuantityZ Bolt12Invoice_supported_quantity(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_supported_quantity")] public static extern long Bolt12Invoice_supported_quantity(long _this_arg);
+ // MUST_USE_RES struct LDKPublicKey Bolt12Invoice_issuer_signing_pubkey(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_issuer_signing_pubkey")] public static extern long Bolt12Invoice_issuer_signing_pubkey(long _this_arg);
// MUST_USE_RES struct LDKu8slice Bolt12Invoice_payer_metadata(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_payer_metadata")] public static extern long Bolt12Invoice_payer_metadata(long _this_arg);
// MUST_USE_RES struct LDKInvoiceRequestFeatures Bolt12Invoice_invoice_request_features(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_invoice_request_features")] public static extern long Bolt12Invoice_invoice_request_features(long _this_arg);
// MUST_USE_RES struct LDKCOption_u64Z Bolt12Invoice_quantity(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_quantity")] public static extern long Bolt12Invoice_quantity(long _this_arg);
- // MUST_USE_RES struct LDKPublicKey Bolt12Invoice_payer_id(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_payer_id")] public static extern long Bolt12Invoice_payer_id(long _this_arg);
+ // MUST_USE_RES struct LDKPublicKey Bolt12Invoice_payer_signing_pubkey(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_payer_signing_pubkey")] public static extern long Bolt12Invoice_payer_signing_pubkey(long _this_arg);
// MUST_USE_RES struct LDKPrintableString Bolt12Invoice_payer_note(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12Invoice_payer_note")] public static extern long Bolt12Invoice_payer_note(long _this_arg);
// MUST_USE_RES struct LDKThirtyTwoBytes Bolt12Invoice_payment_hash(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceError_write")] public static extern long InvoiceError_write(long _obj);
// struct LDKCResult_InvoiceErrorDecodeErrorZ InvoiceError_read(struct LDKu8slice ser);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceError_read")] public static extern long InvoiceError_read(long _ser);
- // void InvoiceRequestWithExplicitPayerIdBuilder_free(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_free")] public static extern void InvoiceRequestWithExplicitPayerIdBuilder_free(long _this_obj);
- // void InvoiceRequestWithDerivedPayerIdBuilder_free(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_obj);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_free")] public static extern void InvoiceRequestWithDerivedPayerIdBuilder_free(long _this_obj);
- // MUST_USE_RES struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_build(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_build")] public static extern long InvoiceRequestWithExplicitPayerIdBuilder_build(long _this_arg);
- // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_chain(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, enum LDKNetwork network);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_chain")] public static extern 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);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_amount_msats")] public static extern 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);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_quantity")] public static extern long InvoiceRequestWithExplicitPayerIdBuilder_quantity(long _this_arg, long _quantity);
- // MUST_USE_RES void InvoiceRequestWithExplicitPayerIdBuilder_payer_note(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, struct LDKStr payer_note);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithExplicitPayerIdBuilder_payer_note")] public static extern void InvoiceRequestWithExplicitPayerIdBuilder_payer_note(long _this_arg, long _payer_note);
- // MUST_USE_RES struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign")] public static extern long InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(long _this_arg);
- // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_chain(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, enum LDKNetwork network);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_chain")] public static extern 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);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_amount_msats")] public static extern 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);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_quantity")] public static extern long InvoiceRequestWithDerivedPayerIdBuilder_quantity(long _this_arg, long _quantity);
- // MUST_USE_RES void InvoiceRequestWithDerivedPayerIdBuilder_payer_note(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, struct LDKStr payer_note);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithDerivedPayerIdBuilder_payer_note")] public static extern void InvoiceRequestWithDerivedPayerIdBuilder_payer_note(long _this_arg, long _payer_note);
+ // void InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_free(struct LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder this_obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_free")] public static extern void InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_free(long _this_obj);
+ // MUST_USE_RES struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_build_and_sign(struct LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_build_and_sign")] public static extern long InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_build_and_sign(long _this_arg);
+ // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_chain(struct LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder this_arg, enum LDKNetwork network);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_chain")] public static extern long InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_chain(long _this_arg, Network _network);
+ // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_amount_msats(struct LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder this_arg, uint64_t amount_msats);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_amount_msats")] public static extern long InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_amount_msats(long _this_arg, long _amount_msats);
+ // MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_quantity(struct LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder this_arg, uint64_t quantity);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_quantity")] public static extern long InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_quantity(long _this_arg, long _quantity);
+ // MUST_USE_RES void InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_payer_note(struct LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder this_arg, struct LDKStr payer_note);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_payer_note")] public static extern void InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_payer_note(long _this_arg, long _payer_note);
+ // MUST_USE_RES void InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_sourced_from_human_readable_name(struct LDKInvoiceRequestWithDerivedPayerSigningPubkeyBuilder this_arg, struct LDKHumanReadableName hrn);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_sourced_from_human_readable_name")] public static extern void InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_sourced_from_human_readable_name(long _this_arg, long _hrn);
// void UnsignedInvoiceRequest_free(struct LDKUnsignedInvoiceRequest this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_free")] public static extern void UnsignedInvoiceRequest_free(long _this_obj);
// uint64_t UnsignedInvoiceRequest_clone_ptr(LDKUnsignedInvoiceRequest *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_paths")] public static extern long UnsignedInvoiceRequest_paths(long _this_arg);
// MUST_USE_RES struct LDKQuantity UnsignedInvoiceRequest_supported_quantity(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_supported_quantity")] public static extern long UnsignedInvoiceRequest_supported_quantity(long _this_arg);
- // MUST_USE_RES struct LDKPublicKey UnsignedInvoiceRequest_signing_pubkey(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_signing_pubkey")] public static extern long UnsignedInvoiceRequest_signing_pubkey(long _this_arg);
+ // MUST_USE_RES struct LDKPublicKey UnsignedInvoiceRequest_issuer_signing_pubkey(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_issuer_signing_pubkey")] public static extern long UnsignedInvoiceRequest_issuer_signing_pubkey(long _this_arg);
// MUST_USE_RES struct LDKu8slice UnsignedInvoiceRequest_payer_metadata(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_payer_metadata")] public static extern long UnsignedInvoiceRequest_payer_metadata(long _this_arg);
// MUST_USE_RES struct LDKThirtyTwoBytes UnsignedInvoiceRequest_chain(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_chain")] public static extern long UnsignedInvoiceRequest_chain(long _this_arg);
// MUST_USE_RES struct LDKCOption_u64Z UnsignedInvoiceRequest_amount_msats(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_amount_msats")] public static extern long UnsignedInvoiceRequest_amount_msats(long _this_arg);
+ // MUST_USE_RES bool UnsignedInvoiceRequest_has_amount_msats(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_has_amount_msats")] public static extern bool UnsignedInvoiceRequest_has_amount_msats(long _this_arg);
// MUST_USE_RES struct LDKInvoiceRequestFeatures UnsignedInvoiceRequest_invoice_request_features(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_invoice_request_features")] public static extern long UnsignedInvoiceRequest_invoice_request_features(long _this_arg);
// MUST_USE_RES struct LDKCOption_u64Z UnsignedInvoiceRequest_quantity(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_quantity")] public static extern long UnsignedInvoiceRequest_quantity(long _this_arg);
- // MUST_USE_RES struct LDKPublicKey UnsignedInvoiceRequest_payer_id(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_payer_id")] public static extern long UnsignedInvoiceRequest_payer_id(long _this_arg);
+ // MUST_USE_RES struct LDKPublicKey UnsignedInvoiceRequest_payer_signing_pubkey(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_payer_signing_pubkey")] public static extern long UnsignedInvoiceRequest_payer_signing_pubkey(long _this_arg);
// MUST_USE_RES struct LDKPrintableString UnsignedInvoiceRequest_payer_note(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_payer_note")] public static extern long UnsignedInvoiceRequest_payer_note(long _this_arg);
+ // MUST_USE_RES struct LDKHumanReadableName UnsignedInvoiceRequest_offer_from_hrn(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_offer_from_hrn")] public static extern long UnsignedInvoiceRequest_offer_from_hrn(long _this_arg);
// MUST_USE_RES struct LDKCVec_ThirtyTwoBytesZ InvoiceRequest_chains(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_chains")] public static extern long InvoiceRequest_chains(long _this_arg);
// MUST_USE_RES struct LDKCOption_CVec_u8ZZ InvoiceRequest_metadata(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_paths")] public static extern long InvoiceRequest_paths(long _this_arg);
// MUST_USE_RES struct LDKQuantity InvoiceRequest_supported_quantity(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_supported_quantity")] public static extern long InvoiceRequest_supported_quantity(long _this_arg);
- // MUST_USE_RES struct LDKPublicKey InvoiceRequest_signing_pubkey(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_signing_pubkey")] public static extern long InvoiceRequest_signing_pubkey(long _this_arg);
+ // MUST_USE_RES struct LDKPublicKey InvoiceRequest_issuer_signing_pubkey(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_issuer_signing_pubkey")] public static extern long InvoiceRequest_issuer_signing_pubkey(long _this_arg);
// MUST_USE_RES struct LDKu8slice InvoiceRequest_payer_metadata(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_payer_metadata")] public static extern long InvoiceRequest_payer_metadata(long _this_arg);
// MUST_USE_RES struct LDKThirtyTwoBytes InvoiceRequest_chain(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_chain")] public static extern long InvoiceRequest_chain(long _this_arg);
// MUST_USE_RES struct LDKCOption_u64Z InvoiceRequest_amount_msats(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_amount_msats")] public static extern long InvoiceRequest_amount_msats(long _this_arg);
+ // MUST_USE_RES bool InvoiceRequest_has_amount_msats(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_has_amount_msats")] public static extern bool InvoiceRequest_has_amount_msats(long _this_arg);
// MUST_USE_RES struct LDKInvoiceRequestFeatures InvoiceRequest_invoice_request_features(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_invoice_request_features")] public static extern long InvoiceRequest_invoice_request_features(long _this_arg);
// MUST_USE_RES struct LDKCOption_u64Z InvoiceRequest_quantity(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_quantity")] public static extern long InvoiceRequest_quantity(long _this_arg);
- // MUST_USE_RES struct LDKPublicKey InvoiceRequest_payer_id(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_payer_id")] public static extern long InvoiceRequest_payer_id(long _this_arg);
+ // MUST_USE_RES struct LDKPublicKey InvoiceRequest_payer_signing_pubkey(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_payer_signing_pubkey")] public static extern long InvoiceRequest_payer_signing_pubkey(long _this_arg);
// MUST_USE_RES struct LDKPrintableString InvoiceRequest_payer_note(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_payer_note")] public static extern long InvoiceRequest_payer_note(long _this_arg);
+ // MUST_USE_RES struct LDKHumanReadableName InvoiceRequest_offer_from_hrn(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_offer_from_hrn")] public static extern long InvoiceRequest_offer_from_hrn(long _this_arg);
// MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ InvoiceRequest_respond_with(const struct LDKInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_BlindedPaymentPathZ payment_paths, struct LDKThirtyTwoBytes payment_hash);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_respond_with")] public static extern long InvoiceRequest_respond_with(long _this_arg, long _payment_paths, long _payment_hash);
// MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ InvoiceRequest_respond_with_no_std(const struct LDKInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_BlindedPaymentPathZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_paths")] public static extern long VerifiedInvoiceRequest_paths(long _this_arg);
// MUST_USE_RES struct LDKQuantity VerifiedInvoiceRequest_supported_quantity(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_supported_quantity")] public static extern long VerifiedInvoiceRequest_supported_quantity(long _this_arg);
- // MUST_USE_RES struct LDKPublicKey VerifiedInvoiceRequest_signing_pubkey(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_signing_pubkey")] public static extern long VerifiedInvoiceRequest_signing_pubkey(long _this_arg);
+ // MUST_USE_RES struct LDKPublicKey VerifiedInvoiceRequest_issuer_signing_pubkey(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_issuer_signing_pubkey")] public static extern long VerifiedInvoiceRequest_issuer_signing_pubkey(long _this_arg);
// MUST_USE_RES struct LDKu8slice VerifiedInvoiceRequest_payer_metadata(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_payer_metadata")] public static extern long VerifiedInvoiceRequest_payer_metadata(long _this_arg);
// MUST_USE_RES struct LDKThirtyTwoBytes VerifiedInvoiceRequest_chain(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_chain")] public static extern long VerifiedInvoiceRequest_chain(long _this_arg);
// MUST_USE_RES struct LDKCOption_u64Z VerifiedInvoiceRequest_amount_msats(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_amount_msats")] public static extern long VerifiedInvoiceRequest_amount_msats(long _this_arg);
+ // MUST_USE_RES bool VerifiedInvoiceRequest_has_amount_msats(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_has_amount_msats")] public static extern bool VerifiedInvoiceRequest_has_amount_msats(long _this_arg);
// MUST_USE_RES struct LDKInvoiceRequestFeatures VerifiedInvoiceRequest_invoice_request_features(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_invoice_request_features")] public static extern long VerifiedInvoiceRequest_invoice_request_features(long _this_arg);
// MUST_USE_RES struct LDKCOption_u64Z VerifiedInvoiceRequest_quantity(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_quantity")] public static extern long VerifiedInvoiceRequest_quantity(long _this_arg);
- // MUST_USE_RES struct LDKPublicKey VerifiedInvoiceRequest_payer_id(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_payer_id")] public static extern long VerifiedInvoiceRequest_payer_id(long _this_arg);
+ // MUST_USE_RES struct LDKPublicKey VerifiedInvoiceRequest_payer_signing_pubkey(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_payer_signing_pubkey")] public static extern long VerifiedInvoiceRequest_payer_signing_pubkey(long _this_arg);
// MUST_USE_RES struct LDKPrintableString VerifiedInvoiceRequest_payer_note(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_payer_note")] public static extern long VerifiedInvoiceRequest_payer_note(long _this_arg);
+ // MUST_USE_RES struct LDKHumanReadableName VerifiedInvoiceRequest_offer_from_hrn(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_offer_from_hrn")] public static extern long VerifiedInvoiceRequest_offer_from_hrn(long _this_arg);
// MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_with(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_BlindedPaymentPathZ payment_paths, struct LDKThirtyTwoBytes payment_hash);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_VerifiedInvoiceRequest_respond_with")] public static extern long VerifiedInvoiceRequest_respond_with(long _this_arg, long _payment_paths, long _payment_hash);
// MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_with_no_std(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_BlindedPaymentPathZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnsignedInvoiceRequest_write")] public static extern long UnsignedInvoiceRequest_write(long _obj);
// struct LDKCVec_u8Z InvoiceRequest_write(const struct LDKInvoiceRequest *NONNULL_PTR obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_write")] public static extern long InvoiceRequest_write(long _obj);
+ // struct LDKCResult_InvoiceRequestDecodeErrorZ InvoiceRequest_read(struct LDKu8slice ser);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequest_read")] public static extern long InvoiceRequest_read(long _ser);
// void InvoiceRequestFields_free(struct LDKInvoiceRequestFields this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_free")] public static extern void InvoiceRequestFields_free(long _this_obj);
- // struct LDKPublicKey InvoiceRequestFields_get_payer_id(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_get_payer_id")] public static extern long InvoiceRequestFields_get_payer_id(long _this_ptr);
- // void InvoiceRequestFields_set_payer_id(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_set_payer_id")] public static extern void InvoiceRequestFields_set_payer_id(long _this_ptr, long _val);
+ // struct LDKPublicKey InvoiceRequestFields_get_payer_signing_pubkey(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_get_payer_signing_pubkey")] public static extern long InvoiceRequestFields_get_payer_signing_pubkey(long _this_ptr);
+ // void InvoiceRequestFields_set_payer_signing_pubkey(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_set_payer_signing_pubkey")] public static extern void InvoiceRequestFields_set_payer_signing_pubkey(long _this_ptr, long _val);
// struct LDKCOption_u64Z InvoiceRequestFields_get_quantity(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_get_quantity")] public static extern long InvoiceRequestFields_get_quantity(long _this_ptr);
// void InvoiceRequestFields_set_quantity(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_get_payer_note_truncated")] public static extern long InvoiceRequestFields_get_payer_note_truncated(long _this_ptr);
// void InvoiceRequestFields_set_payer_note_truncated(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKUntrustedString val);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_set_payer_note_truncated")] public static extern 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);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_new")] public static extern long InvoiceRequestFields_new(long _payer_id_arg, long _quantity_arg, long _payer_note_truncated_arg);
+ // struct LDKHumanReadableName InvoiceRequestFields_get_human_readable_name(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_get_human_readable_name")] public static extern long InvoiceRequestFields_get_human_readable_name(long _this_ptr);
+ // void InvoiceRequestFields_set_human_readable_name(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKHumanReadableName val);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_set_human_readable_name")] public static extern void InvoiceRequestFields_set_human_readable_name(long _this_ptr, long _val);
+ // MUST_USE_RES struct LDKInvoiceRequestFields InvoiceRequestFields_new(struct LDKPublicKey payer_signing_pubkey_arg, struct LDKCOption_u64Z quantity_arg, struct LDKUntrustedString payer_note_truncated_arg, struct LDKHumanReadableName human_readable_name_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_new")] public static extern long InvoiceRequestFields_new(long _payer_signing_pubkey_arg, long _quantity_arg, long _payer_note_truncated_arg, long _human_readable_name_arg);
// uint64_t InvoiceRequestFields_clone_ptr(LDKInvoiceRequestFields *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InvoiceRequestFields_clone_ptr")] public static extern long InvoiceRequestFields_clone_ptr(long _arg);
// struct LDKInvoiceRequestFields InvoiceRequestFields_clone(const struct LDKInvoiceRequestFields *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_unexpected_features")] public static extern Bolt12SemanticError Bolt12SemanticError_unexpected_features();
// enum LDKBolt12SemanticError Bolt12SemanticError_missing_description(void);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_missing_description")] public static extern Bolt12SemanticError Bolt12SemanticError_missing_description();
- // enum LDKBolt12SemanticError Bolt12SemanticError_missing_signing_pubkey(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_missing_signing_pubkey")] public static extern Bolt12SemanticError Bolt12SemanticError_missing_signing_pubkey();
- // enum LDKBolt12SemanticError Bolt12SemanticError_invalid_signing_pubkey(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_invalid_signing_pubkey")] public static extern Bolt12SemanticError Bolt12SemanticError_invalid_signing_pubkey();
- // enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_signing_pubkey(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_unexpected_signing_pubkey")] public static extern Bolt12SemanticError Bolt12SemanticError_unexpected_signing_pubkey();
+ // enum LDKBolt12SemanticError Bolt12SemanticError_missing_issuer_signing_pubkey(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_missing_issuer_signing_pubkey")] public static extern Bolt12SemanticError Bolt12SemanticError_missing_issuer_signing_pubkey();
+ // enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_issuer_signing_pubkey(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_unexpected_issuer_signing_pubkey")] public static extern Bolt12SemanticError Bolt12SemanticError_unexpected_issuer_signing_pubkey();
// enum LDKBolt12SemanticError Bolt12SemanticError_missing_quantity(void);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_missing_quantity")] public static extern Bolt12SemanticError Bolt12SemanticError_missing_quantity();
// enum LDKBolt12SemanticError Bolt12SemanticError_invalid_quantity(void);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_unexpected_metadata")] public static extern Bolt12SemanticError Bolt12SemanticError_unexpected_metadata();
// enum LDKBolt12SemanticError Bolt12SemanticError_missing_payer_metadata(void);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_missing_payer_metadata")] public static extern Bolt12SemanticError Bolt12SemanticError_missing_payer_metadata();
- // enum LDKBolt12SemanticError Bolt12SemanticError_missing_payer_id(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_missing_payer_id")] public static extern Bolt12SemanticError Bolt12SemanticError_missing_payer_id();
+ // enum LDKBolt12SemanticError Bolt12SemanticError_missing_payer_signing_pubkey(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_missing_payer_signing_pubkey")] public static extern Bolt12SemanticError Bolt12SemanticError_missing_payer_signing_pubkey();
// enum LDKBolt12SemanticError Bolt12SemanticError_duplicate_payment_id(void);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_duplicate_payment_id")] public static extern Bolt12SemanticError Bolt12SemanticError_duplicate_payment_id();
// enum LDKBolt12SemanticError Bolt12SemanticError_missing_paths(void);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_missing_payment_hash")] public static extern Bolt12SemanticError Bolt12SemanticError_missing_payment_hash();
// enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_payment_hash(void);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_unexpected_payment_hash")] public static extern Bolt12SemanticError Bolt12SemanticError_unexpected_payment_hash();
+ // enum LDKBolt12SemanticError Bolt12SemanticError_missing_signing_pubkey(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_missing_signing_pubkey")] public static extern Bolt12SemanticError Bolt12SemanticError_missing_signing_pubkey();
+ // enum LDKBolt12SemanticError Bolt12SemanticError_invalid_signing_pubkey(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_invalid_signing_pubkey")] public static extern Bolt12SemanticError Bolt12SemanticError_invalid_signing_pubkey();
// enum LDKBolt12SemanticError Bolt12SemanticError_missing_signature(void);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_missing_signature")] public static extern Bolt12SemanticError Bolt12SemanticError_missing_signature();
+ // enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_human_readable_name(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12SemanticError_unexpected_human_readable_name")] public static extern Bolt12SemanticError Bolt12SemanticError_unexpected_human_readable_name();
// void RefundMaybeWithDerivedMetadataBuilder_free(struct LDKRefundMaybeWithDerivedMetadataBuilder this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_free")] public static extern void RefundMaybeWithDerivedMetadataBuilder_free(long _this_obj);
// uint64_t RefundMaybeWithDerivedMetadataBuilder_clone_ptr(LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_clone_ptr")] public static extern long RefundMaybeWithDerivedMetadataBuilder_clone_ptr(long _arg);
// struct LDKRefundMaybeWithDerivedMetadataBuilder RefundMaybeWithDerivedMetadataBuilder_clone(const struct LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_clone")] public static extern 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);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_new")] public static extern long RefundMaybeWithDerivedMetadataBuilder_new(long _metadata, long _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 LDKNonce nonce, uint64_t amount_msats, struct LDKThirtyTwoBytes payment_id);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id")] public static extern long RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(long _node_id, long _expanded_key, long _nonce, long _amount_msats, long _payment_id);
+ // MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_new(struct LDKCVec_u8Z metadata, struct LDKPublicKey signing_pubkey, uint64_t amount_msats);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_new")] public static extern long RefundMaybeWithDerivedMetadataBuilder_new(long _metadata, long _signing_pubkey, long _amount_msats);
+ // MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_deriving_signing_pubkey(struct LDKPublicKey node_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKNonce nonce, uint64_t amount_msats, struct LDKThirtyTwoBytes payment_id);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_deriving_signing_pubkey")] public static extern long RefundMaybeWithDerivedMetadataBuilder_deriving_signing_pubkey(long _node_id, long _expanded_key, long _nonce, long _amount_msats, long _payment_id);
// MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_description(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr description);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_RefundMaybeWithDerivedMetadataBuilder_description")] public static extern void RefundMaybeWithDerivedMetadataBuilder_description(long _this_arg, long _description);
// MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, uint64_t absolute_expiry);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Refund_features")] public static extern long Refund_features(long _this_arg);
// MUST_USE_RES struct LDKCOption_u64Z Refund_quantity(const struct LDKRefund *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Refund_quantity")] public static extern long Refund_quantity(long _this_arg);
- // MUST_USE_RES struct LDKPublicKey Refund_payer_id(const struct LDKRefund *NONNULL_PTR this_arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Refund_payer_id")] public static extern long Refund_payer_id(long _this_arg);
+ // MUST_USE_RES struct LDKPublicKey Refund_payer_signing_pubkey(const struct LDKRefund *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Refund_payer_signing_pubkey")] public static extern long Refund_payer_signing_pubkey(long _this_arg);
// MUST_USE_RES struct LDKPrintableString Refund_payer_note(const struct LDKRefund *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Refund_payer_note")] public static extern long Refund_payer_note(long _this_arg);
// uint64_t Refund_hash(const struct LDKRefund *NONNULL_PTR o);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_DefaultRouter_new")] public static extern long DefaultRouter_new(long _network_graph, long _logger, long _entropy_source, long _scorer, long _score_params);
// struct LDKRouter DefaultRouter_as_Router(const struct LDKDefaultRouter *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_DefaultRouter_as_Router")] public static extern long DefaultRouter_as_Router(long _this_arg);
- // struct LDKMessageRouter DefaultRouter_as_MessageRouter(const struct LDKDefaultRouter *NONNULL_PTR this_arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DefaultRouter_as_MessageRouter")] public static extern long DefaultRouter_as_MessageRouter(long _this_arg);
// void Router_free(struct LDKRouter this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Router_free")] public static extern void Router_free(long _this_ptr);
// void ScorerAccountingForInFlightHtlcs_free(struct LDKScorerAccountingForInFlightHtlcs this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ProbabilisticScorer_estimated_channel_liquidity_range")] public static extern long ProbabilisticScorer_estimated_channel_liquidity_range(long _this_arg, long _scid, long _target);
// MUST_USE_RES struct LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg, uint64_t scid, const struct LDKNodeId *NONNULL_PTR target);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities")] public static extern long ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(long _this_arg, long _scid, long _target);
- // MUST_USE_RES struct LDKCOption_f64Z ProbabilisticScorer_historical_estimated_payment_success_probability(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg, uint64_t scid, const struct LDKNodeId *NONNULL_PTR target, uint64_t amount_msat, const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR params);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ProbabilisticScorer_historical_estimated_payment_success_probability")] public static extern long ProbabilisticScorer_historical_estimated_payment_success_probability(long _this_arg, long _scid, long _target, long _amount_msat, long _params);
+ // MUST_USE_RES struct LDKCOption_f64Z ProbabilisticScorer_historical_estimated_payment_success_probability(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg, uint64_t scid, const struct LDKNodeId *NONNULL_PTR target, uint64_t amount_msat, const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR params, bool allow_fallback_estimation);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ProbabilisticScorer_historical_estimated_payment_success_probability")] public static extern long ProbabilisticScorer_historical_estimated_payment_success_probability(long _this_arg, long _scid, long _target, long _amount_msat, long _params, bool _allow_fallback_estimation);
+ // MUST_USE_RES struct LDKCOption_f64Z ProbabilisticScorer_live_estimated_payment_success_probability(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg, uint64_t scid, const struct LDKNodeId *NONNULL_PTR target, uint64_t amount_msat, const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR params);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ProbabilisticScorer_live_estimated_payment_success_probability")] public static extern long ProbabilisticScorer_live_estimated_payment_success_probability(long _this_arg, long _scid, long _target, long _amount_msat, long _params);
// struct LDKScoreLookUp ProbabilisticScorer_as_ScoreLookUp(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ProbabilisticScorer_as_ScoreLookUp")] public static extern long ProbabilisticScorer_as_ScoreLookUp(long _this_arg);
// struct LDKScoreUpdate ProbabilisticScorer_as_ScoreUpdate(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_AsyncPaymentsMessage_release_held_htlc")] public static extern long AsyncPaymentsMessage_release_held_htlc(long _a);
// void HeldHtlcAvailable_free(struct LDKHeldHtlcAvailable this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_HeldHtlcAvailable_free")] public static extern void HeldHtlcAvailable_free(long _this_obj);
- // const uint8_t (*HeldHtlcAvailable_get_payment_release_secret(const struct LDKHeldHtlcAvailable *NONNULL_PTR this_ptr))[32];
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HeldHtlcAvailable_get_payment_release_secret")] public static extern long HeldHtlcAvailable_get_payment_release_secret(long _this_ptr);
- // void HeldHtlcAvailable_set_payment_release_secret(struct LDKHeldHtlcAvailable *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HeldHtlcAvailable_set_payment_release_secret")] public static extern void HeldHtlcAvailable_set_payment_release_secret(long _this_ptr, long _val);
- // MUST_USE_RES struct LDKHeldHtlcAvailable HeldHtlcAvailable_new(struct LDKThirtyTwoBytes payment_release_secret_arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HeldHtlcAvailable_new")] public static extern long HeldHtlcAvailable_new(long _payment_release_secret_arg);
+ // MUST_USE_RES struct LDKHeldHtlcAvailable HeldHtlcAvailable_new(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HeldHtlcAvailable_new")] public static extern long HeldHtlcAvailable_new();
// uint64_t HeldHtlcAvailable_clone_ptr(LDKHeldHtlcAvailable *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_HeldHtlcAvailable_clone_ptr")] public static extern long HeldHtlcAvailable_clone_ptr(long _arg);
// struct LDKHeldHtlcAvailable HeldHtlcAvailable_clone(const struct LDKHeldHtlcAvailable *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_HeldHtlcAvailable_clone")] public static extern long HeldHtlcAvailable_clone(long _orig);
// void ReleaseHeldHtlc_free(struct LDKReleaseHeldHtlc this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReleaseHeldHtlc_free")] public static extern void ReleaseHeldHtlc_free(long _this_obj);
- // const uint8_t (*ReleaseHeldHtlc_get_payment_release_secret(const struct LDKReleaseHeldHtlc *NONNULL_PTR this_ptr))[32];
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReleaseHeldHtlc_get_payment_release_secret")] public static extern long ReleaseHeldHtlc_get_payment_release_secret(long _this_ptr);
- // void ReleaseHeldHtlc_set_payment_release_secret(struct LDKReleaseHeldHtlc *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReleaseHeldHtlc_set_payment_release_secret")] public static extern void ReleaseHeldHtlc_set_payment_release_secret(long _this_ptr, long _val);
- // MUST_USE_RES struct LDKReleaseHeldHtlc ReleaseHeldHtlc_new(struct LDKThirtyTwoBytes payment_release_secret_arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReleaseHeldHtlc_new")] public static extern long ReleaseHeldHtlc_new(long _payment_release_secret_arg);
+ // MUST_USE_RES struct LDKReleaseHeldHtlc ReleaseHeldHtlc_new(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReleaseHeldHtlc_new")] public static extern long ReleaseHeldHtlc_new();
// uint64_t ReleaseHeldHtlc_clone_ptr(LDKReleaseHeldHtlc *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReleaseHeldHtlc_clone_ptr")] public static extern long ReleaseHeldHtlc_clone_ptr(long _arg);
// struct LDKReleaseHeldHtlc ReleaseHeldHtlc_clone(const struct LDKReleaseHeldHtlc *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_AsyncPaymentsMessage_write")] public static extern long AsyncPaymentsMessage_write(long _obj);
// struct LDKCResult_AsyncPaymentsMessageDecodeErrorZ AsyncPaymentsMessage_read(struct LDKu8slice ser, uint64_t arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_AsyncPaymentsMessage_read")] public static extern long AsyncPaymentsMessage_read(long _ser, long _arg);
+ // void DNSResolverMessageHandler_free(struct LDKDNSResolverMessageHandler this_ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverMessageHandler_free")] public static extern void DNSResolverMessageHandler_free(long _this_ptr);
+ // void DNSResolverMessage_free(struct LDKDNSResolverMessage this_ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverMessage_free")] public static extern void DNSResolverMessage_free(long _this_ptr);
+ // uint64_t DNSResolverMessage_clone_ptr(LDKDNSResolverMessage *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverMessage_clone_ptr")] public static extern long DNSResolverMessage_clone_ptr(long _arg);
+ // struct LDKDNSResolverMessage DNSResolverMessage_clone(const struct LDKDNSResolverMessage *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverMessage_clone")] public static extern long DNSResolverMessage_clone(long _orig);
+ // struct LDKDNSResolverMessage DNSResolverMessage_dnssecquery(struct LDKDNSSECQuery a);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverMessage_dnssecquery")] public static extern long DNSResolverMessage_dnssecquery(long _a);
+ // struct LDKDNSResolverMessage DNSResolverMessage_dnssecproof(struct LDKDNSSECProof a);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverMessage_dnssecproof")] public static extern long DNSResolverMessage_dnssecproof(long _a);
+ // uint64_t DNSResolverMessage_hash(const struct LDKDNSResolverMessage *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverMessage_hash")] public static extern long DNSResolverMessage_hash(long _o);
+ // bool DNSResolverMessage_eq(const struct LDKDNSResolverMessage *NONNULL_PTR a, const struct LDKDNSResolverMessage *NONNULL_PTR b);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverMessage_eq")] public static extern bool DNSResolverMessage_eq(long _a, long _b);
+ // void DNSSECQuery_free(struct LDKDNSSECQuery this_obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSSECQuery_free")] public static extern void DNSSECQuery_free(long _this_obj);
+ // uint64_t DNSSECQuery_clone_ptr(LDKDNSSECQuery *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSSECQuery_clone_ptr")] public static extern long DNSSECQuery_clone_ptr(long _arg);
+ // struct LDKDNSSECQuery DNSSECQuery_clone(const struct LDKDNSSECQuery *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSSECQuery_clone")] public static extern long DNSSECQuery_clone(long _orig);
+ // uint64_t DNSSECQuery_hash(const struct LDKDNSSECQuery *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSSECQuery_hash")] public static extern long DNSSECQuery_hash(long _o);
+ // bool DNSSECQuery_eq(const struct LDKDNSSECQuery *NONNULL_PTR a, const struct LDKDNSSECQuery *NONNULL_PTR b);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSSECQuery_eq")] public static extern bool DNSSECQuery_eq(long _a, long _b);
+ // void DNSSECProof_free(struct LDKDNSSECProof this_obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSSECProof_free")] public static extern void DNSSECProof_free(long _this_obj);
+ // struct LDKCVec_u8Z DNSSECProof_get_proof(const struct LDKDNSSECProof *NONNULL_PTR this_ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSSECProof_get_proof")] public static extern long DNSSECProof_get_proof(long _this_ptr);
+ // void DNSSECProof_set_proof(struct LDKDNSSECProof *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSSECProof_set_proof")] public static extern void DNSSECProof_set_proof(long _this_ptr, long _val);
+ // uint64_t DNSSECProof_clone_ptr(LDKDNSSECProof *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSSECProof_clone_ptr")] public static extern long DNSSECProof_clone_ptr(long _arg);
+ // struct LDKDNSSECProof DNSSECProof_clone(const struct LDKDNSSECProof *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSSECProof_clone")] public static extern long DNSSECProof_clone(long _orig);
+ // uint64_t DNSSECProof_hash(const struct LDKDNSSECProof *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSSECProof_hash")] public static extern long DNSSECProof_hash(long _o);
+ // bool DNSSECProof_eq(const struct LDKDNSSECProof *NONNULL_PTR a, const struct LDKDNSSECProof *NONNULL_PTR b);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSSECProof_eq")] public static extern bool DNSSECProof_eq(long _a, long _b);
+ // MUST_USE_RES bool DNSResolverMessage_is_known_type(uint64_t tlv_type);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverMessage_is_known_type")] public static extern bool DNSResolverMessage_is_known_type(long _tlv_type);
+ // struct LDKCVec_u8Z DNSResolverMessage_write(const struct LDKDNSResolverMessage *NONNULL_PTR obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverMessage_write")] public static extern long DNSResolverMessage_write(long _obj);
+ // struct LDKCResult_DNSResolverMessageDecodeErrorZ DNSResolverMessage_read(struct LDKu8slice ser, uint64_t arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverMessage_read")] public static extern long DNSResolverMessage_read(long _ser, long _arg);
+ // struct LDKOnionMessageContents DNSResolverMessage_as_OnionMessageContents(const struct LDKDNSResolverMessage *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverMessage_as_OnionMessageContents")] public static extern long DNSResolverMessage_as_OnionMessageContents(long _this_arg);
+ // void HumanReadableName_free(struct LDKHumanReadableName this_obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HumanReadableName_free")] public static extern void HumanReadableName_free(long _this_obj);
+ // uint64_t HumanReadableName_clone_ptr(LDKHumanReadableName *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HumanReadableName_clone_ptr")] public static extern long HumanReadableName_clone_ptr(long _arg);
+ // struct LDKHumanReadableName HumanReadableName_clone(const struct LDKHumanReadableName *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HumanReadableName_clone")] public static extern long HumanReadableName_clone(long _orig);
+ // uint64_t HumanReadableName_hash(const struct LDKHumanReadableName *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HumanReadableName_hash")] public static extern long HumanReadableName_hash(long _o);
+ // bool HumanReadableName_eq(const struct LDKHumanReadableName *NONNULL_PTR a, const struct LDKHumanReadableName *NONNULL_PTR b);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HumanReadableName_eq")] public static extern bool HumanReadableName_eq(long _a, long _b);
+ // MUST_USE_RES struct LDKCResult_HumanReadableNameNoneZ HumanReadableName_new(struct LDKStr user, struct LDKStr domain);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HumanReadableName_new")] public static extern long HumanReadableName_new(long _user, long _domain);
+ // MUST_USE_RES struct LDKCResult_HumanReadableNameNoneZ HumanReadableName_from_encoded(struct LDKStr encoded);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HumanReadableName_from_encoded")] public static extern long HumanReadableName_from_encoded(long _encoded);
+ // MUST_USE_RES struct LDKStr HumanReadableName_user(const struct LDKHumanReadableName *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HumanReadableName_user")] public static extern long HumanReadableName_user(long _this_arg);
+ // MUST_USE_RES struct LDKStr HumanReadableName_domain(const struct LDKHumanReadableName *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HumanReadableName_domain")] public static extern long HumanReadableName_domain(long _this_arg);
+ // struct LDKCVec_u8Z HumanReadableName_write(const struct LDKHumanReadableName *NONNULL_PTR obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HumanReadableName_write")] public static extern long HumanReadableName_write(long _obj);
+ // struct LDKCResult_HumanReadableNameDecodeErrorZ HumanReadableName_read(struct LDKu8slice ser);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_HumanReadableName_read")] public static extern long HumanReadableName_read(long _ser);
+ // void OMNameResolver_free(struct LDKOMNameResolver this_obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OMNameResolver_free")] public static extern void OMNameResolver_free(long _this_obj);
+ // MUST_USE_RES struct LDKOMNameResolver OMNameResolver_new(uint32_t latest_block_time, uint32_t latest_block_height);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OMNameResolver_new")] public static extern long OMNameResolver_new(int _latest_block_time, int _latest_block_height);
+ // void OMNameResolver_new_best_block(const struct LDKOMNameResolver *NONNULL_PTR this_arg, uint32_t height, uint32_t time);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OMNameResolver_new_best_block")] public static extern void OMNameResolver_new_best_block(long _this_arg, int _height, int _time);
+ // MUST_USE_RES struct LDKCResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ OMNameResolver_resolve_name(const struct LDKOMNameResolver *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_id, struct LDKHumanReadableName name, const struct LDKEntropySource *NONNULL_PTR entropy_source);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OMNameResolver_resolve_name")] public static extern long OMNameResolver_resolve_name(long _this_arg, long _payment_id, long _name, long _entropy_source);
+ // MUST_USE_RES struct LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ OMNameResolver_handle_dnssec_proof_for_offer(const struct LDKOMNameResolver *NONNULL_PTR this_arg, struct LDKDNSSECProof msg, struct LDKDNSResolverContext context);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OMNameResolver_handle_dnssec_proof_for_offer")] public static extern long OMNameResolver_handle_dnssec_proof_for_offer(long _this_arg, long _msg, long _context);
+ // MUST_USE_RES struct LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ OMNameResolver_handle_dnssec_proof_for_uri(const struct LDKOMNameResolver *NONNULL_PTR this_arg, struct LDKDNSSECProof msg, struct LDKDNSResolverContext context);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OMNameResolver_handle_dnssec_proof_for_uri")] public static extern long OMNameResolver_handle_dnssec_proof_for_uri(long _this_arg, long _msg, long _context);
// void OnionMessenger_free(struct LDKOnionMessenger this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_OnionMessenger_free")] public static extern void OnionMessenger_free(long _this_obj);
// void Responder_free(struct LDKResponder this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ResponseInstruction_clone_ptr")] public static extern long ResponseInstruction_clone_ptr(long _arg);
// struct LDKResponseInstruction ResponseInstruction_clone(const struct LDKResponseInstruction *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ResponseInstruction_clone")] public static extern long ResponseInstruction_clone(long _orig);
+ // MUST_USE_RES struct LDKMessageSendInstructions ResponseInstruction_into_instructions(struct LDKResponseInstruction this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ResponseInstruction_into_instructions")] public static extern long ResponseInstruction_into_instructions(long _this_arg);
// void MessageSendInstructions_free(struct LDKMessageSendInstructions this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_MessageSendInstructions_free")] public static extern void MessageSendInstructions_free(long _this_ptr);
// uint64_t MessageSendInstructions_clone_ptr(LDKMessageSendInstructions *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_create_onion_message")] public static extern 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);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_peel_onion_message")] public static extern 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 LDKNodeIdLookUp node_id_lookup, struct LDKMessageRouter message_router, struct LDKOffersMessageHandler offers_handler, struct LDKAsyncPaymentsMessageHandler async_payments_handler, struct LDKCustomOnionMessageHandler custom_handler);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OnionMessenger_new")] public static extern long OnionMessenger_new(long _entropy_source, long _node_signer, long _logger, long _node_id_lookup, long _message_router, long _offers_handler, long _async_payments_handler, long _custom_handler);
- // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new_with_offline_peer_interception(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 LDKAsyncPaymentsMessageHandler async_payments_handler, struct LDKCustomOnionMessageHandler custom_handler);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OnionMessenger_new_with_offline_peer_interception")] public static extern long OnionMessenger_new_with_offline_peer_interception(long _entropy_source, long _node_signer, long _logger, long _node_id_lookup, long _message_router, long _offers_handler, long _async_payments_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 LDKAsyncPaymentsMessageHandler async_payments_handler, struct LDKDNSResolverMessageHandler dns_resolver, struct LDKCustomOnionMessageHandler custom_handler);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OnionMessenger_new")] public static extern long OnionMessenger_new(long _entropy_source, long _node_signer, long _logger, long _node_id_lookup, long _message_router, long _offers_handler, long _async_payments_handler, long _dns_resolver, long _custom_handler);
+ // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new_with_offline_peer_interception(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 LDKAsyncPaymentsMessageHandler async_payments_handler, struct LDKDNSResolverMessageHandler dns_resolver, struct LDKCustomOnionMessageHandler custom_handler);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OnionMessenger_new_with_offline_peer_interception")] public static extern long OnionMessenger_new_with_offline_peer_interception(long _entropy_source, long _node_signer, long _logger, long _node_id_lookup, long _message_router, long _offers_handler, long _async_payments_handler, long _dns_resolver, long _custom_handler);
// MUST_USE_RES struct LDKCResult_SendSuccessSendErrorZ OnionMessenger_send_onion_message(const struct LDKOnionMessenger *NONNULL_PTR this_arg, struct LDKOnionMessageContents contents, struct LDKMessageSendInstructions instructions);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_OnionMessenger_send_onion_message")] public static extern long OnionMessenger_send_onion_message(long _this_arg, long _contents, long _instructions);
// MUST_USE_RES struct LDKCResult_NoneSendErrorZ OnionMessenger_forward_onion_message(const struct LDKOnionMessenger *NONNULL_PTR this_arg, struct LDKOnionMessage message, struct LDKPublicKey peer_node_id);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ParsedOnionMessageContents_clone")] public static extern long ParsedOnionMessageContents_clone(long _orig);
// struct LDKParsedOnionMessageContents ParsedOnionMessageContents_offers(struct LDKOffersMessage a);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ParsedOnionMessageContents_offers")] public static extern long ParsedOnionMessageContents_offers(long _a);
+ // struct LDKParsedOnionMessageContents ParsedOnionMessageContents_dnsresolver(struct LDKDNSResolverMessage a);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ParsedOnionMessageContents_dnsresolver")] public static extern long ParsedOnionMessageContents_dnsresolver(long _a);
// struct LDKParsedOnionMessageContents ParsedOnionMessageContents_custom(struct LDKOnionMessageContents a);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ParsedOnionMessageContents_custom")] public static extern long ParsedOnionMessageContents_custom(long _a);
// struct LDKOnionMessageContents ParsedOnionMessageContents_as_OnionMessageContents(const struct LDKParsedOnionMessageContents *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ForwardTlvs_clone")] public static extern long ForwardTlvs_clone(long _orig);
// void ReceiveTlvs_free(struct LDKReceiveTlvs this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReceiveTlvs_free")] public static extern void ReceiveTlvs_free(long _this_obj);
- // const uint8_t (*ReceiveTlvs_get_payment_secret(const struct LDKReceiveTlvs *NONNULL_PTR this_ptr))[32];
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReceiveTlvs_get_payment_secret")] public static extern long ReceiveTlvs_get_payment_secret(long _this_ptr);
- // void ReceiveTlvs_set_payment_secret(struct LDKReceiveTlvs *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReceiveTlvs_set_payment_secret")] public static extern void ReceiveTlvs_set_payment_secret(long _this_ptr, long _val);
- // struct LDKPaymentConstraints ReceiveTlvs_get_payment_constraints(const struct LDKReceiveTlvs *NONNULL_PTR this_ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReceiveTlvs_get_payment_constraints")] public static extern long ReceiveTlvs_get_payment_constraints(long _this_ptr);
- // void ReceiveTlvs_set_payment_constraints(struct LDKReceiveTlvs *NONNULL_PTR this_ptr, struct LDKPaymentConstraints val);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReceiveTlvs_set_payment_constraints")] public static extern void ReceiveTlvs_set_payment_constraints(long _this_ptr, long _val);
- // struct LDKPaymentContext ReceiveTlvs_get_payment_context(const struct LDKReceiveTlvs *NONNULL_PTR this_ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReceiveTlvs_get_payment_context")] public static extern long ReceiveTlvs_get_payment_context(long _this_ptr);
- // void ReceiveTlvs_set_payment_context(struct LDKReceiveTlvs *NONNULL_PTR this_ptr, struct LDKPaymentContext val);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReceiveTlvs_set_payment_context")] public static extern 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);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReceiveTlvs_new")] public static extern long ReceiveTlvs_new(long _payment_secret_arg, long _payment_constraints_arg, long _payment_context_arg);
// uint64_t ReceiveTlvs_clone_ptr(LDKReceiveTlvs *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReceiveTlvs_clone_ptr")] public static extern long ReceiveTlvs_clone_ptr(long _arg);
// struct LDKReceiveTlvs ReceiveTlvs_clone(const struct LDKReceiveTlvs *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReceiveTlvs_clone")] public static extern long ReceiveTlvs_clone(long _orig);
+ // MUST_USE_RES struct LDKUnauthenticatedReceiveTlvs ReceiveTlvs_tlvs(const struct LDKReceiveTlvs *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReceiveTlvs_tlvs")] public static extern long ReceiveTlvs_tlvs(long _this_arg);
+ // void UnauthenticatedReceiveTlvs_free(struct LDKUnauthenticatedReceiveTlvs this_obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnauthenticatedReceiveTlvs_free")] public static extern void UnauthenticatedReceiveTlvs_free(long _this_obj);
+ // const uint8_t (*UnauthenticatedReceiveTlvs_get_payment_secret(const struct LDKUnauthenticatedReceiveTlvs *NONNULL_PTR this_ptr))[32];
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnauthenticatedReceiveTlvs_get_payment_secret")] public static extern long UnauthenticatedReceiveTlvs_get_payment_secret(long _this_ptr);
+ // void UnauthenticatedReceiveTlvs_set_payment_secret(struct LDKUnauthenticatedReceiveTlvs *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnauthenticatedReceiveTlvs_set_payment_secret")] public static extern void UnauthenticatedReceiveTlvs_set_payment_secret(long _this_ptr, long _val);
+ // struct LDKPaymentConstraints UnauthenticatedReceiveTlvs_get_payment_constraints(const struct LDKUnauthenticatedReceiveTlvs *NONNULL_PTR this_ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnauthenticatedReceiveTlvs_get_payment_constraints")] public static extern long UnauthenticatedReceiveTlvs_get_payment_constraints(long _this_ptr);
+ // void UnauthenticatedReceiveTlvs_set_payment_constraints(struct LDKUnauthenticatedReceiveTlvs *NONNULL_PTR this_ptr, struct LDKPaymentConstraints val);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnauthenticatedReceiveTlvs_set_payment_constraints")] public static extern void UnauthenticatedReceiveTlvs_set_payment_constraints(long _this_ptr, long _val);
+ // struct LDKPaymentContext UnauthenticatedReceiveTlvs_get_payment_context(const struct LDKUnauthenticatedReceiveTlvs *NONNULL_PTR this_ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnauthenticatedReceiveTlvs_get_payment_context")] public static extern long UnauthenticatedReceiveTlvs_get_payment_context(long _this_ptr);
+ // void UnauthenticatedReceiveTlvs_set_payment_context(struct LDKUnauthenticatedReceiveTlvs *NONNULL_PTR this_ptr, struct LDKPaymentContext val);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnauthenticatedReceiveTlvs_set_payment_context")] public static extern void UnauthenticatedReceiveTlvs_set_payment_context(long _this_ptr, long _val);
+ // MUST_USE_RES struct LDKUnauthenticatedReceiveTlvs UnauthenticatedReceiveTlvs_new(struct LDKThirtyTwoBytes payment_secret_arg, struct LDKPaymentConstraints payment_constraints_arg, struct LDKPaymentContext payment_context_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnauthenticatedReceiveTlvs_new")] public static extern long UnauthenticatedReceiveTlvs_new(long _payment_secret_arg, long _payment_constraints_arg, long _payment_context_arg);
+ // uint64_t UnauthenticatedReceiveTlvs_clone_ptr(LDKUnauthenticatedReceiveTlvs *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnauthenticatedReceiveTlvs_clone_ptr")] public static extern long UnauthenticatedReceiveTlvs_clone_ptr(long _arg);
+ // struct LDKUnauthenticatedReceiveTlvs UnauthenticatedReceiveTlvs_clone(const struct LDKUnauthenticatedReceiveTlvs *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnauthenticatedReceiveTlvs_clone")] public static extern long UnauthenticatedReceiveTlvs_clone(long _orig);
+ // MUST_USE_RES struct LDKReceiveTlvs UnauthenticatedReceiveTlvs_authenticate(struct LDKUnauthenticatedReceiveTlvs this_arg, struct LDKNonce nonce, const struct LDKExpandedKey *NONNULL_PTR expanded_key);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnauthenticatedReceiveTlvs_authenticate")] public static extern long UnauthenticatedReceiveTlvs_authenticate(long _this_arg, long _nonce, long _expanded_key);
// void PaymentRelay_free(struct LDKPaymentRelay this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentRelay_free")] public static extern void PaymentRelay_free(long _this_obj);
// uint16_t PaymentRelay_get_cltv_expiry_delta(const struct LDKPaymentRelay *NONNULL_PTR this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentContext_clone_ptr")] public static extern long PaymentContext_clone_ptr(long _arg);
// struct LDKPaymentContext PaymentContext_clone(const struct LDKPaymentContext *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentContext_clone")] public static extern long PaymentContext_clone(long _orig);
- // struct LDKPaymentContext PaymentContext_unknown(struct LDKUnknownPaymentContext a);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentContext_unknown")] public static extern long PaymentContext_unknown(long _a);
// struct LDKPaymentContext PaymentContext_bolt12_offer(struct LDKBolt12OfferContext a);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentContext_bolt12_offer")] public static extern long PaymentContext_bolt12_offer(long _a);
// struct LDKPaymentContext PaymentContext_bolt12_refund(struct LDKBolt12RefundContext a);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentContext_bolt12_refund")] public static extern long PaymentContext_bolt12_refund(long _a);
// bool PaymentContext_eq(const struct LDKPaymentContext *NONNULL_PTR a, const struct LDKPaymentContext *NONNULL_PTR b);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentContext_eq")] public static extern bool PaymentContext_eq(long _a, long _b);
- // void UnknownPaymentContext_free(struct LDKUnknownPaymentContext this_obj);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnknownPaymentContext_free")] public static extern void UnknownPaymentContext_free(long _this_obj);
- // uint64_t UnknownPaymentContext_clone_ptr(LDKUnknownPaymentContext *NONNULL_PTR arg);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnknownPaymentContext_clone_ptr")] public static extern long UnknownPaymentContext_clone_ptr(long _arg);
- // struct LDKUnknownPaymentContext UnknownPaymentContext_clone(const struct LDKUnknownPaymentContext *NONNULL_PTR orig);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnknownPaymentContext_clone")] public static extern long UnknownPaymentContext_clone(long _orig);
- // bool UnknownPaymentContext_eq(const struct LDKUnknownPaymentContext *NONNULL_PTR a, const struct LDKUnknownPaymentContext *NONNULL_PTR b);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnknownPaymentContext_eq")] public static extern bool UnknownPaymentContext_eq(long _a, long _b);
// void Bolt12OfferContext_free(struct LDKBolt12OfferContext this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12OfferContext_free")] public static extern void Bolt12OfferContext_free(long _this_obj);
// struct LDKOfferId Bolt12OfferContext_get_offer_id(const struct LDKBolt12OfferContext *NONNULL_PTR this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ForwardTlvs_write")] public static extern long ForwardTlvs_write(long _obj);
// struct LDKCVec_u8Z ReceiveTlvs_write(const struct LDKReceiveTlvs *NONNULL_PTR obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ReceiveTlvs_write")] public static extern long ReceiveTlvs_write(long _obj);
+ // struct LDKCVec_u8Z UnauthenticatedReceiveTlvs_write(const struct LDKUnauthenticatedReceiveTlvs *NONNULL_PTR obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnauthenticatedReceiveTlvs_write")] public static extern long UnauthenticatedReceiveTlvs_write(long _obj);
// struct LDKCVec_u8Z PaymentRelay_write(const struct LDKPaymentRelay *NONNULL_PTR obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentRelay_write")] public static extern long PaymentRelay_write(long _obj);
// struct LDKCResult_PaymentRelayDecodeErrorZ PaymentRelay_read(struct LDKu8slice ser);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentContext_write")] public static extern long PaymentContext_write(long _obj);
// struct LDKCResult_PaymentContextDecodeErrorZ PaymentContext_read(struct LDKu8slice ser);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentContext_read")] public static extern long PaymentContext_read(long _ser);
- // struct LDKCVec_u8Z UnknownPaymentContext_write(const struct LDKUnknownPaymentContext *NONNULL_PTR obj);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnknownPaymentContext_write")] public static extern long UnknownPaymentContext_write(long _obj);
- // struct LDKCResult_UnknownPaymentContextDecodeErrorZ UnknownPaymentContext_read(struct LDKu8slice ser);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_UnknownPaymentContext_read")] public static extern long UnknownPaymentContext_read(long _ser);
// struct LDKCVec_u8Z Bolt12OfferContext_write(const struct LDKBolt12OfferContext *NONNULL_PTR obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12OfferContext_write")] public static extern long Bolt12OfferContext_write(long _obj);
// struct LDKCResult_Bolt12OfferContextDecodeErrorZ Bolt12OfferContext_read(struct LDKu8slice ser);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_MessageContext_clone")] public static extern long MessageContext_clone(long _orig);
// struct LDKMessageContext MessageContext_offers(struct LDKOffersContext a);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_MessageContext_offers")] public static extern long MessageContext_offers(long _a);
+ // struct LDKMessageContext MessageContext_async_payments(struct LDKAsyncPaymentsContext a);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MessageContext_async_payments")] public static extern long MessageContext_async_payments(long _a);
+ // struct LDKMessageContext MessageContext_dnsresolver(struct LDKDNSResolverContext a);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_MessageContext_dnsresolver")] public static extern long MessageContext_dnsresolver(long _a);
// struct LDKMessageContext MessageContext_custom(struct LDKCVec_u8Z a);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_MessageContext_custom")] public static extern long MessageContext_custom(long _a);
// void OffersContext_free(struct LDKOffersContext this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_OffersContext_invoice_request")] public static extern long OffersContext_invoice_request(long _nonce);
// struct LDKOffersContext OffersContext_outbound_payment(struct LDKThirtyTwoBytes payment_id, struct LDKNonce nonce, struct LDKThirtyTwoBytes hmac);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_OffersContext_outbound_payment")] public static extern long OffersContext_outbound_payment(long _payment_id, long _nonce, long _hmac);
- // struct LDKOffersContext OffersContext_inbound_payment(struct LDKThirtyTwoBytes payment_hash);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OffersContext_inbound_payment")] public static extern long OffersContext_inbound_payment(long _payment_hash);
+ // struct LDKOffersContext OffersContext_inbound_payment(struct LDKThirtyTwoBytes payment_hash, struct LDKNonce nonce, struct LDKThirtyTwoBytes hmac);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_OffersContext_inbound_payment")] public static extern long OffersContext_inbound_payment(long _payment_hash, long _nonce, long _hmac);
// bool OffersContext_eq(const struct LDKOffersContext *NONNULL_PTR a, const struct LDKOffersContext *NONNULL_PTR b);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_OffersContext_eq")] public static extern bool OffersContext_eq(long _a, long _b);
+ // void AsyncPaymentsContext_free(struct LDKAsyncPaymentsContext this_ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AsyncPaymentsContext_free")] public static extern void AsyncPaymentsContext_free(long _this_ptr);
+ // uint64_t AsyncPaymentsContext_clone_ptr(LDKAsyncPaymentsContext *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AsyncPaymentsContext_clone_ptr")] public static extern long AsyncPaymentsContext_clone_ptr(long _arg);
+ // struct LDKAsyncPaymentsContext AsyncPaymentsContext_clone(const struct LDKAsyncPaymentsContext *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AsyncPaymentsContext_clone")] public static extern long AsyncPaymentsContext_clone(long _orig);
+ // struct LDKAsyncPaymentsContext AsyncPaymentsContext_outbound_payment(struct LDKThirtyTwoBytes payment_id, struct LDKNonce nonce, struct LDKThirtyTwoBytes hmac);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AsyncPaymentsContext_outbound_payment")] public static extern long AsyncPaymentsContext_outbound_payment(long _payment_id, long _nonce, long _hmac);
// struct LDKCVec_u8Z MessageContext_write(const struct LDKMessageContext *NONNULL_PTR obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_MessageContext_write")] public static extern long MessageContext_write(long _obj);
// struct LDKCResult_MessageContextDecodeErrorZ MessageContext_read(struct LDKu8slice ser);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_OffersContext_write")] public static extern long OffersContext_write(long _obj);
// struct LDKCResult_OffersContextDecodeErrorZ OffersContext_read(struct LDKu8slice ser);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_OffersContext_read")] public static extern long OffersContext_read(long _ser);
+ // struct LDKCVec_u8Z AsyncPaymentsContext_write(const struct LDKAsyncPaymentsContext *NONNULL_PTR obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AsyncPaymentsContext_write")] public static extern long AsyncPaymentsContext_write(long _obj);
+ // struct LDKCResult_AsyncPaymentsContextDecodeErrorZ AsyncPaymentsContext_read(struct LDKu8slice ser);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_AsyncPaymentsContext_read")] public static extern long AsyncPaymentsContext_read(long _ser);
+ // void DNSResolverContext_free(struct LDKDNSResolverContext this_obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverContext_free")] public static extern void DNSResolverContext_free(long _this_obj);
+ // const uint8_t (*DNSResolverContext_get_nonce(const struct LDKDNSResolverContext *NONNULL_PTR this_ptr))[16];
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverContext_get_nonce")] public static extern long DNSResolverContext_get_nonce(long _this_ptr);
+ // void DNSResolverContext_set_nonce(struct LDKDNSResolverContext *NONNULL_PTR this_ptr, struct LDKSixteenBytes val);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverContext_set_nonce")] public static extern void DNSResolverContext_set_nonce(long _this_ptr, long _val);
+ // MUST_USE_RES struct LDKDNSResolverContext DNSResolverContext_new(struct LDKSixteenBytes nonce_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverContext_new")] public static extern long DNSResolverContext_new(long _nonce_arg);
+ // uint64_t DNSResolverContext_clone_ptr(LDKDNSResolverContext *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverContext_clone_ptr")] public static extern long DNSResolverContext_clone_ptr(long _arg);
+ // struct LDKDNSResolverContext DNSResolverContext_clone(const struct LDKDNSResolverContext *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverContext_clone")] public static extern long DNSResolverContext_clone(long _orig);
+ // uint64_t DNSResolverContext_hash(const struct LDKDNSResolverContext *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverContext_hash")] public static extern long DNSResolverContext_hash(long _o);
+ // bool DNSResolverContext_eq(const struct LDKDNSResolverContext *NONNULL_PTR a, const struct LDKDNSResolverContext *NONNULL_PTR b);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverContext_eq")] public static extern bool DNSResolverContext_eq(long _a, long _b);
+ // struct LDKCVec_u8Z DNSResolverContext_write(const struct LDKDNSResolverContext *NONNULL_PTR obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverContext_write")] public static extern long DNSResolverContext_write(long _obj);
+ // struct LDKCResult_DNSResolverContextDecodeErrorZ DNSResolverContext_read(struct LDKu8slice ser);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_DNSResolverContext_read")] public static extern long DNSResolverContext_read(long _ser);
// void FundingInfo_free(struct LDKFundingInfo this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_FundingInfo_free")] public static extern void FundingInfo_free(long _this_ptr);
// uint64_t FundingInfo_clone_ptr(LDKFundingInfo *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentFailureReason_invoice_request_expired")] public static extern PaymentFailureReason PaymentFailureReason_invoice_request_expired();
// enum LDKPaymentFailureReason PaymentFailureReason_invoice_request_rejected(void);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentFailureReason_invoice_request_rejected")] public static extern PaymentFailureReason PaymentFailureReason_invoice_request_rejected();
+ // enum LDKPaymentFailureReason PaymentFailureReason_blinded_path_creation_failed(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentFailureReason_blinded_path_creation_failed")] public static extern PaymentFailureReason PaymentFailureReason_blinded_path_creation_failed();
// bool PaymentFailureReason_eq(const enum LDKPaymentFailureReason *NONNULL_PTR a, const enum LDKPaymentFailureReason *NONNULL_PTR b);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentFailureReason_eq")] public static extern bool PaymentFailureReason_eq(long _a, long _b);
// struct LDKCVec_u8Z PaymentFailureReason_write(const enum LDKPaymentFailureReason *NONNULL_PTR obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentFailureReason_write")] public static extern long PaymentFailureReason_write(long _obj);
// struct LDKCResult_COption_PaymentFailureReasonZDecodeErrorZ PaymentFailureReason_read(struct LDKu8slice ser);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_PaymentFailureReason_read")] public static extern long PaymentFailureReason_read(long _ser);
+ // void InboundChannelFunds_free(struct LDKInboundChannelFunds this_ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InboundChannelFunds_free")] public static extern void InboundChannelFunds_free(long _this_ptr);
+ // uint64_t InboundChannelFunds_clone_ptr(LDKInboundChannelFunds *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InboundChannelFunds_clone_ptr")] public static extern long InboundChannelFunds_clone_ptr(long _arg);
+ // struct LDKInboundChannelFunds InboundChannelFunds_clone(const struct LDKInboundChannelFunds *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InboundChannelFunds_clone")] public static extern long InboundChannelFunds_clone(long _orig);
+ // struct LDKInboundChannelFunds InboundChannelFunds_push_msat(uint64_t a);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InboundChannelFunds_push_msat")] public static extern long InboundChannelFunds_push_msat(long _a);
+ // struct LDKInboundChannelFunds InboundChannelFunds_dual_funded(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InboundChannelFunds_dual_funded")] public static extern long InboundChannelFunds_dual_funded();
+ // bool InboundChannelFunds_eq(const struct LDKInboundChannelFunds *NONNULL_PTR a, const struct LDKInboundChannelFunds *NONNULL_PTR b);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InboundChannelFunds_eq")] public static extern bool InboundChannelFunds_eq(long _a, long _b);
// void Event_free(struct LDKEvent this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_free")] public static extern void Event_free(long _this_ptr);
// uint64_t Event_clone_ptr(LDKEvent *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_funding_generation_ready")] public static extern long Event_funding_generation_ready(long _temporary_channel_id, long _counterparty_node_id, long _channel_value_satoshis, long _output_script, long _user_channel_id);
// struct LDKEvent Event_funding_tx_broadcast_safe(struct LDKChannelId channel_id, struct LDKU128 user_channel_id, struct LDKOutPoint funding_txo, struct LDKPublicKey counterparty_node_id, struct LDKChannelId former_temporary_channel_id);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_funding_tx_broadcast_safe")] public static extern long Event_funding_tx_broadcast_safe(long _channel_id, long _user_channel_id, long _funding_txo, long _counterparty_node_id, long _former_temporary_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);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_payment_claimable")] public static extern long Event_payment_claimable(long _receiver_node_id, long _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, struct LDKRecipientOnionFields onion_fields);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_payment_claimed")] public static extern long Event_payment_claimed(long _receiver_node_id, long _payment_hash, long _amount_msat, long _purpose, long _htlcs, long _sender_intended_total_msat, long _onion_fields);
+ // 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, struct LDKCOption_ThirtyTwoBytesZ payment_id);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_payment_claimable")] public static extern long Event_payment_claimable(long _receiver_node_id, long _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, long _payment_id);
+ // 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, struct LDKRecipientOnionFields onion_fields, struct LDKCOption_ThirtyTwoBytesZ payment_id);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_payment_claimed")] public static extern long Event_payment_claimed(long _receiver_node_id, long _payment_hash, long _amount_msat, long _purpose, long _htlcs, long _sender_intended_total_msat, long _onion_fields, long _payment_id);
// struct LDKEvent Event_connection_needed(struct LDKPublicKey node_id, struct LDKCVec_SocketAddressZ addresses);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_connection_needed")] public static extern long Event_connection_needed(long _node_id, long _addresses);
// struct LDKEvent Event_invoice_received(struct LDKThirtyTwoBytes payment_id, struct LDKBolt12Invoice invoice, struct LDKCOption_OffersContextZ context, struct LDKResponder responder);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_htlcintercepted")] public static extern long Event_htlcintercepted(long _intercept_id, long _requested_next_hop_scid, long _payment_hash, long _inbound_amount_msat, long _expected_outbound_amount_msat);
// struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs, struct LDKChannelId channel_id);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_spendable_outputs")] public static extern long Event_spendable_outputs(long _outputs, long _channel_id);
- // 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);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_payment_forwarded")] public static extern 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, bool _claim_from_onchain_tx, long _outbound_amount_forwarded_msat);
+ // 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 LDKPublicKey prev_node_id, struct LDKPublicKey next_node_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);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_payment_forwarded")] public static extern long Event_payment_forwarded(long _prev_channel_id, long _next_channel_id, long _prev_user_channel_id, long _next_user_channel_id, long _prev_node_id, long _next_node_id, long _total_fee_earned_msat, long _skimmed_fee_msat, bool _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);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_channel_pending")] public static extern long Event_channel_pending(long _channel_id, long _user_channel_id, long _former_temporary_channel_id, long _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);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_channel_ready")] public static extern long Event_channel_ready(long _channel_id, long _user_channel_id, long _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);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_channel_closed")] public static extern long Event_channel_closed(long _channel_id, long _user_channel_id, long _reason, long _counterparty_node_id, long _channel_capacity_sats, long _channel_funding_txo);
+ // 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, struct LDKCOption_u64Z last_local_balance_msat);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_channel_closed")] public static extern long Event_channel_closed(long _channel_id, long _user_channel_id, long _reason, long _counterparty_node_id, long _channel_capacity_sats, long _channel_funding_txo, long _last_local_balance_msat);
// struct LDKEvent Event_discard_funding(struct LDKChannelId channel_id, struct LDKFundingInfo funding_info);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_discard_funding")] public static extern long Event_discard_funding(long _channel_id, long _funding_info);
- // 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, bool is_announced, struct LDKChannelParameters params);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_open_channel_request")] public static extern long Event_open_channel_request(long _temporary_channel_id, long _counterparty_node_id, long _funding_satoshis, long _push_msat, long _channel_type, bool _is_announced, long _params);
+ // struct LDKEvent Event_open_channel_request(struct LDKChannelId temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t funding_satoshis, struct LDKInboundChannelFunds channel_negotiation_type, struct LDKChannelTypeFeatures channel_type, bool is_announced, struct LDKChannelParameters params);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_open_channel_request")] public static extern long Event_open_channel_request(long _temporary_channel_id, long _counterparty_node_id, long _funding_satoshis, long _channel_negotiation_type, long _channel_type, bool _is_announced, long _params);
// struct LDKEvent Event_htlchandling_failed(struct LDKChannelId prev_channel_id, struct LDKHTLCDestination failed_next_destination);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Event_htlchandling_failed")] public static extern long Event_htlchandling_failed(long _prev_channel_id, long _failed_next_destination);
// struct LDKEvent Event_bump_transaction(struct LDKBumpTransactionEvent a);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InitFeatures_requires_shutdown_anysegwit")] public static extern bool InitFeatures_requires_shutdown_anysegwit(long _this_arg);
// MUST_USE_RES bool NodeFeatures_requires_shutdown_anysegwit(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_requires_shutdown_anysegwit")] public static extern bool NodeFeatures_requires_shutdown_anysegwit(long _this_arg);
+ // void InitFeatures_set_dual_fund_optional(struct LDKInitFeatures *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InitFeatures_set_dual_fund_optional")] public static extern void InitFeatures_set_dual_fund_optional(long _this_arg);
+ // void InitFeatures_set_dual_fund_required(struct LDKInitFeatures *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InitFeatures_set_dual_fund_required")] public static extern void InitFeatures_set_dual_fund_required(long _this_arg);
+ // MUST_USE_RES bool InitFeatures_supports_dual_fund(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InitFeatures_supports_dual_fund")] public static extern bool InitFeatures_supports_dual_fund(long _this_arg);
+ // void NodeFeatures_set_dual_fund_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_set_dual_fund_optional")] public static extern void NodeFeatures_set_dual_fund_optional(long _this_arg);
+ // void NodeFeatures_set_dual_fund_required(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_set_dual_fund_required")] public static extern void NodeFeatures_set_dual_fund_required(long _this_arg);
+ // MUST_USE_RES bool NodeFeatures_supports_dual_fund(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_supports_dual_fund")] public static extern bool NodeFeatures_supports_dual_fund(long _this_arg);
+ // MUST_USE_RES bool InitFeatures_requires_dual_fund(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_InitFeatures_requires_dual_fund")] public static extern bool InitFeatures_requires_dual_fund(long _this_arg);
+ // MUST_USE_RES bool NodeFeatures_requires_dual_fund(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_requires_dual_fund")] public static extern bool NodeFeatures_requires_dual_fund(long _this_arg);
// void InitFeatures_set_taproot_optional(struct LDKInitFeatures *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InitFeatures_set_taproot_optional")] public static extern void InitFeatures_set_taproot_optional(long _this_arg);
// void InitFeatures_set_taproot_required(struct LDKInitFeatures *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceFeatures_set_trampoline_routing_required")] public static extern void Bolt11InvoiceFeatures_set_trampoline_routing_required(long _this_arg);
// MUST_USE_RES bool Bolt11InvoiceFeatures_supports_trampoline_routing(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceFeatures_supports_trampoline_routing")] public static extern bool Bolt11InvoiceFeatures_supports_trampoline_routing(long _this_arg);
+ // void Bolt12InvoiceFeatures_set_trampoline_routing_optional(struct LDKBolt12InvoiceFeatures *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12InvoiceFeatures_set_trampoline_routing_optional")] public static extern void Bolt12InvoiceFeatures_set_trampoline_routing_optional(long _this_arg);
+ // void Bolt12InvoiceFeatures_set_trampoline_routing_required(struct LDKBolt12InvoiceFeatures *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12InvoiceFeatures_set_trampoline_routing_required")] public static extern void Bolt12InvoiceFeatures_set_trampoline_routing_required(long _this_arg);
+ // MUST_USE_RES bool Bolt12InvoiceFeatures_supports_trampoline_routing(const struct LDKBolt12InvoiceFeatures *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12InvoiceFeatures_supports_trampoline_routing")] public static extern bool Bolt12InvoiceFeatures_supports_trampoline_routing(long _this_arg);
// MUST_USE_RES bool InitFeatures_requires_trampoline_routing(const struct LDKInitFeatures *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_InitFeatures_requires_trampoline_routing")] public static extern bool InitFeatures_requires_trampoline_routing(long _this_arg);
// MUST_USE_RES bool NodeFeatures_requires_trampoline_routing(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_requires_trampoline_routing")] public static extern bool NodeFeatures_requires_trampoline_routing(long _this_arg);
// MUST_USE_RES bool Bolt11InvoiceFeatures_requires_trampoline_routing(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceFeatures_requires_trampoline_routing")] public static extern bool Bolt11InvoiceFeatures_requires_trampoline_routing(long _this_arg);
+ // MUST_USE_RES bool Bolt12InvoiceFeatures_requires_trampoline_routing(const struct LDKBolt12InvoiceFeatures *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt12InvoiceFeatures_requires_trampoline_routing")] public static extern bool Bolt12InvoiceFeatures_requires_trampoline_routing(long _this_arg);
+ // void NodeFeatures_set_dns_resolution_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_set_dns_resolution_optional")] public static extern void NodeFeatures_set_dns_resolution_optional(long _this_arg);
+ // void NodeFeatures_set_dns_resolution_required(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_set_dns_resolution_required")] public static extern void NodeFeatures_set_dns_resolution_required(long _this_arg);
+ // MUST_USE_RES bool NodeFeatures_supports_dns_resolution(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_supports_dns_resolution")] public static extern bool NodeFeatures_supports_dns_resolution(long _this_arg);
+ // MUST_USE_RES bool NodeFeatures_requires_dns_resolution(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_NodeFeatures_requires_dns_resolution")] public static extern bool NodeFeatures_requires_dns_resolution(long _this_arg);
// void RoutingFees_free(struct LDKRoutingFees this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_RoutingFees_free")] public static extern void RoutingFees_free(long _this_obj);
// uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_FilesystemStore_get_data_dir")] public static extern long FilesystemStore_get_data_dir(long _this_arg);
// struct LDKKVStore FilesystemStore_as_KVStore(const struct LDKFilesystemStore *NONNULL_PTR this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_FilesystemStore_as_KVStore")] public static extern long FilesystemStore_as_KVStore(long _this_arg);
+ // struct LDKMigratableKVStore FilesystemStore_as_MigratableKVStore(const struct LDKFilesystemStore *NONNULL_PTR this_arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_FilesystemStore_as_MigratableKVStore")] public static extern long FilesystemStore_as_MigratableKVStore(long _this_arg);
// void BackgroundProcessor_free(struct LDKBackgroundProcessor this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_BackgroundProcessor_free")] public static extern void BackgroundProcessor_free(long _this_obj);
// void GossipSync_free(struct LDKGossipSync this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_BackgroundProcessor_join")] public static extern long BackgroundProcessor_join(long _this_arg);
// MUST_USE_RES struct LDKCResult_NoneIOErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_BackgroundProcessor_stop")] public static extern long BackgroundProcessor_stop(long _this_arg);
- // void Bolt11ParseError_free(struct LDKBolt11ParseError this_ptr);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_free")] public static extern void Bolt11ParseError_free(long _this_ptr);
+ // void Bolt11ParseError_free(struct LDKBolt11ParseError this_obj);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_free")] public static extern void Bolt11ParseError_free(long _this_obj);
+ // bool Bolt11ParseError_eq(const struct LDKBolt11ParseError *NONNULL_PTR a, const struct LDKBolt11ParseError *NONNULL_PTR b);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_eq")] public static extern bool Bolt11ParseError_eq(long _a, long _b);
// uint64_t Bolt11ParseError_clone_ptr(LDKBolt11ParseError *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_clone_ptr")] public static extern long Bolt11ParseError_clone_ptr(long _arg);
// struct LDKBolt11ParseError Bolt11ParseError_clone(const struct LDKBolt11ParseError *NONNULL_PTR orig);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_clone")] public static extern long Bolt11ParseError_clone(long _orig);
- // struct LDKBolt11ParseError Bolt11ParseError_bech32_error(struct LDKBech32Error a);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_bech32_error")] public static extern long Bolt11ParseError_bech32_error(long _a);
- // struct LDKBolt11ParseError Bolt11ParseError_parse_amount_error(struct LDKError a);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_parse_amount_error")] public static extern long Bolt11ParseError_parse_amount_error(int _a);
- // struct LDKBolt11ParseError Bolt11ParseError_malformed_signature(enum LDKSecp256k1Error a);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_malformed_signature")] public static extern long Bolt11ParseError_malformed_signature(Secp256k1Error _a);
- // struct LDKBolt11ParseError Bolt11ParseError_bad_prefix(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_bad_prefix")] public static extern long Bolt11ParseError_bad_prefix();
- // struct LDKBolt11ParseError Bolt11ParseError_unknown_currency(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_unknown_currency")] public static extern long Bolt11ParseError_unknown_currency();
- // struct LDKBolt11ParseError Bolt11ParseError_unknown_si_prefix(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_unknown_si_prefix")] public static extern long Bolt11ParseError_unknown_si_prefix();
- // struct LDKBolt11ParseError Bolt11ParseError_malformed_hrp(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_malformed_hrp")] public static extern long Bolt11ParseError_malformed_hrp();
- // struct LDKBolt11ParseError Bolt11ParseError_too_short_data_part(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_too_short_data_part")] public static extern long Bolt11ParseError_too_short_data_part();
- // struct LDKBolt11ParseError Bolt11ParseError_unexpected_end_of_tagged_fields(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_unexpected_end_of_tagged_fields")] public static extern long Bolt11ParseError_unexpected_end_of_tagged_fields();
- // struct LDKBolt11ParseError Bolt11ParseError_description_decode_error(struct LDKError a);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_description_decode_error")] public static extern long Bolt11ParseError_description_decode_error(int _a);
- // struct LDKBolt11ParseError Bolt11ParseError_padding_error(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_padding_error")] public static extern long Bolt11ParseError_padding_error();
- // struct LDKBolt11ParseError Bolt11ParseError_integer_overflow_error(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_integer_overflow_error")] public static extern long Bolt11ParseError_integer_overflow_error();
- // struct LDKBolt11ParseError Bolt11ParseError_invalid_seg_wit_program_length(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_invalid_seg_wit_program_length")] public static extern long Bolt11ParseError_invalid_seg_wit_program_length();
- // struct LDKBolt11ParseError Bolt11ParseError_invalid_pub_key_hash_length(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_invalid_pub_key_hash_length")] public static extern long Bolt11ParseError_invalid_pub_key_hash_length();
- // struct LDKBolt11ParseError Bolt11ParseError_invalid_script_hash_length(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_invalid_script_hash_length")] public static extern long Bolt11ParseError_invalid_script_hash_length();
- // struct LDKBolt11ParseError Bolt11ParseError_invalid_recovery_id(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_invalid_recovery_id")] public static extern long Bolt11ParseError_invalid_recovery_id();
- // struct LDKBolt11ParseError Bolt11ParseError_invalid_slice_length(struct LDKStr a);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_invalid_slice_length")] public static extern long Bolt11ParseError_invalid_slice_length(long _a);
- // struct LDKBolt11ParseError Bolt11ParseError_skip(void);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_skip")] public static extern long Bolt11ParseError_skip();
- // bool Bolt11ParseError_eq(const struct LDKBolt11ParseError *NONNULL_PTR a, const struct LDKBolt11ParseError *NONNULL_PTR b);
- [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11ParseError_eq")] public static extern bool Bolt11ParseError_eq(long _a, long _b);
// void ParseOrSemanticError_free(struct LDKParseOrSemanticError this_ptr);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_ParseOrSemanticError_free")] public static extern void ParseOrSemanticError_free(long _this_ptr);
// uint64_t ParseOrSemanticError_clone_ptr(LDKParseOrSemanticError *NONNULL_PTR arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11Invoice_clone")] public static extern long Bolt11Invoice_clone(long _orig);
// uint64_t Bolt11Invoice_hash(const struct LDKBolt11Invoice *NONNULL_PTR o);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11Invoice_hash")] public static extern long Bolt11Invoice_hash(long _o);
+ // void Bolt11InvoiceDescription_free(struct LDKBolt11InvoiceDescription this_ptr);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceDescription_free")] public static extern void Bolt11InvoiceDescription_free(long _this_ptr);
+ // uint64_t Bolt11InvoiceDescription_clone_ptr(LDKBolt11InvoiceDescription *NONNULL_PTR arg);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceDescription_clone_ptr")] public static extern long Bolt11InvoiceDescription_clone_ptr(long _arg);
+ // struct LDKBolt11InvoiceDescription Bolt11InvoiceDescription_clone(const struct LDKBolt11InvoiceDescription *NONNULL_PTR orig);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceDescription_clone")] public static extern long Bolt11InvoiceDescription_clone(long _orig);
+ // struct LDKBolt11InvoiceDescription Bolt11InvoiceDescription_direct(struct LDKDescription a);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceDescription_direct")] public static extern long Bolt11InvoiceDescription_direct(long _a);
+ // struct LDKBolt11InvoiceDescription Bolt11InvoiceDescription_hash(struct LDKSha256 a);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceDescription_hash")] public static extern long Bolt11InvoiceDescription_hash(long _a);
+ // bool Bolt11InvoiceDescription_eq(const struct LDKBolt11InvoiceDescription *NONNULL_PTR a, const struct LDKBolt11InvoiceDescription *NONNULL_PTR b);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceDescription_eq")] public static extern bool Bolt11InvoiceDescription_eq(long _a, long _b);
+ // struct LDKStr Bolt11InvoiceDescription_to_str(const struct LDKBolt11InvoiceDescription *NONNULL_PTR o);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11InvoiceDescription_to_str")] public static extern long Bolt11InvoiceDescription_to_str(long _o);
// void SignedRawBolt11Invoice_free(struct LDKSignedRawBolt11Invoice this_obj);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_SignedRawBolt11Invoice_free")] public static extern void SignedRawBolt11Invoice_free(long _this_obj);
// bool SignedRawBolt11Invoice_eq(const struct LDKSignedRawBolt11Invoice *NONNULL_PTR a, const struct LDKSignedRawBolt11Invoice *NONNULL_PTR b);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Bolt11Invoice_amount_milli_satoshis")] public static extern long Bolt11Invoice_amount_milli_satoshis(long _this_arg);
// MUST_USE_RES struct LDKCResult_DescriptionCreationErrorZ Description_new(struct LDKStr description);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Description_new")] public static extern long Description_new(long _description);
+ // MUST_USE_RES struct LDKDescription Description_empty(void);
+ [DllImport ("ldkcsharp", EntryPoint="CS_LDK_Description_empty")] public static extern long Description_empty();
// MUST_USE_RES struct LDKUntrustedString Description_into_inner(struct LDKDescription this_arg);
[DllImport ("ldkcsharp", EntryPoint="CS_LDK_Description_into_inner")] public static extern long Description_into_inner(long _this_arg);
// MUST_USE_RES struct LDKUntrustedString Description_as_inner(const struct LDKDescription *NONNULL_PTR this_arg);
Environment.Exit(44);
}
return ((LDKEcdsaChannelSigner)obj).sign_channel_announcement_with_funding_key(a);
- case 35:
- if (!(obj is LDKNodeSigner)) {
- Console.Error.WriteLine("Got function call to object that wasn't a LDKNodeSigner in l_l");
- Console.Error.Flush();
- Environment.Exit(44);
- }
- return ((LDKNodeSigner)obj).sign_bolt12_invoice_request(a);
case 36:
if (!(obj is LDKNodeSigner)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKNodeSigner in l_l");
Environment.Exit(44);
}
return ((LDKSignerProvider)obj).get_destination_script(a);
- case 65:
+ case 66:
if (!(obj is LDKPersister)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKPersister in l_l");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKPersister)obj).persist_manager(a);
- case 66:
+ case 67:
if (!(obj is LDKPersister)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKPersister in l_l");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKPersister)obj).persist_graph(a);
- case 67:
+ case 68:
if (!(obj is LDKPersister)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKPersister in l_l");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKPersister)obj).persist_scorer(a);
- case 79:
+ case 80:
if (!(obj is LDKEventHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKEventHandler in l_l");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKEventHandler)obj).handle_event(a);
- case 115:
+ case 118:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in l_l");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKChannelMessageHandler)obj).provided_init_features(a);
- case 122:
+ case 130:
if (!(obj is LDKNodeIdLookUp)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKNodeIdLookUp in l_l");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKNodeIdLookUp)obj).next_node_id(a);
- case 123:
- if (!(obj is LDKRoutingMessageHandler)) {
- Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_l");
- Console.Error.Flush();
- Environment.Exit(44);
- }
- return ((LDKRoutingMessageHandler)obj).handle_node_announcement(a);
- case 124:
- if (!(obj is LDKRoutingMessageHandler)) {
- Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_l");
- Console.Error.Flush();
- Environment.Exit(44);
- }
- return ((LDKRoutingMessageHandler)obj).handle_channel_announcement(a);
- case 125:
- if (!(obj is LDKRoutingMessageHandler)) {
- Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_l");
- Console.Error.Flush();
- Environment.Exit(44);
- }
- return ((LDKRoutingMessageHandler)obj).handle_channel_update(a);
- case 126:
+ case 134:
if (!(obj is LDKRoutingMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_l");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKRoutingMessageHandler)obj).get_next_channel_announcement(a);
- case 127:
+ case 135:
if (!(obj is LDKRoutingMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_l");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKRoutingMessageHandler)obj).get_next_node_announcement(a);
- case 135:
+ case 143:
if (!(obj is LDKRoutingMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_l");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKRoutingMessageHandler)obj).provided_init_features(a);
- case 137:
+ case 145:
if (!(obj is LDKOnionMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKOnionMessageHandler in l_l");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKOnionMessageHandler)obj).next_onion_message_for_peer(a);
- case 142:
+ case 150:
if (!(obj is LDKOnionMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKOnionMessageHandler in l_l");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKOnionMessageHandler)obj).provided_init_features(a);
- case 149:
+ case 157:
if (!(obj is LDKCustomMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKCustomMessageHandler in l_l");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKCustomMessageHandler)obj).provided_init_features(a);
- case 157:
+ case 165:
if (!(obj is LDKSignBolt12InvoiceFn)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKSignBolt12InvoiceFn in l_l");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKSignBolt12InvoiceFn)obj).sign_invoice(a);
- case 158:
+ case 166:
if (!(obj is LDKSignInvoiceRequestFn)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKSignInvoiceRequestFn in l_l");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKSignInvoiceRequestFn)obj).sign_invoice_request(a);
- case 161:
+ case 169:
if (!(obj is LDKCoinSelectionSource)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKCoinSelectionSource in l_l");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKCoinSelectionSource)obj).sign_psbt(a);
- case 164:
+ case 172:
if (!(obj is LDKWalletSource)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKWalletSource in l_l");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKEcdsaChannelSigner)obj).sign_holder_anchor_input(a, b);
- case 25:
+ case 26:
if (!(obj is LDKUtxoLookup)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKUtxoLookup in l_ll");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKUtxoLookup)obj).get_utxo(a, b);
- case 26:
+ case 27:
if (!(obj is LDKWatch)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKWatch in l_ll");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKKVStore)obj).list(a, b);
- case 119:
+ case 82:
+ if (!(obj is LDKVerification)) {
+ Console.Error.WriteLine("Got function call to object that wasn't a LDKVerification in l_ll");
+ Console.Error.Flush();
+ Environment.Exit(44);
+ }
+ return ((LDKVerification)obj).hmac_for_offer_payment(a, b);
+ case 123:
if (!(obj is LDKAsyncPaymentsMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKAsyncPaymentsMessageHandler in l_ll");
Console.Error.Flush();
Environment.Exit(44);
}
- return ((LDKAsyncPaymentsMessageHandler)obj).held_htlc_available(a, b);
- case 129:
+ return ((LDKAsyncPaymentsMessageHandler)obj).handle_held_htlc_available(a, b);
+ case 126:
+ if (!(obj is LDKDNSResolverMessageHandler)) {
+ Console.Error.WriteLine("Got function call to object that wasn't a LDKDNSResolverMessageHandler in l_ll");
+ Console.Error.Flush();
+ Environment.Exit(44);
+ }
+ return ((LDKDNSResolverMessageHandler)obj).handle_dnssec_query(a, b);
+ case 131:
+ if (!(obj is LDKRoutingMessageHandler)) {
+ Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_ll");
+ Console.Error.Flush();
+ Environment.Exit(44);
+ }
+ return ((LDKRoutingMessageHandler)obj).handle_node_announcement(a, b);
+ case 132:
+ if (!(obj is LDKRoutingMessageHandler)) {
+ Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_ll");
+ Console.Error.Flush();
+ Environment.Exit(44);
+ }
+ return ((LDKRoutingMessageHandler)obj).handle_channel_announcement(a, b);
+ case 133:
+ if (!(obj is LDKRoutingMessageHandler)) {
+ Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_ll");
+ Console.Error.Flush();
+ Environment.Exit(44);
+ }
+ return ((LDKRoutingMessageHandler)obj).handle_channel_update(a, b);
+ case 137:
if (!(obj is LDKRoutingMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_ll");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKRoutingMessageHandler)obj).handle_reply_channel_range(a, b);
- case 130:
+ case 138:
if (!(obj is LDKRoutingMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_ll");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKRoutingMessageHandler)obj).handle_reply_short_channel_ids_end(a, b);
- case 131:
+ case 139:
if (!(obj is LDKRoutingMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_ll");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKRoutingMessageHandler)obj).handle_query_channel_range(a, b);
- case 132:
+ case 140:
if (!(obj is LDKRoutingMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_ll");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKRoutingMessageHandler)obj).handle_query_short_channel_ids(a, b);
- case 144:
+ case 152:
if (!(obj is LDKCustomMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKCustomMessageHandler in l_ll");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKCustomMessageHandler)obj).handle_custom_message(a, b);
- case 151:
+ case 159:
if (!(obj is LDKCustomOnionMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKCustomOnionMessageHandler in l_ll");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKChannelSigner)obj).channel_keys_id();
- case 21:
+ case 22:
if (!(obj is LDKLockableScore)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKLockableScore in l_");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKLockableScore)obj).read_lock();
- case 22:
+ case 23:
if (!(obj is LDKLockableScore)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKLockableScore in l_");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKLockableScore)obj).write_lock();
- case 23:
+ case 24:
if (!(obj is LDKWriteableScore)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKWriteableScore in l_");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKWriteableScore)obj).write();
- case 28:
+ case 29:
if (!(obj is LDKWatch)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKWatch in l_");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKWatch)obj).release_pending_monitor_events();
- case 30:
+ case 31:
if (!(obj is LDKEntropySource)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKEntropySource in l_");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKEntropySource)obj).get_secure_random_bytes();
- case 31:
+ case 32:
if (!(obj is LDKNodeSigner)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKNodeSigner in l_");
Console.Error.Flush();
Environment.Exit(44);
}
- return ((LDKNodeSigner)obj).get_inbound_payment_key_material();
+ return ((LDKNodeSigner)obj).get_inbound_payment_key();
case 42:
if (!(obj is LDKSignerProvider)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKSignerProvider in l_");
Environment.Exit(44);
}
return ((LDKChangeDestinationSource)obj).get_change_destination_script();
- case 77:
+ case 65:
+ if (!(obj is LDKMigratableKVStore)) {
+ Console.Error.WriteLine("Got function call to object that wasn't a LDKMigratableKVStore in l_");
+ Console.Error.Flush();
+ Environment.Exit(44);
+ }
+ return ((LDKMigratableKVStore)obj).list_all_keys();
+ case 78:
if (!(obj is LDKConfirm)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKConfirm in l_");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKConfirm)obj).get_relevant_txids();
- case 81:
+ case 84:
if (!(obj is LDKMessageSendEventsProvider)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKMessageSendEventsProvider in l_");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKMessageSendEventsProvider)obj).get_and_clear_pending_msg_events();
- case 114:
+ case 117:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in l_");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKChannelMessageHandler)obj).provided_node_features();
- case 116:
+ case 119:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in l_");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKChannelMessageHandler)obj).get_chain_hashes();
- case 118:
+ case 122:
if (!(obj is LDKOffersMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKOffersMessageHandler in l_");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKOffersMessageHandler)obj).release_pending_messages();
- case 121:
+ case 125:
if (!(obj is LDKAsyncPaymentsMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKAsyncPaymentsMessageHandler in l_");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKAsyncPaymentsMessageHandler)obj).release_pending_messages();
- case 134:
+ case 128:
+ if (!(obj is LDKDNSResolverMessageHandler)) {
+ Console.Error.WriteLine("Got function call to object that wasn't a LDKDNSResolverMessageHandler in l_");
+ Console.Error.Flush();
+ Environment.Exit(44);
+ }
+ return ((LDKDNSResolverMessageHandler)obj).provided_node_features();
+ case 129:
+ if (!(obj is LDKDNSResolverMessageHandler)) {
+ Console.Error.WriteLine("Got function call to object that wasn't a LDKDNSResolverMessageHandler in l_");
+ Console.Error.Flush();
+ Environment.Exit(44);
+ }
+ return ((LDKDNSResolverMessageHandler)obj).release_pending_messages();
+ case 142:
if (!(obj is LDKRoutingMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKRoutingMessageHandler)obj).provided_node_features();
- case 141:
+ case 149:
if (!(obj is LDKOnionMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKOnionMessageHandler in l_");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKOnionMessageHandler)obj).provided_node_features();
- case 145:
+ case 153:
if (!(obj is LDKCustomMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKCustomMessageHandler in l_");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKCustomMessageHandler)obj).get_and_clear_pending_msg();
- case 148:
+ case 156:
if (!(obj is LDKCustomMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKCustomMessageHandler in l_");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKCustomMessageHandler)obj).provided_node_features();
- case 152:
+ case 160:
if (!(obj is LDKCustomOnionMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKCustomOnionMessageHandler in l_");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKCustomOnionMessageHandler)obj).release_pending_custom_messages();
- case 156:
+ case 164:
if (!(obj is LDKSocketDescriptor)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKSocketDescriptor in l_");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKSocketDescriptor)obj).hash();
- case 159:
+ case 167:
if (!(obj is LDKScore)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKScore in l_");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKScore)obj).write();
- case 162:
+ case 170:
if (!(obj is LDKWalletSource)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKWalletSource in l_");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKWalletSource)obj).list_confirmed_utxos();
- case 163:
+ case 171:
if (!(obj is LDKWalletSource)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKWalletSource in l_");
Console.Error.Flush();
}
((LDKChannelSigner)obj).provide_channel_parameters(a);
return;
- case 20:
+ case 21:
if (!(obj is LDKScoreUpdate)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKScoreUpdate in void_l");
Console.Error.Flush();
}
((LDKScoreUpdate)obj).time_passed(a);
return;
- case 24:
+ case 25:
if (!(obj is LDKLogger)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKLogger in void_l");
Console.Error.Flush();
}
((LDKLogger)obj).log(a);
return;
- case 29:
+ case 30:
if (!(obj is LDKBroadcasterInterface)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKBroadcasterInterface in void_l");
Console.Error.Flush();
}
((LDKFilter)obj).register_output(a);
return;
- case 70:
+ case 71:
if (!(obj is LDKPersist)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKPersist in void_l");
Console.Error.Flush();
}
((LDKPersist)obj).archive_persisted_channel(a);
return;
- case 75:
+ case 76:
if (!(obj is LDKConfirm)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKConfirm in void_l");
Console.Error.Flush();
}
((LDKConfirm)obj).transaction_unconfirmed(a);
return;
- case 80:
+ case 81:
if (!(obj is LDKEventsProvider)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKEventsProvider in void_l");
Console.Error.Flush();
}
((LDKEventsProvider)obj).process_pending_events(a);
return;
- case 109:
+ case 112:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_l");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).peer_disconnected(a);
return;
- case 120:
- if (!(obj is LDKAsyncPaymentsMessageHandler)) {
- Console.Error.WriteLine("Got function call to object that wasn't a LDKAsyncPaymentsMessageHandler in void_l");
- Console.Error.Flush();
- Environment.Exit(44);
- }
- ((LDKAsyncPaymentsMessageHandler)obj).release_held_htlc(a);
- return;
- case 139:
+ case 147:
if (!(obj is LDKOnionMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKOnionMessageHandler in void_l");
Console.Error.Flush();
}
((LDKOnionMessageHandler)obj).peer_disconnected(a);
return;
- case 146:
+ case 154:
if (!(obj is LDKCustomMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKCustomMessageHandler in void_l");
Console.Error.Flush();
}
return ((LDKEcdsaChannelSigner)obj).sign_holder_htlc_transaction(a, b, c);
case 15:
+ if (!(obj is LDKEcdsaChannelSigner)) {
+ Console.Error.WriteLine("Got function call to object that wasn't a LDKEcdsaChannelSigner in l_lll");
+ Console.Error.Flush();
+ Environment.Exit(44);
+ }
+ return ((LDKEcdsaChannelSigner)obj).sign_splicing_funding_input(a, b, c);
+ case 16:
if (!(obj is LDKScoreLookUp)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKScoreLookUp in l_lll");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKScoreLookUp)obj).channel_penalty_msat(a, b, c);
- case 44:
+ case 47:
if (!(obj is LDKMessageRouter)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKMessageRouter in l_lll");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKMessageRouter)obj).find_path(a, b, c);
- case 45:
+ case 48:
if (!(obj is LDKMessageRouter)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKMessageRouter in l_lll");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKMessageRouter)obj).create_blinded_paths(a, b, c);
- case 46:
+ case 49:
if (!(obj is LDKMessageRouter)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKMessageRouter in l_lll");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKKVStore)obj).read(a, b, c);
- case 117:
+ case 83:
+ if (!(obj is LDKVerification)) {
+ Console.Error.WriteLine("Got function call to object that wasn't a LDKVerification in l_lll");
+ Console.Error.Flush();
+ Environment.Exit(44);
+ }
+ return ((LDKVerification)obj).verify_for_offer_payment(a, b, c);
+ case 121:
if (!(obj is LDKOffersMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKOffersMessageHandler in l_lll");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKOffersMessageHandler)obj).handle_message(a, b, c);
- case 150:
+ case 158:
if (!(obj is LDKCustomOnionMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKCustomOnionMessageHandler in l_lll");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKEcdsaChannelSigner)obj).sign_justice_revoked_output(a, b, c, d);
- case 47:
+ case 44:
if (!(obj is LDKRouter)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKRouter in l_llll");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKRouter)obj).find_route(a, b, c, d);
- case 49:
+ case 46:
if (!(obj is LDKRouter)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKRouter in l_llll");
Console.Error.Flush();
Environment.Exit(43);
}
switch (fn_id) {
- case 16:
+ case 17:
if (!(obj is LDKScoreUpdate)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKScoreUpdate in void_lll");
Console.Error.Flush();
}
((LDKScoreUpdate)obj).payment_path_failed(a, b, c);
return;
- case 18:
+ case 19:
if (!(obj is LDKScoreUpdate)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKScoreUpdate in void_lll");
Console.Error.Flush();
Environment.Exit(43);
}
switch (fn_id) {
- case 17:
+ case 18:
if (!(obj is LDKScoreUpdate)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKScoreUpdate in void_ll");
Console.Error.Flush();
}
((LDKScoreUpdate)obj).payment_path_successful(a, b);
return;
- case 19:
+ case 20:
if (!(obj is LDKScoreUpdate)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKScoreUpdate in void_ll");
Console.Error.Flush();
}
((LDKFilter)obj).register_tx(a, b);
return;
- case 82:
+ case 85:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_open_channel(a, b);
return;
- case 83:
+ case 86:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_open_channel_v2(a, b);
return;
- case 84:
+ case 87:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_accept_channel(a, b);
return;
- case 85:
+ case 88:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_accept_channel_v2(a, b);
return;
- case 86:
+ case 89:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_funding_created(a, b);
return;
- case 87:
+ case 90:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_funding_signed(a, b);
return;
- case 88:
+ case 91:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_channel_ready(a, b);
return;
- case 89:
+ case 92:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_shutdown(a, b);
return;
- case 90:
+ case 93:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_closing_signed(a, b);
return;
- case 91:
+ case 94:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_stfu(a, b);
return;
- case 92:
+ case 95:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_tx_add_input(a, b);
return;
- case 93:
+ case 96:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_tx_add_output(a, b);
return;
- case 94:
+ case 97:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_tx_remove_input(a, b);
return;
- case 95:
+ case 98:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_tx_remove_output(a, b);
return;
- case 96:
+ case 99:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_tx_complete(a, b);
return;
- case 97:
+ case 100:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_tx_signatures(a, b);
return;
- case 98:
+ case 101:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_tx_init_rbf(a, b);
return;
- case 99:
+ case 102:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_tx_ack_rbf(a, b);
return;
- case 100:
+ case 103:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_tx_abort(a, b);
return;
- case 101:
+ case 104:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_update_add_htlc(a, b);
return;
- case 102:
+ case 105:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_update_fulfill_htlc(a, b);
return;
- case 103:
+ case 106:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_update_fail_htlc(a, b);
return;
- case 104:
+ case 107:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_update_fail_malformed_htlc(a, b);
return;
- case 105:
+ case 108:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_commitment_signed(a, b);
return;
- case 106:
+ case 109:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_revoke_and_ack(a, b);
return;
- case 107:
+ case 110:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_update_fee(a, b);
return;
- case 108:
+ case 111:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_announcement_signatures(a, b);
return;
- case 111:
+ case 114:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_channel_reestablish(a, b);
return;
- case 112:
+ case 115:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_channel_update(a, b);
return;
- case 113:
+ case 116:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_ll");
Console.Error.Flush();
}
((LDKChannelMessageHandler)obj).handle_error(a, b);
return;
- case 136:
+ case 124:
+ if (!(obj is LDKAsyncPaymentsMessageHandler)) {
+ Console.Error.WriteLine("Got function call to object that wasn't a LDKAsyncPaymentsMessageHandler in void_ll");
+ Console.Error.Flush();
+ Environment.Exit(44);
+ }
+ ((LDKAsyncPaymentsMessageHandler)obj).handle_release_held_htlc(a, b);
+ return;
+ case 127:
+ if (!(obj is LDKDNSResolverMessageHandler)) {
+ Console.Error.WriteLine("Got function call to object that wasn't a LDKDNSResolverMessageHandler in void_ll");
+ Console.Error.Flush();
+ Environment.Exit(44);
+ }
+ ((LDKDNSResolverMessageHandler)obj).handle_dnssec_proof(a, b);
+ return;
+ case 144:
if (!(obj is LDKOnionMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKOnionMessageHandler in void_ll");
Console.Error.Flush();
Environment.Exit(43);
}
switch (fn_id) {
- case 27:
+ case 28:
if (!(obj is LDKWatch)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKWatch in ChannelMonitorUpdateStatus_ll");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKWatch)obj).update_channel(a, b);
- case 68:
+ case 69:
if (!(obj is LDKPersist)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKPersist in ChannelMonitorUpdateStatus_ll");
Console.Error.Flush();
Environment.Exit(43);
}
switch (fn_id) {
- case 32:
+ case 33:
if (!(obj is LDKNodeSigner)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKNodeSigner in l_Recipient");
Console.Error.Flush();
Environment.Exit(43);
}
switch (fn_id) {
- case 33:
+ case 34:
if (!(obj is LDKNodeSigner)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKNodeSigner in l_Recipientll");
Console.Error.Flush();
Environment.Exit(43);
}
switch (fn_id) {
- case 34:
+ case 35:
if (!(obj is LDKNodeSigner)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKNodeSigner in l_lRecipient");
Console.Error.Flush();
Environment.Exit(43);
}
switch (fn_id) {
- case 48:
+ case 45:
if (!(obj is LDKRouter)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKRouter in l_llllll");
Console.Error.Flush();
Environment.Exit(43);
}
switch (fn_id) {
- case 69:
+ case 70:
if (!(obj is LDKPersist)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKPersist in ChannelMonitorUpdateStatus_lll");
Console.Error.Flush();
Environment.Exit(43);
}
switch (fn_id) {
- case 71:
+ case 72:
if (!(obj is LDKListen)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKListen in void_lli");
Console.Error.Flush();
}
((LDKListen)obj).filtered_block_connected(a, b, c);
return;
- case 74:
+ case 75:
if (!(obj is LDKConfirm)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKConfirm in void_lli");
Console.Error.Flush();
Environment.Exit(43);
}
switch (fn_id) {
- case 72:
+ case 73:
if (!(obj is LDKListen)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKListen in void_li");
Console.Error.Flush();
}
((LDKListen)obj).block_connected(a, b);
return;
- case 73:
+ case 74:
if (!(obj is LDKListen)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKListen in void_li");
Console.Error.Flush();
}
((LDKListen)obj).block_disconnected(a, b);
return;
- case 76:
+ case 77:
if (!(obj is LDKConfirm)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKConfirm in void_li");
Console.Error.Flush();
Environment.Exit(43);
}
switch (fn_id) {
- case 78:
+ case 79:
if (!(obj is LDKFutureCallback)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKFutureCallback in void_");
Console.Error.Flush();
}
((LDKFutureCallback)obj).call();
return;
- case 140:
+ case 120:
+ if (!(obj is LDKChannelMessageHandler)) {
+ Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in void_");
+ Console.Error.Flush();
+ Environment.Exit(44);
+ }
+ ((LDKChannelMessageHandler)obj).message_received();
+ return;
+ case 148:
if (!(obj is LDKOnionMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKOnionMessageHandler in void_");
Console.Error.Flush();
}
((LDKOnionMessageHandler)obj).timer_tick_occurred();
return;
- case 154:
+ case 162:
if (!(obj is LDKSocketDescriptor)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKSocketDescriptor in void_");
Console.Error.Flush();
Environment.Exit(43);
}
switch (fn_id) {
- case 110:
+ case 113:
if (!(obj is LDKChannelMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKChannelMessageHandler in l_llb");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKChannelMessageHandler)obj).peer_connected(a, b, c);
- case 128:
+ case 136:
if (!(obj is LDKRoutingMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in l_llb");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKRoutingMessageHandler)obj).peer_connected(a, b, c);
- case 138:
+ case 146:
if (!(obj is LDKOnionMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKOnionMessageHandler in l_llb");
Console.Error.Flush();
Environment.Exit(44);
}
return ((LDKOnionMessageHandler)obj).peer_connected(a, b, c);
- case 147:
+ case 155:
if (!(obj is LDKCustomMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKCustomMessageHandler in l_llb");
Console.Error.Flush();
Environment.Exit(43);
}
switch (fn_id) {
- case 133:
+ case 141:
if (!(obj is LDKRoutingMessageHandler)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKRoutingMessageHandler in b_");
Console.Error.Flush();
Environment.Exit(43);
}
switch (fn_id) {
- case 143:
+ case 151:
if (!(obj is LDKCustomMessageReader)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKCustomMessageReader in l_sl");
Console.Error.Flush();
Environment.Exit(43);
}
switch (fn_id) {
- case 153:
+ case 161:
if (!(obj is LDKSocketDescriptor)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKSocketDescriptor in l_lb");
Console.Error.Flush();
Environment.Exit(43);
}
switch (fn_id) {
- case 155:
+ case 163:
if (!(obj is LDKSocketDescriptor)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKSocketDescriptor in b_l");
Console.Error.Flush();
Environment.Exit(43);
}
switch (fn_id) {
- case 160:
+ case 168:
if (!(obj is LDKCoinSelectionSource)) {
Console.Error.WriteLine("Got function call to object that wasn't a LDKCoinSelectionSource in l_llli");
Console.Error.Flush();
/**
- * An accept_channel2 message to be sent by or received from the channel accepter.
+ * An [`accept_channel2`] message to be sent by or received from the channel accepter.
*
* Used in V2 channel establishment
+ *
+ * [`accept_channel2`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-accept_channel2-message
*/
public class AcceptChannelV2 : CommonBase {
internal AcceptChannelV2(object _dummy, long ptr) : base(ptr) { }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+/**
+ * Contains data specific to an [`AsyncPaymentsMessage`].
+ *
+ * [`AsyncPaymentsMessage`]: crate::onion_message::async_payments::AsyncPaymentsMessage
+ */
+public class AsyncPaymentsContext : CommonBase {
+ protected AsyncPaymentsContext(object _dummy, long ptr) : base(ptr) { }
+ ~AsyncPaymentsContext() {
+ if (ptr != 0) { bindings.AsyncPaymentsContext_free(ptr); }
+ }
+
+ internal static AsyncPaymentsContext constr_from_ptr(long ptr) {
+ long raw_ty = bindings.LDKAsyncPaymentsContext_ty_from_ptr(ptr);
+ switch (raw_ty) {
+ case 0: return new AsyncPaymentsContext_OutboundPayment(ptr);
+ default:
+ throw new ArgumentException("Impossible enum variant");
+ }
+ }
+
+ /** A AsyncPaymentsContext of type OutboundPayment */
+ public class AsyncPaymentsContext_OutboundPayment : AsyncPaymentsContext {
+ /**
+ * ID used when payment to the originating [`Offer`] was initiated. Useful for us to identify
+ * which of our pending outbound payments should be released to its often-offline payee.
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ */
+ public byte[] payment_id;
+ /**
+ * A nonce used for authenticating that a [`ReleaseHeldHtlc`] message is valid for a preceding
+ * [`HeldHtlcAvailable`] message.
+ *
+ * [`ReleaseHeldHtlc`]: crate::onion_message::async_payments::ReleaseHeldHtlc
+ * [`HeldHtlcAvailable`]: crate::onion_message::async_payments::HeldHtlcAvailable
+ */
+ public Nonce nonce;
+ /**
+ * Authentication code for the [`PaymentId`].
+ *
+ * Prevents the recipient from being able to deanonymize us by creating a blinded path to us
+ * containing the expected [`PaymentId`].
+ */
+ public byte[] hmac;
+ internal AsyncPaymentsContext_OutboundPayment(long ptr) : base(null, ptr) {
+ long payment_id = bindings.LDKAsyncPaymentsContext_OutboundPayment_get_payment_id(ptr);
+ byte[] payment_id_conv = InternalUtils.decodeUint8Array(payment_id);
+ this.payment_id = payment_id_conv;
+ long nonce = bindings.LDKAsyncPaymentsContext_OutboundPayment_get_nonce(ptr);
+ org.ldk.structs.Nonce nonce_hu_conv = null; if (nonce < 0 || nonce > 4096) { nonce_hu_conv = new org.ldk.structs.Nonce(null, nonce); }
+ if (nonce_hu_conv != null) { nonce_hu_conv.ptrs_to.AddLast(this); };
+ this.nonce = nonce_hu_conv;
+ long hmac = bindings.LDKAsyncPaymentsContext_OutboundPayment_get_hmac(ptr);
+ byte[] hmac_conv = InternalUtils.decodeUint8Array(hmac);
+ this.hmac = hmac_conv;
+ }
+ }
+ internal long clone_ptr() {
+ long ret = bindings.AsyncPaymentsContext_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the AsyncPaymentsContext
+ */
+ public AsyncPaymentsContext clone() {
+ long ret = bindings.AsyncPaymentsContext_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.AsyncPaymentsContext ret_hu_conv = org.ldk.structs.AsyncPaymentsContext.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new OutboundPayment-variant AsyncPaymentsContext
+ */
+ public static AsyncPaymentsContext outbound_payment(byte[] payment_id, org.ldk.structs.Nonce nonce, byte[] hmac) {
+ long ret = bindings.AsyncPaymentsContext_outbound_payment(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), nonce.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(hmac, 32)));
+ GC.KeepAlive(payment_id);
+ GC.KeepAlive(nonce);
+ GC.KeepAlive(hmac);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.AsyncPaymentsContext ret_hu_conv = org.ldk.structs.AsyncPaymentsContext.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Serialize the AsyncPaymentsContext object into a byte array which can be read by AsyncPaymentsContext_read
+ */
+ public byte[] write() {
+ long ret = bindings.AsyncPaymentsContext_write(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
+ /**
+ * Read a AsyncPaymentsContext from a byte array, created by AsyncPaymentsContext_write
+ */
+ public static Result_AsyncPaymentsContextDecodeErrorZ read(byte[] ser) {
+ long ret = bindings.AsyncPaymentsContext_read(InternalUtils.encodeUint8Array(ser));
+ GC.KeepAlive(ser);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_AsyncPaymentsContextDecodeErrorZ ret_hu_conv = Result_AsyncPaymentsContextDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
+} } }
*
* Note that responder (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- Option_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ held_htlc_available(HeldHtlcAvailable message, Responder responder);
+ Option_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ handle_held_htlc_available(HeldHtlcAvailable message, Responder responder);
/**Handle a [`ReleaseHeldHtlc`] message. If authentication of the message succeeds, an HTLC
* should be released to the corresponding payee.
*/
- void release_held_htlc(ReleaseHeldHtlc message);
+ void handle_release_held_htlc(ReleaseHeldHtlc message, AsyncPaymentsContext context);
/**Release any [`AsyncPaymentsMessage`]s that need to be sent.
*
* Typically, this is used for messages initiating an async payment flow rather than in response
internal LDKAsyncPaymentsMessageHandlerImpl(AsyncPaymentsMessageHandlerInterface arg, LDKAsyncPaymentsMessageHandlerHolder impl_holder) { this.arg = arg; this.impl_holder = impl_holder; }
private AsyncPaymentsMessageHandlerInterface arg;
private LDKAsyncPaymentsMessageHandlerHolder impl_holder;
- public long held_htlc_available(long _message, long _responder) {
+ public long handle_held_htlc_available(long _message, long _responder) {
org.ldk.structs.HeldHtlcAvailable _message_hu_conv = null; if (_message < 0 || _message > 4096) { _message_hu_conv = new org.ldk.structs.HeldHtlcAvailable(null, _message); }
if (_message_hu_conv != null) { _message_hu_conv.ptrs_to.AddLast(this); };
org.ldk.structs.Responder _responder_hu_conv = null; if (_responder < 0 || _responder > 4096) { _responder_hu_conv = new org.ldk.structs.Responder(null, _responder); }
if (_responder_hu_conv != null) { _responder_hu_conv.ptrs_to.AddLast(this); };
- Option_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ ret = arg.held_htlc_available(_message_hu_conv, _responder_hu_conv);
+ Option_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ ret = arg.handle_held_htlc_available(_message_hu_conv, _responder_hu_conv);
GC.KeepAlive(arg);
long result = ret.clone_ptr();
return result;
}
- public void release_held_htlc(long _message) {
+ public void handle_release_held_htlc(long _message, long _context) {
org.ldk.structs.ReleaseHeldHtlc _message_hu_conv = null; if (_message < 0 || _message > 4096) { _message_hu_conv = new org.ldk.structs.ReleaseHeldHtlc(null, _message); }
if (_message_hu_conv != null) { _message_hu_conv.ptrs_to.AddLast(this); };
- arg.release_held_htlc(_message_hu_conv);
+ org.ldk.structs.AsyncPaymentsContext _context_hu_conv = org.ldk.structs.AsyncPaymentsContext.constr_from_ptr(_context);
+ if (_context_hu_conv != null) { _context_hu_conv.ptrs_to.AddLast(this); };
+ arg.handle_release_held_htlc(_message_hu_conv, _context_hu_conv);
GC.KeepAlive(arg);
}
public long release_pending_messages() {
*
* Note that responder (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public Option_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ held_htlc_available(org.ldk.structs.HeldHtlcAvailable message, org.ldk.structs.Responder responder) {
- long ret = bindings.AsyncPaymentsMessageHandler_held_htlc_available(this.ptr, message.ptr, responder == null ? 0 : responder.ptr);
+ public Option_C2Tuple_ReleaseHeldHtlcResponseInstructionZZ handle_held_htlc_available(org.ldk.structs.HeldHtlcAvailable message, org.ldk.structs.Responder responder) {
+ long ret = bindings.AsyncPaymentsMessageHandler_handle_held_htlc_available(this.ptr, message.ptr, responder == null ? 0 : responder.ptr);
GC.KeepAlive(this);
GC.KeepAlive(message);
GC.KeepAlive(responder);
* Handle a [`ReleaseHeldHtlc`] message. If authentication of the message succeeds, an HTLC
* should be released to the corresponding payee.
*/
- public void release_held_htlc(org.ldk.structs.ReleaseHeldHtlc message) {
- bindings.AsyncPaymentsMessageHandler_release_held_htlc(this.ptr, message.ptr);
+ public void handle_release_held_htlc(org.ldk.structs.ReleaseHeldHtlc message, org.ldk.structs.AsyncPaymentsContext context) {
+ bindings.AsyncPaymentsMessageHandler_handle_release_held_htlc(this.ptr, message.ptr, context.ptr);
GC.KeepAlive(this);
GC.KeepAlive(message);
+ GC.KeepAlive(context);
}
/**
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+/**
+ * Represents the description of an invoice which has to be either a directly included string or
+ * a hash of a description provided out of band.
+ */
+public class Bolt11InvoiceDescription : CommonBase {
+ protected Bolt11InvoiceDescription(object _dummy, long ptr) : base(ptr) { }
+ ~Bolt11InvoiceDescription() {
+ if (ptr != 0) { bindings.Bolt11InvoiceDescription_free(ptr); }
+ }
+
+ internal static Bolt11InvoiceDescription constr_from_ptr(long ptr) {
+ long raw_ty = bindings.LDKBolt11InvoiceDescription_ty_from_ptr(ptr);
+ switch (raw_ty) {
+ case 0: return new Bolt11InvoiceDescription_Direct(ptr);
+ case 1: return new Bolt11InvoiceDescription_Hash(ptr);
+ default:
+ throw new ArgumentException("Impossible enum variant");
+ }
+ }
+
+ /** A Bolt11InvoiceDescription of type Direct */
+ public class Bolt11InvoiceDescription_Direct : Bolt11InvoiceDescription {
+ public Description direct;
+ internal Bolt11InvoiceDescription_Direct(long ptr) : base(null, ptr) {
+ long direct = bindings.LDKBolt11InvoiceDescription_Direct_get_direct(ptr);
+ org.ldk.structs.Description direct_hu_conv = null; if (direct < 0 || direct > 4096) { direct_hu_conv = new org.ldk.structs.Description(null, direct); }
+ if (direct_hu_conv != null) { direct_hu_conv.ptrs_to.AddLast(this); };
+ this.direct = direct_hu_conv;
+ }
+ }
+ /** A Bolt11InvoiceDescription of type Hash */
+ public class Bolt11InvoiceDescription_Hash : Bolt11InvoiceDescription {
+ public Sha256 hash;
+ internal Bolt11InvoiceDescription_Hash(long ptr) : base(null, ptr) {
+ long hash = bindings.LDKBolt11InvoiceDescription_Hash_get_hash(ptr);
+ org.ldk.structs.Sha256 hash_hu_conv = null; if (hash < 0 || hash > 4096) { hash_hu_conv = new org.ldk.structs.Sha256(null, hash); }
+ if (hash_hu_conv != null) { hash_hu_conv.ptrs_to.AddLast(this); };
+ this.hash = hash_hu_conv;
+ }
+ }
+ internal long clone_ptr() {
+ long ret = bindings.Bolt11InvoiceDescription_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the Bolt11InvoiceDescription
+ */
+ public Bolt11InvoiceDescription clone() {
+ long ret = bindings.Bolt11InvoiceDescription_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Bolt11InvoiceDescription ret_hu_conv = org.ldk.structs.Bolt11InvoiceDescription.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new Direct-variant Bolt11InvoiceDescription
+ */
+ public static Bolt11InvoiceDescription direct(org.ldk.structs.Description a) {
+ long ret = bindings.Bolt11InvoiceDescription_direct(a.ptr);
+ GC.KeepAlive(a);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Bolt11InvoiceDescription ret_hu_conv = org.ldk.structs.Bolt11InvoiceDescription.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new Hash-variant Bolt11InvoiceDescription
+ */
+ public static Bolt11InvoiceDescription hash(org.ldk.structs.Sha256 a) {
+ long ret = bindings.Bolt11InvoiceDescription_hash(a.ptr);
+ GC.KeepAlive(a);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Bolt11InvoiceDescription ret_hu_conv = org.ldk.structs.Bolt11InvoiceDescription.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if two Bolt11InvoiceDescriptions contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public bool eq(org.ldk.structs.Bolt11InvoiceDescription b) {
+ bool ret = bindings.Bolt11InvoiceDescription_eq(this.ptr, b.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(b);
+ return ret;
+ }
+
+ public override bool Equals(object o) {
+ if (!(o is Bolt11InvoiceDescription)) return false;
+ return this.eq((Bolt11InvoiceDescription)o);
+ }
+ /**
+ * Get the string representation of a Bolt11InvoiceDescription object
+ */
+ public string to_str() {
+ long ret = bindings.Bolt11InvoiceDescription_to_str(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ string ret_conv = InternalUtils.decodeString(ret);
+ return ret_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+/**
+ * Parameters used with [`create_bolt11_invoice`].
+ *
+ * [`create_bolt11_invoice`]: ChannelManager::create_bolt11_invoice
+ */
+public class Bolt11InvoiceParameters : CommonBase {
+ internal Bolt11InvoiceParameters(object _dummy, long ptr) : base(ptr) { }
+ ~Bolt11InvoiceParameters() {
+ if (ptr != 0) { bindings.Bolt11InvoiceParameters_free(ptr); }
+ }
+
+ /**
+ * The amount for the invoice, if any.
+ */
+ public Option_u64Z get_amount_msats() {
+ long ret = bindings.Bolt11InvoiceParameters_get_amount_msats(this.ptr);
+ GC.KeepAlive(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.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The amount for the invoice, if any.
+ */
+ public void set_amount_msats(org.ldk.structs.Option_u64Z val) {
+ bindings.Bolt11InvoiceParameters_set_amount_msats(this.ptr, val.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(val);
+ }
+
+ /**
+ * The description for what the invoice is for, or hash of such description.
+ */
+ public Bolt11InvoiceDescription get_description() {
+ long ret = bindings.Bolt11InvoiceParameters_get_description(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Bolt11InvoiceDescription ret_hu_conv = org.ldk.structs.Bolt11InvoiceDescription.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The description for what the invoice is for, or hash of such description.
+ */
+ public void set_description(org.ldk.structs.Bolt11InvoiceDescription val) {
+ bindings.Bolt11InvoiceParameters_set_description(this.ptr, val.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(val);
+ }
+
+ /**
+ * The invoice expiration relative to its creation time. If not set, the invoice will expire in
+ * [`DEFAULT_EXPIRY_TIME`] by default.
+ *
+ * The creation time used is the duration since the Unix epoch for `std` builds. For non-`std`
+ * builds, the highest block timestamp seen is used instead. In the latter case, use a long
+ * enough expiry to account for the average block time.
+ */
+ public Option_u32Z get_invoice_expiry_delta_secs() {
+ long ret = bindings.Bolt11InvoiceParameters_get_invoice_expiry_delta_secs(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_u32Z ret_hu_conv = org.ldk.structs.Option_u32Z.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The invoice expiration relative to its creation time. If not set, the invoice will expire in
+ * [`DEFAULT_EXPIRY_TIME`] by default.
+ *
+ * The creation time used is the duration since the Unix epoch for `std` builds. For non-`std`
+ * builds, the highest block timestamp seen is used instead. In the latter case, use a long
+ * enough expiry to account for the average block time.
+ */
+ public void set_invoice_expiry_delta_secs(org.ldk.structs.Option_u32Z val) {
+ bindings.Bolt11InvoiceParameters_set_invoice_expiry_delta_secs(this.ptr, val.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(val);
+ }
+
+ /**
+ * The minimum `cltv_expiry` for the last HTLC in the route. If not set, will use
+ * [`MIN_FINAL_CLTV_EXPIRY_DELTA`].
+ *
+ * If set, must be at least [`MIN_FINAL_CLTV_EXPIRY_DELTA`], and a three-block buffer will be
+ * added as well to allow for up to a few new block confirmations during routing.
+ */
+ public Option_u16Z get_min_final_cltv_expiry_delta() {
+ long ret = bindings.Bolt11InvoiceParameters_get_min_final_cltv_expiry_delta(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_u16Z ret_hu_conv = org.ldk.structs.Option_u16Z.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The minimum `cltv_expiry` for the last HTLC in the route. If not set, will use
+ * [`MIN_FINAL_CLTV_EXPIRY_DELTA`].
+ *
+ * If set, must be at least [`MIN_FINAL_CLTV_EXPIRY_DELTA`], and a three-block buffer will be
+ * added as well to allow for up to a few new block confirmations during routing.
+ */
+ public void set_min_final_cltv_expiry_delta(org.ldk.structs.Option_u16Z val) {
+ bindings.Bolt11InvoiceParameters_set_min_final_cltv_expiry_delta(this.ptr, val.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(val);
+ }
+
+ /**
+ * The payment hash used in the invoice. If not set, a payment hash will be generated using a
+ * preimage that can be reproduced by [`ChannelManager`] without storing any state.
+ *
+ * Uses the payment hash if set. This may be useful if you're building an on-chain swap or
+ * involving another protocol where the payment hash is also involved outside the scope of
+ * lightning.
+ */
+ public Option_ThirtyTwoBytesZ get_payment_hash() {
+ long ret = bindings.Bolt11InvoiceParameters_get_payment_hash(this.ptr);
+ GC.KeepAlive(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);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The payment hash used in the invoice. If not set, a payment hash will be generated using a
+ * preimage that can be reproduced by [`ChannelManager`] without storing any state.
+ *
+ * Uses the payment hash if set. This may be useful if you're building an on-chain swap or
+ * involving another protocol where the payment hash is also involved outside the scope of
+ * lightning.
+ */
+ public void set_payment_hash(org.ldk.structs.Option_ThirtyTwoBytesZ val) {
+ bindings.Bolt11InvoiceParameters_set_payment_hash(this.ptr, val.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(val);
+ }
+
+ /**
+ * Constructs a new Bolt11InvoiceParameters given each field
+ */
+ public static Bolt11InvoiceParameters of(org.ldk.structs.Option_u64Z amount_msats_arg, org.ldk.structs.Bolt11InvoiceDescription description_arg, org.ldk.structs.Option_u32Z invoice_expiry_delta_secs_arg, org.ldk.structs.Option_u16Z min_final_cltv_expiry_delta_arg, org.ldk.structs.Option_ThirtyTwoBytesZ payment_hash_arg) {
+ long ret = bindings.Bolt11InvoiceParameters_new(amount_msats_arg.ptr, description_arg.ptr, invoice_expiry_delta_secs_arg.ptr, min_final_cltv_expiry_delta_arg.ptr, payment_hash_arg.ptr);
+ GC.KeepAlive(amount_msats_arg);
+ GC.KeepAlive(description_arg);
+ GC.KeepAlive(invoice_expiry_delta_secs_arg);
+ GC.KeepAlive(min_final_cltv_expiry_delta_arg);
+ GC.KeepAlive(payment_hash_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Bolt11InvoiceParameters ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Bolt11InvoiceParameters(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a "default" Bolt11InvoiceParameters. See struct and individual field documentaiton for details on which values are used.
+ */
+ public static Bolt11InvoiceParameters with_default() {
+ long ret = bindings.Bolt11InvoiceParameters_default();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Bolt11InvoiceParameters ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Bolt11InvoiceParameters(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+}
+} } }
namespace org { namespace ldk { namespace structs {
+
/**
* Errors that indicate what is wrong with the invoice. They have some granularity for debug
* reasons, but should generally result in an \"invalid BOLT11 invoice\" message for the user.
*/
public class Bolt11ParseError : CommonBase {
- protected Bolt11ParseError(object _dummy, long ptr) : base(ptr) { }
+ internal Bolt11ParseError(object _dummy, long ptr) : base(ptr) { }
~Bolt11ParseError() {
if (ptr != 0) { bindings.Bolt11ParseError_free(ptr); }
}
- internal static Bolt11ParseError constr_from_ptr(long ptr) {
- long raw_ty = bindings.LDKBolt11ParseError_ty_from_ptr(ptr);
- switch (raw_ty) {
- case 0: return new Bolt11ParseError_Bech32Error(ptr);
- case 1: return new Bolt11ParseError_ParseAmountError(ptr);
- case 2: return new Bolt11ParseError_MalformedSignature(ptr);
- case 3: return new Bolt11ParseError_BadPrefix(ptr);
- case 4: return new Bolt11ParseError_UnknownCurrency(ptr);
- case 5: return new Bolt11ParseError_UnknownSiPrefix(ptr);
- case 6: return new Bolt11ParseError_MalformedHRP(ptr);
- case 7: return new Bolt11ParseError_TooShortDataPart(ptr);
- case 8: return new Bolt11ParseError_UnexpectedEndOfTaggedFields(ptr);
- case 9: return new Bolt11ParseError_DescriptionDecodeError(ptr);
- case 10: return new Bolt11ParseError_PaddingError(ptr);
- case 11: return new Bolt11ParseError_IntegerOverflowError(ptr);
- case 12: return new Bolt11ParseError_InvalidSegWitProgramLength(ptr);
- case 13: return new Bolt11ParseError_InvalidPubKeyHashLength(ptr);
- case 14: return new Bolt11ParseError_InvalidScriptHashLength(ptr);
- case 15: return new Bolt11ParseError_InvalidRecoveryId(ptr);
- case 16: return new Bolt11ParseError_InvalidSliceLength(ptr);
- case 17: return new Bolt11ParseError_Skip(ptr);
- default:
- throw new ArgumentException("Impossible enum variant");
- }
+ /**
+ * Checks if two Bolt11ParseErrors 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 bool eq(org.ldk.structs.Bolt11ParseError b) {
+ bool ret = bindings.Bolt11ParseError_eq(this.ptr, b.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(b);
+ if (this != null) { this.ptrs_to.AddLast(b); };
+ return ret;
}
- /** A Bolt11ParseError of type Bech32Error */
- public class Bolt11ParseError_Bech32Error : Bolt11ParseError {
- public Bech32Error bech32_error;
- internal Bolt11ParseError_Bech32Error(long ptr) : base(null, ptr) {
- long bech32_error = bindings.LDKBolt11ParseError_Bech32Error_get_bech32_error(ptr);
- org.ldk.structs.Bech32Error bech32_error_hu_conv = org.ldk.structs.Bech32Error.constr_from_ptr(bech32_error);
- if (bech32_error_hu_conv != null) { bech32_error_hu_conv.ptrs_to.AddLast(this); };
- this.bech32_error = bech32_error_hu_conv;
- }
- }
- /** A Bolt11ParseError of type ParseAmountError */
- public class Bolt11ParseError_ParseAmountError : Bolt11ParseError {
- public UnqualifiedError parse_amount_error;
- internal Bolt11ParseError_ParseAmountError(long ptr) : base(null, ptr) {
- int parse_amount_error = bindings.LDKBolt11ParseError_ParseAmountError_get_parse_amount_error(ptr);
- UnqualifiedError parse_amount_error_conv = new UnqualifiedError(parse_amount_error);
- this.parse_amount_error = parse_amount_error_conv;
- }
- }
- /** A Bolt11ParseError of type MalformedSignature */
- public class Bolt11ParseError_MalformedSignature : Bolt11ParseError {
- public Secp256k1Error malformed_signature;
- internal Bolt11ParseError_MalformedSignature(long ptr) : base(null, ptr) {
- this.malformed_signature = bindings.LDKBolt11ParseError_MalformedSignature_get_malformed_signature(ptr);
- }
- }
- /** A Bolt11ParseError of type BadPrefix */
- public class Bolt11ParseError_BadPrefix : Bolt11ParseError {
- internal Bolt11ParseError_BadPrefix(long ptr) : base(null, ptr) {
- }
- }
- /** A Bolt11ParseError of type UnknownCurrency */
- public class Bolt11ParseError_UnknownCurrency : Bolt11ParseError {
- internal Bolt11ParseError_UnknownCurrency(long ptr) : base(null, ptr) {
- }
- }
- /** A Bolt11ParseError of type UnknownSiPrefix */
- public class Bolt11ParseError_UnknownSiPrefix : Bolt11ParseError {
- internal Bolt11ParseError_UnknownSiPrefix(long ptr) : base(null, ptr) {
- }
- }
- /** A Bolt11ParseError of type MalformedHRP */
- public class Bolt11ParseError_MalformedHRP : Bolt11ParseError {
- internal Bolt11ParseError_MalformedHRP(long ptr) : base(null, ptr) {
- }
- }
- /** A Bolt11ParseError of type TooShortDataPart */
- public class Bolt11ParseError_TooShortDataPart : Bolt11ParseError {
- internal Bolt11ParseError_TooShortDataPart(long ptr) : base(null, ptr) {
- }
- }
- /** A Bolt11ParseError of type UnexpectedEndOfTaggedFields */
- public class Bolt11ParseError_UnexpectedEndOfTaggedFields : Bolt11ParseError {
- internal Bolt11ParseError_UnexpectedEndOfTaggedFields(long ptr) : base(null, ptr) {
- }
- }
- /** A Bolt11ParseError of type DescriptionDecodeError */
- public class Bolt11ParseError_DescriptionDecodeError : Bolt11ParseError {
- public UnqualifiedError description_decode_error;
- internal Bolt11ParseError_DescriptionDecodeError(long ptr) : base(null, ptr) {
- int description_decode_error = bindings.LDKBolt11ParseError_DescriptionDecodeError_get_description_decode_error(ptr);
- UnqualifiedError description_decode_error_conv = new UnqualifiedError(description_decode_error);
- this.description_decode_error = description_decode_error_conv;
- }
- }
- /** A Bolt11ParseError of type PaddingError */
- public class Bolt11ParseError_PaddingError : Bolt11ParseError {
- internal Bolt11ParseError_PaddingError(long ptr) : base(null, ptr) {
- }
- }
- /** A Bolt11ParseError of type IntegerOverflowError */
- public class Bolt11ParseError_IntegerOverflowError : Bolt11ParseError {
- internal Bolt11ParseError_IntegerOverflowError(long ptr) : base(null, ptr) {
- }
- }
- /** A Bolt11ParseError of type InvalidSegWitProgramLength */
- public class Bolt11ParseError_InvalidSegWitProgramLength : Bolt11ParseError {
- internal Bolt11ParseError_InvalidSegWitProgramLength(long ptr) : base(null, ptr) {
- }
- }
- /** A Bolt11ParseError of type InvalidPubKeyHashLength */
- public class Bolt11ParseError_InvalidPubKeyHashLength : Bolt11ParseError {
- internal Bolt11ParseError_InvalidPubKeyHashLength(long ptr) : base(null, ptr) {
- }
- }
- /** A Bolt11ParseError of type InvalidScriptHashLength */
- public class Bolt11ParseError_InvalidScriptHashLength : Bolt11ParseError {
- internal Bolt11ParseError_InvalidScriptHashLength(long ptr) : base(null, ptr) {
- }
- }
- /** A Bolt11ParseError of type InvalidRecoveryId */
- public class Bolt11ParseError_InvalidRecoveryId : Bolt11ParseError {
- internal Bolt11ParseError_InvalidRecoveryId(long ptr) : base(null, ptr) {
- }
- }
- /** A Bolt11ParseError of type InvalidSliceLength */
- public class Bolt11ParseError_InvalidSliceLength : Bolt11ParseError {
- public string invalid_slice_length;
- internal Bolt11ParseError_InvalidSliceLength(long ptr) : base(null, ptr) {
- long invalid_slice_length = bindings.LDKBolt11ParseError_InvalidSliceLength_get_invalid_slice_length(ptr);
- string invalid_slice_length_conv = InternalUtils.decodeString(invalid_slice_length);
- this.invalid_slice_length = invalid_slice_length_conv;
- }
- }
- /** A Bolt11ParseError of type Skip */
- public class Bolt11ParseError_Skip : Bolt11ParseError {
- internal Bolt11ParseError_Skip(long ptr) : base(null, ptr) {
- }
+ public override bool Equals(object o) {
+ if (!(o is Bolt11ParseError)) return false;
+ return this.eq((Bolt11ParseError)o);
}
internal long clone_ptr() {
long ret = bindings.Bolt11ParseError_clone_ptr(this.ptr);
long ret = bindings.Bolt11ParseError_clone(this.ptr);
GC.KeepAlive(this);
if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Bolt11ParseError ret_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(ret);
+ org.ldk.structs.Bolt11ParseError ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Bolt11ParseError(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
return ret_hu_conv;
}
- /**
- * Utility method to constructs a new Bech32Error-variant Bolt11ParseError
- */
- public static Bolt11ParseError bech32_error(org.ldk.structs.Bech32Error a) {
- long ret = bindings.Bolt11ParseError_bech32_error(a.ptr);
- GC.KeepAlive(a);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Bolt11ParseError ret_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new ParseAmountError-variant Bolt11ParseError
- */
- public static Bolt11ParseError parse_amount_error(org.ldk.util.UnqualifiedError a) {
- long ret = bindings.Bolt11ParseError_parse_amount_error(0);
- GC.KeepAlive(a);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Bolt11ParseError ret_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new MalformedSignature-variant Bolt11ParseError
- */
- public static Bolt11ParseError malformed_signature(Secp256k1Error a) {
- long ret = bindings.Bolt11ParseError_malformed_signature(a);
- GC.KeepAlive(a);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Bolt11ParseError ret_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new BadPrefix-variant Bolt11ParseError
- */
- public static Bolt11ParseError bad_prefix() {
- long ret = bindings.Bolt11ParseError_bad_prefix();
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Bolt11ParseError ret_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new UnknownCurrency-variant Bolt11ParseError
- */
- public static Bolt11ParseError unknown_currency() {
- long ret = bindings.Bolt11ParseError_unknown_currency();
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Bolt11ParseError ret_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new UnknownSiPrefix-variant Bolt11ParseError
- */
- public static Bolt11ParseError unknown_si_prefix() {
- long ret = bindings.Bolt11ParseError_unknown_si_prefix();
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Bolt11ParseError ret_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new MalformedHRP-variant Bolt11ParseError
- */
- public static Bolt11ParseError malformed_hrp() {
- long ret = bindings.Bolt11ParseError_malformed_hrp();
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Bolt11ParseError ret_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new TooShortDataPart-variant Bolt11ParseError
- */
- public static Bolt11ParseError too_short_data_part() {
- long ret = bindings.Bolt11ParseError_too_short_data_part();
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Bolt11ParseError ret_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new UnexpectedEndOfTaggedFields-variant Bolt11ParseError
- */
- public static Bolt11ParseError unexpected_end_of_tagged_fields() {
- long ret = bindings.Bolt11ParseError_unexpected_end_of_tagged_fields();
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Bolt11ParseError ret_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new DescriptionDecodeError-variant Bolt11ParseError
- */
- public static Bolt11ParseError description_decode_error(org.ldk.util.UnqualifiedError a) {
- long ret = bindings.Bolt11ParseError_description_decode_error(0);
- GC.KeepAlive(a);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Bolt11ParseError ret_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new PaddingError-variant Bolt11ParseError
- */
- public static Bolt11ParseError padding_error() {
- long ret = bindings.Bolt11ParseError_padding_error();
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Bolt11ParseError ret_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new IntegerOverflowError-variant Bolt11ParseError
- */
- public static Bolt11ParseError integer_overflow_error() {
- long ret = bindings.Bolt11ParseError_integer_overflow_error();
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Bolt11ParseError ret_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new InvalidSegWitProgramLength-variant Bolt11ParseError
- */
- public static Bolt11ParseError invalid_seg_wit_program_length() {
- long ret = bindings.Bolt11ParseError_invalid_seg_wit_program_length();
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Bolt11ParseError ret_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new InvalidPubKeyHashLength-variant Bolt11ParseError
- */
- public static Bolt11ParseError invalid_pub_key_hash_length() {
- long ret = bindings.Bolt11ParseError_invalid_pub_key_hash_length();
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Bolt11ParseError ret_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new InvalidScriptHashLength-variant Bolt11ParseError
- */
- public static Bolt11ParseError invalid_script_hash_length() {
- long ret = bindings.Bolt11ParseError_invalid_script_hash_length();
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Bolt11ParseError ret_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new InvalidRecoveryId-variant Bolt11ParseError
- */
- public static Bolt11ParseError invalid_recovery_id() {
- long ret = bindings.Bolt11ParseError_invalid_recovery_id();
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Bolt11ParseError ret_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new InvalidSliceLength-variant Bolt11ParseError
- */
- public static Bolt11ParseError invalid_slice_length(string a) {
- long ret = bindings.Bolt11ParseError_invalid_slice_length(InternalUtils.encodeString(a));
- GC.KeepAlive(a);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Bolt11ParseError ret_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new Skip-variant Bolt11ParseError
- */
- public static Bolt11ParseError skip() {
- long ret = bindings.Bolt11ParseError_skip();
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.Bolt11ParseError ret_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Checks if two Bolt11ParseErrors contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- */
- public bool eq(org.ldk.structs.Bolt11ParseError b) {
- bool ret = bindings.Bolt11ParseError_eq(this.ptr, b.ptr);
- GC.KeepAlive(this);
- GC.KeepAlive(b);
- return ret;
- }
-
- public override bool Equals(object o) {
- if (!(o is Bolt11ParseError)) return false;
- return this.eq((Bolt11ParseError)o);
- }
/**
* Get the string representation of a Bolt11ParseError object
*/
return ret_hu_conv;
}
+ /**
+ * Paths to the recipient originating from publicly reachable nodes, including information
+ * needed for routing payments across them.
+ *
+ * Blinded paths provide recipient privacy by obfuscating its node id. Note, however, that this
+ * privacy is lost if a public node id is used for
+ * [`Bolt12Invoice::signing_pubkey`].
+ */
+ public BlindedPaymentPath[] payment_paths() {
+ long ret = bindings.Bolt12Invoice_payment_paths(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ int ret_conv_20_len = InternalUtils.getArrayLength(ret);
+ BlindedPaymentPath[] ret_conv_20_arr = new BlindedPaymentPath[ret_conv_20_len];
+ for (int u = 0; u < ret_conv_20_len; u++) {
+ long ret_conv_20 = InternalUtils.getU64ArrayElem(ret, u);
+ org.ldk.structs.BlindedPaymentPath ret_conv_20_hu_conv = null; if (ret_conv_20 < 0 || ret_conv_20 > 4096) { ret_conv_20_hu_conv = new org.ldk.structs.BlindedPaymentPath(null, ret_conv_20); }
+ if (ret_conv_20_hu_conv != null) { ret_conv_20_hu_conv.ptrs_to.AddLast(this); };
+ ret_conv_20_arr[u] = ret_conv_20_hu_conv;
+ }
+ bindings.free_buffer(ret);
+ return ret_conv_20_arr;
+ }
+
/**
* Duration since the Unix epoch when the invoice was created.
*/
}
/**
- * The public key corresponding to the key used to sign the invoice.
+ * A typically transient public key corresponding to the key used to sign the invoice.
+ *
+ * If the invoices was created in response to an [`Offer`], then this will be:
+ * - [`Offer::issuer_signing_pubkey`] if it's `Some`, otherwise
+ * - the final blinded node id from a [`BlindedMessagePath`] in [`Offer::paths`] if `None`.
+ *
+ * If the invoice was created in response to a [`Refund`], then it is a valid pubkey chosen by
+ * the recipient.
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ * [`Offer::issuer_signing_pubkey`]: crate::offers::offer::Offer::issuer_signing_pubkey
+ * [`Offer::paths`]: crate::offers::offer::Offer::paths
+ * [`Refund`]: crate::offers::refund::Refund
*/
public byte[] signing_pubkey() {
long ret = bindings.Bolt12Invoice_signing_pubkey(this.ptr);
return ret_hu_conv;
}
+ /**
+ * The public key used by the recipient to sign invoices.
+ *
+ * From [`Offer::issuer_signing_pubkey`] and may be `None`; also `None` if the invoice was
+ * created in response to a [`Refund`].
+ *
+ * [`Offer::issuer_signing_pubkey`]: crate::offers::offer::Offer::issuer_signing_pubkey
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public byte[] issuer_signing_pubkey() {
+ long ret = bindings.Bolt12Invoice_issuer_signing_pubkey(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
/**
* An unpredictable series of bytes from the payer.
*
*
* [`message_paths`]: Self::message_paths
*/
- public byte[] payer_id() {
- long ret = bindings.Bolt12Invoice_payer_id(this.ptr);
+ public byte[] payer_signing_pubkey() {
+ long ret = bindings.Bolt12Invoice_payer_signing_pubkey(this.ptr);
GC.KeepAlive(this);
if (ret >= 0 && ret <= 4096) { return null; }
byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
return ret;
}
+ /**
+ * Set this feature as optional.
+ */
+ public void set_trampoline_routing_optional() {
+ bindings.Bolt12InvoiceFeatures_set_trampoline_routing_optional(this.ptr);
+ GC.KeepAlive(this);
+ }
+
+ /**
+ * Set this feature as required.
+ */
+ public void set_trampoline_routing_required() {
+ bindings.Bolt12InvoiceFeatures_set_trampoline_routing_required(this.ptr);
+ GC.KeepAlive(this);
+ }
+
+ /**
+ * Checks if this feature is supported.
+ */
+ public bool supports_trampoline_routing() {
+ bool ret = bindings.Bolt12InvoiceFeatures_supports_trampoline_routing(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Checks if this feature is required.
+ */
+ public bool requires_trampoline_routing() {
+ bool ret = bindings.Bolt12InvoiceFeatures_requires_trampoline_routing(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
}
} } }
GC.KeepAlive(this);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.util.UInt128 ret_conv = new org.ldk.util.UInt128(ret);
+ bindings.free_buffer(ret);
return ret_conv;
}
GC.KeepAlive(val);
}
- /**
- * Our total balance. This is the amount we would get if we close the channel.
- * This value is not exact. Due to various in-flight changes and feerate changes, exactly this
- * amount is not likely to be recoverable on close.
- *
- * This does not include any pending HTLCs which are not yet fully resolved (and, thus, whose
- * balance is not available for inclusion in new outbound HTLCs). This further does not include
- * any pending outgoing HTLCs which are awaiting some other resolution to be sent.
- * This does not consider any on-chain fees.
- *
- * See also [`ChannelDetails::outbound_capacity_msat`]
- */
- public long get_balance_msat() {
- long ret = bindings.ChannelDetails_get_balance_msat(this.ptr);
- GC.KeepAlive(this);
- return ret;
- }
-
- /**
- * Our total balance. This is the amount we would get if we close the channel.
- * This value is not exact. Due to various in-flight changes and feerate changes, exactly this
- * amount is not likely to be recoverable on close.
- *
- * This does not include any pending HTLCs which are not yet fully resolved (and, thus, whose
- * balance is not available for inclusion in new outbound HTLCs). This further does not include
- * any pending outgoing HTLCs which are awaiting some other resolution to be sent.
- * This does not consider any on-chain fees.
- *
- * See also [`ChannelDetails::outbound_capacity_msat`]
- */
- public void set_balance_msat(long val) {
- bindings.ChannelDetails_set_balance_msat(this.ptr, val);
- GC.KeepAlive(this);
- GC.KeepAlive(val);
- }
-
/**
* The available outbound capacity for sending HTLCs to the remote peer. This does not include
* any pending HTLCs which are not yet fully resolved (and, thus, whose balance is not
* available for inclusion in new outbound HTLCs). This further does not include any pending
* outgoing HTLCs which are awaiting some other resolution to be sent.
*
- * See also [`ChannelDetails::balance_msat`]
- *
* This value is not exact. Due to various in-flight changes, feerate changes, and our
* conflict-avoidance policy, exactly this amount is not likely to be spendable. However, we
* should be able to spend nearly this amount.
* available for inclusion in new outbound HTLCs). This further does not include any pending
* outgoing HTLCs which are awaiting some other resolution to be sent.
*
- * See also [`ChannelDetails::balance_msat`]
- *
* This value is not exact. Due to various in-flight changes, feerate changes, and our
* conflict-avoidance policy, exactly this amount is not likely to be spendable. However, we
* should be able to spend nearly this amount.
* the current state and per-HTLC limit(s). This is intended for use when routing, allowing us
* to use a limit as close as possible to the HTLC limit we can currently send.
*
- * See also [`ChannelDetails::next_outbound_htlc_minimum_msat`],
- * [`ChannelDetails::balance_msat`], and [`ChannelDetails::outbound_capacity_msat`].
+ * See also [`ChannelDetails::next_outbound_htlc_minimum_msat`] and
+ * [`ChannelDetails::outbound_capacity_msat`].
*/
public long get_next_outbound_htlc_limit_msat() {
long ret = bindings.ChannelDetails_get_next_outbound_htlc_limit_msat(this.ptr);
* the current state and per-HTLC limit(s). This is intended for use when routing, allowing us
* to use a limit as close as possible to the HTLC limit we can currently send.
*
- * See also [`ChannelDetails::next_outbound_htlc_minimum_msat`],
- * [`ChannelDetails::balance_msat`], and [`ChannelDetails::outbound_capacity_msat`].
+ * See also [`ChannelDetails::next_outbound_htlc_minimum_msat`] and
+ * [`ChannelDetails::outbound_capacity_msat`].
*/
public void set_next_outbound_htlc_limit_msat(long val) {
bindings.ChannelDetails_set_next_outbound_htlc_limit_msat(this.ptr, val);
* 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(org.ldk.structs.ChannelId channel_id_arg, org.ldk.structs.ChannelCounterparty counterparty_arg, org.ldk.structs.OutPoint funding_txo_arg, 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, bool is_outbound_arg, bool is_channel_ready_arg, org.ldk.structs.Option_ChannelShutdownStateZ channel_shutdown_state_arg, bool is_usable_arg, bool is_announced_arg, org.ldk.structs.Option_u64Z inbound_htlc_minimum_msat_arg, org.ldk.structs.Option_u64Z inbound_htlc_maximum_msat_arg, org.ldk.structs.ChannelConfig config_arg, InboundHTLCDetails[] pending_inbound_htlcs_arg, OutboundHTLCDetails[] pending_outbound_htlcs_arg) {
- long ret = bindings.ChannelDetails_new(channel_id_arg.ptr, 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, InternalUtils.encodeUint8Array(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_announced_arg, inbound_htlc_minimum_msat_arg.ptr, inbound_htlc_maximum_msat_arg.ptr, config_arg == null ? 0 : config_arg.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(pending_inbound_htlcs_arg, pending_inbound_htlcs_arg_conv_20 => pending_inbound_htlcs_arg_conv_20.ptr)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(pending_outbound_htlcs_arg, pending_outbound_htlcs_arg_conv_21 => pending_outbound_htlcs_arg_conv_21.ptr)));
+ public static ChannelDetails of(org.ldk.structs.ChannelId channel_id_arg, org.ldk.structs.ChannelCounterparty counterparty_arg, org.ldk.structs.OutPoint funding_txo_arg, 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 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, bool is_outbound_arg, bool is_channel_ready_arg, org.ldk.structs.Option_ChannelShutdownStateZ channel_shutdown_state_arg, bool is_usable_arg, bool is_announced_arg, org.ldk.structs.Option_u64Z inbound_htlc_minimum_msat_arg, org.ldk.structs.Option_u64Z inbound_htlc_maximum_msat_arg, org.ldk.structs.ChannelConfig config_arg, InboundHTLCDetails[] pending_inbound_htlcs_arg, OutboundHTLCDetails[] pending_outbound_htlcs_arg) {
+ long ret = bindings.ChannelDetails_new(channel_id_arg.ptr, 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, InternalUtils.encodeUint8Array(user_channel_id_arg.getLEBytes()), feerate_sat_per_1000_weight_arg.ptr, 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_announced_arg, inbound_htlc_minimum_msat_arg.ptr, inbound_htlc_maximum_msat_arg.ptr, config_arg == null ? 0 : config_arg.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(pending_inbound_htlcs_arg, pending_inbound_htlcs_arg_conv_20 => pending_inbound_htlcs_arg_conv_20.ptr)), InternalUtils.encodeUint64Array(InternalUtils.mapArray(pending_outbound_htlcs_arg, pending_outbound_htlcs_arg_conv_21 => pending_outbound_htlcs_arg_conv_21.ptr)));
GC.KeepAlive(channel_id_arg);
GC.KeepAlive(counterparty_arg);
GC.KeepAlive(funding_txo_arg);
GC.KeepAlive(unspendable_punishment_reserve_arg);
GC.KeepAlive(user_channel_id_arg);
GC.KeepAlive(feerate_sat_per_1000_weight_arg);
- GC.KeepAlive(balance_msat_arg);
GC.KeepAlive(outbound_capacity_msat_arg);
GC.KeepAlive(next_outbound_htlc_limit_msat_arg);
GC.KeepAlive(next_outbound_htlc_minimum_msat_arg);
return ret_hu_conv;
}
- /**
- * Get the string representation of a ChannelId object
- */
- public string to_str() {
- long ret = bindings.ChannelId_to_str(this.ptr);
- GC.KeepAlive(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- string ret_conv = InternalUtils.decodeString(ret);
- return ret_conv;
- }
-
}
} } }
* - [`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
+ * - [`MessageRouter`] for finding message paths when initiating and retrying onion messages
* - [`Logger`] for logging operational information of varying degrees
*
* Additionally, it implements the following traits:
* # 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>,
+ * # router: &lightning::routing::router::DefaultRouter<&NetworkGraph<&'a L>, &'a L, &ES, &S>,
+ * # message_router: &lightning::onion_message::messenger::DefaultMessageRouter<&NetworkGraph<&'a L>, &'a L, &ES>,
* # logger: &L,
* # entropy_source: &ES,
* # node_signer: &dyn lightning::sign::NodeSigner,
* };
* 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
+ * fee_estimator, chain_monitor, tx_broadcaster, router, message_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()
+ * router, message_router, logger, default_config, channel_monitors.iter().collect(),
* );
* let (block_hash, channel_manager) =
- * <(BlockHash, ChannelManager<_, _, _, _, _, _, _, _>)>::read(&mut reader, args)?;
+ * <(BlockHash, ChannelManager<_, _, _, _, _, _, _, _, _>)>::read(&mut reader, args)?;
*
* Update the ChannelManager and ChannelMonitors with the latest chain data
* ...
*
* ## 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
+ * The [`lightning-invoice`] crate is useful for creating BOLT 11 invoices. However, in order to
+ * construct a [`Bolt11Invoice`] that is compatible with [`ChannelManager`], use
+ * [`create_bolt11_invoice`]. This method serves 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.
+ * own [`PaymentHash`], override the appropriate [`Bolt11InvoiceParameters`], which is equivalent
+ * to using [`create_inbound_payment_for_hash`].
*
* [`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
*
* ```
* # use lightning::events::{Event, EventsProvider, PaymentPurpose};
- * # use lightning::ln::channelmanager::AChannelManager;
+ * # use lightning::ln::channelmanager::{AChannelManager, Bolt11InvoiceParameters};
* #
* # 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
+ * let params = Bolt11InvoiceParameters {
+ * amount_msats: Some(10_000_000),
+ * invoice_expiry_delta_secs: Some(3600),
+ * ..Default::default()
+ * };
+ * let invoice = match channel_manager.create_bolt11_invoice(params) {
+ * Ok(invoice) => {
+ * println!(\"Creating invoice with payment hash {}\", invoice.payment_hash());
+ * invoice
* },
- * Err(()) => panic!(\"Error creating inbound payment\"),
+ * Err(e) => panic!(\"Error creating invoice: {}\", e),
* };
*
* On the event processing thread
* match event {
* Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose {
* PaymentPurpose::Bolt11InvoicePayment { payment_preimage: Some(payment_preimage), .. } => {
- * assert_eq!(payment_hash, known_payment_hash);
+ * assert_eq!(payment_hash.0, invoice.payment_hash().as_ref());
* println!(\"Claiming payment {}\", payment_hash);
* channel_manager.claim_funds(payment_preimage);
* },
* println!(\"Unknown payment hash: {}\", payment_hash);
* },
* PaymentPurpose::SpontaneousPayment(payment_preimage) => {
- * assert_ne!(payment_hash, known_payment_hash);
+ * assert_ne!(payment_hash.0, invoice.payment_hash().as_ref());
* 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);
+ * assert_eq!(payment_hash.0, invoice.payment_hash().as_ref());
* println!(\"Claimed {} msats\", amount_msat);
* },
* ...
* # }
* ```
*
- * For paying an invoice, [`lightning-invoice`] provides a `payment` module with convenience
- * functions for use with [`send_payment`].
+ * For paying an invoice, see the [`bolt11_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::types::payment::PaymentHash;
+ * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails};
+ * # use lightning::ln::outbound_payment::{RecipientOnionFields, Retry};
* # use lightning::routing::router::RouteParameters;
* #
* # fn example<T: AChannelManager>(
*
* ```
* # use lightning::events::{Event, EventsProvider};
- * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, Retry};
+ * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails};
+ * # use lightning::ln::outbound_payment::Retry;
* # use lightning::offers::offer::Offer;
* #
* # fn example<T: AChannelManager>(
* ```
* # use core::time::Duration;
* # use lightning::events::{Event, EventsProvider};
- * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, Retry};
+ * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails};
+ * # use lightning::ln::outbound_payment::Retry;
* # use lightning::offers::parse::Bolt12SemanticError;
* #
* # fn example<T: AChannelManager>(
* [`list_recent_payments`]: Self::list_recent_payments
* [`abandon_payment`]: Self::abandon_payment
* [`lightning-invoice`]: https://docs.rs/lightning_invoice/latest/lightning_invoice
+ * [`create_bolt11_invoice`]: Self::create_bolt11_invoice
* [`create_inbound_payment`]: Self::create_inbound_payment
* [`create_inbound_payment_for_hash`]: Self::create_inbound_payment_for_hash
+ * [`bolt11_payment`]: crate::ln::bolt11_payment
* [`claim_funds`]: Self::claim_funds
* [`send_payment`]: Self::send_payment
* [`offers`]: crate::offers
* [`block_disconnected`]: chain::Listen::block_disconnected
* [`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.ptr, _params.ptr, current_timestamp);
+ 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.MessageRouter message_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, message_router.ptr, logger.ptr, entropy_source.ptr, node_signer.ptr, signer_provider.ptr, config.ptr, _params.ptr, current_timestamp);
GC.KeepAlive(fee_est);
GC.KeepAlive(chain_monitor);
GC.KeepAlive(tx_broadcaster);
GC.KeepAlive(router);
+ GC.KeepAlive(message_router);
GC.KeepAlive(logger);
GC.KeepAlive(entropy_source);
GC.KeepAlive(node_signer);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(chain_monitor); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(tx_broadcaster); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(router); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(message_router); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(logger); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(entropy_source); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(node_signer); };
}
/**
- * Sends a payment along a given route.
- *
- * This method is *DEPRECATED*, use [`Self::send_payment`] instead. If you wish to fix the
- * route for a payment, do so by matching the [`PaymentId`] passed to
- * [`Router::find_route_with_id`].
- *
- * Value parameters are provided via the last hop in route, see documentation for [`RouteHop`]
- * fields for more info.
+ * Sends a payment to the route found using the provided [`RouteParameters`], retrying failed
+ * payment paths based on the provided `Retry`.
*
* May generate [`UpdateHTLCs`] message(s) event on success, which should be relayed (e.g. via
* [`PeerManager::process_events`]).
* # Avoiding Duplicate Payments
*
* If a pending payment is currently in-flight with the same [`PaymentId`] provided, this
- * method will error with an [`APIError::InvalidRoute`]. Note, however, that once a payment
- * is no longer pending (either via [`ChannelManager::abandon_payment`], or handling of an
- * [`Event::PaymentSent`] or [`Event::PaymentFailed`]) LDK will not stop you from sending a
+ * method will error with [`RetryableSendFailure::DuplicatePayment`]. Note, however, that once a
+ * payment is no longer pending (either via [`ChannelManager::abandon_payment`], or handling of
+ * an [`Event::PaymentSent`] or [`Event::PaymentFailed`]) LDK will not stop you from sending a
* second payment with the same [`PaymentId`].
*
* Thus, in order to ensure duplicate payments are not sent, you should implement your own
* using [`ChannelMonitorUpdateStatus::InProgress`]), the payment may be lost on restart. See
* [`ChannelManager::list_recent_payments`] for more information.
*
- * # Possible Error States on [`PaymentSendFailure`]
- *
- * Each path may have a different return value, and [`PaymentSendFailure`] may return a `Vec` with
- * each entry matching the corresponding-index entry in the route paths, see
- * [`PaymentSendFailure`] for more info.
- *
- * In general, a path may raise:
- * [`APIError::InvalidRoute`] when an invalid route or forwarding parameter (cltv_delta, fee,
- * node public key) is specified.
- * [`APIError::ChannelUnavailable`] if the next-hop channel is not available as it has been
- * closed, doesn't exist, or the peer is currently disconnected.
- * [`APIError::MonitorUpdateInProgress`] if a new monitor update failure prevented sending the
- * relevant updates.
+ * Routes are automatically found using the [`Router] provided on startup. To fix a route for a
+ * particular payment, match the [`PaymentId`] passed to [`Router::find_route_with_id`].
*
- * Note that depending on the type of the [`PaymentSendFailure`] the HTLC may have been
- * irrevocably committed to on our end. In such a case, do NOT retry the payment with a
- * different route unless you intend to pay twice!
- *
- * [`RouteHop`]: crate::routing::router::RouteHop
* [`Event::PaymentSent`]: events::Event::PaymentSent
* [`Event::PaymentFailed`]: events::Event::PaymentFailed
* [`UpdateHTLCs`]: events::MessageSendEvent::UpdateHTLCs
* [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events
* [`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.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), recipient_onion.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)));
+ 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.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), recipient_onion.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), route_params.ptr, retry_strategy.ptr);
GC.KeepAlive(this);
- GC.KeepAlive(route);
GC.KeepAlive(payment_hash);
GC.KeepAlive(recipient_onion);
GC.KeepAlive(payment_id);
+ GC.KeepAlive(route_params);
+ GC.KeepAlive(retry_strategy);
if (ret >= 0 && ret <= 4096) { return null; }
- Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
+ Result_NoneRetryableSendFailureZ ret_hu_conv = Result_NoneRetryableSendFailureZ.constr_from_ptr(ret);
return ret_hu_conv;
}
/**
- * Similar to [`ChannelManager::send_payment_with_route`], but will automatically find a route based on
- * `route_params` and retry failed payment paths based on `retry_strategy`.
+ * Pays the [`Bolt12Invoice`] associated with the `payment_id` encoded in its `payer_metadata`.
+ *
+ * The invoice's `payer_metadata` is used to authenticate that the invoice was indeed requested
+ * before attempting a payment. [`Bolt12PaymentError::UnexpectedInvoice`] is returned if this
+ * fails or if the encoded `payment_id` is not recognized. The latter may happen once the
+ * payment is no longer tracked because the payment was attempted after:
+ * - an invoice for the `payment_id` was already paid,
+ * - one full [timer tick] has elapsed since initially requesting the invoice when paying an
+ * offer, or
+ * - the refund corresponding to the invoice has already expired.
+ *
+ * To retry the payment, request another invoice using a new `payment_id`.
+ *
+ * Attempting to pay the same invoice twice while the first payment is still pending will
+ * result in a [`Bolt12PaymentError::DuplicateInvoice`].
+ *
+ * Otherwise, either [`Event::PaymentSent`] or [`Event::PaymentFailed`] are used to indicate
+ * whether or not the payment was successful.
+ *
+ * [timer tick]: Self::timer_tick_occurred
*/
- 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.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), recipient_onion.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), route_params.ptr, retry_strategy.ptr);
+ public Result_NoneBolt12PaymentErrorZ send_payment_for_bolt12_invoice(org.ldk.structs.Bolt12Invoice invoice, org.ldk.structs.Option_OffersContextZ context) {
+ long ret = bindings.ChannelManager_send_payment_for_bolt12_invoice(this.ptr, invoice.ptr, context.ptr);
GC.KeepAlive(this);
- GC.KeepAlive(payment_hash);
- GC.KeepAlive(recipient_onion);
- GC.KeepAlive(payment_id);
- GC.KeepAlive(route_params);
- GC.KeepAlive(retry_strategy);
+ GC.KeepAlive(invoice);
+ GC.KeepAlive(context);
if (ret >= 0 && ret <= 4096) { return null; }
- Result_NoneRetryableSendFailureZ ret_hu_conv = Result_NoneRetryableSendFailureZ.constr_from_ptr(ret);
+ Result_NoneBolt12PaymentErrorZ ret_hu_conv = Result_NoneBolt12PaymentErrorZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.AddLast(invoice); };
return ret_hu_conv;
}
* would be able to guess -- otherwise, an intermediate node may claim the payment and it will
* never reach the recipient.
*
- * See [`send_payment`] documentation for more details on the return value of this function
- * and idempotency guarantees provided by the [`PaymentId`] key.
- *
* Similar to regular payments, you MUST NOT reuse a `payment_preimage` value. See
* [`send_payment`] for more information about the risks of duplicate preimage usage.
*
- * [`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.ptr, payment_preimage.ptr, recipient_onion.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)));
- GC.KeepAlive(this);
- GC.KeepAlive(route);
- GC.KeepAlive(payment_preimage);
- GC.KeepAlive(recipient_onion);
- GC.KeepAlive(payment_id);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_ThirtyTwoBytesPaymentSendFailureZ ret_hu_conv = Result_ThirtyTwoBytesPaymentSendFailureZ.constr_from_ptr(ret);
- if (this != null) { this.ptrs_to.AddLast(route); };
- return ret_hu_conv;
- }
-
- /**
- * Similar to [`ChannelManager::send_spontaneous_payment`], but will automatically find a route
- * based on `route_params` and retry failed payment paths based on `retry_strategy`.
+ * See [`send_payment`] documentation for more details on the idempotency guarantees provided by
+ * the [`PaymentId`] key.
*
* See [`PaymentParameters::for_keysend`] for help in constructing `route_params` for spontaneous
* payments.
*
+ * [`send_payment`]: Self::send_payment
* [`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.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), route_params.ptr, retry_strategy.ptr);
+ public Result_ThirtyTwoBytesRetryableSendFailureZ send_spontaneous_payment(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(this.ptr, payment_preimage.ptr, recipient_onion.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), route_params.ptr, retry_strategy.ptr);
GC.KeepAlive(this);
GC.KeepAlive(payment_preimage);
GC.KeepAlive(recipient_onion);
* [`PaymentHash`] of probes based on a static secret and a random [`PaymentId`], which allows
* us to easily discern them from real payments.
*/
- public Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ send_probe(org.ldk.structs.Path path) {
+ public Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ send_probe(org.ldk.structs.Path path) {
long ret = bindings.ChannelManager_send_probe(this.ptr, path.ptr);
GC.KeepAlive(this);
GC.KeepAlive(path);
if (ret >= 0 && ret <= 4096) { return null; }
- Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.constr_from_ptr(ret);
+ Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ.constr_from_ptr(ret);
return ret_hu_conv;
}
* Forgetting about stale outbound payments, either those that have already been fulfilled
* or those awaiting an invoice that hasn't been delivered in the necessary amount of time.
* The latter is determined using the system clock in `std` and the highest seen block time
- * minus two hours in `no-std`.
+ * minus two hours in non-`std`.
*
* Note that this may cause reentrancy through [`chain::Watch::update_channel`] calls or feerate
* estimate fetches.
* for zero confirmations. Instead, `accept_inbound_channel_from_trusted_peer_0conf` must be
* used to accept such channels.
*
+ * NOTE: LDK makes no attempt to prevent the counterparty from using non-standard inputs which
+ * will prevent the funding transaction from being relayed on the bitcoin network and hence being
+ * confirmed.
+ *
* [`Event::OpenChannelRequest`]: events::Event::OpenChannelRequest
* [`Event::ChannelClosed::user_channel_id`]: events::Event::ChannelClosed::user_channel_id
*/
return ret_hu_conv;
}
+ /**
+ * When a call to a [`ChannelSigner`] method returns an error, this indicates that the signer
+ * is (temporarily) unavailable, and the operation should be retried later.
+ *
+ * This method allows for that retry - either checking for any signer-pending messages to be
+ * attempted in every channel, or in the specifically provided channel.
+ *
+ * [`ChannelSigner`]: crate::sign::ChannelSigner
+ */
+ public void signer_unblocked(org.ldk.structs.Option_C2Tuple_PublicKeyChannelIdZZ channel_opt) {
+ bindings.ChannelManager_signer_unblocked(this.ptr, channel_opt.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(channel_opt);
+ }
+
+ /**
+ * Utility for creating a BOLT11 invoice that can be verified by [`ChannelManager`] without
+ * storing any additional state. It achieves this by including a [`PaymentSecret`] in the
+ * invoice which it uses to verify that the invoice has not expired and the payment amount is
+ * sufficient, reproducing the [`PaymentPreimage`] if applicable.
+ */
+ public Result_Bolt11InvoiceSignOrCreationErrorZ create_bolt11_invoice(Option_u64Z params_amount_msats_arg, Bolt11InvoiceDescription params_description_arg, Option_u32Z params_invoice_expiry_delta_secs_arg, Option_u16Z params_min_final_cltv_expiry_delta_arg, Option_ThirtyTwoBytesZ params_payment_hash_arg) {
+ long ret = bindings.ChannelManager_create_bolt11_invoice(this.ptr, bindings.Bolt11InvoiceParameters_new(params_amount_msats_arg.ptr, params_description_arg.ptr, params_invoice_expiry_delta_secs_arg.ptr, params_min_final_cltv_expiry_delta_arg.ptr, params_payment_hash_arg.ptr));
+ GC.KeepAlive(this);
+ GC.KeepAlive(params_amount_msats_arg);
+ GC.KeepAlive(params_description_arg);
+ GC.KeepAlive(params_invoice_expiry_delta_secs_arg);
+ GC.KeepAlive(params_min_final_cltv_expiry_delta_arg);
+ GC.KeepAlive(params_payment_hash_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_Bolt11InvoiceSignOrCreationErrorZ ret_hu_conv = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
+ ;
+ ;
+ ;
+ ;
+ ;
+ 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's
* 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
+ * returned builder will not be honored by [`ChannelManager`]. For non-`std`, the highest seen
* block time minus two hours is used for the current time when determining if the refund has
* expired.
*
* # Limitations
*
* Requires a direct connection to an introduction node in [`Offer::paths`] or to
- * [`Offer::signing_pubkey`], if empty. A similar restriction applies to the responding
+ * [`Offer::issuer_signing_pubkey`], if empty. A similar restriction applies to the responding
* [`Bolt12Invoice::payment_paths`].
*
* # Errors
* # Limitations
*
* Requires a direct connection to an introduction node in [`Refund::paths`] or to
- * [`Refund::payer_id`], if empty. This request is best effort; an invoice will be sent to each
- * node meeting the aforementioned criteria, but there's no guarantee that they will be
- * received and no retries will be made.
+ * [`Refund::payer_signing_pubkey`], if empty. This request is best effort; an invoice will be
+ * sent to each node meeting the aforementioned criteria, but there's no guarantee that they
+ * will be received and no retries will be made.
*
* # Errors
*
return ret_hu_conv;
}
+ /**
+ * Pays for an [`Offer`] looked up using [BIP 353] Human Readable Names resolved by the DNS
+ * resolver(s) at `dns_resolvers` which resolve names according to bLIP 32.
+ *
+ * If the wallet supports paying on-chain schemes, you should instead use
+ * [`OMNameResolver::resolve_name`] and [`OMNameResolver::handle_dnssec_proof_for_uri`] (by
+ * implementing [`DNSResolverMessageHandler`]) directly to look up a URI and then delegate to
+ * your normal URI handling.
+ *
+ * If `max_total_routing_fee_msat` is not specified, the default from
+ * [`RouteParameters::from_payment_params_and_value`] is applied.
+ *
+ * # Payment
+ *
+ * The provided `payment_id` is used to ensure that only one invoice is paid for the request
+ * when received. See [Avoiding Duplicate Payments] for other requirements once the payment has
+ * been sent.
+ *
+ * To revoke the request, use [`ChannelManager::abandon_payment`] prior to receiving the
+ * invoice. If abandoned, or an invoice isn't received in a reasonable amount of time, the
+ * payment will fail with an [`Event::InvoiceRequestFailed`].
+ *
+ * # Privacy
+ *
+ * For payer privacy, uses a derived payer id and uses [`MessageRouter::create_blinded_paths`]
+ * to construct a [`BlindedPath`] for the reply path. For further privacy implications, see the
+ * docs of the parameterized [`Router`], which implements [`MessageRouter`].
+ *
+ * # Limitations
+ *
+ * Requires a direct connection to the given [`Destination`] as well as an introduction node in
+ * [`Offer::paths`] or to [`Offer::signing_pubkey`], if empty. A similar restriction applies to
+ * the responding [`Bolt12Invoice::payment_paths`].
+ *
+ * # Errors
+ *
+ * Errors if:
+ * - a duplicate `payment_id` is provided given the caveats in the aforementioned link,
+ *
+ * [`Bolt12Invoice::payment_paths`]: crate::offers::invoice::Bolt12Invoice::payment_paths
+ * [Avoiding Duplicate Payments]: #avoiding-duplicate-payments
+ */
+ public Result_NoneNoneZ pay_for_offer_from_human_readable_name(org.ldk.structs.HumanReadableName name, long amount_msats, byte[] payment_id, org.ldk.structs.Retry retry_strategy, org.ldk.structs.Option_u64Z max_total_routing_fee_msat, Destination[] dns_resolvers) {
+ long ret = bindings.ChannelManager_pay_for_offer_from_human_readable_name(this.ptr, name.ptr, amount_msats, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), retry_strategy.ptr, max_total_routing_fee_msat.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(dns_resolvers, dns_resolvers_conv_13 => dns_resolvers_conv_13.ptr)));
+ GC.KeepAlive(this);
+ GC.KeepAlive(name);
+ GC.KeepAlive(amount_msats);
+ GC.KeepAlive(payment_id);
+ GC.KeepAlive(retry_strategy);
+ GC.KeepAlive(max_total_routing_fee_msat);
+ GC.KeepAlive(dns_resolvers);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
/**
* Gets a payment secret and payment hash for use in an invoice given to a third party wishing
* to pay us.
return ret_hu_conv;
}
+ /**
+ * Constructs a new DNSResolverMessageHandler which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned DNSResolverMessageHandler must be freed before this_arg is
+ */
+ public DNSResolverMessageHandler as_DNSResolverMessageHandler() {
+ long ret = bindings.ChannelManager_as_DNSResolverMessageHandler(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ DNSResolverMessageHandler ret_hu_conv = new DNSResolverMessageHandler(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ 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
* 3) If you are not fetching full blocks, register all relevant [`ChannelMonitor`] outpoints the
* same way you would handle a [`chain::Filter`] call using
* [`ChannelMonitor::get_outputs_to_watch`] and [`ChannelMonitor::get_funding_txo`].
- * 4) Reconnect blocks on your [`ChannelMonitor`]s.
- * 5) Disconnect/connect blocks on the [`ChannelManager`].
- * 6) Re-persist the [`ChannelMonitor`]s to ensure the latest state is on disk.
+ * 4) Disconnect/connect blocks on your [`ChannelMonitor`]s to get them in sync with the chain.
+ * 5) Disconnect/connect blocks on the [`ChannelManager`] to get it in sync with the chain.
+ * 6) Optionally re-persist the [`ChannelMonitor`]s to ensure the latest state is on disk.
+ * This is important if you have replayed a nontrivial number of blocks in step (4), allowing
+ * you to avoid having to replay the same blocks if you shut down quickly after startup. It is
+ * otherwise not required.
* Note that if you're using a [`ChainMonitor`] for your [`chain::Watch`] implementation, you
* will likely accomplish this as a side-effect of calling [`chain::Watch::watch_channel`] in
* the next step.
if (this != null) { this.ptrs_to.AddLast(val); };
}
+ /**
+ * The [`MessageRouter`] used for constructing [`BlindedMessagePath`]s for [`Offer`]s,
+ * [`Refund`]s, and any reply paths.
+ */
+ public MessageRouter get_message_router() {
+ long ret = bindings.ChannelManagerReadArgs_get_message_router(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ MessageRouter ret_hu_conv = new MessageRouter(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The [`MessageRouter`] used for constructing [`BlindedMessagePath`]s for [`Offer`]s,
+ * [`Refund`]s, and any reply paths.
+ */
+ public void set_message_router(org.ldk.structs.MessageRouter val) {
+ bindings.ChannelManagerReadArgs_set_message_router(this.ptr, val.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(val);
+ if (this != null) { this.ptrs_to.AddLast(val); };
+ }
+
/**
* The Logger for use in the ChannelManager and which may be used to log information during
* deserialization.
* HashMap for you. This is primarily useful for C bindings where it is not practical to
* 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.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(channel_monitors, channel_monitors_conv_16 => channel_monitors_conv_16.ptr)));
+ 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.MessageRouter message_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, message_router.ptr, logger.ptr, default_config.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(channel_monitors, channel_monitors_conv_16 => channel_monitors_conv_16.ptr)));
GC.KeepAlive(entropy_source);
GC.KeepAlive(node_signer);
GC.KeepAlive(signer_provider);
GC.KeepAlive(chain_monitor);
GC.KeepAlive(tx_broadcaster);
GC.KeepAlive(router);
+ GC.KeepAlive(message_router);
GC.KeepAlive(logger);
GC.KeepAlive(default_config);
GC.KeepAlive(channel_monitors);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(chain_monitor); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(tx_broadcaster); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(router); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(message_router); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(logger); };
foreach (ChannelMonitor channel_monitors_conv_16 in channel_monitors) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channel_monitors_conv_16); }; };
return ret_hu_conv;
* connecting to peers.
*/
Option_CVec_ThirtyTwoBytesZZ get_chain_hashes();
+ /**Indicates that a message was received from any peer for any handler.
+ * Called before the message is passed to the appropriate handler.
+ * Useful for indicating that a network connection is active.
+ *
+ * Note: Since this function is called frequently, it should be as
+ * efficient as possible for its intended purpose.
+ */
+ void message_received();
}
/**
long result = ret.clone_ptr();
return result;
}
+ public void message_received() {
+ arg.message_received();
+ GC.KeepAlive(arg);
+ }
}
/** Creates a new instance of ChannelMessageHandler from a given implementation */
return ret_hu_conv;
}
+ /**
+ * Indicates that a message was received from any peer for any handler.
+ * Called before the message is passed to the appropriate handler.
+ * Useful for indicating that a network connection is active.
+ *
+ * Note: Since this function is called frequently, it should be as
+ * efficient as possible for its intended purpose.
+ */
+ public void message_received() {
+ bindings.ChannelMessageHandler_message_received(this.ptr);
+ GC.KeepAlive(this);
+ }
+
}
} } }
/**
* Gets the update_id from the latest ChannelMonitorUpdate which was applied to this
* ChannelMonitor.
+ *
+ * Note that for channels closed prior to LDK 0.1, this may return [`u64::MAX`].
*/
public long get_latest_update_id() {
long ret = bindings.ChannelMonitor_get_latest_update_id(this.ptr);
* [`SpendableOutputs`]: crate::events::Event::SpendableOutputs
* [`BumpTransaction`]: crate::events::Event::BumpTransaction
*/
- public Result_NoneReplayEventZ process_pending_events(org.ldk.structs.EventHandler handler) {
- long ret = bindings.ChannelMonitor_process_pending_events(this.ptr, handler.ptr);
+ public Result_NoneReplayEventZ process_pending_events(org.ldk.structs.EventHandler handler, org.ldk.structs.Logger logger) {
+ long ret = bindings.ChannelMonitor_process_pending_events(this.ptr, handler.ptr, logger.ptr);
GC.KeepAlive(this);
GC.KeepAlive(handler);
+ GC.KeepAlive(logger);
if (ret >= 0 && ret <= 4096) { return null; }
Result_NoneReplayEventZ ret_hu_conv = Result_NoneReplayEventZ.constr_from_ptr(ret);
if (this != null) { this.ptrs_to.AddLast(handler); };
+ if (this != null) { this.ptrs_to.AddLast(logger); };
return ret_hu_conv;
}
/**
* 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).
+ * its outputs and balances (i.e. [`Self::get_claimable_balances`] returns an empty set) and
+ * which does not have any payment preimages for HTLCs which are still pending on other
+ * channels.
+ *
+ * Additionally may update state to track when the balances set became empty.
+ *
+ * This function returns a tuple of two booleans, the first indicating whether the monitor is
+ * fully resolved, and the second whether the monitor needs persistence to ensure it is
+ * reliably marked as resolved within 4032 blocks.
*
- * This function returns true only if [`Self::get_claimable_balances`] has been empty for at least
+ * The first boolean is 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 bool is_fully_resolved(org.ldk.structs.Logger logger) {
- bool ret = bindings.ChannelMonitor_is_fully_resolved(this.ptr, logger.ptr);
+ public TwoTuple_boolboolZ check_and_update_full_resolution_status(org.ldk.structs.Logger logger) {
+ long ret = bindings.ChannelMonitor_check_and_update_full_resolution_status(this.ptr, logger.ptr);
GC.KeepAlive(this);
GC.KeepAlive(logger);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_boolboolZ ret_hu_conv = new TwoTuple_boolboolZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
if (this != null) { this.ptrs_to.AddLast(logger); };
- return ret;
+ return ret_hu_conv;
}
/**
* [`ChannelMonitorUpdateStatus::InProgress`] have been applied to all copies of a given
* ChannelMonitor when ChannelManager::channel_monitor_updated is called.
*
- * The only instances we allow where update_id values are not strictly increasing have a
- * special update ID of [`CLOSED_CHANNEL_UPDATE_ID`]. This update ID is used for updates that
- * will force close the channel by broadcasting the latest commitment transaction or
- * special post-force-close updates, like providing preimages necessary to claim outputs on the
- * broadcast commitment transaction. See its docs for more details.
+ * Note that for [`ChannelMonitorUpdate`]s generated on LDK versions prior to 0.1 after the
+ * channel was closed, this value may be [`u64::MAX`]. In that case, multiple updates may
+ * appear with the same ID, and all should be replayed.
*
* [`ChannelMonitorUpdateStatus::InProgress`]: super::ChannelMonitorUpdateStatus::InProgress
*/
* [`ChannelMonitorUpdateStatus::InProgress`] have been applied to all copies of a given
* ChannelMonitor when ChannelManager::channel_monitor_updated is called.
*
- * The only instances we allow where update_id values are not strictly increasing have a
- * special update ID of [`CLOSED_CHANNEL_UPDATE_ID`]. This update ID is used for updates that
- * will force close the channel by broadcasting the latest commitment transaction or
- * special post-force-close updates, like providing preimages necessary to claim outputs on the
- * broadcast commitment transaction. See its docs for more details.
+ * Note that for [`ChannelMonitorUpdate`]s generated on LDK versions prior to 0.1 after the
+ * channel was closed, this value may be [`u64::MAX`]. In that case, multiple updates may
+ * appear with the same ID, and all should be replayed.
*
* [`ChannelMonitorUpdateStatus::InProgress`]: super::ChannelMonitorUpdateStatus::InProgress
*/
*
* Note that the commitment number starts at `(1 << 48) - 1` and counts backwards.
*
- * If the signer returns `Err`, then the user is responsible for either force-closing the channel
- * or calling `ChannelManager::signer_unblocked` (this method is only available when the
- * `async_signing` cfg flag is enabled) once the signature is ready.
+ * This method is *not* asynchronous. This method is expected to always return `Ok`
+ * immediately after we reconnect to peers, and returning an `Err` may lead to an immediate
+ * `panic`. This method will be made asynchronous in a future release.
*/
Result_PublicKeyNoneZ get_per_commitment_point(long idx);
/**Gets the commitment secret for a specific commitment number as part of the revocation process
* May be called more than once for the same index.
*
* Note that the commitment number starts at `(1 << 48) - 1` and counts backwards.
+ *
+ * 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`, [`ChannelManager::signer_unblocked`] must be called.
+ *
+ * [`ChannelManager::signer_unblocked`]: crate::ln::channelmanager::ChannelManager::signer_unblocked
*/
Result__u832NoneZ release_commitment_secret(long idx);
/**Validate the counterparty's signatures on the holder commitment transaction and HTLCs.
*
* Note that all the relevant preimages will be provided, but there may also be additional
* irrelevant or duplicate preimages.
+ *
+ * This method is *not* asynchronous. If an `Err` is returned, the channel will be immediately
+ * closed. If you wish to make this operation asynchronous, you should instead return `Ok(())`
+ * and pause future signing operations until this validation completes.
*/
Result_NoneNoneZ validate_holder_commitment(HolderCommitmentTransaction holder_tx, byte[][] outbound_htlc_preimages);
/**Validate the counterparty's revocation.
*
* This is required in order for the signer to make sure that the state has moved
* forward and it is safe to sign the next counterparty commitment.
+ *
+ * This method is *not* asynchronous. If an `Err` is returned, the channel will be immediately
+ * closed. If you wish to make this operation asynchronous, you should instead return `Ok(())`
+ * and pause future signing operations until this validation completes.
*/
Result_NoneNoneZ validate_counterparty_revocation(long idx, byte[] secret);
/**Returns an arbitrary identifier describing the set of keys which are provided back to you in
* some [`SpendableOutputDescriptor`] types. This should be sufficient to identify this
* [`EcdsaChannelSigner`] object uniquely and lookup or re-derive its keys.
+ *
+ * This method is *not* asynchronous. Instead, the value must be cached locally.
*/
byte[] channel_keys_id();
/**Set the counterparty static channel data, including basepoints,
* A trait to handle Lightning channel key material without concretizing the channel type or
* the signature mechanism.
*
- * Several methods allow error types to be returned to support async signing. This feature
- * is not yet complete, and panics may occur in certain situations when returning errors
- * for these methods.
+ * Several methods allow errors to be returned to support async signing. In such cases, the
+ * signing operation can be replayed by calling [`ChannelManager::signer_unblocked`] once the
+ * result is ready, at which point the channel operation will resume. Methods which allow for
+ * async results are explicitly documented as such
+ *
+ * [`ChannelManager::signer_unblocked`]: crate::ln::channelmanager::ChannelManager::signer_unblocked
*/
public class ChannelSigner : CommonBase {
internal bindings.LDKChannelSigner bindings_instance;
*
* Note that the commitment number starts at `(1 << 48) - 1` and counts backwards.
*
- * If the signer returns `Err`, then the user is responsible for either force-closing the channel
- * or calling `ChannelManager::signer_unblocked` (this method is only available when the
- * `async_signing` cfg flag is enabled) once the signature is ready.
+ * This method is *not* asynchronous. This method is expected to always return `Ok`
+ * immediately after we reconnect to peers, and returning an `Err` may lead to an immediate
+ * `panic`. This method will be made asynchronous in a future release.
*/
public Result_PublicKeyNoneZ get_per_commitment_point(long idx) {
long ret = bindings.ChannelSigner_get_per_commitment_point(this.ptr, idx);
* May be called more than once for the same index.
*
* Note that the commitment number starts at `(1 << 48) - 1` and counts backwards.
+ *
+ * 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`, [`ChannelManager::signer_unblocked`] must be called.
+ *
+ * [`ChannelManager::signer_unblocked`]: crate::ln::channelmanager::ChannelManager::signer_unblocked
*/
public Result__u832NoneZ release_commitment_secret(long idx) {
long ret = bindings.ChannelSigner_release_commitment_secret(this.ptr, idx);
*
* Note that all the relevant preimages will be provided, but there may also be additional
* irrelevant or duplicate preimages.
+ *
+ * This method is *not* asynchronous. If an `Err` is returned, the channel will be immediately
+ * closed. If you wish to make this operation asynchronous, you should instead return `Ok(())`
+ * and pause future signing operations until this validation completes.
*/
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.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(outbound_htlc_preimages, outbound_htlc_preimages_conv_8 => InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(outbound_htlc_preimages_conv_8, 32)))));
*
* This is required in order for the signer to make sure that the state has moved
* forward and it is safe to sign the next counterparty commitment.
+ *
+ * This method is *not* asynchronous. If an `Err` is returned, the channel will be immediately
+ * closed. If you wish to make this operation asynchronous, you should instead return `Ok(())`
+ * and pause future signing operations until this validation completes.
*/
public Result_NoneNoneZ validate_counterparty_revocation(long idx, byte[] secret) {
long ret = bindings.ChannelSigner_validate_counterparty_revocation(this.ptr, idx, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(secret, 32)));
* Returns an arbitrary identifier describing the set of keys which are provided back to you in
* some [`SpendableOutputDescriptor`] types. This should be sufficient to identify this
* [`EcdsaChannelSigner`] object uniquely and lookup or re-derive its keys.
+ *
+ * This method is *not* asynchronous. Instead, the value must be cached locally.
*/
public byte[] channel_keys_id() {
long ret = bindings.ChannelSigner_channel_keys_id(this.ptr);
GC.KeepAlive(this);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.util.UInt128 ret_conv = new org.ldk.util.UInt128(ret);
+ bindings.free_buffer(ret);
return ret_conv;
}
/**
- * Contains fields that are both common to [`accept_channel`] and `accept_channel2` messages.
+ * 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
+ * [`accept_channel2`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-accept_channel2-message
*/
public class CommonAcceptChannelFields : CommonBase {
internal CommonAcceptChannelFields(object _dummy, long ptr) : base(ptr) { }
/**
- * Contains fields that are both common to [`open_channel`] and `open_channel2` messages.
+ * 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
+ * [`open_channel2`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-open_channel2-message
*/
public class CommonOpenChannelFields : CommonBase {
internal CommonOpenChannelFields(object _dummy, long ptr) : base(ptr) { }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+/**
+ * Contains a simple nonce for use in a blinded path's context.
+ *
+ * Such a context is required when receiving a [`DNSSECProof`] message.
+ *
+ * [`DNSSECProof`]: crate::onion_message::dns_resolution::DNSSECProof
+ */
+public class DNSResolverContext : CommonBase {
+ internal DNSResolverContext(object _dummy, long ptr) : base(ptr) { }
+ ~DNSResolverContext() {
+ if (ptr != 0) { bindings.DNSResolverContext_free(ptr); }
+ }
+
+ /**
+ * A nonce which uniquely describes a DNS resolution.
+ *
+ * When we receive a DNSSEC proof message, we should check that it was sent over the blinded
+ * path we included in the request by comparing a stored nonce with this one.
+ */
+ public byte[] get_nonce() {
+ long ret = bindings.DNSResolverContext_get_nonce(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
+ /**
+ * A nonce which uniquely describes a DNS resolution.
+ *
+ * When we receive a DNSSEC proof message, we should check that it was sent over the blinded
+ * path we included in the request by comparing a stored nonce with this one.
+ */
+ public void set_nonce(byte[] val) {
+ bindings.DNSResolverContext_set_nonce(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 16)));
+ GC.KeepAlive(this);
+ GC.KeepAlive(val);
+ }
+
+ /**
+ * Constructs a new DNSResolverContext given each field
+ */
+ public static DNSResolverContext of(byte[] nonce_arg) {
+ long ret = bindings.DNSResolverContext_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(nonce_arg, 16)));
+ GC.KeepAlive(nonce_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.DNSResolverContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.DNSResolverContext(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.DNSResolverContext_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the DNSResolverContext
+ */
+ public DNSResolverContext clone() {
+ long ret = bindings.DNSResolverContext_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.DNSResolverContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.DNSResolverContext(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Generates a non-cryptographic 64-bit hash of the DNSResolverContext.
+ */
+ public long hash() {
+ long ret = bindings.DNSResolverContext_hash(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ public override int GetHashCode() {
+ return (int)this.hash();
+ }
+ /**
+ * Checks if two DNSResolverContexts 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 bool eq(org.ldk.structs.DNSResolverContext b) {
+ bool ret = bindings.DNSResolverContext_eq(this.ptr, b.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(b);
+ if (this != null) { this.ptrs_to.AddLast(b); };
+ return ret;
+ }
+
+ public override bool Equals(object o) {
+ if (!(o is DNSResolverContext)) return false;
+ return this.eq((DNSResolverContext)o);
+ }
+ /**
+ * Serialize the DNSResolverContext object into a byte array which can be read by DNSResolverContext_read
+ */
+ public byte[] write() {
+ long ret = bindings.DNSResolverContext_write(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
+ /**
+ * Read a DNSResolverContext from a byte array, created by DNSResolverContext_write
+ */
+ public static Result_DNSResolverContextDecodeErrorZ read(byte[] ser) {
+ long ret = bindings.DNSResolverContext_read(InternalUtils.encodeUint8Array(ser));
+ GC.KeepAlive(ser);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_DNSResolverContextDecodeErrorZ ret_hu_conv = Result_DNSResolverContextDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+/**
+ * An enum containing the possible onion messages which are used uses to request and receive
+ * DNSSEC proofs.
+ */
+public class DNSResolverMessage : CommonBase {
+ protected DNSResolverMessage(object _dummy, long ptr) : base(ptr) { }
+ ~DNSResolverMessage() {
+ if (ptr != 0) { bindings.DNSResolverMessage_free(ptr); }
+ }
+
+ internal static DNSResolverMessage constr_from_ptr(long ptr) {
+ long raw_ty = bindings.LDKDNSResolverMessage_ty_from_ptr(ptr);
+ switch (raw_ty) {
+ case 0: return new DNSResolverMessage_DNSSECQuery(ptr);
+ case 1: return new DNSResolverMessage_DNSSECProof(ptr);
+ default:
+ throw new ArgumentException("Impossible enum variant");
+ }
+ }
+
+ /** A DNSResolverMessage of type DNSSECQuery */
+ public class DNSResolverMessage_DNSSECQuery : DNSResolverMessage {
+ public DNSSECQuery dnssec_query;
+ internal DNSResolverMessage_DNSSECQuery(long ptr) : base(null, ptr) {
+ long dnssec_query = bindings.LDKDNSResolverMessage_DNSSECQuery_get_dnssec_query(ptr);
+ org.ldk.structs.DNSSECQuery dnssec_query_hu_conv = null; if (dnssec_query < 0 || dnssec_query > 4096) { dnssec_query_hu_conv = new org.ldk.structs.DNSSECQuery(null, dnssec_query); }
+ if (dnssec_query_hu_conv != null) { dnssec_query_hu_conv.ptrs_to.AddLast(this); };
+ this.dnssec_query = dnssec_query_hu_conv;
+ }
+ }
+ /** A DNSResolverMessage of type DNSSECProof */
+ public class DNSResolverMessage_DNSSECProof : DNSResolverMessage {
+ public DNSSECProof dnssec_proof;
+ internal DNSResolverMessage_DNSSECProof(long ptr) : base(null, ptr) {
+ long dnssec_proof = bindings.LDKDNSResolverMessage_DNSSECProof_get_dnssec_proof(ptr);
+ org.ldk.structs.DNSSECProof dnssec_proof_hu_conv = null; if (dnssec_proof < 0 || dnssec_proof > 4096) { dnssec_proof_hu_conv = new org.ldk.structs.DNSSECProof(null, dnssec_proof); }
+ if (dnssec_proof_hu_conv != null) { dnssec_proof_hu_conv.ptrs_to.AddLast(this); };
+ this.dnssec_proof = dnssec_proof_hu_conv;
+ }
+ }
+ internal long clone_ptr() {
+ long ret = bindings.DNSResolverMessage_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the DNSResolverMessage
+ */
+ public DNSResolverMessage clone() {
+ long ret = bindings.DNSResolverMessage_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.DNSResolverMessage ret_hu_conv = org.ldk.structs.DNSResolverMessage.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new DNSSECQuery-variant DNSResolverMessage
+ */
+ public static DNSResolverMessage dnssecquery(org.ldk.structs.DNSSECQuery a) {
+ long ret = bindings.DNSResolverMessage_dnssecquery(a.ptr);
+ GC.KeepAlive(a);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.DNSResolverMessage ret_hu_conv = org.ldk.structs.DNSResolverMessage.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new DNSSECProof-variant DNSResolverMessage
+ */
+ public static DNSResolverMessage dnssecproof(org.ldk.structs.DNSSECProof a) {
+ long ret = bindings.DNSResolverMessage_dnssecproof(a.ptr);
+ GC.KeepAlive(a);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.DNSResolverMessage ret_hu_conv = org.ldk.structs.DNSResolverMessage.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Generates a non-cryptographic 64-bit hash of the DNSResolverMessage.
+ */
+ public long hash() {
+ long ret = bindings.DNSResolverMessage_hash(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ public override int GetHashCode() {
+ return (int)this.hash();
+ }
+ /**
+ * Checks if two DNSResolverMessages contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public bool eq(org.ldk.structs.DNSResolverMessage b) {
+ bool ret = bindings.DNSResolverMessage_eq(this.ptr, b.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(b);
+ return ret;
+ }
+
+ public override bool Equals(object o) {
+ if (!(o is DNSResolverMessage)) return false;
+ return this.eq((DNSResolverMessage)o);
+ }
+ /**
+ * Serialize the DNSResolverMessage object into a byte array which can be read by DNSResolverMessage_read
+ */
+ public byte[] write() {
+ long ret = bindings.DNSResolverMessage_write(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
+ /**
+ * Read a DNSResolverMessage from a byte array, created by DNSResolverMessage_write
+ */
+ public static Result_DNSResolverMessageDecodeErrorZ read(byte[] ser, long arg) {
+ long ret = bindings.DNSResolverMessage_read(InternalUtils.encodeUint8Array(ser), arg);
+ GC.KeepAlive(ser);
+ GC.KeepAlive(arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_DNSResolverMessageDecodeErrorZ ret_hu_conv = Result_DNSResolverMessageDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new OnionMessageContents which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned OnionMessageContents must be freed before this_arg is
+ */
+ public OnionMessageContents as_OnionMessageContents() {
+ long ret = bindings.DNSResolverMessage_as_OnionMessageContents(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ OnionMessageContents ret_hu_conv = new OnionMessageContents(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+
+/** An implementation of DNSResolverMessageHandler */
+public interface DNSResolverMessageHandlerInterface {
+ /**Handle a [`DNSSECQuery`] message.
+ *
+ * If we provide DNS resolution services to third parties, we should respond with a
+ * [`DNSSECProof`] message.
+ *
+ * Note that responder (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ Option_C2Tuple_DNSResolverMessageResponseInstructionZZ handle_dnssec_query(DNSSECQuery message, Responder responder);
+ /**Handle a [`DNSSECProof`] message (in response to a [`DNSSECQuery`] we presumably sent).
+ *
+ * With this, we should be able to validate the DNS record we requested.
+ */
+ void handle_dnssec_proof(DNSSECProof message, DNSResolverContext context);
+ /**Gets the node feature flags which this handler itself supports. Useful for setting the
+ * `dns_resolver` flag if this handler supports returning [`DNSSECProof`] messages in response
+ * to [`DNSSECQuery`] messages.
+ */
+ NodeFeatures provided_node_features();
+ /**Release any [`DNSResolverMessage`]s that need to be sent.
+ */
+ TwoTuple_DNSResolverMessageMessageSendInstructionsZ[] release_pending_messages();
+}
+
+/**
+ * A handler for an [`OnionMessage`] containing a DNS(SEC) query or a DNSSEC proof
+ *
+ * [`OnionMessage`]: crate::ln::msgs::OnionMessage
+ */
+public class DNSResolverMessageHandler : CommonBase {
+ internal bindings.LDKDNSResolverMessageHandler bindings_instance;
+ internal long instance_idx;
+
+ internal DNSResolverMessageHandler(object _dummy, long ptr) : base(ptr) { bindings_instance = null; }
+ ~DNSResolverMessageHandler() {
+ if (ptr != 0) { bindings.DNSResolverMessageHandler_free(ptr); }
+ }
+
+ private class LDKDNSResolverMessageHandlerHolder { internal DNSResolverMessageHandler held; }
+ private class LDKDNSResolverMessageHandlerImpl : bindings.LDKDNSResolverMessageHandler {
+ internal LDKDNSResolverMessageHandlerImpl(DNSResolverMessageHandlerInterface arg, LDKDNSResolverMessageHandlerHolder impl_holder) { this.arg = arg; this.impl_holder = impl_holder; }
+ private DNSResolverMessageHandlerInterface arg;
+ private LDKDNSResolverMessageHandlerHolder impl_holder;
+ public long handle_dnssec_query(long _message, long _responder) {
+ org.ldk.structs.DNSSECQuery _message_hu_conv = null; if (_message < 0 || _message > 4096) { _message_hu_conv = new org.ldk.structs.DNSSECQuery(null, _message); }
+ if (_message_hu_conv != null) { _message_hu_conv.ptrs_to.AddLast(this); };
+ org.ldk.structs.Responder _responder_hu_conv = null; if (_responder < 0 || _responder > 4096) { _responder_hu_conv = new org.ldk.structs.Responder(null, _responder); }
+ if (_responder_hu_conv != null) { _responder_hu_conv.ptrs_to.AddLast(this); };
+ Option_C2Tuple_DNSResolverMessageResponseInstructionZZ ret = arg.handle_dnssec_query(_message_hu_conv, _responder_hu_conv);
+ GC.KeepAlive(arg);
+ long result = ret.clone_ptr();
+ return result;
+ }
+ public void handle_dnssec_proof(long _message, long _context) {
+ org.ldk.structs.DNSSECProof _message_hu_conv = null; if (_message < 0 || _message > 4096) { _message_hu_conv = new org.ldk.structs.DNSSECProof(null, _message); }
+ if (_message_hu_conv != null) { _message_hu_conv.ptrs_to.AddLast(this); };
+ org.ldk.structs.DNSResolverContext _context_hu_conv = null; if (_context < 0 || _context > 4096) { _context_hu_conv = new org.ldk.structs.DNSResolverContext(null, _context); }
+ if (_context_hu_conv != null) { _context_hu_conv.ptrs_to.AddLast(this); };
+ arg.handle_dnssec_proof(_message_hu_conv, _context_hu_conv);
+ GC.KeepAlive(arg);
+ }
+ public long provided_node_features() {
+ NodeFeatures ret = arg.provided_node_features();
+ GC.KeepAlive(arg);
+ long result = ret.clone_ptr();
+ return result;
+ }
+ public long release_pending_messages() {
+ TwoTuple_DNSResolverMessageMessageSendInstructionsZ[] ret = arg.release_pending_messages();
+ GC.KeepAlive(arg);
+ long result = InternalUtils.encodeUint64Array(InternalUtils.mapArray(ret, ret_conv_53 => ret_conv_53.clone_ptr()));
+ return result;
+ }
+ }
+
+ /** Creates a new instance of DNSResolverMessageHandler from a given implementation */
+ public static DNSResolverMessageHandler new_impl(DNSResolverMessageHandlerInterface arg) {
+ LDKDNSResolverMessageHandlerHolder impl_holder = new LDKDNSResolverMessageHandlerHolder();
+ LDKDNSResolverMessageHandlerImpl impl = new LDKDNSResolverMessageHandlerImpl(arg, impl_holder);
+ long[] ptr_idx = bindings.LDKDNSResolverMessageHandler_new(impl);
+
+ impl_holder.held = new DNSResolverMessageHandler(null, ptr_idx[0]);
+ impl_holder.held.instance_idx = ptr_idx[1];
+ impl_holder.held.bindings_instance = impl;
+ return impl_holder.held;
+ }
+
+ /**
+ * Handle a [`DNSSECQuery`] message.
+ *
+ * If we provide DNS resolution services to third parties, we should respond with a
+ * [`DNSSECProof`] message.
+ *
+ * Note that responder (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public Option_C2Tuple_DNSResolverMessageResponseInstructionZZ handle_dnssec_query(org.ldk.structs.DNSSECQuery message, org.ldk.structs.Responder responder) {
+ long ret = bindings.DNSResolverMessageHandler_handle_dnssec_query(this.ptr, message.ptr, responder == null ? 0 : responder.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(message);
+ GC.KeepAlive(responder);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_C2Tuple_DNSResolverMessageResponseInstructionZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_DNSResolverMessageResponseInstructionZZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Handle a [`DNSSECProof`] message (in response to a [`DNSSECQuery`] we presumably sent).
+ *
+ * With this, we should be able to validate the DNS record we requested.
+ */
+ public void handle_dnssec_proof(org.ldk.structs.DNSSECProof message, org.ldk.structs.DNSResolverContext context) {
+ bindings.DNSResolverMessageHandler_handle_dnssec_proof(this.ptr, message.ptr, context.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(message);
+ GC.KeepAlive(context);
+ }
+
+ /**
+ * Gets the node feature flags which this handler itself supports. Useful for setting the
+ * `dns_resolver` flag if this handler supports returning [`DNSSECProof`] messages in response
+ * to [`DNSSECQuery`] messages.
+ */
+ public NodeFeatures provided_node_features() {
+ long ret = bindings.DNSResolverMessageHandler_provided_node_features(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.NodeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeFeatures(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Release any [`DNSResolverMessage`]s that need to be sent.
+ */
+ public TwoTuple_DNSResolverMessageMessageSendInstructionsZ[] release_pending_messages() {
+ long ret = bindings.DNSResolverMessageHandler_release_pending_messages(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ int ret_conv_53_len = InternalUtils.getArrayLength(ret);
+ TwoTuple_DNSResolverMessageMessageSendInstructionsZ[] ret_conv_53_arr = new TwoTuple_DNSResolverMessageMessageSendInstructionsZ[ret_conv_53_len];
+ for (int b = 0; b < ret_conv_53_len; b++) {
+ long ret_conv_53 = InternalUtils.getU64ArrayElem(ret, b);
+ TwoTuple_DNSResolverMessageMessageSendInstructionsZ ret_conv_53_hu_conv = new TwoTuple_DNSResolverMessageMessageSendInstructionsZ(null, ret_conv_53);
+ if (ret_conv_53_hu_conv != null) { ret_conv_53_hu_conv.ptrs_to.AddLast(this); };
+ ret_conv_53_arr[b] = ret_conv_53_hu_conv;
+ }
+ bindings.free_buffer(ret);
+ return ret_conv_53_arr;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+/**
+ * A message which is sent in response to [`DNSSECQuery`] containing a DNSSEC proof.
+ */
+public class DNSSECProof : CommonBase {
+ internal DNSSECProof(object _dummy, long ptr) : base(ptr) { }
+ ~DNSSECProof() {
+ if (ptr != 0) { bindings.DNSSECProof_free(ptr); }
+ }
+
+ /**
+ * An [RFC 9102 DNSSEC AuthenticationChain] providing a DNSSEC proof.
+ *
+ * [RFC 9102 DNSSEC AuthenticationChain]: https://www.rfc-editor.org/rfc/rfc9102.html#name-dnssec-authentication-chain
+ *
+ * Returns a copy of the field.
+ */
+ public byte[] get_proof() {
+ long ret = bindings.DNSSECProof_get_proof(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
+ /**
+ * An [RFC 9102 DNSSEC AuthenticationChain] providing a DNSSEC proof.
+ *
+ * [RFC 9102 DNSSEC AuthenticationChain]: https://www.rfc-editor.org/rfc/rfc9102.html#name-dnssec-authentication-chain
+ */
+ public void set_proof(byte[] val) {
+ bindings.DNSSECProof_set_proof(this.ptr, InternalUtils.encodeUint8Array(val));
+ GC.KeepAlive(this);
+ GC.KeepAlive(val);
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.DNSSECProof_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the DNSSECProof
+ */
+ public DNSSECProof clone() {
+ long ret = bindings.DNSSECProof_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.DNSSECProof ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.DNSSECProof(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Generates a non-cryptographic 64-bit hash of the DNSSECProof.
+ */
+ public long hash() {
+ long ret = bindings.DNSSECProof_hash(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ public override int GetHashCode() {
+ return (int)this.hash();
+ }
+ /**
+ * Checks if two DNSSECProofs 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 bool eq(org.ldk.structs.DNSSECProof b) {
+ bool ret = bindings.DNSSECProof_eq(this.ptr, b.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(b);
+ if (this != null) { this.ptrs_to.AddLast(b); };
+ return ret;
+ }
+
+ public override bool Equals(object o) {
+ if (!(o is DNSSECProof)) return false;
+ return this.eq((DNSSECProof)o);
+ }
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+/**
+ * A message which is sent to a DNSSEC prover requesting a DNSSEC proof for the given name.
+ */
+public class DNSSECQuery : CommonBase {
+ internal DNSSECQuery(object _dummy, long ptr) : base(ptr) { }
+ ~DNSSECQuery() {
+ if (ptr != 0) { bindings.DNSSECQuery_free(ptr); }
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.DNSSECQuery_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the DNSSECQuery
+ */
+ public DNSSECQuery clone() {
+ long ret = bindings.DNSSECQuery_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.DNSSECQuery ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.DNSSECQuery(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Generates a non-cryptographic 64-bit hash of the DNSSECQuery.
+ */
+ public long hash() {
+ long ret = bindings.DNSSECQuery_hash(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ public override int GetHashCode() {
+ return (int)this.hash();
+ }
+ /**
+ * Checks if two DNSSECQuerys 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 bool eq(org.ldk.structs.DNSSECQuery b) {
+ bool ret = bindings.DNSSECQuery_eq(this.ptr, b.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(b);
+ if (this != null) { this.ptrs_to.AddLast(b); };
+ return ret;
+ }
+
+ public override bool Equals(object o) {
+ if (!(o is DNSSECQuery)) return false;
+ return this.eq((DNSSECQuery)o);
+ }
+}
+} } }
*
* # Privacy
*
- * Implements [`MessageRouter`] by delegating to [`DefaultMessageRouter`]. See those docs for
- * privacy implications.
+ * Creating [`BlindedPaymentPath`]s may affect privacy since, if a suitable path cannot be found,
+ * it will create a one-hop path using the recipient as the introduction node if it is a announced
+ * node. Otherwise, there is no way to find a path to the introduction node in order to send a
+ * payment, and thus an `Err` is returned.
*/
public class DefaultRouter : CommonBase {
internal DefaultRouter(object _dummy, long ptr) : base(ptr) { }
return ret_hu_conv;
}
- /**
- * Constructs a new MessageRouter which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned MessageRouter must be freed before this_arg is
- */
- public MessageRouter as_MessageRouter() {
- long ret = bindings.DefaultRouter_as_MessageRouter(this.ptr);
- GC.KeepAlive(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- MessageRouter ret_hu_conv = new MessageRouter(null, ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
- return ret_hu_conv;
- }
-
}
} } }
return ret_hu_conv;
}
+ /**
+ * Creates an empty `Description`.
+ */
+ public static Description empty() {
+ long ret = bindings.Description_empty();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Description ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Description(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
/**
* Returns the underlying description [`UntrustedString`]
*/
/** An implementation of EcdsaChannelSigner */
public interface EcdsaChannelSignerInterface {
/**Create a signature for a counterparty's commitment transaction and associated HTLC transactions.
- *
- * Note that if signing fails or is rejected, the channel will be force-closed.
*
* Policy checks should be implemented in this function, including checking the amount
* sent to us and checking the HTLCs.
*
* Note that all the relevant preimages will be provided, but there may also be additional
* irrelevant or duplicate preimages.
+ *
+ * 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`, [`ChannelManager::signer_unblocked`] must be called.
+ *
+ * [`ChannelManager::signer_unblocked`]: crate::ln::channelmanager::ChannelManager::signer_unblocked
*/
Result_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ sign_counterparty_commitment(CommitmentTransaction commitment_tx, byte[][] inbound_htlc_preimages, byte[][] outbound_htlc_preimages);
/**Creates a signature for a holder's 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.
+ * monitor or [`ChainMonitor::signer_unblocked`] called to attempt unblocking all monitors.
*
* [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
+ * [`ChainMonitor::signer_unblocked`]: crate::chain::chainmonitor::ChainMonitor::signer_unblocked
*/
Result_ECDSASignatureNoneZ sign_holder_commitment(HolderCommitmentTransaction commitment_tx);
/**Create a signature for the given input in a transaction spending an HTLC transaction output
* 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.
+ * monitor or [`ChainMonitor::signer_unblocked`] called to attempt unblocking all monitors.
*
* [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
+ * [`ChainMonitor::signer_unblocked`]: crate::chain::chainmonitor::ChainMonitor::signer_unblocked
*/
Result_ECDSASignatureNoneZ sign_justice_revoked_output(byte[] justice_tx, long input, long amount, byte[] per_commitment_key);
/**Create a signature for the given input in a transaction spending a 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.
+ * monitor or [`ChainMonitor::signer_unblocked`] called to attempt unblocking all monitors.
*
* [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
+ * [`ChainMonitor::signer_unblocked`]: crate::chain::chainmonitor::ChainMonitor::signer_unblocked
*/
Result_ECDSASignatureNoneZ sign_justice_revoked_htlc(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, HTLCOutputInCommitment htlc);
/**Computes the signature for a commitment transaction's HTLC output used as an input within
* 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.
+ * monitor or [`ChainMonitor::signer_unblocked`] called to attempt unblocking all monitors.
*
* [`EcdsaSighashType::All`]: bitcoin::sighash::EcdsaSighashType::All
* [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
* [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
+ * [`ChainMonitor::signer_unblocked`]: crate::chain::chainmonitor::ChainMonitor::signer_unblocked
*/
Result_ECDSASignatureNoneZ sign_holder_htlc_transaction(byte[] htlc_tx, long input, HTLCDescriptor htlc_descriptor);
/**Create a signature for a claiming transaction for a HTLC output on a counterparty's commitment
* 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.
+ * monitor or [`ChainMonitor::signer_unblocked`] called to attempt unblocking all monitors.
*
* [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
+ * [`ChainMonitor::signer_unblocked`]: crate::chain::chainmonitor::ChainMonitor::signer_unblocked
*/
Result_ECDSASignatureNoneZ sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, HTLCOutputInCommitment htlc);
/**Create a signature for a (proposed) closing transaction.
*
* Note that, due to rounding, there may be one \"missing\" satoshi, and either party may have
* chosen to forgo their output as dust.
+ *
+ * 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`, [`ChannelManager::signer_unblocked`] must be called.
+ *
+ * [`ChannelManager::signer_unblocked`]: crate::ln::channelmanager::ChannelManager::signer_unblocked
*/
Result_ECDSASignatureNoneZ sign_closing_transaction(ClosingTransaction closing_tx);
/**Computes the signature for a commitment transaction's anchor output used as an
* 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.
+ * monitor or [`ChainMonitor::signer_unblocked`] called to attempt unblocking all monitors.
*
* [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
+ * [`ChainMonitor::signer_unblocked`]: crate::chain::chainmonitor::ChainMonitor::signer_unblocked
*/
Result_ECDSASignatureNoneZ sign_holder_anchor_input(byte[] anchor_tx, long input);
/**Signs a channel announcement message with our funding key proving it comes from one of the
* Channel announcements also require a signature from each node's network key. Our node
* signature is computed through [`NodeSigner::sign_gossip_message`].
*
- * Note that if this fails or is rejected, the channel will not be publicly announced and
- * our counterparty may (though likely will not) close the channel on us for violating the
- * protocol.
+ * This method is *not* asynchronous. If an `Err` is returned, the channel will not be
+ * publicly announced and our counterparty may (though likely will not) close the channel on
+ * us for violating the protocol.
*
* [`NodeSigner::sign_gossip_message`]: crate::sign::NodeSigner::sign_gossip_message
*/
Result_ECDSASignatureNoneZ sign_channel_announcement_with_funding_key(UnsignedChannelAnnouncement msg);
+ /**Signs the input of a splicing funding transaction with our funding key.
+ *
+ * In splicing, the previous funding transaction output is spent as the input of
+ * the new funding transaction, and is a 2-of-2 multisig.
+ *
+ * `input_index`: The index of the input within the new funding transaction `tx`,
+ * spending the previous funding transaction's output
+ *
+ * `input_value`: The value of the previous funding transaction output.
+ *
+ * This method is *not* asynchronous. If an `Err` is returned, the channel will be immediately
+ * closed.
+ */
+ Result_ECDSASignatureNoneZ sign_splicing_funding_input(byte[] tx, long input_index, long input_value);
}
/**
* policies in order to be secure. Please refer to the [VLS Policy
* Controls](https://gitlab.com/lightning-signer/validating-lightning-signer/-/blob/main/docs/policy-controls.md)
* for an example of such policies.
+ *
+ * Like [`ChannelSigner`], many of the methods allow errors to be returned to support async
+ * signing. In such cases, the signing operation can be replayed by calling
+ * [`ChannelManager::signer_unblocked`] or [`ChainMonitor::signer_unblocked`] (see individual
+ * method documentation for which method should be called) once the result is ready, at which
+ * point the channel operation will resume.
+ *
+ * [`ChannelManager::signer_unblocked`]: crate::ln::channelmanager::ChannelManager::signer_unblocked
+ * [`ChainMonitor::signer_unblocked`]: crate::chain::chainmonitor::ChainMonitor::signer_unblocked
*/
public class EcdsaChannelSigner : CommonBase {
internal bindings.LDKEcdsaChannelSigner bindings_instance;
long result = ret.clone_ptr();
return result;
}
+ public long sign_splicing_funding_input(long _tx, long _input_index, long _input_value) {
+ byte[] _tx_conv = InternalUtils.decodeUint8Array(_tx);
+ Result_ECDSASignatureNoneZ ret = arg.sign_splicing_funding_input(_tx_conv, _input_index, _input_value);
+ GC.KeepAlive(arg);
+ long result = ret.clone_ptr();
+ return result;
+ }
}
/** Creates a new instance of EcdsaChannelSigner from a given implementation */
/**
* Create a signature for a counterparty's commitment transaction and associated HTLC transactions.
*
- * Note that if signing fails or is rejected, the channel will be force-closed.
- *
* Policy checks should be implemented in this function, including checking the amount
* sent to us and checking the HTLCs.
*
*
* Note that all the relevant preimages will be provided, but there may also be additional
* irrelevant or duplicate preimages.
+ *
+ * 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`, [`ChannelManager::signer_unblocked`] must be called.
+ *
+ * [`ChannelManager::signer_unblocked`]: crate::ln::channelmanager::ChannelManager::signer_unblocked
*/
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.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(inbound_htlc_preimages, inbound_htlc_preimages_conv_8 => InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(inbound_htlc_preimages_conv_8, 32)))), InternalUtils.encodeUint64Array(InternalUtils.mapArray(outbound_htlc_preimages, outbound_htlc_preimages_conv_8 => InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(outbound_htlc_preimages_conv_8, 32)))));
* 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.
+ * monitor or [`ChainMonitor::signer_unblocked`] called to attempt unblocking all monitors.
*
* [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
+ * [`ChainMonitor::signer_unblocked`]: crate::chain::chainmonitor::ChainMonitor::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.ptr);
* 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.
+ * monitor or [`ChainMonitor::signer_unblocked`] called to attempt unblocking all monitors.
*
* [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
+ * [`ChainMonitor::signer_unblocked`]: crate::chain::chainmonitor::ChainMonitor::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, InternalUtils.encodeUint8Array(justice_tx), input, amount, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_key, 32)));
* 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.
+ * monitor or [`ChainMonitor::signer_unblocked`] called to attempt unblocking all monitors.
*
* [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
+ * [`ChainMonitor::signer_unblocked`]: crate::chain::chainmonitor::ChainMonitor::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, InternalUtils.encodeUint8Array(justice_tx), input, amount, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_key, 32)), htlc.ptr);
* 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.
+ * monitor or [`ChainMonitor::signer_unblocked`] called to attempt unblocking all monitors.
*
* [`EcdsaSighashType::All`]: bitcoin::sighash::EcdsaSighashType::All
* [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
* [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
+ * [`ChainMonitor::signer_unblocked`]: crate::chain::chainmonitor::ChainMonitor::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, InternalUtils.encodeUint8Array(htlc_tx), input, htlc_descriptor.ptr);
* 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.
+ * monitor or [`ChainMonitor::signer_unblocked`] called to attempt unblocking all monitors.
*
* [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
+ * [`ChainMonitor::signer_unblocked`]: crate::chain::chainmonitor::ChainMonitor::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, InternalUtils.encodeUint8Array(htlc_tx), input, amount, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point, 33)), htlc.ptr);
*
* Note that, due to rounding, there may be one \"missing\" satoshi, and either party may have
* chosen to forgo their output as dust.
+ *
+ * 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`, [`ChannelManager::signer_unblocked`] must be called.
+ *
+ * [`ChannelManager::signer_unblocked`]: crate::ln::channelmanager::ChannelManager::signer_unblocked
*/
public Result_ECDSASignatureNoneZ sign_closing_transaction(org.ldk.structs.ClosingTransaction closing_tx) {
long ret = bindings.EcdsaChannelSigner_sign_closing_transaction(this.ptr, closing_tx.ptr);
* 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.
+ * monitor or [`ChainMonitor::signer_unblocked`] called to attempt unblocking all monitors.
*
* [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
+ * [`ChainMonitor::signer_unblocked`]: crate::chain::chainmonitor::ChainMonitor::signer_unblocked
*/
public Result_ECDSASignatureNoneZ sign_holder_anchor_input(byte[] anchor_tx, long input) {
long ret = bindings.EcdsaChannelSigner_sign_holder_anchor_input(this.ptr, InternalUtils.encodeUint8Array(anchor_tx), input);
* Channel announcements also require a signature from each node's network key. Our node
* signature is computed through [`NodeSigner::sign_gossip_message`].
*
- * Note that if this fails or is rejected, the channel will not be publicly announced and
- * our counterparty may (though likely will not) close the channel on us for violating the
- * protocol.
+ * This method is *not* asynchronous. If an `Err` is returned, the channel will not be
+ * publicly announced and our counterparty may (though likely will not) close the channel on
+ * us for violating the protocol.
*
* [`NodeSigner::sign_gossip_message`]: crate::sign::NodeSigner::sign_gossip_message
*/
return ret_hu_conv;
}
+ /**
+ * Signs the input of a splicing funding transaction with our funding key.
+ *
+ * In splicing, the previous funding transaction output is spent as the input of
+ * the new funding transaction, and is a 2-of-2 multisig.
+ *
+ * `input_index`: The index of the input within the new funding transaction `tx`,
+ * spending the previous funding transaction's output
+ *
+ * `input_value`: The value of the previous funding transaction output.
+ *
+ * This method is *not* asynchronous. If an `Err` is returned, the channel will be immediately
+ * closed.
+ */
+ public Result_ECDSASignatureNoneZ sign_splicing_funding_input(byte[] tx, long input_index, long input_value) {
+ long ret = bindings.EcdsaChannelSigner_sign_splicing_funding_input(this.ptr, InternalUtils.encodeUint8Array(tx), input_index, input_value);
+ GC.KeepAlive(this);
+ GC.KeepAlive(tx);
+ GC.KeepAlive(input_index);
+ GC.KeepAlive(input_value);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_ECDSASignatureNoneZ ret_hu_conv = Result_ECDSASignatureNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
internal long clone_ptr() {
long ret = bindings.EcdsaChannelSigner_clone_ptr(this.ptr);
GC.KeepAlive(this);
this.output_script = output_script_conv;
long user_channel_id = bindings.LDKEvent_FundingGenerationReady_get_user_channel_id(ptr);
org.ldk.util.UInt128 user_channel_id_conv = new org.ldk.util.UInt128(user_channel_id);
+ bindings.free_buffer(user_channel_id);
this.user_channel_id = user_channel_id_conv;
}
}
this.channel_id = channel_id_hu_conv;
long user_channel_id = bindings.LDKEvent_FundingTxBroadcastSafe_get_user_channel_id(ptr);
org.ldk.util.UInt128 user_channel_id_conv = new org.ldk.util.UInt128(user_channel_id);
+ bindings.free_buffer(user_channel_id);
this.user_channel_id = user_channel_id_conv;
long funding_txo = bindings.LDKEvent_FundingTxBroadcastSafe_get_funding_txo(ptr);
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); }
* [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds
*/
public Option_u32Z claim_deadline;
+ /**
+ * A unique ID describing this payment (derived from the list of HTLCs in the payment).
+ *
+ * Payers may pay for the same [`PaymentHash`] multiple times (though this is unsafe and
+ * an intermediary node may steal the funds). Thus, in order to accurately track when
+ * payments are received and claimed, you should use this identifier.
+ *
+ * Only filled in for payments received on LDK versions 0.1 and higher.
+ */
+ public Option_ThirtyTwoBytesZ payment_id;
internal Event_PaymentClaimable(long ptr) : base(null, ptr) {
long receiver_node_id = bindings.LDKEvent_PaymentClaimable_get_receiver_node_id(ptr);
byte[] receiver_node_id_conv = InternalUtils.decodeUint8Array(receiver_node_id);
org.ldk.structs.Option_u32Z claim_deadline_hu_conv = org.ldk.structs.Option_u32Z.constr_from_ptr(claim_deadline);
if (claim_deadline_hu_conv != null) { claim_deadline_hu_conv.ptrs_to.AddLast(this); };
this.claim_deadline = claim_deadline_hu_conv;
+ long payment_id = bindings.LDKEvent_PaymentClaimable_get_payment_id(ptr);
+ org.ldk.structs.Option_ThirtyTwoBytesZ payment_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(payment_id);
+ if (payment_id_hu_conv != null) { payment_id_hu_conv.ptrs_to.AddLast(this); };
+ this.payment_id = payment_id_hu_conv;
}
}
/** A Event of type PaymentClaimed */
* Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public RecipientOnionFields onion_fields;
+ /**
+ * A unique ID describing this payment (derived from the list of HTLCs in the payment).
+ *
+ * Payers may pay for the same [`PaymentHash`] multiple times (though this is unsafe and
+ * an intermediary node may steal the funds). Thus, in order to accurately track when
+ * payments are received and claimed, you should use this identifier.
+ *
+ * Only filled in for payments received on LDK versions 0.1 and higher.
+ */
+ public Option_ThirtyTwoBytesZ payment_id;
internal Event_PaymentClaimed(long ptr) : base(null, ptr) {
long receiver_node_id = bindings.LDKEvent_PaymentClaimed_get_receiver_node_id(ptr);
byte[] receiver_node_id_conv = InternalUtils.decodeUint8Array(receiver_node_id);
org.ldk.structs.RecipientOnionFields onion_fields_hu_conv = null; if (onion_fields < 0 || onion_fields > 4096) { onion_fields_hu_conv = new org.ldk.structs.RecipientOnionFields(null, onion_fields); }
if (onion_fields_hu_conv != null) { onion_fields_hu_conv.ptrs_to.AddLast(this); };
this.onion_fields = onion_fields_hu_conv;
+ long payment_id = bindings.LDKEvent_PaymentClaimed_get_payment_id(ptr);
+ org.ldk.structs.Option_ThirtyTwoBytesZ payment_id_hu_conv = org.ldk.structs.Option_ThirtyTwoBytesZ.constr_from_ptr(payment_id);
+ if (payment_id_hu_conv != null) { payment_id_hu_conv.ptrs_to.AddLast(this); };
+ this.payment_id = payment_id_hu_conv;
}
}
/** A Event of type ConnectionNeeded */
* events generated or serialized by versions prior to 0.0.122.
*/
public Option_U128Z next_user_channel_id;
+ /**
+ * The node id of the previous node.
+ *
+ * This is only `None` for HTLCs received prior to 0.1 or for events serialized by
+ * versions prior to 0.1
+ *
+ * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public byte[] prev_node_id;
+ /**
+ * The node id of the next node.
+ *
+ * This is only `None` for HTLCs received prior to 0.1 or for events serialized by
+ * versions prior to 0.1
+ *
+ * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public byte[] next_node_id;
/**
* The total fee, in milli-satoshis, which was earned as a result of the payment.
*
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.AddLast(this); };
this.next_user_channel_id = next_user_channel_id_hu_conv;
+ long prev_node_id = bindings.LDKEvent_PaymentForwarded_get_prev_node_id(ptr);
+ byte[] prev_node_id_conv = InternalUtils.decodeUint8Array(prev_node_id);
+ this.prev_node_id = prev_node_id_conv;
+ long next_node_id = bindings.LDKEvent_PaymentForwarded_get_next_node_id(ptr);
+ byte[] next_node_id_conv = InternalUtils.decodeUint8Array(next_node_id);
+ this.next_node_id = next_node_id_conv;
long total_fee_earned_msat = bindings.LDKEvent_PaymentForwarded_get_total_fee_earned_msat(ptr);
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.AddLast(this); };
this.channel_id = channel_id_hu_conv;
long user_channel_id = bindings.LDKEvent_ChannelPending_get_user_channel_id(ptr);
org.ldk.util.UInt128 user_channel_id_conv = new org.ldk.util.UInt128(user_channel_id);
+ bindings.free_buffer(user_channel_id);
this.user_channel_id = user_channel_id_conv;
long former_temporary_channel_id = bindings.LDKEvent_ChannelPending_get_former_temporary_channel_id(ptr);
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); }
this.channel_id = channel_id_hu_conv;
long user_channel_id = bindings.LDKEvent_ChannelReady_get_user_channel_id(ptr);
org.ldk.util.UInt128 user_channel_id_conv = new org.ldk.util.UInt128(user_channel_id);
+ bindings.free_buffer(user_channel_id);
this.user_channel_id = user_channel_id_conv;
long counterparty_node_id = bindings.LDKEvent_ChannelReady_get_counterparty_node_id(ptr);
byte[] counterparty_node_id_conv = InternalUtils.decodeUint8Array(counterparty_node_id);
* Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public OutPoint channel_funding_txo;
+ /**
+ * An upper bound on the our last local balance in msats before the channel was closed.
+ *
+ * Will overstate our balance as it ignores pending outbound HTLCs and transaction fees.
+ *
+ * For more accurate balances including fee information see
+ * [`ChainMonitor::get_claimable_balances`].
+ *
+ * This field will be `None` only for objects serialized prior to LDK 0.1.
+ *
+ * [`ChainMonitor::get_claimable_balances`]: crate::chain::chainmonitor::ChainMonitor::get_claimable_balances
+ */
+ public Option_u64Z last_local_balance_msat;
internal Event_ChannelClosed(long ptr) : base(null, ptr) {
long channel_id = bindings.LDKEvent_ChannelClosed_get_channel_id(ptr);
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); }
this.channel_id = channel_id_hu_conv;
long user_channel_id = bindings.LDKEvent_ChannelClosed_get_user_channel_id(ptr);
org.ldk.util.UInt128 user_channel_id_conv = new org.ldk.util.UInt128(user_channel_id);
+ bindings.free_buffer(user_channel_id);
this.user_channel_id = user_channel_id_conv;
long reason = bindings.LDKEvent_ChannelClosed_get_reason(ptr);
org.ldk.structs.ClosureReason reason_hu_conv = org.ldk.structs.ClosureReason.constr_from_ptr(reason);
org.ldk.structs.OutPoint channel_funding_txo_hu_conv = null; if (channel_funding_txo < 0 || channel_funding_txo > 4096) { channel_funding_txo_hu_conv = new org.ldk.structs.OutPoint(null, channel_funding_txo); }
if (channel_funding_txo_hu_conv != null) { channel_funding_txo_hu_conv.ptrs_to.AddLast(this); };
this.channel_funding_txo = channel_funding_txo_hu_conv;
+ long last_local_balance_msat = bindings.LDKEvent_ChannelClosed_get_last_local_balance_msat(ptr);
+ org.ldk.structs.Option_u64Z last_local_balance_msat_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(last_local_balance_msat);
+ if (last_local_balance_msat_hu_conv != null) { last_local_balance_msat_hu_conv.ptrs_to.AddLast(this); };
+ this.last_local_balance_msat = last_local_balance_msat_hu_conv;
}
}
/** A Event of type DiscardFunding */
*/
public long funding_satoshis;
/**
- * Our starting balance in the channel if the request is accepted, in milli-satoshi.
+ * If `channel_negotiation_type` is `InboundChannelFunds::DualFunded`, this indicates that the peer wishes to
+ * open a dual-funded channel. Otherwise, this field will be `InboundChannelFunds::PushMsats`,
+ * indicating the `push_msats` value our peer is pushing to us for a non-dual-funded channel.
*/
- public long push_msat;
+ public InboundChannelFunds channel_negotiation_type;
/**
* The features that this channel will operate with. If you reject the channel, a
* well-behaved counterparty may automatically re-attempt the channel with a new set of
byte[] counterparty_node_id_conv = InternalUtils.decodeUint8Array(counterparty_node_id);
this.counterparty_node_id = counterparty_node_id_conv;
this.funding_satoshis = bindings.LDKEvent_OpenChannelRequest_get_funding_satoshis(ptr);
- this.push_msat = bindings.LDKEvent_OpenChannelRequest_get_push_msat(ptr);
+ long channel_negotiation_type = bindings.LDKEvent_OpenChannelRequest_get_channel_negotiation_type(ptr);
+ org.ldk.structs.InboundChannelFunds channel_negotiation_type_hu_conv = org.ldk.structs.InboundChannelFunds.constr_from_ptr(channel_negotiation_type);
+ if (channel_negotiation_type_hu_conv != null) { channel_negotiation_type_hu_conv.ptrs_to.AddLast(this); };
+ this.channel_negotiation_type = channel_negotiation_type_hu_conv;
long channel_type = bindings.LDKEvent_OpenChannelRequest_get_channel_type(ptr);
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.AddLast(this); };
/**
* 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.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.encodeUint8Array(InternalUtils.check_arr_len(receiver_node_id, 33)), InternalUtils.encodeUint8Array(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);
+ 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, org.ldk.structs.Option_ThirtyTwoBytesZ payment_id) {
+ long ret = bindings.Event_payment_claimable(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(receiver_node_id, 33)), InternalUtils.encodeUint8Array(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, payment_id.ptr);
GC.KeepAlive(receiver_node_id);
GC.KeepAlive(payment_hash);
GC.KeepAlive(onion_fields);
GC.KeepAlive(via_channel_id);
GC.KeepAlive(via_user_channel_id);
GC.KeepAlive(claim_deadline);
+ GC.KeepAlive(payment_id);
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.AddLast(ret_hu_conv); };
/**
* 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, org.ldk.structs.RecipientOnionFields onion_fields) {
- long ret = bindings.Event_payment_claimed(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(receiver_node_id, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), amount_msat, purpose.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(htlcs, htlcs_conv_13 => htlcs_conv_13.ptr)), sender_intended_total_msat.ptr, onion_fields.ptr);
+ 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, org.ldk.structs.RecipientOnionFields onion_fields, org.ldk.structs.Option_ThirtyTwoBytesZ payment_id) {
+ long ret = bindings.Event_payment_claimed(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(receiver_node_id, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), amount_msat, purpose.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(htlcs, htlcs_conv_13 => htlcs_conv_13.ptr)), sender_intended_total_msat.ptr, onion_fields.ptr, payment_id.ptr);
GC.KeepAlive(receiver_node_id);
GC.KeepAlive(payment_hash);
GC.KeepAlive(amount_msat);
GC.KeepAlive(htlcs);
GC.KeepAlive(sender_intended_total_msat);
GC.KeepAlive(onion_fields);
+ GC.KeepAlive(payment_id);
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.AddLast(ret_hu_conv); };
/**
* Utility method to constructs a new PaymentForwarded-variant Event
*/
- 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, bool 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);
+ 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, byte[] prev_node_id, byte[] next_node_id, org.ldk.structs.Option_u64Z total_fee_earned_msat, org.ldk.structs.Option_u64Z skimmed_fee_msat, bool 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, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(prev_node_id, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(next_node_id, 33)), total_fee_earned_msat.ptr, skimmed_fee_msat.ptr, claim_from_onchain_tx, outbound_amount_forwarded_msat.ptr);
GC.KeepAlive(prev_channel_id);
GC.KeepAlive(next_channel_id);
GC.KeepAlive(prev_user_channel_id);
GC.KeepAlive(next_user_channel_id);
+ GC.KeepAlive(prev_node_id);
+ GC.KeepAlive(next_node_id);
GC.KeepAlive(total_fee_earned_msat);
GC.KeepAlive(skimmed_fee_msat);
GC.KeepAlive(claim_from_onchain_tx);
/**
* Utility method to constructs a new ChannelClosed-variant Event
*/
- 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, InternalUtils.encodeUint8Array(user_channel_id.getLEBytes()), reason.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), channel_capacity_sats.ptr, 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, org.ldk.structs.Option_u64Z last_local_balance_msat) {
+ long ret = bindings.Event_channel_closed(channel_id.ptr, InternalUtils.encodeUint8Array(user_channel_id.getLEBytes()), reason.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), channel_capacity_sats.ptr, channel_funding_txo.ptr, last_local_balance_msat.ptr);
GC.KeepAlive(channel_id);
GC.KeepAlive(user_channel_id);
GC.KeepAlive(reason);
GC.KeepAlive(counterparty_node_id);
GC.KeepAlive(channel_capacity_sats);
GC.KeepAlive(channel_funding_txo);
+ GC.KeepAlive(last_local_balance_msat);
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.AddLast(ret_hu_conv); };
/**
* Utility method to constructs a new OpenChannelRequest-variant Event
*/
- 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, bool is_announced, org.ldk.structs.ChannelParameters _params) {
- long ret = bindings.Event_open_channel_request(temporary_channel_id.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), funding_satoshis, push_msat, channel_type.ptr, is_announced, _params.ptr);
+ public static Event open_channel_request(org.ldk.structs.ChannelId temporary_channel_id, byte[] counterparty_node_id, long funding_satoshis, org.ldk.structs.InboundChannelFunds channel_negotiation_type, org.ldk.structs.ChannelTypeFeatures channel_type, bool is_announced, org.ldk.structs.ChannelParameters _params) {
+ long ret = bindings.Event_open_channel_request(temporary_channel_id.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(counterparty_node_id, 33)), funding_satoshis, channel_negotiation_type.ptr, channel_type.ptr, is_announced, _params.ptr);
GC.KeepAlive(temporary_channel_id);
GC.KeepAlive(counterparty_node_id);
GC.KeepAlive(funding_satoshis);
- GC.KeepAlive(push_msat);
+ GC.KeepAlive(channel_negotiation_type);
GC.KeepAlive(channel_type);
GC.KeepAlive(is_announced);
GC.KeepAlive(_params);
/**
- * A set of keys that were HKDF-expanded from an initial call to
- * [`NodeSigner::get_inbound_payment_key_material`].
+ * A set of keys that were HKDF-expanded. Returned by [`NodeSigner::get_inbound_payment_key`].
*
- * [`NodeSigner::get_inbound_payment_key_material`]: crate::sign::NodeSigner::get_inbound_payment_key_material
+ * [`NodeSigner::get_inbound_payment_key`]: crate::sign::NodeSigner::get_inbound_payment_key
*/
public class ExpandedKey : CommonBase {
internal ExpandedKey(object _dummy, long ptr) : base(ptr) { }
if (ptr != 0) { bindings.ExpandedKey_free(ptr); }
}
+ /**
+ * Generates a non-cryptographic 64-bit hash of the ExpandedKey.
+ */
+ public long hash() {
+ long ret = bindings.ExpandedKey_hash(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ public override int GetHashCode() {
+ return (int)this.hash();
+ }
+ internal long clone_ptr() {
+ long ret = bindings.ExpandedKey_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the ExpandedKey
+ */
+ public ExpandedKey clone() {
+ long ret = bindings.ExpandedKey_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ExpandedKey ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ExpandedKey(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if two ExpandedKeys 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 bool eq(org.ldk.structs.ExpandedKey b) {
+ bool ret = bindings.ExpandedKey_eq(this.ptr, b.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(b);
+ if (this != null) { this.ptrs_to.AddLast(b); };
+ return ret;
+ }
+
+ public override bool Equals(object o) {
+ if (!(o is ExpandedKey)) return false;
+ return this.eq((ExpandedKey)o);
+ }
/**
* Create a new [`ExpandedKey`] for generating an inbound payment hash and secret.
*
return ret_hu_conv;
}
+ /**
+ * Constructs a new MigratableKVStore which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned MigratableKVStore must be freed before this_arg is
+ */
+ public MigratableKVStore as_MigratableKVStore() {
+ long ret = bindings.FilesystemStore_as_MigratableKVStore(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ MigratableKVStore ret_hu_conv = new MigratableKVStore(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
}
} } }
return ret_hu_conv;
}
+ /**
+ * Checks if two FinalOnionHopDatas 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 bool eq(org.ldk.structs.FinalOnionHopData b) {
+ bool ret = bindings.FinalOnionHopData_eq(this.ptr, b.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(b);
+ if (this != null) { this.ptrs_to.AddLast(b); };
+ return ret;
+ }
+
+ public override bool Equals(object o) {
+ if (!(o is FinalOnionHopData)) return false;
+ return this.eq((FinalOnionHopData)o);
+ }
/**
* Serialize the FinalOnionHopData object into a byte array which can be read by FinalOnionHopData_read
*/
* A callback which is called when a [`Future`] completes.
*
* Note that this MUST NOT call back into LDK directly, it must instead schedule actions to be
- * taken later. Rust users should use the [`std::future::Future`] implementation for [`Future`]
- * instead.
+ * taken later.
+ * Rust users should use the [`std::future::Future`] implementation for [`Future`] instead.
*
- * Note that the [`std::future::Future`] implementation may only work for runtimes which schedule
- * futures when they receive a wake, rather than immediately executing them.
+ * Note that the [`std::future::Future`] implementation may only work for runtimes which schedule futures when they receive a wake, rather than immediately executing them.
*/
public class FutureCallback : CommonBase {
internal bindings.LDKFutureCallback bindings_instance;
if (ptr != 0) { bindings.HeldHtlcAvailable_free(ptr); }
}
- /**
- * The secret that will be used by the recipient of this message to release the held HTLC.
- */
- public byte[] get_payment_release_secret() {
- long ret = bindings.HeldHtlcAvailable_get_payment_release_secret(this.ptr);
- GC.KeepAlive(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
- return ret_conv;
- }
-
- /**
- * The secret that will be used by the recipient of this message to release the held HTLC.
- */
- public void set_payment_release_secret(byte[] val) {
- bindings.HeldHtlcAvailable_set_payment_release_secret(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32)));
- GC.KeepAlive(this);
- GC.KeepAlive(val);
- }
-
/**
* Constructs a new HeldHtlcAvailable given each field
*/
- public static HeldHtlcAvailable of(byte[] payment_release_secret_arg) {
- long ret = bindings.HeldHtlcAvailable_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_release_secret_arg, 32)));
- GC.KeepAlive(payment_release_secret_arg);
+ public static HeldHtlcAvailable of() {
+ long ret = bindings.HeldHtlcAvailable_new();
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.HeldHtlcAvailable ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.HeldHtlcAvailable(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+/**
+ * A struct containing the two parts of a BIP 353 Human Readable Name - the user and domain parts.
+ *
+ * The `user` and `domain` parts, together, cannot exceed 232 bytes in length, and both must be
+ * non-empty.
+ *
+ * To protect against [Homograph Attacks], both parts of a Human Readable Name must be plain
+ * ASCII.
+ *
+ * [Homograph Attacks]: https://en.wikipedia.org/wiki/IDN_homograph_attack
+ */
+public class HumanReadableName : CommonBase {
+ internal HumanReadableName(object _dummy, long ptr) : base(ptr) { }
+ ~HumanReadableName() {
+ if (ptr != 0) { bindings.HumanReadableName_free(ptr); }
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.HumanReadableName_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the HumanReadableName
+ */
+ public HumanReadableName clone() {
+ long ret = bindings.HumanReadableName_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.HumanReadableName ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.HumanReadableName(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Generates a non-cryptographic 64-bit hash of the HumanReadableName.
+ */
+ public long hash() {
+ long ret = bindings.HumanReadableName_hash(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ public override int GetHashCode() {
+ return (int)this.hash();
+ }
+ /**
+ * Checks if two HumanReadableNames 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 bool eq(org.ldk.structs.HumanReadableName b) {
+ bool ret = bindings.HumanReadableName_eq(this.ptr, b.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(b);
+ if (this != null) { this.ptrs_to.AddLast(b); };
+ return ret;
+ }
+
+ public override bool Equals(object o) {
+ if (!(o is HumanReadableName)) return false;
+ return this.eq((HumanReadableName)o);
+ }
+ /**
+ * Constructs a new [`HumanReadableName`] from the `user` and `domain` parts. See the
+ * struct-level documentation for more on the requirements on each.
+ */
+ public static Result_HumanReadableNameNoneZ of(string user, string domain) {
+ long ret = bindings.HumanReadableName_new(InternalUtils.encodeString(user), InternalUtils.encodeString(domain));
+ GC.KeepAlive(user);
+ GC.KeepAlive(domain);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_HumanReadableNameNoneZ ret_hu_conv = Result_HumanReadableNameNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new [`HumanReadableName`] from the standard encoding - `user`@`domain`.
+ *
+ * If `user` includes the standard BIP 353 â‚¿ prefix it is automatically removed as required by
+ * BIP 353.
+ */
+ public static Result_HumanReadableNameNoneZ from_encoded(string encoded) {
+ long ret = bindings.HumanReadableName_from_encoded(InternalUtils.encodeString(encoded));
+ GC.KeepAlive(encoded);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_HumanReadableNameNoneZ ret_hu_conv = Result_HumanReadableNameNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Gets the `user` part of this Human Readable Name
+ */
+ public string user() {
+ long ret = bindings.HumanReadableName_user(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ string ret_conv = InternalUtils.decodeString(ret);
+ return ret_conv;
+ }
+
+ /**
+ * Gets the `domain` part of this Human Readable Name
+ */
+ public string domain() {
+ long ret = bindings.HumanReadableName_domain(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ string ret_conv = InternalUtils.decodeString(ret);
+ return ret_conv;
+ }
+
+ /**
+ * Serialize the HumanReadableName object into a byte array which can be read by HumanReadableName_read
+ */
+ public byte[] write() {
+ long ret = bindings.HumanReadableName_write(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
+ /**
+ * Read a HumanReadableName from a byte array, created by HumanReadableName_write
+ */
+ public static Result_HumanReadableNameDecodeErrorZ read(byte[] ser) {
+ long ret = bindings.HumanReadableName_read(InternalUtils.encodeUint8Array(ser));
+ GC.KeepAlive(ser);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_HumanReadableNameDecodeErrorZ ret_hu_conv = Result_HumanReadableNameDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
+} } }
return ret_hu_conv;
}
+ /**
+ * Constructs a new DNSResolverMessageHandler which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned DNSResolverMessageHandler must be freed before this_arg is
+ */
+ public DNSResolverMessageHandler as_DNSResolverMessageHandler() {
+ long ret = bindings.IgnoringMessageHandler_as_DNSResolverMessageHandler(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ DNSResolverMessageHandler ret_hu_conv = new DNSResolverMessageHandler(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
/**
* Constructs a new CustomOnionMessageHandler which calls the relevant methods on this_arg.
* This copies the `inner` pointer in this_arg and thus the returned CustomOnionMessageHandler must be freed before this_arg is
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+/**
+ * Used to indicate the kind of funding for this channel by the channel acceptor (us).
+ *
+ * Allows the differentiation between a request for a dual-funded and non-dual-funded channel.
+ */
+public class InboundChannelFunds : CommonBase {
+ protected InboundChannelFunds(object _dummy, long ptr) : base(ptr) { }
+ ~InboundChannelFunds() {
+ if (ptr != 0) { bindings.InboundChannelFunds_free(ptr); }
+ }
+
+ internal static InboundChannelFunds constr_from_ptr(long ptr) {
+ long raw_ty = bindings.LDKInboundChannelFunds_ty_from_ptr(ptr);
+ switch (raw_ty) {
+ case 0: return new InboundChannelFunds_PushMsat(ptr);
+ case 1: return new InboundChannelFunds_DualFunded(ptr);
+ default:
+ throw new ArgumentException("Impossible enum variant");
+ }
+ }
+
+ /** A InboundChannelFunds of type PushMsat */
+ public class InboundChannelFunds_PushMsat : InboundChannelFunds {
+ public long push_msat;
+ internal InboundChannelFunds_PushMsat(long ptr) : base(null, ptr) {
+ this.push_msat = bindings.LDKInboundChannelFunds_PushMsat_get_push_msat(ptr);
+ }
+ }
+ /** A InboundChannelFunds of type DualFunded */
+ public class InboundChannelFunds_DualFunded : InboundChannelFunds {
+ internal InboundChannelFunds_DualFunded(long ptr) : base(null, ptr) {
+ }
+ }
+ internal long clone_ptr() {
+ long ret = bindings.InboundChannelFunds_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the InboundChannelFunds
+ */
+ public InboundChannelFunds clone() {
+ long ret = bindings.InboundChannelFunds_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.InboundChannelFunds ret_hu_conv = org.ldk.structs.InboundChannelFunds.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new PushMsat-variant InboundChannelFunds
+ */
+ public static InboundChannelFunds push_msat(long a) {
+ long ret = bindings.InboundChannelFunds_push_msat(a);
+ GC.KeepAlive(a);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.InboundChannelFunds ret_hu_conv = org.ldk.structs.InboundChannelFunds.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new DualFunded-variant InboundChannelFunds
+ */
+ public static InboundChannelFunds dual_funded() {
+ long ret = bindings.InboundChannelFunds_dual_funded();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.InboundChannelFunds ret_hu_conv = org.ldk.structs.InboundChannelFunds.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if two InboundChannelFundss contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+ public bool eq(org.ldk.structs.InboundChannelFunds b) {
+ bool ret = bindings.InboundChannelFunds_eq(this.ptr, b.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(b);
+ return ret;
+ }
+
+ public override bool Equals(object o) {
+ if (!(o is InboundChannelFunds)) return false;
+ return this.eq((InboundChannelFunds)o);
+ }
+}
+} } }
return ret;
}
+ /**
+ * Set this feature as optional.
+ */
+ public void set_dual_fund_optional() {
+ bindings.InitFeatures_set_dual_fund_optional(this.ptr);
+ GC.KeepAlive(this);
+ }
+
+ /**
+ * Set this feature as required.
+ */
+ public void set_dual_fund_required() {
+ bindings.InitFeatures_set_dual_fund_required(this.ptr);
+ GC.KeepAlive(this);
+ }
+
+ /**
+ * Checks if this feature is supported.
+ */
+ public bool supports_dual_fund() {
+ bool ret = bindings.InitFeatures_supports_dual_fund(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Checks if this feature is required.
+ */
+ public bool requires_dual_fund() {
+ bool ret = bindings.InitFeatures_requires_dual_fund(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
/**
* Set this feature as optional.
*/
}
/**
- * The public key used by the recipient to sign invoices.
+ * The public key corresponding to the key used by the recipient to sign invoices.
+ * - If [`Offer::paths`] is empty, MUST be `Some` and contain the recipient's node id for
+ * sending an [`InvoiceRequest`].
+ * - If [`Offer::paths`] is not empty, MAY be `Some` and contain a transient id.
+ * - If `None`, the signing pubkey will be the final blinded node id from the
+ * [`BlindedMessagePath`] in [`Offer::paths`] used to send the [`InvoiceRequest`].
+ *
+ * See also [`Bolt12Invoice::signing_pubkey`].
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Bolt12Invoice::signing_pubkey`]: crate::offers::invoice::Bolt12Invoice::signing_pubkey
*
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public byte[] signing_pubkey() {
- long ret = bindings.InvoiceRequest_signing_pubkey(this.ptr);
+ public byte[] issuer_signing_pubkey() {
+ long ret = bindings.InvoiceRequest_issuer_signing_pubkey(this.ptr);
GC.KeepAlive(this);
if (ret >= 0 && ret <= 4096) { return null; }
byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
/**
* An unpredictable series of bytes, typically containing information about the derivation of
- * [`payer_id`].
+ * [`payer_signing_pubkey`].
*
- * [`payer_id`]: Self::payer_id
+ * [`payer_signing_pubkey`]: Self::payer_signing_pubkey
*/
public byte[] payer_metadata() {
long ret = bindings.InvoiceRequest_payer_metadata(this.ptr);
return ret_hu_conv;
}
+ /**
+ * Returns whether an amount was set in the request; otherwise, if [`amount_msats`] is `Some`
+ * then it was inferred from the [`Offer::amount`] and [`quantity`].
+ *
+ * [`amount_msats`]: Self::amount_msats
+ * [`quantity`]: Self::quantity
+ */
+ public bool has_amount_msats() {
+ bool ret = bindings.InvoiceRequest_has_amount_msats(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
/**
* Features pertaining to requesting an invoice.
*/
/**
* A possibly transient pubkey used to sign the invoice request.
*/
- public byte[] payer_id() {
- long ret = bindings.InvoiceRequest_payer_id(this.ptr);
+ public byte[] payer_signing_pubkey() {
+ long ret = bindings.InvoiceRequest_payer_signing_pubkey(this.ptr);
GC.KeepAlive(this);
if (ret >= 0 && ret <= 4096) { return null; }
byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
return ret_hu_conv;
}
+ /**
+ * If the [`Offer`] was sourced from a BIP 353 Human Readable Name, this should be set by the
+ * builder to indicate the original [`HumanReadableName`] which was resolved.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public HumanReadableName offer_from_hrn() {
+ long ret = bindings.InvoiceRequest_offer_from_hrn(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.HumanReadableName ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.HumanReadableName(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ 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.
* 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.
+ * `created_at`, which is used to set [`Bolt12Invoice::created_at`].
+ * Useful for non-`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`].
+ * [`Offer::issuer_signing_pubkey`].
*
* Errors if the request contains unknown required features.
*
}
/**
- * Signature of the invoice request using [`payer_id`].
+ * Signature of the invoice request using [`payer_signing_pubkey`].
*
- * [`payer_id`]: Self::payer_id
+ * [`payer_signing_pubkey`]: Self::payer_signing_pubkey
*/
public byte[] signature() {
long ret = bindings.InvoiceRequest_signature(this.ptr);
return ret_conv;
}
+ /**
+ * Read a InvoiceRequest from a byte array, created by InvoiceRequest_write
+ */
+ public static Result_InvoiceRequestDecodeErrorZ read(byte[] ser) {
+ long ret = bindings.InvoiceRequest_read(InternalUtils.encodeUint8Array(ser));
+ GC.KeepAlive(ser);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestDecodeErrorZ ret_hu_conv = Result_InvoiceRequestDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
}
} } }
/**
* A possibly transient pubkey used to sign the invoice request.
*/
- public byte[] get_payer_id() {
- long ret = bindings.InvoiceRequestFields_get_payer_id(this.ptr);
+ public byte[] get_payer_signing_pubkey() {
+ long ret = bindings.InvoiceRequestFields_get_payer_signing_pubkey(this.ptr);
GC.KeepAlive(this);
if (ret >= 0 && ret <= 4096) { return null; }
byte[] ret_conv = InternalUtils.decodeUint8Array(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.encodeUint8Array(InternalUtils.check_arr_len(val, 33)));
+ public void set_payer_signing_pubkey(byte[] val) {
+ bindings.InvoiceRequestFields_set_payer_signing_pubkey(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33)));
GC.KeepAlive(this);
GC.KeepAlive(val);
}
GC.KeepAlive(val);
}
+ /**
+ * The Human Readable Name which the sender indicated they were paying to.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public HumanReadableName get_human_readable_name() {
+ long ret = bindings.InvoiceRequestFields_get_human_readable_name(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.HumanReadableName ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.HumanReadableName(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * The Human Readable Name which the sender indicated they were paying to.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public void set_human_readable_name(org.ldk.structs.HumanReadableName val) {
+ bindings.InvoiceRequestFields_set_human_readable_name(this.ptr, val == null ? 0 : val.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(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
+ * Note that human_readable_name_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, org.ldk.structs.UntrustedString payer_note_truncated_arg) {
- long ret = bindings.InvoiceRequestFields_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payer_id_arg, 33)), quantity_arg.ptr, payer_note_truncated_arg == null ? 0 : payer_note_truncated_arg.ptr);
- GC.KeepAlive(payer_id_arg);
+ public static InvoiceRequestFields of(byte[] payer_signing_pubkey_arg, org.ldk.structs.Option_u64Z quantity_arg, org.ldk.structs.UntrustedString payer_note_truncated_arg, org.ldk.structs.HumanReadableName human_readable_name_arg) {
+ long ret = bindings.InvoiceRequestFields_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payer_signing_pubkey_arg, 33)), quantity_arg.ptr, payer_note_truncated_arg == null ? 0 : payer_note_truncated_arg.ptr, human_readable_name_arg == null ? 0 : human_readable_name_arg.ptr);
+ GC.KeepAlive(payer_signing_pubkey_arg);
GC.KeepAlive(quantity_arg);
GC.KeepAlive(payer_note_truncated_arg);
+ GC.KeepAlive(human_readable_name_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.AddLast(ret_hu_conv); };
+++ /dev/null
-using org.ldk.impl;
-using org.ldk.enums;
-using org.ldk.util;
-using System;
-
-namespace org { namespace ldk { namespace structs {
-
-
-/**
- * Builds an [`InvoiceRequest`] from an [`Offer`] for the \"offer to be paid\" flow.
- *
- * See [module-level documentation] for usage.
- *
- * [module-level documentation]: self
- */
-public class InvoiceRequestWithDerivedPayerIdBuilder : CommonBase {
- internal InvoiceRequestWithDerivedPayerIdBuilder(object _dummy, long ptr) : base(ptr) { }
- ~InvoiceRequestWithDerivedPayerIdBuilder() {
- 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);
- GC.KeepAlive(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.AddLast(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(Network network) {
- long ret = bindings.InvoiceRequestWithDerivedPayerIdBuilder_chain(this.ptr, network);
- GC.KeepAlive(this);
- GC.KeepAlive(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.AddLast(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);
- GC.KeepAlive(this);
- GC.KeepAlive(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.AddLast(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);
- GC.KeepAlive(this);
- GC.KeepAlive(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.AddLast(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(string payer_note) {
- bindings.InvoiceRequestWithDerivedPayerIdBuilder_payer_note(this.ptr, InternalUtils.encodeString(payer_note));
- GC.KeepAlive(this);
- GC.KeepAlive(payer_note);
- if (this != null) { this.ptrs_to.AddLast(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;;
- }
-
-}
-} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+/**
+ * Builds an [`InvoiceRequest`] from an [`Offer`] for the \"offer to be paid\" flow.
+ *
+ * See [module-level documentation] for usage.
+ *
+ * [module-level documentation]: self
+ */
+public class InvoiceRequestWithDerivedPayerSigningPubkeyBuilder : CommonBase {
+ internal InvoiceRequestWithDerivedPayerSigningPubkeyBuilder(object _dummy, long ptr) : base(ptr) { }
+ ~InvoiceRequestWithDerivedPayerSigningPubkeyBuilder() {
+ if (ptr != 0) { bindings.InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_free(ptr); }
+ }
+
+ /**
+ * Builds a signed [`InvoiceRequest`] after checking for valid semantics.
+ */
+ public Result_InvoiceRequestBolt12SemanticErrorZ build_and_sign() {
+ long ret = bindings.InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_build_and_sign(this.ptr);
+ GC.KeepAlive(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.AddLast(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(Network network) {
+ long ret = bindings.InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_chain(this.ptr, network);
+ GC.KeepAlive(this);
+ GC.KeepAlive(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.AddLast(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.InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_amount_msats(this.ptr, amount_msats);
+ GC.KeepAlive(this);
+ GC.KeepAlive(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.AddLast(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.InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_quantity(this.ptr, quantity);
+ GC.KeepAlive(this);
+ GC.KeepAlive(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.AddLast(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(string payer_note) {
+ bindings.InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_payer_note(this.ptr, InternalUtils.encodeString(payer_note));
+ GC.KeepAlive(this);
+ GC.KeepAlive(payer_note);
+ if (this != null) { this.ptrs_to.AddLast(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 the [`InvoiceRequest::offer_from_hrn`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+ public void sourced_from_human_readable_name(org.ldk.structs.HumanReadableName hrn) {
+ bindings.InvoiceRequestWithDerivedPayerSigningPubkeyBuilder_sourced_from_human_readable_name(this.ptr, hrn.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(hrn);
+ if (this != null) { this.ptrs_to.AddLast(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;;
+ }
+
+}
+} } }
+++ /dev/null
-using org.ldk.impl;
-using org.ldk.enums;
-using org.ldk.util;
-using System;
-
-namespace org { namespace ldk { namespace structs {
-
-
-/**
- * Builds an [`InvoiceRequest`] from an [`Offer`] for the \"offer to be paid\" flow.
- *
- * See [module-level documentation] for usage.
- *
- * [module-level documentation]: self
- */
-public class InvoiceRequestWithExplicitPayerIdBuilder : CommonBase {
- internal InvoiceRequestWithExplicitPayerIdBuilder(object _dummy, long ptr) : base(ptr) { }
- ~InvoiceRequestWithExplicitPayerIdBuilder() {
- 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);
- GC.KeepAlive(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.AddLast(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(Network network) {
- long ret = bindings.InvoiceRequestWithExplicitPayerIdBuilder_chain(this.ptr, network);
- GC.KeepAlive(this);
- GC.KeepAlive(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.AddLast(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);
- GC.KeepAlive(this);
- GC.KeepAlive(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.AddLast(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);
- GC.KeepAlive(this);
- GC.KeepAlive(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.AddLast(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(string payer_note) {
- bindings.InvoiceRequestWithExplicitPayerIdBuilder_payer_note(this.ptr, InternalUtils.encodeString(payer_note));
- GC.KeepAlive(this);
- GC.KeepAlive(payer_note);
- if (this != null) { this.ptrs_to.AddLast(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;;
- }
-
-}
-} } }
}
/**
- * Builds an unsigned [`Bolt12Invoice`] after checking for valid semantics. It can be signed by
- * [`UnsignedBolt12Invoice::sign`].
+ * Builds an unsigned [`Bolt12Invoice`] after checking for valid semantics.
*/
public Result_UnsignedBolt12InvoiceBolt12SemanticErrorZ build() {
long ret = bindings.InvoiceWithExplicitSigningPubkeyBuilder_build(this.ptr);
long raw_ty = bindings.LDKMessageContext_ty_from_ptr(ptr);
switch (raw_ty) {
case 0: return new MessageContext_Offers(ptr);
- case 1: return new MessageContext_Custom(ptr);
+ case 1: return new MessageContext_AsyncPayments(ptr);
+ case 2: return new MessageContext_DNSResolver(ptr);
+ case 3: return new MessageContext_Custom(ptr);
default:
throw new ArgumentException("Impossible enum variant");
}
this.offers = offers_hu_conv;
}
}
+ /** A MessageContext of type AsyncPayments */
+ public class MessageContext_AsyncPayments : MessageContext {
+ public AsyncPaymentsContext async_payments;
+ internal MessageContext_AsyncPayments(long ptr) : base(null, ptr) {
+ long async_payments = bindings.LDKMessageContext_AsyncPayments_get_async_payments(ptr);
+ org.ldk.structs.AsyncPaymentsContext async_payments_hu_conv = org.ldk.structs.AsyncPaymentsContext.constr_from_ptr(async_payments);
+ if (async_payments_hu_conv != null) { async_payments_hu_conv.ptrs_to.AddLast(this); };
+ this.async_payments = async_payments_hu_conv;
+ }
+ }
+ /** A MessageContext of type DNSResolver */
+ public class MessageContext_DNSResolver : MessageContext {
+ public DNSResolverContext dns_resolver;
+ internal MessageContext_DNSResolver(long ptr) : base(null, ptr) {
+ long dns_resolver = bindings.LDKMessageContext_DNSResolver_get_dns_resolver(ptr);
+ org.ldk.structs.DNSResolverContext dns_resolver_hu_conv = null; if (dns_resolver < 0 || dns_resolver > 4096) { dns_resolver_hu_conv = new org.ldk.structs.DNSResolverContext(null, dns_resolver); }
+ if (dns_resolver_hu_conv != null) { dns_resolver_hu_conv.ptrs_to.AddLast(this); };
+ this.dns_resolver = dns_resolver_hu_conv;
+ }
+ }
/** A MessageContext of type Custom */
public class MessageContext_Custom : MessageContext {
public byte[] custom;
return ret_hu_conv;
}
+ /**
+ * Utility method to constructs a new AsyncPayments-variant MessageContext
+ */
+ public static MessageContext async_payments(org.ldk.structs.AsyncPaymentsContext a) {
+ long ret = bindings.MessageContext_async_payments(a.ptr);
+ GC.KeepAlive(a);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.MessageContext ret_hu_conv = org.ldk.structs.MessageContext.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new DNSResolver-variant MessageContext
+ */
+ public static MessageContext dnsresolver(org.ldk.structs.DNSResolverContext a) {
+ long ret = bindings.MessageContext_dnsresolver(a.ptr);
+ GC.KeepAlive(a);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.MessageContext ret_hu_conv = org.ldk.structs.MessageContext.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
/**
* Utility method to constructs a new Custom-variant MessageContext
*/
--- /dev/null
+
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+
+/** An implementation of MigratableKVStore */
+public interface MigratableKVStoreInterface {
+ /**Returns *all* known keys as a list of `primary_namespace`, `secondary_namespace`, `key` tuples.
+ *
+ * This is useful for migrating data from [`KVStore`] implementation to [`KVStore`]
+ * implementation.
+ *
+ * Must exhaustively return all entries known to the store to ensure no data is missed, but
+ * may return the items in arbitrary order.
+ */
+ Result_CVec_C3Tuple_StrStrStrZZIOErrorZ list_all_keys();
+}
+
+/**
+ * Provides additional interface methods that are required for [`KVStore`]-to-[`KVStore`]
+ * data migration.
+ */
+public class MigratableKVStore : CommonBase {
+ internal bindings.LDKMigratableKVStore bindings_instance;
+ internal long instance_idx;
+
+ internal MigratableKVStore(object _dummy, long ptr) : base(ptr) { bindings_instance = null; }
+ ~MigratableKVStore() {
+ if (ptr != 0) { bindings.MigratableKVStore_free(ptr); }
+ }
+
+ private class LDKMigratableKVStoreHolder { internal MigratableKVStore held; }
+ private class LDKMigratableKVStoreImpl : bindings.LDKMigratableKVStore {
+ internal LDKMigratableKVStoreImpl(MigratableKVStoreInterface arg, LDKMigratableKVStoreHolder impl_holder) { this.arg = arg; this.impl_holder = impl_holder; }
+ private MigratableKVStoreInterface arg;
+ private LDKMigratableKVStoreHolder impl_holder;
+ public long list_all_keys() {
+ Result_CVec_C3Tuple_StrStrStrZZIOErrorZ ret = arg.list_all_keys();
+ GC.KeepAlive(arg);
+ long result = ret.clone_ptr();
+ return result;
+ }
+ }
+
+ /** Creates a new instance of MigratableKVStore from a given implementation */
+ public static MigratableKVStore new_impl(MigratableKVStoreInterface arg, KVStoreInterface kVStore_impl) {
+ LDKMigratableKVStoreHolder impl_holder = new LDKMigratableKVStoreHolder();
+ LDKMigratableKVStoreImpl impl = new LDKMigratableKVStoreImpl(arg, impl_holder);
+ KVStore kVStore = KVStore.new_impl(kVStore_impl);
+ long[] ptr_idx = bindings.LDKMigratableKVStore_new(impl, kVStore.instance_idx);
+
+ impl_holder.held = new MigratableKVStore(null, ptr_idx[0]);
+ impl_holder.held.instance_idx = ptr_idx[1];
+ impl_holder.held.bindings_instance = impl;
+ impl_holder.held.ptrs_to.AddLast(kVStore);
+ return impl_holder.held;
+ }
+
+ /**
+ * Returns *all* known keys as a list of `primary_namespace`, `secondary_namespace`, `key` tuples.
+ *
+ * This is useful for migrating data from [`KVStore`] implementation to [`KVStore`]
+ * implementation.
+ *
+ * Must exhaustively return all entries known to the store to ensure no data is missed, but
+ * may return the items in arbitrary order.
+ */
+ public Result_CVec_C3Tuple_StrStrStrZZIOErrorZ list_all_keys() {
+ long ret = bindings.MigratableKVStore_list_all_keys(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_CVec_C3Tuple_StrStrStrZZIOErrorZ ret_hu_conv = Result_CVec_C3Tuple_StrStrStrZZIOErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+/**
+ * A struct representing a name for a channel monitor.
+ *
+ * `MonitorName` is primarily used within the [`MonitorUpdatingPersister`]
+ * in functions that store or retrieve channel monitor snapshots.
+ * It provides a consistent way to generate a unique key for channel
+ * monitors based on their funding outpoints.
+ *
+ * While users of the Lightning Dev Kit library generally won't need
+ * to interact with [`MonitorName`] directly, it can be useful for:
+ * - Custom persistence implementations
+ * - Debugging or logging channel monitor operations
+ * - Extending the functionality of the `MonitorUpdatingPersister`
+ * # Examples
+ *
+ * ```
+ * use std::str::FromStr;
+ *
+ * use bitcoin::Txid;
+ *
+ * use lightning::util::persist::MonitorName;
+ * use lightning::chain::transaction::OutPoint;
+ *
+ * let outpoint = OutPoint {
+ * \t txid: Txid::from_str(\"deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef\").unwrap(),
+ * \t index: 1,
+ * };
+ * let monitor_name = MonitorName::from(outpoint);
+ * assert_eq!(monitor_name.as_str(), \"deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef_1\");
+ *
+ * Using MonitorName to generate a storage key
+ * let storage_key = format!(\"channel_monitors/{}\", monitor_name.as_str());
+ * ```
+ */
+public class MonitorName : CommonBase {
+ internal MonitorName(object _dummy, long ptr) : base(ptr) { }
+ ~MonitorName() {
+ if (ptr != 0) { bindings.MonitorName_free(ptr); }
+ }
+
+ /**
+ * Constructs a [`MonitorName`], after verifying that an [`OutPoint`] can
+ * be formed from the given `name`.
+ * This method is useful if you have a String and you want to verify that
+ * it's a valid storage key for a channel monitor.
+ */
+ public static Result_MonitorNameIOErrorZ of(string name) {
+ long ret = bindings.MonitorName_new(InternalUtils.encodeString(name));
+ GC.KeepAlive(name);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_MonitorNameIOErrorZ ret_hu_conv = Result_MonitorNameIOErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Convert this monitor name to a str.
+ * This method is particularly useful when you need to use the monitor name
+ * as a key in a key-value store or when logging.
+ */
+ public string as_str() {
+ long ret = bindings.MonitorName_as_str(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ string ret_conv = InternalUtils.decodeString(ret);
+ return ret_conv;
+ }
+
+}
+} } }
* in the map for a while so that these can be resynced from gossip in the future.
*
* This method is only available with the `std` feature. See
- * [`NetworkGraph::remove_stale_channels_and_tracking_with_time`] for `no-std` use.
+ * [`NetworkGraph::remove_stale_channels_and_tracking_with_time`] for non-`std` use.
*/
public void remove_stale_channels_and_tracking() {
bindings.NetworkGraph_remove_stale_channels_and_tracking(this.ptr);
* [`RoutingMessageHandler`] implementation to call it indirectly. This may be useful to accept
* routing messages from a source using a protocol other than the lightning P2P protocol.
*
- * If built with `no-std`, any updates with a timestamp more than two weeks in the past or
+ * If not built with `std`, any updates with a timestamp more than two weeks in the past or
* materially in the future will be rejected.
*/
public Result_NoneLightningErrorZ update_channel(org.ldk.structs.ChannelUpdate msg) {
* of the channel without verifying the associated signatures. Because we aren't given the
* associated signatures here we cannot relay the channel update to any of our peers.
*
- * If built with `no-std`, any updates with a timestamp more than two weeks in the past or
+ * If not built with `std`, any updates with a timestamp more than two weeks in the past or
* materially in the future will be rejected.
*/
public Result_NoneLightningErrorZ update_channel_unsigned(org.ldk.structs.UnsignedChannelUpdate msg) {
*
* This checks whether the update currently is applicable by [`Self::update_channel`].
*
- * If built with `no-std`, any updates with a timestamp more than two weeks in the past or
+ * If not built with `std`, any updates with a timestamp more than two weeks in the past or
* materially in the future will be rejected.
*/
public Result_NoneLightningErrorZ verify_channel_update(org.ldk.structs.ChannelUpdate msg) {
return ret;
}
+ /**
+ * Set this feature as optional.
+ */
+ public void set_dual_fund_optional() {
+ bindings.NodeFeatures_set_dual_fund_optional(this.ptr);
+ GC.KeepAlive(this);
+ }
+
+ /**
+ * Set this feature as required.
+ */
+ public void set_dual_fund_required() {
+ bindings.NodeFeatures_set_dual_fund_required(this.ptr);
+ GC.KeepAlive(this);
+ }
+
+ /**
+ * Checks if this feature is supported.
+ */
+ public bool supports_dual_fund() {
+ bool ret = bindings.NodeFeatures_supports_dual_fund(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Checks if this feature is required.
+ */
+ public bool requires_dual_fund() {
+ bool ret = bindings.NodeFeatures_requires_dual_fund(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
/**
* Set this feature as optional.
*/
return ret;
}
+ /**
+ * Set this feature as optional.
+ */
+ public void set_dns_resolution_optional() {
+ bindings.NodeFeatures_set_dns_resolution_optional(this.ptr);
+ GC.KeepAlive(this);
+ }
+
+ /**
+ * Set this feature as required.
+ */
+ public void set_dns_resolution_required() {
+ bindings.NodeFeatures_set_dns_resolution_required(this.ptr);
+ GC.KeepAlive(this);
+ }
+
+ /**
+ * Checks if this feature is supported.
+ */
+ public bool supports_dns_resolution() {
+ bool ret = bindings.NodeFeatures_supports_dns_resolution(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Checks if this feature is required.
+ */
+ public bool requires_dns_resolution() {
+ bool ret = bindings.NodeFeatures_requires_dns_resolution(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
}
} } }
/** An implementation of NodeSigner */
public interface NodeSignerInterface {
- /**Get secret key material as bytes for use in encrypting and decrypting inbound payment data.
+ /**Get the [`ExpandedKey`] for use in encrypting and decrypting inbound payment data.
*
* If the implementor of this trait supports [phantom node payments], then every node that is
* intended to be included in the phantom invoice route hints must return the same value from
*
* [phantom node payments]: PhantomKeysManager
*/
- byte[] get_inbound_payment_key_material();
+ ExpandedKey get_inbound_payment_key();
/**Get node id based on the provided [`Recipient`].
*
* This method must return the same value each time it is called with a given [`Recipient`]
* Errors if the [`Recipient`] variant is not supported by the implementation.
*/
Result_RecoverableSignatureNoneZ sign_invoice(RawBolt11Invoice invoice, Recipient recipient);
- /**Signs the [`TaggedHash`] of a BOLT 12 invoice request.
- *
- * May be called by a function passed to [`UnsignedInvoiceRequest::sign`] where
- * `invoice_request` is the callee.
- *
- * Implementors may check that the `invoice_request` is expected rather than blindly signing
- * the tagged hash. An `Ok` result should sign `invoice_request.tagged_hash().as_digest()` with
- * the node's signing key or an ephemeral key to preserve privacy, whichever is associated with
- * [`UnsignedInvoiceRequest::payer_id`].
- *
- * [`TaggedHash`]: crate::offers::merkle::TaggedHash
- */
- Result_SchnorrSignatureNoneZ sign_bolt12_invoice_request(UnsignedInvoiceRequest invoice_request);
/**Signs the [`TaggedHash`] of a BOLT 12 invoice.
- *
- * May be called by a function passed to [`UnsignedBolt12Invoice::sign`] where `invoice` is the
- * callee.
*
* Implementors may check that the `invoice` is expected rather than blindly signing the tagged
* hash. An `Ok` result should sign `invoice.tagged_hash().as_digest()` with the node's signing
internal LDKNodeSignerImpl(NodeSignerInterface arg, LDKNodeSignerHolder impl_holder) { this.arg = arg; this.impl_holder = impl_holder; }
private NodeSignerInterface arg;
private LDKNodeSignerHolder impl_holder;
- public long get_inbound_payment_key_material() {
- byte[] ret = arg.get_inbound_payment_key_material();
+ public long get_inbound_payment_key() {
+ ExpandedKey ret = arg.get_inbound_payment_key();
GC.KeepAlive(arg);
- long result = InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(ret, 32));
+ long result = ret.clone_ptr();
return result;
}
public long get_node_id(Recipient _recipient) {
long result = ret.clone_ptr();
return result;
}
- 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);
- GC.KeepAlive(arg);
- long result = ret.clone_ptr();
- return result;
- }
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);
}
/**
- * Get secret key material as bytes for use in encrypting and decrypting inbound payment data.
+ * Get the [`ExpandedKey`] for use in encrypting and decrypting inbound payment data.
*
* If the implementor of this trait supports [phantom node payments], then every node that is
* intended to be included in the phantom invoice route hints must return the same value from
*
* [phantom node payments]: PhantomKeysManager
*/
- public byte[] get_inbound_payment_key_material() {
- long ret = bindings.NodeSigner_get_inbound_payment_key_material(this.ptr);
+ public ExpandedKey get_inbound_payment_key() {
+ long ret = bindings.NodeSigner_get_inbound_payment_key(this.ptr);
GC.KeepAlive(this);
if (ret >= 0 && ret <= 4096) { return null; }
- byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
- return ret_conv;
+ org.ldk.structs.ExpandedKey ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ExpandedKey(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
}
/**
return ret_hu_conv;
}
- /**
- * Signs the [`TaggedHash`] of a BOLT 12 invoice request.
- *
- * May be called by a function passed to [`UnsignedInvoiceRequest::sign`] where
- * `invoice_request` is the callee.
- *
- * Implementors may check that the `invoice_request` is expected rather than blindly signing
- * the tagged hash. An `Ok` result should sign `invoice_request.tagged_hash().as_digest()` with
- * the node's signing key or an ephemeral key to preserve privacy, whichever is associated with
- * [`UnsignedInvoiceRequest::payer_id`].
- *
- * [`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.ptr);
- GC.KeepAlive(this);
- GC.KeepAlive(invoice_request);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_SchnorrSignatureNoneZ ret_hu_conv = Result_SchnorrSignatureNoneZ.constr_from_ptr(ret);
- if (this != null) { this.ptrs_to.AddLast(invoice_request); };
- return ret_hu_conv;
- }
-
/**
* Signs the [`TaggedHash`] of a BOLT 12 invoice.
*
- * May be called by a function passed to [`UnsignedBolt12Invoice::sign`] where `invoice` is the
- * callee.
- *
* Implementors may check that the `invoice` is expected rather than blindly signing the tagged
* hash. An `Ok` result should sign `invoice.tagged_hash().as_digest()` with the node's signing
* key or an ephemeral key to preserve privacy, whichever is associated with
/**
* A 128-bit number used only once.
*
- * Needed when constructing [`Offer::metadata`] and deriving [`Offer::signing_pubkey`] from
+ * Needed when constructing [`Offer::metadata`] and deriving [`Offer::issuer_signing_pubkey`] from
* [`ExpandedKey`]. Must not be reused for any other derivation without first hashing.
*
* [`Offer::metadata`]: crate::offers::offer::Offer::metadata
- * [`Offer::signing_pubkey`]: crate::offers::offer::Offer::signing_pubkey
+ * [`Offer::issuer_signing_pubkey`]: crate::offers::offer::Offer::issuer_signing_pubkey
* [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey
*/
public class Nonce : CommonBase {
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+/**
+ * A stateful resolver which maps BIP 353 Human Readable Names to URIs and BOLT12 [`Offer`]s.
+ *
+ * It does not directly implement [`DNSResolverMessageHandler`] but implements all the core logic
+ * which is required in a client which intends to.
+ *
+ * It relies on being made aware of the passage of time with regular calls to
+ * [`Self::new_best_block`] in order to time out existing queries. Queries time out after two
+ * blocks.
+ */
+public class OMNameResolver : CommonBase {
+ internal OMNameResolver(object _dummy, long ptr) : base(ptr) { }
+ ~OMNameResolver() {
+ if (ptr != 0) { bindings.OMNameResolver_free(ptr); }
+ }
+
+ /**
+ * Builds a new [`OMNameResolver`].
+ */
+ public static OMNameResolver of(int latest_block_time, int latest_block_height) {
+ long ret = bindings.OMNameResolver_new(latest_block_time, latest_block_height);
+ GC.KeepAlive(latest_block_time);
+ GC.KeepAlive(latest_block_height);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.OMNameResolver ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OMNameResolver(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Informs the [`OMNameResolver`] of the passage of time in the form of a new best Bitcoin
+ * block.
+ *
+ * This will call back to resolve some pending queries which have timed out.
+ */
+ public void new_best_block(int height, int time) {
+ bindings.OMNameResolver_new_best_block(this.ptr, height, time);
+ GC.KeepAlive(this);
+ GC.KeepAlive(height);
+ GC.KeepAlive(time);
+ }
+
+ /**
+ * Begins the process of resolving a BIP 353 Human Readable Name.
+ *
+ * Returns a [`DNSSECQuery`] onion message and a [`DNSResolverContext`] which should be sent
+ * to a resolver (with the context used to generate the blinded response path) on success.
+ */
+ public Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ resolve_name(byte[] payment_id, org.ldk.structs.HumanReadableName name, org.ldk.structs.EntropySource entropy_source) {
+ long ret = bindings.OMNameResolver_resolve_name(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), name.ptr, entropy_source.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(payment_id);
+ GC.KeepAlive(name);
+ GC.KeepAlive(entropy_source);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ ret_hu_conv = Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.AddLast(entropy_source); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Handles a [`DNSSECProof`] message, attempting to verify it and match it against a pending
+ * query.
+ *
+ * If verification succeeds, the resulting bitcoin: URI is parsed to find a contained
+ * [`Offer`].
+ *
+ * Note that a single proof for a wildcard DNS entry may complete several requests for
+ * different [`HumanReadableName`]s.
+ *
+ * If an [`Offer`] is found, it, as well as the [`PaymentId`] and original `name` passed to
+ * [`Self::resolve_name`] are returned.
+ */
+ public Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ handle_dnssec_proof_for_offer(org.ldk.structs.DNSSECProof msg, org.ldk.structs.DNSResolverContext context) {
+ long ret = bindings.OMNameResolver_handle_dnssec_proof_for_offer(this.ptr, msg.ptr, context.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(msg);
+ GC.KeepAlive(context);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Handles a [`DNSSECProof`] message, attempting to verify it and match it against any pending
+ * queries.
+ *
+ * If verification succeeds, all matching [`PaymentId`] and [`HumanReadableName`]s passed to
+ * [`Self::resolve_name`], as well as the resolved bitcoin: URI are returned.
+ *
+ * Note that a single proof for a wildcard DNS entry may complete several requests for
+ * different [`HumanReadableName`]s.
+ *
+ * This method is useful for those who handle bitcoin: URIs already, handling more than just
+ * BOLT12 [`Offer`]s.
+ */
+ public Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ handle_dnssec_proof_for_uri(org.ldk.structs.DNSSECProof msg, org.ldk.structs.DNSResolverContext context) {
+ long ret = bindings.OMNameResolver_handle_dnssec_proof_for_uri(this.ptr, msg.ptr, context.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(msg);
+ GC.KeepAlive(context);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+}
+} } }
}
/**
- * The public key used by the recipient to sign invoices.
+ * The public key corresponding to the key used by the recipient to sign invoices.
+ * - If [`Offer::paths`] is empty, MUST be `Some` and contain the recipient's node id for
+ * sending an [`InvoiceRequest`].
+ * - If [`Offer::paths`] is not empty, MAY be `Some` and contain a transient id.
+ * - If `None`, the signing pubkey will be the final blinded node id from the
+ * [`BlindedMessagePath`] in [`Offer::paths`] used to send the [`InvoiceRequest`].
+ *
+ * See also [`Bolt12Invoice::signing_pubkey`].
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Bolt12Invoice::signing_pubkey`]: crate::offers::invoice::Bolt12Invoice::signing_pubkey
*
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public byte[] signing_pubkey() {
- long ret = bindings.Offer_signing_pubkey(this.ptr);
+ public byte[] issuer_signing_pubkey() {
+ long ret = bindings.Offer_issuer_signing_pubkey(this.ptr);
GC.KeepAlive(this);
if (ret >= 0 && ret <= 4096) { return null; }
byte[] ret_conv = InternalUtils.decodeUint8Array(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_using_metadata`] to determine if the
- * invoice was requested using a base [`ExpandedKey`] from which the payer id was derived,
- * and
+ * Creates an [`InvoiceRequestBuilder`] for the offer, which
+ * - derives the [`InvoiceRequest::payer_signing_pubkey`] such that a different key can be used
+ * for each request in order to protect the sender's privacy,
+ * - sets [`InvoiceRequest::payer_metadata`] when [`InvoiceRequestBuilder::build_and_sign`] is
+ * called such that it can be used by [`Bolt12Invoice::verify_using_metadata`] 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.
+ * Errors if the offer contains unknown required features.
*
- * [`InvoiceRequest::payer_id`]: crate::offers::invoice_request::InvoiceRequest::payer_id
+ * [`InvoiceRequest::payer_signing_pubkey`]: crate::offers::invoice_request::InvoiceRequest::payer_signing_pubkey
* [`InvoiceRequest::payer_metadata`]: crate::offers::invoice_request::InvoiceRequest::payer_metadata
* [`Bolt12Invoice::verify_using_metadata`]: crate::offers::invoice::Bolt12Invoice::verify_using_metadata
* [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey
*/
- public Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ request_invoice_deriving_payer_id(org.ldk.structs.ExpandedKey expanded_key, org.ldk.structs.Nonce nonce, byte[] payment_id) {
- long ret = bindings.Offer_request_invoice_deriving_payer_id(this.ptr, expanded_key.ptr, nonce.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)));
- GC.KeepAlive(this);
- GC.KeepAlive(expanded_key);
- GC.KeepAlive(nonce);
- GC.KeepAlive(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.AddLast(expanded_key); };
- 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.Nonce nonce, byte[] payment_id) {
- long ret = bindings.Offer_request_invoice_deriving_metadata(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payer_id, 33)), expanded_key.ptr, nonce.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)));
+ public Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ request_invoice(org.ldk.structs.ExpandedKey expanded_key, org.ldk.structs.Nonce nonce, byte[] payment_id) {
+ long ret = bindings.Offer_request_invoice(this.ptr, expanded_key.ptr, nonce.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)));
GC.KeepAlive(this);
- GC.KeepAlive(payer_id);
GC.KeepAlive(expanded_key);
GC.KeepAlive(nonce);
GC.KeepAlive(payment_id);
if (ret >= 0 && ret <= 4096) { return null; }
- Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
if (this != null) { this.ptrs_to.AddLast(expanded_key); };
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, InternalUtils.encodeUint8Array(metadata), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payer_id, 33)));
- GC.KeepAlive(this);
- GC.KeepAlive(metadata);
- GC.KeepAlive(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.
*/
* Similar to [`OfferBuilder::new`] except, if [`OfferBuilder::path`] is called, the signing
* pubkey is derived from the given [`ExpandedKey`] and [`Nonce`]. This provides recipient
* privacy by using a different signing pubkey for each offer. Otherwise, the provided
- * `node_id` is used for the signing pubkey.
+ * `node_id` is used for [`Offer::issuer_signing_pubkey`].
*
* Also, sets the metadata when [`OfferBuilder::build`] is called such that it can be used by
* [`InvoiceRequest::verify_using_metadata`] to determine if the request was produced for the
}
/**
- * 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`].
+ * 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.
*/
/**
* 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.
+ * private channels or if [`Offer::issuer_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.
}
/**
- * 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.
+ * Creates a new builder for an offer using the `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.
*
}
/**
- * 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`].
+ * 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.
*/
/**
* 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.
+ * private channels or if [`Offer::issuer_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.
* [`Bolt12Invoice::payment_hash`]: crate::offers::invoice::Bolt12Invoice::payment_hash
*/
public byte[] payment_hash;
+ /**
+ * A nonce used for authenticating that a received [`InvoiceError`] is for a valid
+ * sent [`Bolt12Invoice`].
+ *
+ * [`InvoiceError`]: crate::offers::invoice_error::InvoiceError
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ */
+ public Nonce nonce;
+ /**
+ * Authentication code for the [`PaymentHash`], which should be checked when the context is
+ * used to log the received [`InvoiceError`].
+ *
+ * [`InvoiceError`]: crate::offers::invoice_error::InvoiceError
+ */
+ public byte[] hmac;
internal OffersContext_InboundPayment(long ptr) : base(null, ptr) {
long payment_hash = bindings.LDKOffersContext_InboundPayment_get_payment_hash(ptr);
byte[] payment_hash_conv = InternalUtils.decodeUint8Array(payment_hash);
this.payment_hash = payment_hash_conv;
+ long nonce = bindings.LDKOffersContext_InboundPayment_get_nonce(ptr);
+ org.ldk.structs.Nonce nonce_hu_conv = null; if (nonce < 0 || nonce > 4096) { nonce_hu_conv = new org.ldk.structs.Nonce(null, nonce); }
+ if (nonce_hu_conv != null) { nonce_hu_conv.ptrs_to.AddLast(this); };
+ this.nonce = nonce_hu_conv;
+ long hmac = bindings.LDKOffersContext_InboundPayment_get_hmac(ptr);
+ byte[] hmac_conv = InternalUtils.decodeUint8Array(hmac);
+ this.hmac = hmac_conv;
}
}
internal long clone_ptr() {
/**
* Utility method to constructs a new InboundPayment-variant OffersContext
*/
- public static OffersContext inbound_payment(byte[] payment_hash) {
- long ret = bindings.OffersContext_inbound_payment(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)));
+ public static OffersContext inbound_payment(byte[] payment_hash, org.ldk.structs.Nonce nonce, byte[] hmac) {
+ long ret = bindings.OffersContext_inbound_payment(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), nonce.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(hmac, 32)));
GC.KeepAlive(payment_hash);
+ GC.KeepAlive(nonce);
+ GC.KeepAlive(hmac);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.OffersContext ret_hu_conv = org.ldk.structs.OffersContext.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
* # let custom_message_handler = IgnoringMessageHandler {};
* # let offers_message_handler = IgnoringMessageHandler {};
* # let async_payments_message_handler = IgnoringMessageHandler {};
+ * # let dns_resolution_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, &node_id_lookup, message_router,
- * &offers_message_handler, &async_payments_message_handler, &custom_message_handler
+ * &offers_message_handler, &async_payments_message_handler, &dns_resolution_message_handler,
+ * &custom_message_handler,
* );
*
- * # #[derive(Debug, Clone)]
+ * # #[derive(Clone, Debug)]
* # struct YourCustomMessage {}
* impl Writeable for YourCustomMessage {
* \tfn write<W: Writer>(&self, w: &mut W) -> Result<(), io::Error> {
* 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.NodeIdLookUp node_id_lookup, org.ldk.structs.MessageRouter message_router, org.ldk.structs.OffersMessageHandler offers_handler, org.ldk.structs.AsyncPaymentsMessageHandler async_payments_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, async_payments_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.AsyncPaymentsMessageHandler async_payments_handler, org.ldk.structs.DNSResolverMessageHandler dns_resolver, 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, async_payments_handler.ptr, dns_resolver.ptr, custom_handler.ptr);
GC.KeepAlive(entropy_source);
GC.KeepAlive(node_signer);
GC.KeepAlive(logger);
GC.KeepAlive(message_router);
GC.KeepAlive(offers_handler);
GC.KeepAlive(async_payments_handler);
+ GC.KeepAlive(dns_resolver);
GC.KeepAlive(custom_handler);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.OnionMessenger ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OnionMessenger(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(message_router); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(offers_handler); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(async_payments_handler); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(dns_resolver); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(custom_handler); };
return ret_hu_conv;
}
* onion messages are persisted and only persist onion messages for relevant
* peers.
*/
- public static OnionMessenger new_with_offline_peer_interception(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.AsyncPaymentsMessageHandler async_payments_handler, org.ldk.structs.CustomOnionMessageHandler custom_handler) {
- long ret = bindings.OnionMessenger_new_with_offline_peer_interception(entropy_source.ptr, node_signer.ptr, logger.ptr, node_id_lookup.ptr, message_router.ptr, offers_handler.ptr, async_payments_handler.ptr, custom_handler.ptr);
+ public static OnionMessenger new_with_offline_peer_interception(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.AsyncPaymentsMessageHandler async_payments_handler, org.ldk.structs.DNSResolverMessageHandler dns_resolver, org.ldk.structs.CustomOnionMessageHandler custom_handler) {
+ long ret = bindings.OnionMessenger_new_with_offline_peer_interception(entropy_source.ptr, node_signer.ptr, logger.ptr, node_id_lookup.ptr, message_router.ptr, offers_handler.ptr, async_payments_handler.ptr, dns_resolver.ptr, custom_handler.ptr);
GC.KeepAlive(entropy_source);
GC.KeepAlive(node_signer);
GC.KeepAlive(logger);
GC.KeepAlive(message_router);
GC.KeepAlive(offers_handler);
GC.KeepAlive(async_payments_handler);
+ GC.KeepAlive(dns_resolver);
GC.KeepAlive(custom_handler);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.OnionMessenger ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OnionMessenger(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(message_router); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(offers_handler); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(async_payments_handler); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(dns_resolver); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(custom_handler); };
return ret_hu_conv;
}
/**
- * An open_channel2 message to be sent by or received from the channel initiator.
+ * An [`open_channel2`] message to be sent by or received from the channel initiator.
*
* Used in V2 channel establishment
+ *
+ * [`open_channel2`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-open_channel2-message
*/
public class OpenChannelV2 : CommonBase {
internal OpenChannelV2(object _dummy, long ptr) : base(ptr) { }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+/**
+ * An enum which can either contain a crate::c_types::derived::C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ or not
+ */
+public class Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ : CommonBase {
+ protected Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ(object _dummy, long ptr) : base(ptr) { }
+ ~Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ() {
+ if (ptr != 0) { bindings.COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_free(ptr); }
+ }
+
+ internal static Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ constr_from_ptr(long ptr) {
+ long raw_ty = bindings.LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_ty_from_ptr(ptr);
+ switch (raw_ty) {
+ case 0: return new Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_Some(ptr);
+ case 1: return new Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_None(ptr);
+ default:
+ throw new ArgumentException("Impossible enum variant");
+ }
+ }
+
+ /** A Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ of type Some */
+ public class Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_Some : Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ {
+ public TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ some;
+ internal Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_Some(long ptr) : base(null, ptr) {
+ long some = bindings.LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_Some_get_some(ptr);
+ TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ some_hu_conv = new TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ(null, some);
+ if (some_hu_conv != null) { some_hu_conv.ptrs_to.AddLast(this); };
+ this.some = some_hu_conv;
+ }
+ }
+ /** A Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ of type None */
+ public class Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_None : Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ {
+ internal Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_None(long ptr) : base(null, ptr) {
+ }
+ }
+ /**
+ * Constructs a new COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ containing a crate::c_types::derived::C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ
+ */
+ public static Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ some(org.ldk.structs.TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ o) {
+ long ret = bindings.COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_some(o.ptr);
+ GC.KeepAlive(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ containing nothing
+ */
+ public static Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ none() {
+ long ret = bindings.COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_none();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ clone() {
+ long ret = bindings.COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+/**
+ * An enum which can either contain a crate::c_types::derived::C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ or not
+ */
+public class Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ : CommonBase {
+ protected Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ(object _dummy, long ptr) : base(ptr) { }
+ ~Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ() {
+ if (ptr != 0) { bindings.COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_free(ptr); }
+ }
+
+ internal static Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ constr_from_ptr(long ptr) {
+ long raw_ty = bindings.LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_ty_from_ptr(ptr);
+ switch (raw_ty) {
+ case 0: return new Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_Some(ptr);
+ case 1: return new Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_None(ptr);
+ default:
+ throw new ArgumentException("Impossible enum variant");
+ }
+ }
+
+ /** A Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ of type Some */
+ public class Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_Some : Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ {
+ public TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ some;
+ internal Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_Some(long ptr) : base(null, ptr) {
+ long some = bindings.LDKCOption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_Some_get_some(ptr);
+ TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ some_hu_conv = new TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ(null, some);
+ if (some_hu_conv != null) { some_hu_conv.ptrs_to.AddLast(this); };
+ this.some = some_hu_conv;
+ }
+ }
+ /** A Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ of type None */
+ public class Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_None : Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ {
+ internal Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_None(long ptr) : base(null, ptr) {
+ }
+ }
+ /**
+ * Constructs a new COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ containing a crate::c_types::derived::C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ
+ */
+ public static Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ some(org.ldk.structs.TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ o) {
+ long ret = bindings.COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_some(o.ptr);
+ GC.KeepAlive(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ containing nothing
+ */
+ public static Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ none() {
+ long ret = bindings.COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_none();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ clone() {
+ long ret = bindings.COption_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+/**
+ * An enum which can either contain a crate::c_types::derived::C2Tuple_DNSResolverMessageResponseInstructionZ or not
+ */
+public class Option_C2Tuple_DNSResolverMessageResponseInstructionZZ : CommonBase {
+ protected Option_C2Tuple_DNSResolverMessageResponseInstructionZZ(object _dummy, long ptr) : base(ptr) { }
+ ~Option_C2Tuple_DNSResolverMessageResponseInstructionZZ() {
+ if (ptr != 0) { bindings.COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_free(ptr); }
+ }
+
+ internal static Option_C2Tuple_DNSResolverMessageResponseInstructionZZ constr_from_ptr(long ptr) {
+ long raw_ty = bindings.LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ_ty_from_ptr(ptr);
+ switch (raw_ty) {
+ case 0: return new Option_C2Tuple_DNSResolverMessageResponseInstructionZZ_Some(ptr);
+ case 1: return new Option_C2Tuple_DNSResolverMessageResponseInstructionZZ_None(ptr);
+ default:
+ throw new ArgumentException("Impossible enum variant");
+ }
+ }
+
+ /** A Option_C2Tuple_DNSResolverMessageResponseInstructionZZ of type Some */
+ public class Option_C2Tuple_DNSResolverMessageResponseInstructionZZ_Some : Option_C2Tuple_DNSResolverMessageResponseInstructionZZ {
+ public TwoTuple_DNSResolverMessageResponseInstructionZ some;
+ internal Option_C2Tuple_DNSResolverMessageResponseInstructionZZ_Some(long ptr) : base(null, ptr) {
+ long some = bindings.LDKCOption_C2Tuple_DNSResolverMessageResponseInstructionZZ_Some_get_some(ptr);
+ TwoTuple_DNSResolverMessageResponseInstructionZ some_hu_conv = new TwoTuple_DNSResolverMessageResponseInstructionZ(null, some);
+ if (some_hu_conv != null) { some_hu_conv.ptrs_to.AddLast(this); };
+ this.some = some_hu_conv;
+ }
+ }
+ /** A Option_C2Tuple_DNSResolverMessageResponseInstructionZZ of type None */
+ public class Option_C2Tuple_DNSResolverMessageResponseInstructionZZ_None : Option_C2Tuple_DNSResolverMessageResponseInstructionZZ {
+ internal Option_C2Tuple_DNSResolverMessageResponseInstructionZZ_None(long ptr) : base(null, ptr) {
+ }
+ }
+ /**
+ * Constructs a new COption_C2Tuple_DNSResolverMessageResponseInstructionZZ containing a crate::c_types::derived::C2Tuple_DNSResolverMessageResponseInstructionZ
+ */
+ public static Option_C2Tuple_DNSResolverMessageResponseInstructionZZ some(org.ldk.structs.TwoTuple_DNSResolverMessageResponseInstructionZ o) {
+ long ret = bindings.COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_some(o.ptr);
+ GC.KeepAlive(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_C2Tuple_DNSResolverMessageResponseInstructionZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_DNSResolverMessageResponseInstructionZZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new COption_C2Tuple_DNSResolverMessageResponseInstructionZZ containing nothing
+ */
+ public static Option_C2Tuple_DNSResolverMessageResponseInstructionZZ none() {
+ long ret = bindings.COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_none();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_C2Tuple_DNSResolverMessageResponseInstructionZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_DNSResolverMessageResponseInstructionZZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new COption_C2Tuple_DNSResolverMessageResponseInstructionZZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Option_C2Tuple_DNSResolverMessageResponseInstructionZZ clone() {
+ long ret = bindings.COption_C2Tuple_DNSResolverMessageResponseInstructionZZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_C2Tuple_DNSResolverMessageResponseInstructionZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_DNSResolverMessageResponseInstructionZZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+/**
+ * An enum which can either contain a crate::c_types::derived::C2Tuple_PublicKeyChannelIdZ or not
+ */
+public class Option_C2Tuple_PublicKeyChannelIdZZ : CommonBase {
+ protected Option_C2Tuple_PublicKeyChannelIdZZ(object _dummy, long ptr) : base(ptr) { }
+ ~Option_C2Tuple_PublicKeyChannelIdZZ() {
+ if (ptr != 0) { bindings.COption_C2Tuple_PublicKeyChannelIdZZ_free(ptr); }
+ }
+
+ internal static Option_C2Tuple_PublicKeyChannelIdZZ constr_from_ptr(long ptr) {
+ long raw_ty = bindings.LDKCOption_C2Tuple_PublicKeyChannelIdZZ_ty_from_ptr(ptr);
+ switch (raw_ty) {
+ case 0: return new Option_C2Tuple_PublicKeyChannelIdZZ_Some(ptr);
+ case 1: return new Option_C2Tuple_PublicKeyChannelIdZZ_None(ptr);
+ default:
+ throw new ArgumentException("Impossible enum variant");
+ }
+ }
+
+ /** A Option_C2Tuple_PublicKeyChannelIdZZ of type Some */
+ public class Option_C2Tuple_PublicKeyChannelIdZZ_Some : Option_C2Tuple_PublicKeyChannelIdZZ {
+ public TwoTuple_PublicKeyChannelIdZ some;
+ internal Option_C2Tuple_PublicKeyChannelIdZZ_Some(long ptr) : base(null, ptr) {
+ long some = bindings.LDKCOption_C2Tuple_PublicKeyChannelIdZZ_Some_get_some(ptr);
+ TwoTuple_PublicKeyChannelIdZ some_hu_conv = new TwoTuple_PublicKeyChannelIdZ(null, some);
+ if (some_hu_conv != null) { some_hu_conv.ptrs_to.AddLast(this); };
+ this.some = some_hu_conv;
+ }
+ }
+ /** A Option_C2Tuple_PublicKeyChannelIdZZ of type None */
+ public class Option_C2Tuple_PublicKeyChannelIdZZ_None : Option_C2Tuple_PublicKeyChannelIdZZ {
+ internal Option_C2Tuple_PublicKeyChannelIdZZ_None(long ptr) : base(null, ptr) {
+ }
+ }
+ /**
+ * Constructs a new COption_C2Tuple_PublicKeyChannelIdZZ containing a crate::c_types::derived::C2Tuple_PublicKeyChannelIdZ
+ */
+ public static Option_C2Tuple_PublicKeyChannelIdZZ some(org.ldk.structs.TwoTuple_PublicKeyChannelIdZ o) {
+ long ret = bindings.COption_C2Tuple_PublicKeyChannelIdZZ_some(o.ptr);
+ GC.KeepAlive(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_C2Tuple_PublicKeyChannelIdZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_PublicKeyChannelIdZZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constructs a new COption_C2Tuple_PublicKeyChannelIdZZ containing nothing
+ */
+ public static Option_C2Tuple_PublicKeyChannelIdZZ none() {
+ long ret = bindings.COption_C2Tuple_PublicKeyChannelIdZZ_none();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_C2Tuple_PublicKeyChannelIdZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_PublicKeyChannelIdZZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.COption_C2Tuple_PublicKeyChannelIdZZ_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new COption_C2Tuple_PublicKeyChannelIdZZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Option_C2Tuple_PublicKeyChannelIdZZ clone() {
+ long ret = bindings.COption_C2Tuple_PublicKeyChannelIdZZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_C2Tuple_PublicKeyChannelIdZZ ret_hu_conv = org.ldk.structs.Option_C2Tuple_PublicKeyChannelIdZZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+}
+} } }
internal Option_U128Z_Some(long ptr) : base(null, ptr) {
long some = bindings.LDKCOption_U128Z_Some_get_some(ptr);
org.ldk.util.UInt128 some_conv = new org.ldk.util.UInt128(some);
+ bindings.free_buffer(some);
this.some = some_conv;
}
}
public Bolt11ParseError parse_error;
internal ParseOrSemanticError_ParseError(long ptr) : base(null, ptr) {
long parse_error = bindings.LDKParseOrSemanticError_ParseError_get_parse_error(ptr);
- org.ldk.structs.Bolt11ParseError parse_error_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(parse_error);
+ org.ldk.structs.Bolt11ParseError parse_error_hu_conv = null; if (parse_error < 0 || parse_error > 4096) { parse_error_hu_conv = new org.ldk.structs.Bolt11ParseError(null, parse_error); }
if (parse_error_hu_conv != null) { parse_error_hu_conv.ptrs_to.AddLast(this); };
this.parse_error = parse_error_hu_conv;
}
long raw_ty = bindings.LDKParsedOnionMessageContents_ty_from_ptr(ptr);
switch (raw_ty) {
case 0: return new ParsedOnionMessageContents_Offers(ptr);
- case 1: return new ParsedOnionMessageContents_Custom(ptr);
+ case 1: return new ParsedOnionMessageContents_DNSResolver(ptr);
+ case 2: return new ParsedOnionMessageContents_Custom(ptr);
default:
throw new ArgumentException("Impossible enum variant");
}
this.offers = offers_hu_conv;
}
}
+ /** A ParsedOnionMessageContents of type DNSResolver */
+ public class ParsedOnionMessageContents_DNSResolver : ParsedOnionMessageContents {
+ public DNSResolverMessage dns_resolver;
+ internal ParsedOnionMessageContents_DNSResolver(long ptr) : base(null, ptr) {
+ long dns_resolver = bindings.LDKParsedOnionMessageContents_DNSResolver_get_dns_resolver(ptr);
+ org.ldk.structs.DNSResolverMessage dns_resolver_hu_conv = org.ldk.structs.DNSResolverMessage.constr_from_ptr(dns_resolver);
+ if (dns_resolver_hu_conv != null) { dns_resolver_hu_conv.ptrs_to.AddLast(this); };
+ this.dns_resolver = dns_resolver_hu_conv;
+ }
+ }
/** A ParsedOnionMessageContents of type Custom */
public class ParsedOnionMessageContents_Custom : ParsedOnionMessageContents {
public OnionMessageContents custom;
return ret_hu_conv;
}
+ /**
+ * Utility method to constructs a new DNSResolver-variant ParsedOnionMessageContents
+ */
+ public static ParsedOnionMessageContents dnsresolver(org.ldk.structs.DNSResolverMessage a) {
+ long ret = bindings.ParsedOnionMessageContents_dnsresolver(a.ptr);
+ GC.KeepAlive(a);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ParsedOnionMessageContents ret_hu_conv = org.ldk.structs.ParsedOnionMessageContents.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
/**
* Utility method to constructs a new Custom-variant ParsedOnionMessageContents
*/
internal static PaymentContext constr_from_ptr(long ptr) {
long raw_ty = bindings.LDKPaymentContext_ty_from_ptr(ptr);
switch (raw_ty) {
- case 0: return new PaymentContext_Unknown(ptr);
- case 1: return new PaymentContext_Bolt12Offer(ptr);
- case 2: return new PaymentContext_Bolt12Refund(ptr);
+ case 0: return new PaymentContext_Bolt12Offer(ptr);
+ case 1: return new PaymentContext_Bolt12Refund(ptr);
default:
throw new ArgumentException("Impossible enum variant");
}
}
- /** A PaymentContext of type Unknown */
- public class PaymentContext_Unknown : PaymentContext {
- public UnknownPaymentContext unknown;
- internal PaymentContext_Unknown(long ptr) : base(null, ptr) {
- long unknown = bindings.LDKPaymentContext_Unknown_get_unknown(ptr);
- 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.AddLast(this); };
- this.unknown = unknown_hu_conv;
- }
- }
/** A PaymentContext of type Bolt12Offer */
public class PaymentContext_Bolt12Offer : PaymentContext {
public Bolt12OfferContext bolt12_offer;
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);
- GC.KeepAlive(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.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
/**
* Utility method to constructs a new Bolt12Offer-variant PaymentContext
*/
* The context of the payment such as information about the corresponding [`Offer`] and
* [`InvoiceRequest`].
*
+ * This includes the Human Readable Name which the sender indicated they were paying to,
+ * for possible recipient disambiguation if you're using a single wildcard DNS entry to
+ * resolve to many recipients.
+ *
* [`Offer`]: crate::offers::offer::Offer
* [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
*/
+++ /dev/null
-using org.ldk.impl;
-using org.ldk.enums;
-using org.ldk.util;
-using System;
-
-namespace org { namespace ldk { namespace structs {
-
-/**
- * If a payment fails to send with [`ChannelManager::send_payment_with_route`], it can be in one
- * of several states. This enum is returned as the Err() type describing which state the payment
- * is in, see the description of individual enum states for more.
- *
- * [`ChannelManager::send_payment_with_route`]: crate::ln::channelmanager::ChannelManager::send_payment_with_route
- */
-public class PaymentSendFailure : CommonBase {
- protected PaymentSendFailure(object _dummy, long ptr) : base(ptr) { }
- ~PaymentSendFailure() {
- if (ptr != 0) { bindings.PaymentSendFailure_free(ptr); }
- }
-
- internal static PaymentSendFailure constr_from_ptr(long ptr) {
- long raw_ty = bindings.LDKPaymentSendFailure_ty_from_ptr(ptr);
- switch (raw_ty) {
- case 0: return new PaymentSendFailure_ParameterError(ptr);
- case 1: return new PaymentSendFailure_PathParameterError(ptr);
- case 2: return new PaymentSendFailure_AllFailedResendSafe(ptr);
- case 3: return new PaymentSendFailure_DuplicatePayment(ptr);
- case 4: return new PaymentSendFailure_PartialFailure(ptr);
- default:
- throw new ArgumentException("Impossible enum variant");
- }
- }
-
- /** A PaymentSendFailure of type ParameterError */
- public class PaymentSendFailure_ParameterError : PaymentSendFailure {
- public APIError parameter_error;
- internal PaymentSendFailure_ParameterError(long ptr) : base(null, ptr) {
- long parameter_error = bindings.LDKPaymentSendFailure_ParameterError_get_parameter_error(ptr);
- org.ldk.structs.APIError parameter_error_hu_conv = org.ldk.structs.APIError.constr_from_ptr(parameter_error);
- if (parameter_error_hu_conv != null) { parameter_error_hu_conv.ptrs_to.AddLast(this); };
- this.parameter_error = parameter_error_hu_conv;
- }
- }
- /** A PaymentSendFailure of type PathParameterError */
- public class PaymentSendFailure_PathParameterError : PaymentSendFailure {
- public Result_NoneAPIErrorZ[] path_parameter_error;
- internal PaymentSendFailure_PathParameterError(long ptr) : base(null, ptr) {
- long path_parameter_error = bindings.LDKPaymentSendFailure_PathParameterError_get_path_parameter_error(ptr);
- int path_parameter_error_conv_22_len = InternalUtils.getArrayLength(path_parameter_error);
- Result_NoneAPIErrorZ[] path_parameter_error_conv_22_arr = new Result_NoneAPIErrorZ[path_parameter_error_conv_22_len];
- for (int w = 0; w < path_parameter_error_conv_22_len; w++) {
- long path_parameter_error_conv_22 = InternalUtils.getU64ArrayElem(path_parameter_error, w);
- Result_NoneAPIErrorZ path_parameter_error_conv_22_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(path_parameter_error_conv_22);
- path_parameter_error_conv_22_arr[w] = path_parameter_error_conv_22_hu_conv;
- }
- bindings.free_buffer(path_parameter_error);
- this.path_parameter_error = path_parameter_error_conv_22_arr;
- }
- }
- /** A PaymentSendFailure of type AllFailedResendSafe */
- public class PaymentSendFailure_AllFailedResendSafe : PaymentSendFailure {
- public APIError[] all_failed_resend_safe;
- internal PaymentSendFailure_AllFailedResendSafe(long ptr) : base(null, ptr) {
- long all_failed_resend_safe = bindings.LDKPaymentSendFailure_AllFailedResendSafe_get_all_failed_resend_safe(ptr);
- int all_failed_resend_safe_conv_10_len = InternalUtils.getArrayLength(all_failed_resend_safe);
- APIError[] all_failed_resend_safe_conv_10_arr = new APIError[all_failed_resend_safe_conv_10_len];
- for (int k = 0; k < all_failed_resend_safe_conv_10_len; k++) {
- long all_failed_resend_safe_conv_10 = InternalUtils.getU64ArrayElem(all_failed_resend_safe, k);
- org.ldk.structs.APIError all_failed_resend_safe_conv_10_hu_conv = org.ldk.structs.APIError.constr_from_ptr(all_failed_resend_safe_conv_10);
- if (all_failed_resend_safe_conv_10_hu_conv != null) { all_failed_resend_safe_conv_10_hu_conv.ptrs_to.AddLast(this); };
- all_failed_resend_safe_conv_10_arr[k] = all_failed_resend_safe_conv_10_hu_conv;
- }
- bindings.free_buffer(all_failed_resend_safe);
- this.all_failed_resend_safe = all_failed_resend_safe_conv_10_arr;
- }
- }
- /** A PaymentSendFailure of type DuplicatePayment */
- public class PaymentSendFailure_DuplicatePayment : PaymentSendFailure {
- internal PaymentSendFailure_DuplicatePayment(long ptr) : base(null, ptr) {
- }
- }
- /** A PaymentSendFailure of type PartialFailure */
- public class PaymentSendFailure_PartialFailure : PaymentSendFailure {
- /**
- * The errors themselves, in the same order as the paths from the route.
- */
- public Result_NoneAPIErrorZ[] results;
- /**
- * If some paths failed without irrevocably committing to the new HTLC(s), this will
- * contain a [`RouteParameters`] object for the failing paths.
- *
- * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
- */
- public RouteParameters failed_paths_retry;
- /**
- * The payment id for the payment, which is now at least partially pending.
- */
- public byte[] payment_id;
- internal PaymentSendFailure_PartialFailure(long ptr) : base(null, ptr) {
- long results = bindings.LDKPaymentSendFailure_PartialFailure_get_results(ptr);
- int results_conv_22_len = InternalUtils.getArrayLength(results);
- Result_NoneAPIErrorZ[] results_conv_22_arr = new Result_NoneAPIErrorZ[results_conv_22_len];
- for (int w = 0; w < results_conv_22_len; w++) {
- long results_conv_22 = InternalUtils.getU64ArrayElem(results, w);
- Result_NoneAPIErrorZ results_conv_22_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(results_conv_22);
- results_conv_22_arr[w] = results_conv_22_hu_conv;
- }
- bindings.free_buffer(results);
- this.results = results_conv_22_arr;
- long failed_paths_retry = bindings.LDKPaymentSendFailure_PartialFailure_get_failed_paths_retry(ptr);
- org.ldk.structs.RouteParameters failed_paths_retry_hu_conv = null; if (failed_paths_retry < 0 || failed_paths_retry > 4096) { failed_paths_retry_hu_conv = new org.ldk.structs.RouteParameters(null, failed_paths_retry); }
- if (failed_paths_retry_hu_conv != null) { failed_paths_retry_hu_conv.ptrs_to.AddLast(this); };
- this.failed_paths_retry = failed_paths_retry_hu_conv;
- long payment_id = bindings.LDKPaymentSendFailure_PartialFailure_get_payment_id(ptr);
- byte[] payment_id_conv = InternalUtils.decodeUint8Array(payment_id);
- this.payment_id = payment_id_conv;
- }
- }
- internal long clone_ptr() {
- long ret = bindings.PaymentSendFailure_clone_ptr(this.ptr);
- GC.KeepAlive(this);
- return ret;
- }
-
- /**
- * Creates a copy of the PaymentSendFailure
- */
- public PaymentSendFailure clone() {
- long ret = bindings.PaymentSendFailure_clone(this.ptr);
- GC.KeepAlive(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.PaymentSendFailure ret_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new ParameterError-variant PaymentSendFailure
- */
- public static PaymentSendFailure parameter_error(org.ldk.structs.APIError a) {
- long ret = bindings.PaymentSendFailure_parameter_error(a.ptr);
- GC.KeepAlive(a);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.PaymentSendFailure ret_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * 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(InternalUtils.encodeUint64Array(InternalUtils.mapArray(a, a_conv_22 => a_conv_22.ptr)));
- GC.KeepAlive(a);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.PaymentSendFailure ret_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new AllFailedResendSafe-variant PaymentSendFailure
- */
- public static PaymentSendFailure all_failed_resend_safe(APIError[] a) {
- long ret = bindings.PaymentSendFailure_all_failed_resend_safe(InternalUtils.encodeUint64Array(InternalUtils.mapArray(a, a_conv_10 => a_conv_10.ptr)));
- GC.KeepAlive(a);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.PaymentSendFailure ret_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Utility method to constructs a new DuplicatePayment-variant PaymentSendFailure
- */
- public static PaymentSendFailure duplicate_payment() {
- long ret = bindings.PaymentSendFailure_duplicate_payment();
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.PaymentSendFailure ret_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * 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(InternalUtils.encodeUint64Array(InternalUtils.mapArray(results, results_conv_22 => results_conv_22.ptr)), failed_paths_retry.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)));
- GC.KeepAlive(results);
- GC.KeepAlive(failed_paths_retry);
- GC.KeepAlive(payment_id);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.PaymentSendFailure ret_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
- return ret_hu_conv;
- }
-
- /**
- * Checks if two PaymentSendFailures contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- */
- public bool eq(org.ldk.structs.PaymentSendFailure b) {
- bool ret = bindings.PaymentSendFailure_eq(this.ptr, b.ptr);
- GC.KeepAlive(this);
- GC.KeepAlive(b);
- return ret;
- }
-
- public override bool Equals(object o) {
- if (!(o is PaymentSendFailure)) return false;
- return this.eq((PaymentSendFailure)o);
- }
-}
-} } }
* May call [`send_data`] on [`SocketDescriptor`]s. Thus, be very careful with reentrancy
* issues!
*
- * You don't have to call this function explicitly if you are using [`lightning-net-tokio`]
- * or one of the other clients provided in our language bindings.
+ * This should be called any time we may have messages to send. It is automatically called by
+ * [`lightning-net-tokio`] after processing incoming messages, and by
+ * [`lightning-background-processor`] when channel state has changed. Therefore, If you are not
+ * using both [`lightning-net-tokio`] and [`lightning-background-processor`], you may need to call
+ * this function manually to prevent messages from being delayed.
*
* Note that if there are any other calls to this function waiting on lock(s) this may return
* without doing any work. All available events that need handling will be handled before the
* Set if this HTLC is the final hop in a multi-hop blinded path.
*/
public bool requires_blinded_error;
+ /**
+ * Set if we are receiving a keysend to a blinded path, meaning we created the
+ * [`PaymentSecret`] and should verify it using our
+ * [`NodeSigner::get_inbound_payment_key`].
+ */
+ public bool has_recipient_created_payment_secret;
internal PendingHTLCRouting_ReceiveKeysend(long ptr) : base(null, ptr) {
long payment_data = bindings.LDKPendingHTLCRouting_ReceiveKeysend_get_payment_data(ptr);
org.ldk.structs.FinalOnionHopData payment_data_hu_conv = null; if (payment_data < 0 || payment_data > 4096) { payment_data_hu_conv = new org.ldk.structs.FinalOnionHopData(null, payment_data); }
bindings.free_buffer(custom_tlvs);
this.custom_tlvs = custom_tlvs_conv_23_arr;
this.requires_blinded_error = bindings.LDKPendingHTLCRouting_ReceiveKeysend_get_requires_blinded_error(ptr);
+ this.has_recipient_created_payment_secret = bindings.LDKPendingHTLCRouting_ReceiveKeysend_get_has_recipient_created_payment_secret(ptr);
}
}
internal long clone_ptr() {
/**
* 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, bool requires_blinded_error) {
- long ret = bindings.PendingHTLCRouting_receive_keysend(payment_data.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_preimage, 32)), payment_metadata.ptr, incoming_cltv_expiry, InternalUtils.encodeUint64Array(InternalUtils.mapArray(custom_tlvs, custom_tlvs_conv_23 => custom_tlvs_conv_23.ptr)), requires_blinded_error);
+ 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, bool requires_blinded_error, bool has_recipient_created_payment_secret) {
+ long ret = bindings.PendingHTLCRouting_receive_keysend(payment_data.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_preimage, 32)), payment_metadata.ptr, incoming_cltv_expiry, InternalUtils.encodeUint64Array(InternalUtils.mapArray(custom_tlvs, custom_tlvs_conv_23 => custom_tlvs_conv_23.ptr)), requires_blinded_error, has_recipient_created_payment_secret);
GC.KeepAlive(payment_data);
GC.KeepAlive(payment_preimage);
GC.KeepAlive(payment_metadata);
GC.KeepAlive(incoming_cltv_expiry);
GC.KeepAlive(custom_tlvs);
GC.KeepAlive(requires_blinded_error);
+ GC.KeepAlive(has_recipient_created_payment_secret);
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.AddLast(ret_hu_conv); };
*
* Archiving the data in a backup location (rather than deleting it fully) is useful for
* hedging against data loss in case of unexpected failure.
+ *
+ * Note that if a crash occurs during the archiving process, and its implementation is not
+ * atomic, a state may emerge with the archival operation only being partially complete. In
+ * that scenario, the monitor may still be loaded on startup pending successful completion of
+ * the archive process. Additionally, because the archive operation could be retried on
+ * restart, this method must in that case be idempotent, ensuring it can handle scenarios where
+ * the monitor already exists in the archive.
*/
void archive_persisted_channel(OutPoint channel_funding_outpoint);
}
*
* Archiving the data in a backup location (rather than deleting it fully) is useful for
* hedging against data loss in case of unexpected failure.
+ *
+ * Note that if a crash occurs during the archiving process, and its implementation is not
+ * atomic, a state may emerge with the archival operation only being partially complete. In
+ * that scenario, the monitor may still be loaded on startup pending successful completion of
+ * the archive process. Additionally, because the archive operation could be retried on
+ * restart, this method must in that case be idempotent, ensuring it can handle scenarios where
+ * the monitor already exists in the archive.
*/
public void archive_persisted_channel(org.ldk.structs.OutPoint channel_funding_outpoint) {
bindings.Persist_archive_persisted_channel(this.ptr, channel_funding_outpoint.ptr);
* with `scid` towards the given `target` node, based on the historical estimated liquidity
* bounds.
*
+ * Returns `None` if:
+ * - the given channel is not in the network graph, the provided `target` is not a party to
+ * the channel, or we don't have forwarding parameters for either direction in the channel.
+ * - `allow_fallback_estimation` is *not* set and there is no (or insufficient) historical
+ * data for the given channel.
+ *
* These are the same bounds as returned by
* [`Self::historical_estimated_channel_liquidity_probabilities`] (but not those returned by
* [`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.ptr, amount_msat, _params.ptr);
+ public Option_f64Z historical_estimated_payment_success_probability(long scid, org.ldk.structs.NodeId target, long amount_msat, org.ldk.structs.ProbabilisticScoringFeeParameters _params, bool allow_fallback_estimation) {
+ long ret = bindings.ProbabilisticScorer_historical_estimated_payment_success_probability(this.ptr, scid, target.ptr, amount_msat, _params.ptr, allow_fallback_estimation);
+ GC.KeepAlive(this);
+ GC.KeepAlive(scid);
+ GC.KeepAlive(target);
+ GC.KeepAlive(amount_msat);
+ GC.KeepAlive(_params);
+ GC.KeepAlive(allow_fallback_estimation);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Option_f64Z ret_hu_conv = org.ldk.structs.Option_f64Z.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ if (this != null) { this.ptrs_to.AddLast(target); };
+ if (this != null) { this.ptrs_to.AddLast(_params); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Query the probability of payment success sending the given `amount_msat` over the channel
+ * with `scid` towards the given `target` node, based on the live estimated liquidity bounds.
+ *
+ * This will return `Some` for any channel which is present in the [`NetworkGraph`], including
+ * if we have no bound information beside the channel's capacity.
+ */
+ public Option_f64Z live_estimated_payment_success_probability(long scid, org.ldk.structs.NodeId target, long amount_msat, org.ldk.structs.ProbabilisticScoringFeeParameters _params) {
+ long ret = bindings.ProbabilisticScorer_live_estimated_payment_success_probability(this.ptr, scid, target.ptr, amount_msat, _params.ptr);
GC.KeepAlive(this);
GC.KeepAlive(scid);
GC.KeepAlive(target);
* liquidity bounds are 200,000 sats and 600,000 sats, after this amount of time the upper
* and lower liquidity bounds will be decayed to 100,000 and 800,000 sats.
*
- * Default value: 6 hours
+ * Default value: 30 minutes
*
* # Note
*
- * When built with the `no-std` feature, time will never elapse. Therefore, the channel
+ * When not built with the `std` feature, time will never elapse. Therefore, the channel
* liquidity knowledge will never decay except when the bounds cross.
*/
public long get_liquidity_offset_half_life() {
* liquidity bounds are 200,000 sats and 600,000 sats, after this amount of time the upper
* and lower liquidity bounds will be decayed to 100,000 and 800,000 sats.
*
- * Default value: 6 hours
+ * Default value: 30 minutes
*
* # Note
*
- * When built with the `no-std` feature, time will never elapse. Therefore, the channel
+ * When not built with the `std` feature, time will never elapse. Therefore, the channel
* liquidity knowledge will never decay except when the bounds cross.
*/
public void set_liquidity_offset_half_life(long val) {
/**
* A fixed penalty in msats to apply to each channel.
*
- * Default value: 500 msat
+ * In testing, a value of roughly 1/10th of [`historical_liquidity_penalty_multiplier_msat`]
+ * (implying scaling all estimated probabilities down by a factor of ~79%) resulted in the
+ * most accurate total success probabilities.
+ *
+ * Default value: 1,024 msat (i.e. we're willing to pay 1 sat to avoid each additional hop).
+ *
+ * [`historical_liquidity_penalty_multiplier_msat`]: Self::historical_liquidity_penalty_multiplier_msat
*/
public long get_base_penalty_msat() {
long ret = bindings.ProbabilisticScoringFeeParameters_get_base_penalty_msat(this.ptr);
/**
* A fixed penalty in msats to apply to each channel.
*
- * Default value: 500 msat
+ * In testing, a value of roughly 1/10th of [`historical_liquidity_penalty_multiplier_msat`]
+ * (implying scaling all estimated probabilities down by a factor of ~79%) resulted in the
+ * most accurate total success probabilities.
+ *
+ * Default value: 1,024 msat (i.e. we're willing to pay 1 sat to avoid each additional hop).
+ *
+ * [`historical_liquidity_penalty_multiplier_msat`]: Self::historical_liquidity_penalty_multiplier_msat
*/
public void set_base_penalty_msat(long val) {
bindings.ProbabilisticScoringFeeParameters_set_base_penalty_msat(this.ptr, val);
}
/**
- * A multiplier used with the total amount flowing over a channel to calculate a fixed penalty
- * applied to each channel, in excess of the [`base_penalty_msat`].
+ * A multiplier used with the payment amount to calculate a fixed penalty applied to each
+ * channel, in excess of the [`base_penalty_msat`].
*
* The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
* fees plus penalty) for large payments. The penalty is computed as the product of this
- * multiplier and `2^30`ths of the total amount flowing over a channel (i.e. the payment
- * amount plus the amount of any other HTLCs flowing we sent over the same channel).
+ * multiplier and `2^30`ths of the payment amount.
*
* ie `base_penalty_amount_multiplier_msat * amount_msat / 2^30`
*
- * Default value: 8,192 msat
+ * In testing, a value of roughly ~100x (1/10th * 2^10) of
+ * [`historical_liquidity_penalty_amount_multiplier_msat`] (implying scaling all estimated
+ * probabilities down by a factor of ~79%) resulted in the most accurate total success
+ * probabilities.
+ *
+ * Default value: 131,072 msat (i.e. we're willing to pay 0.125bps to avoid each additional
+ * hop).
*
* [`base_penalty_msat`]: Self::base_penalty_msat
+ * [`historical_liquidity_penalty_amount_multiplier_msat`]: Self::historical_liquidity_penalty_amount_multiplier_msat
*/
public long get_base_penalty_amount_multiplier_msat() {
long ret = bindings.ProbabilisticScoringFeeParameters_get_base_penalty_amount_multiplier_msat(this.ptr);
}
/**
- * A multiplier used with the total amount flowing over a channel to calculate a fixed penalty
- * applied to each channel, in excess of the [`base_penalty_msat`].
+ * A multiplier used with the payment amount to calculate a fixed penalty applied to each
+ * channel, in excess of the [`base_penalty_msat`].
*
* The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
* fees plus penalty) for large payments. The penalty is computed as the product of this
- * multiplier and `2^30`ths of the total amount flowing over a channel (i.e. the payment
- * amount plus the amount of any other HTLCs flowing we sent over the same channel).
+ * multiplier and `2^30`ths of the payment amount.
*
* ie `base_penalty_amount_multiplier_msat * amount_msat / 2^30`
*
- * Default value: 8,192 msat
+ * In testing, a value of roughly ~100x (1/10th * 2^10) of
+ * [`historical_liquidity_penalty_amount_multiplier_msat`] (implying scaling all estimated
+ * probabilities down by a factor of ~79%) resulted in the most accurate total success
+ * probabilities.
+ *
+ * Default value: 131,072 msat (i.e. we're willing to pay 0.125bps to avoid each additional
+ * hop).
*
* [`base_penalty_msat`]: Self::base_penalty_msat
+ * [`historical_liquidity_penalty_amount_multiplier_msat`]: Self::historical_liquidity_penalty_amount_multiplier_msat
*/
public void set_base_penalty_amount_multiplier_msat(long val) {
bindings.ProbabilisticScoringFeeParameters_set_base_penalty_amount_multiplier_msat(this.ptr, val);
*
* `-log10(success_probability) * liquidity_penalty_multiplier_msat`
*
- * Default value: 30,000 msat
+ * In testing, this scoring model performs much worse than the historical scoring model
+ * configured with the [`historical_liquidity_penalty_multiplier_msat`] and thus is disabled
+ * by default.
+ *
+ * Default value: 0 msat
*
* [`liquidity_offset_half_life`]: ProbabilisticScoringDecayParameters::liquidity_offset_half_life
+ * [`historical_liquidity_penalty_multiplier_msat`]: Self::historical_liquidity_penalty_multiplier_msat
*/
public long get_liquidity_penalty_multiplier_msat() {
long ret = bindings.ProbabilisticScoringFeeParameters_get_liquidity_penalty_multiplier_msat(this.ptr);
*
* `-log10(success_probability) * liquidity_penalty_multiplier_msat`
*
- * Default value: 30,000 msat
+ * In testing, this scoring model performs much worse than the historical scoring model
+ * configured with the [`historical_liquidity_penalty_multiplier_msat`] and thus is disabled
+ * by default.
+ *
+ * Default value: 0 msat
*
* [`liquidity_offset_half_life`]: ProbabilisticScoringDecayParameters::liquidity_offset_half_life
+ * [`historical_liquidity_penalty_multiplier_msat`]: Self::historical_liquidity_penalty_multiplier_msat
*/
public void set_liquidity_penalty_multiplier_msat(long val) {
bindings.ProbabilisticScoringFeeParameters_set_liquidity_penalty_multiplier_msat(this.ptr, val);
}
/**
- * A multiplier used in conjunction with the total amount flowing over a channel and the
- * negative `log10` of the channel's success probability for the payment, as determined by our
- * latest estimates of the channel's liquidity, to determine the amount penalty.
+ * A multiplier used in conjunction with the payment amount and the negative `log10` of the
+ * channel's success probability for the total amount flowing over a channel, as determined by
+ * our latest estimates of the channel's liquidity, to determine the amount penalty.
*
* The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
* fees plus penalty) for large payments. The penalty is computed as the product of this
- * multiplier and `2^20`ths of the amount flowing over this channel, weighted by the negative
- * `log10` of the success probability.
+ * multiplier and `2^20`ths of the payment amount, weighted by the negative `log10` of the
+ * success probability.
*
* `-log10(success_probability) * liquidity_penalty_amount_multiplier_msat * amount_msat / 2^20`
*
* probabilities, the multiplier will have a decreasing effect as the negative `log10` will
* fall below `1`.
*
- * Default value: 192 msat
+ * In testing, this scoring model performs much worse than the historical scoring model
+ * configured with the [`historical_liquidity_penalty_amount_multiplier_msat`] and thus is
+ * disabled by default.
+ *
+ * Default value: 0 msat
+ *
+ * [`historical_liquidity_penalty_amount_multiplier_msat`]: Self::historical_liquidity_penalty_amount_multiplier_msat
*/
public long get_liquidity_penalty_amount_multiplier_msat() {
long ret = bindings.ProbabilisticScoringFeeParameters_get_liquidity_penalty_amount_multiplier_msat(this.ptr);
}
/**
- * A multiplier used in conjunction with the total amount flowing over a channel and the
- * negative `log10` of the channel's success probability for the payment, as determined by our
- * latest estimates of the channel's liquidity, to determine the amount penalty.
+ * A multiplier used in conjunction with the payment amount and the negative `log10` of the
+ * channel's success probability for the total amount flowing over a channel, as determined by
+ * our latest estimates of the channel's liquidity, to determine the amount penalty.
*
* The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
* fees plus penalty) for large payments. The penalty is computed as the product of this
- * multiplier and `2^20`ths of the amount flowing over this channel, weighted by the negative
- * `log10` of the success probability.
+ * multiplier and `2^20`ths of the payment amount, weighted by the negative `log10` of the
+ * success probability.
*
* `-log10(success_probability) * liquidity_penalty_amount_multiplier_msat * amount_msat / 2^20`
*
* probabilities, the multiplier will have a decreasing effect as the negative `log10` will
* fall below `1`.
*
- * Default value: 192 msat
+ * In testing, this scoring model performs much worse than the historical scoring model
+ * configured with the [`historical_liquidity_penalty_amount_multiplier_msat`] and thus is
+ * disabled by default.
+ *
+ * Default value: 0 msat
+ *
+ * [`historical_liquidity_penalty_amount_multiplier_msat`]: Self::historical_liquidity_penalty_amount_multiplier_msat
*/
public void set_liquidity_penalty_amount_multiplier_msat(long val) {
bindings.ProbabilisticScoringFeeParameters_set_liquidity_penalty_amount_multiplier_msat(this.ptr, val);
* track which of several buckets those bounds fall into, exponentially decaying the
* probability of each bucket as new samples are added.
*
- * Default value: 10,000 msat
+ * Default value: 10,000 msat (i.e. willing to pay 1 sat to avoid an 80% probability channel,
+ * or 6 sats to avoid a 25% probability channel).
*
* [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
*/
* track which of several buckets those bounds fall into, exponentially decaying the
* probability of each bucket as new samples are added.
*
- * Default value: 10,000 msat
+ * Default value: 10,000 msat (i.e. willing to pay 1 sat to avoid an 80% probability channel,
+ * or 6 sats to avoid a 25% probability channel).
*
* [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
*/
}
/**
- * A multiplier used in conjunction with the total amount flowing over a channel and the
- * negative `log10` of the channel's success probability for the payment, as determined based
- * on the history of our estimates of the channel's available liquidity, to determine a
+ * A multiplier used in conjunction with the payment amount and the negative `log10` of the
+ * channel's success probability for the total amount flowing over a channel, as determined
+ * based on the history of our estimates of the channel's available liquidity, to determine a
* penalty.
*
* The purpose of the amount penalty is to avoid having fees dominate the channel cost for
* large payments. The penalty is computed as the product of this multiplier and `2^20`ths
- * of the amount flowing over this channel, weighted by the negative `log10` of the success
- * probability.
+ * of the payment amount, weighted by the negative `log10` of the success probability.
*
* This penalty is similar to [`liquidity_penalty_amount_multiplier_msat`], however, instead
* of using only our latest estimate for the current liquidity available in the channel, it
* channel, we track which of several buckets those bounds fall into, exponentially decaying
* the probability of each bucket as new samples are added.
*
- * Default value: 64 msat
+ * Default value: 1,250 msat (i.e. willing to pay about 0.125 bps per hop to avoid 78%
+ * probability channels, or 0.5bps to avoid a 38% probability
+ * channel).
*
* [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
*/
}
/**
- * A multiplier used in conjunction with the total amount flowing over a channel and the
- * negative `log10` of the channel's success probability for the payment, as determined based
- * on the history of our estimates of the channel's available liquidity, to determine a
+ * A multiplier used in conjunction with the payment amount and the negative `log10` of the
+ * channel's success probability for the total amount flowing over a channel, as determined
+ * based on the history of our estimates of the channel's available liquidity, to determine a
* penalty.
*
* The purpose of the amount penalty is to avoid having fees dominate the channel cost for
* large payments. The penalty is computed as the product of this multiplier and `2^20`ths
- * of the amount flowing over this channel, weighted by the negative `log10` of the success
- * probability.
+ * of the payment amount, weighted by the negative `log10` of the success probability.
*
* This penalty is similar to [`liquidity_penalty_amount_multiplier_msat`], however, instead
* of using only our latest estimate for the current liquidity available in the channel, it
* channel, we track which of several buckets those bounds fall into, exponentially decaying
* the probability of each bucket as new samples are added.
*
- * Default value: 64 msat
+ * Default value: 1,250 msat (i.e. willing to pay about 0.125 bps per hop to avoid 78%
+ * probability channels, or 0.5bps to avoid a 38% probability
+ * channel).
*
* [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
*/
long raw_ty = bindings.LDKProbeSendFailure_ty_from_ptr(ptr);
switch (raw_ty) {
case 0: return new ProbeSendFailure_RouteNotFound(ptr);
- case 1: return new ProbeSendFailure_SendingFailed(ptr);
+ case 1: return new ProbeSendFailure_ParameterError(ptr);
+ case 2: return new ProbeSendFailure_DuplicateProbe(ptr);
default:
throw new ArgumentException("Impossible enum variant");
}
internal ProbeSendFailure_RouteNotFound(long ptr) : base(null, ptr) {
}
}
- /** A ProbeSendFailure of type SendingFailed */
- public class ProbeSendFailure_SendingFailed : ProbeSendFailure {
- public PaymentSendFailure sending_failed;
- internal ProbeSendFailure_SendingFailed(long ptr) : base(null, ptr) {
- long sending_failed = bindings.LDKProbeSendFailure_SendingFailed_get_sending_failed(ptr);
- org.ldk.structs.PaymentSendFailure sending_failed_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(sending_failed);
- if (sending_failed_hu_conv != null) { sending_failed_hu_conv.ptrs_to.AddLast(this); };
- this.sending_failed = sending_failed_hu_conv;
+ /** A ProbeSendFailure of type ParameterError */
+ public class ProbeSendFailure_ParameterError : ProbeSendFailure {
+ public APIError parameter_error;
+ internal ProbeSendFailure_ParameterError(long ptr) : base(null, ptr) {
+ long parameter_error = bindings.LDKProbeSendFailure_ParameterError_get_parameter_error(ptr);
+ org.ldk.structs.APIError parameter_error_hu_conv = org.ldk.structs.APIError.constr_from_ptr(parameter_error);
+ if (parameter_error_hu_conv != null) { parameter_error_hu_conv.ptrs_to.AddLast(this); };
+ this.parameter_error = parameter_error_hu_conv;
+ }
+ }
+ /** A ProbeSendFailure of type DuplicateProbe */
+ public class ProbeSendFailure_DuplicateProbe : ProbeSendFailure {
+ internal ProbeSendFailure_DuplicateProbe(long ptr) : base(null, ptr) {
}
}
internal long clone_ptr() {
}
/**
- * Utility method to constructs a new SendingFailed-variant ProbeSendFailure
+ * Utility method to constructs a new ParameterError-variant ProbeSendFailure
*/
- public static ProbeSendFailure sending_failed(org.ldk.structs.PaymentSendFailure a) {
- long ret = bindings.ProbeSendFailure_sending_failed(a.ptr);
+ public static ProbeSendFailure parameter_error(org.ldk.structs.APIError a) {
+ long ret = bindings.ProbeSendFailure_parameter_error(a.ptr);
GC.KeepAlive(a);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.ProbeSendFailure ret_hu_conv = org.ldk.structs.ProbeSendFailure.constr_from_ptr(ret);
return ret_hu_conv;
}
+ /**
+ * Utility method to constructs a new DuplicateProbe-variant ProbeSendFailure
+ */
+ public static ProbeSendFailure duplicate_probe() {
+ long ret = bindings.ProbeSendFailure_duplicate_probe();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ProbeSendFailure ret_hu_conv = org.ldk.structs.ProbeSendFailure.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
/**
* Checks if two ProbeSendFailures contain equal inner contents.
* This ignores pointers and is_owned flags and looks at the values in fields.
/**
* Data to construct a [`BlindedHop`] for receiving a payment. This payload is custom to LDK and
* may not be valid if received by another lightning implementation.
+ *
+ * Can only be constructed by calling [`UnauthenticatedReceiveTlvs::authenticate`].
*/
public class ReceiveTlvs : CommonBase {
internal ReceiveTlvs(object _dummy, long ptr) : base(ptr) { }
if (ptr != 0) { bindings.ReceiveTlvs_free(ptr); }
}
- /**
- * Used to authenticate the sender of a payment to the receiver and tie MPP HTLCs together.
- */
- public byte[] get_payment_secret() {
- long ret = bindings.ReceiveTlvs_get_payment_secret(this.ptr);
- GC.KeepAlive(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
- return ret_conv;
- }
-
- /**
- * Used to authenticate the sender of a payment to the receiver and tie MPP HTLCs together.
- */
- public void set_payment_secret(byte[] val) {
- bindings.ReceiveTlvs_set_payment_secret(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32)));
- GC.KeepAlive(this);
- GC.KeepAlive(val);
- }
-
- /**
- * Constraints for the receiver of this payment.
- */
- public PaymentConstraints get_payment_constraints() {
- long ret = bindings.ReceiveTlvs_get_payment_constraints(this.ptr);
- GC.KeepAlive(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- org.ldk.structs.PaymentConstraints ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PaymentConstraints(null, ret); }
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
- return ret_hu_conv;
- }
-
- /**
- * 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.ptr);
- GC.KeepAlive(this);
- GC.KeepAlive(val);
- }
-
- /**
- * Context for the receiver of this payment.
- */
- public PaymentContext get_payment_context() {
- long ret = bindings.ReceiveTlvs_get_payment_context(this.ptr);
+ internal long clone_ptr() {
+ long ret = bindings.ReceiveTlvs_clone_ptr(this.ptr);
GC.KeepAlive(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.AddLast(this); };
- return ret_hu_conv;
+ return ret;
}
/**
- * Context for the receiver of this payment.
+ * Creates a copy of the ReceiveTlvs
*/
- public void set_payment_context(org.ldk.structs.PaymentContext val) {
- bindings.ReceiveTlvs_set_payment_context(this.ptr, val.ptr);
+ public ReceiveTlvs clone() {
+ long ret = bindings.ReceiveTlvs_clone(this.ptr);
GC.KeepAlive(this);
- GC.KeepAlive(val);
- }
-
- /**
- * Constructs a new ReceiveTlvs given each field
- */
- 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.encodeUint8Array(InternalUtils.check_arr_len(payment_secret_arg, 32)), payment_constraints_arg.ptr, payment_context_arg.ptr);
- GC.KeepAlive(payment_secret_arg);
- GC.KeepAlive(payment_constraints_arg);
- GC.KeepAlive(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.AddLast(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
return ret_hu_conv;
}
- internal long clone_ptr() {
- long ret = bindings.ReceiveTlvs_clone_ptr(this.ptr);
- GC.KeepAlive(this);
- return ret;
- }
-
/**
- * Creates a copy of the ReceiveTlvs
+ * Returns the underlying TLVs.
*/
- public ReceiveTlvs clone() {
- long ret = bindings.ReceiveTlvs_clone(this.ptr);
+ public UnauthenticatedReceiveTlvs tlvs() {
+ long ret = bindings.ReceiveTlvs_tlvs(this.ptr);
GC.KeepAlive(this);
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); }
+ org.ldk.structs.UnauthenticatedReceiveTlvs ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnauthenticatedReceiveTlvs(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
return ret_hu_conv;
}
/** A RecentPaymentDetails of type AwaitingInvoice */
public class RecentPaymentDetails_AwaitingInvoice : RecentPaymentDetails {
/**
- * A user-provided identifier in [`ChannelManager::send_payment`] used to uniquely identify
- * a payment and ensure idempotency in LDK.
+ * A user-provided identifier in [`ChannelManager::pay_for_offer`] used to uniquely identify a
+ * payment and ensure idempotency in LDK.
*/
public byte[] payment_id;
internal RecentPaymentDetails_AwaitingInvoice(long ptr) : base(null, ptr) {
/** A RecentPaymentDetails of type Pending */
public class RecentPaymentDetails_Pending : RecentPaymentDetails {
/**
- * A user-provided identifier in [`ChannelManager::send_payment`] used to uniquely identify
- * a payment and ensure idempotency in LDK.
+ * A user-provided identifier in [`send_payment`] or [`pay_for_offer`] used to uniquely
+ * identify a payment and ensure idempotency in LDK.
+ *
+ * [`send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
+ * [`pay_for_offer`]: crate::ln::channelmanager::ChannelManager::pay_for_offer
*/
public byte[] payment_id;
/**
/** A RecentPaymentDetails of type Fulfilled */
public class RecentPaymentDetails_Fulfilled : RecentPaymentDetails {
/**
- * A user-provided identifier in [`ChannelManager::send_payment`] used to uniquely identify
- * a payment and ensure idempotency in LDK.
+ * A user-provided identifier in [`send_payment`] or [`pay_for_offer`] used to uniquely
+ * identify a payment and ensure idempotency in LDK.
+ *
+ * [`send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
+ * [`pay_for_offer`]: crate::ln::channelmanager::ChannelManager::pay_for_offer
*/
public byte[] payment_id;
/**
/** A RecentPaymentDetails of type Abandoned */
public class RecentPaymentDetails_Abandoned : RecentPaymentDetails {
/**
- * A user-provided identifier in [`ChannelManager::send_payment`] used to uniquely identify
- * a payment and ensure idempotency in LDK.
+ * A user-provided identifier in [`send_payment`] or [`pay_for_offer`] used to uniquely
+ * identify a payment and ensure idempotency in LDK.
+ *
+ * [`send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
+ * [`pay_for_offer`]: crate::ln::channelmanager::ChannelManager::pay_for_offer
*/
public byte[] payment_id;
/**
/**
* An unpredictable series of bytes, typically containing information about the derivation of
- * [`payer_id`].
+ * [`payer_signing_pubkey`].
*
- * [`payer_id`]: Self::payer_id
+ * [`payer_signing_pubkey`]: Self::payer_signing_pubkey
*/
public byte[] payer_metadata() {
long ret = bindings.Refund_payer_metadata(this.ptr);
*
* [`paths`]: Self::paths
*/
- public byte[] payer_id() {
- long ret = bindings.Refund_payer_id(this.ptr);
+ public byte[] payer_signing_pubkey() {
+ long ret = bindings.Refund_payer_signing_pubkey(this.ptr);
GC.KeepAlive(this);
if (ret >= 0 && ret <= 4096) { return null; }
byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
}
/**
- * 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.
+ * Creates a new builder for a refund using the `signing_pubkey` for the public node id to send
+ * to if no [`Refund::paths`] are set. Otherwise, `signing_pubkey` may be a transient pubkey.
*
* Additionally, sets the required (empty) [`Refund::description`], [`Refund::payer_metadata`],
* and [`Refund::amount_msats`].
* [`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(InternalUtils.encodeUint8Array(metadata), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payer_id, 33)), amount_msats);
+ public static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ of(byte[] metadata, byte[] signing_pubkey, long amount_msats) {
+ long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_new(InternalUtils.encodeUint8Array(metadata), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(signing_pubkey, 33)), amount_msats);
GC.KeepAlive(metadata);
- GC.KeepAlive(payer_id);
+ GC.KeepAlive(signing_pubkey);
GC.KeepAlive(amount_msats);
if (ret >= 0 && ret <= 4096) { return null; }
Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ret_hu_conv = Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
* [`Bolt12Invoice::verify_using_payer_data`]: crate::offers::invoice::Bolt12Invoice::verify_using_payer_data
* [`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.Nonce nonce, long amount_msats, byte[] payment_id) {
- long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), expanded_key.ptr, nonce.ptr, amount_msats, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)));
+ public static Result_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ deriving_signing_pubkey(byte[] node_id, org.ldk.structs.ExpandedKey expanded_key, org.ldk.structs.Nonce nonce, long amount_msats, byte[] payment_id) {
+ long ret = bindings.RefundMaybeWithDerivedMetadataBuilder_deriving_signing_pubkey(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(node_id, 33)), expanded_key.ptr, nonce.ptr, amount_msats, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)));
GC.KeepAlive(node_id);
GC.KeepAlive(expanded_key);
GC.KeepAlive(nonce);
}
/**
- * 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`].
+ * 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.
*/
/**
* 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.
+ * by private channels or if [`Refund::payer_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.
if (ptr != 0) { bindings.ReleaseHeldHtlc_free(ptr); }
}
- /**
- * Used to release the HTLC held upstream if it matches the corresponding
- * [`HeldHtlcAvailable::payment_release_secret`].
- */
- public byte[] get_payment_release_secret() {
- long ret = bindings.ReleaseHeldHtlc_get_payment_release_secret(this.ptr);
- GC.KeepAlive(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
- return ret_conv;
- }
-
- /**
- * Used to release the HTLC held upstream if it matches the corresponding
- * [`HeldHtlcAvailable::payment_release_secret`].
- */
- public void set_payment_release_secret(byte[] val) {
- bindings.ReleaseHeldHtlc_set_payment_release_secret(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32)));
- GC.KeepAlive(this);
- GC.KeepAlive(val);
- }
-
/**
* Constructs a new ReleaseHeldHtlc given each field
*/
- public static ReleaseHeldHtlc of(byte[] payment_release_secret_arg) {
- long ret = bindings.ReleaseHeldHtlc_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_release_secret_arg, 32)));
- GC.KeepAlive(payment_release_secret_arg);
+ public static ReleaseHeldHtlc of() {
+ long ret = bindings.ReleaseHeldHtlc_new();
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.ReleaseHeldHtlc ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ReleaseHeldHtlc(null, ret); }
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
return ret_hu_conv;
}
+ /**
+ * Converts this [`ResponseInstruction`] into a [`MessageSendInstructions`] so that it can be
+ * used to send the response via a normal message sending method.
+ */
+ public MessageSendInstructions into_instructions() {
+ long ret = bindings.ResponseInstruction_into_instructions(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.MessageSendInstructions ret_hu_conv = org.ldk.structs.MessageSendInstructions.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ ;
+ return ret_hu_conv;
+ }
+
}
} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+public class Result_AsyncPaymentsContextDecodeErrorZ : CommonBase {
+ Result_AsyncPaymentsContextDecodeErrorZ(object _dummy, long ptr) : base(ptr) { }
+ ~Result_AsyncPaymentsContextDecodeErrorZ() {
+ if (ptr != 0) { bindings.CResult_AsyncPaymentsContextDecodeErrorZ_free(ptr); }
+ }
+
+ internal static Result_AsyncPaymentsContextDecodeErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_AsyncPaymentsContextDecodeErrorZ_is_ok(ptr)) {
+ return new Result_AsyncPaymentsContextDecodeErrorZ_OK(null, ptr);
+ } else {
+ return new Result_AsyncPaymentsContextDecodeErrorZ_Err(null, ptr);
+ }
+ }
+ public class Result_AsyncPaymentsContextDecodeErrorZ_OK : Result_AsyncPaymentsContextDecodeErrorZ {
+ public readonly AsyncPaymentsContext res;
+ internal Result_AsyncPaymentsContextDecodeErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
+ long res = bindings.CResult_AsyncPaymentsContextDecodeErrorZ_get_ok(ptr);
+ org.ldk.structs.AsyncPaymentsContext res_hu_conv = org.ldk.structs.AsyncPaymentsContext.constr_from_ptr(res);
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public class Result_AsyncPaymentsContextDecodeErrorZ_Err : Result_AsyncPaymentsContextDecodeErrorZ {
+ public readonly DecodeError err;
+ internal Result_AsyncPaymentsContextDecodeErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
+ long err = bindings.CResult_AsyncPaymentsContextDecodeErrorZ_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.AddLast(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_AsyncPaymentsContextDecodeErrorZ in the success state.
+ */
+ public static Result_AsyncPaymentsContextDecodeErrorZ ok(org.ldk.structs.AsyncPaymentsContext o) {
+ long ret = bindings.CResult_AsyncPaymentsContextDecodeErrorZ_ok(o.ptr);
+ GC.KeepAlive(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_AsyncPaymentsContextDecodeErrorZ ret_hu_conv = Result_AsyncPaymentsContextDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_AsyncPaymentsContextDecodeErrorZ in the error state.
+ */
+ public static Result_AsyncPaymentsContextDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+ long ret = bindings.CResult_AsyncPaymentsContextDecodeErrorZ_err(e.ptr);
+ GC.KeepAlive(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_AsyncPaymentsContextDecodeErrorZ ret_hu_conv = Result_AsyncPaymentsContextDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public bool is_ok() {
+ bool ret = bindings.CResult_AsyncPaymentsContextDecodeErrorZ_is_ok(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.CResult_AsyncPaymentsContextDecodeErrorZ_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_AsyncPaymentsContextDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_AsyncPaymentsContextDecodeErrorZ clone() {
+ long ret = bindings.CResult_AsyncPaymentsContextDecodeErrorZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_AsyncPaymentsContextDecodeErrorZ ret_hu_conv = Result_AsyncPaymentsContextDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+public class Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ : CommonBase {
+ Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ(object _dummy, long ptr) : base(ptr) { }
+ ~Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ() {
+ if (ptr != 0) { bindings.CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_free(ptr); }
+ }
+
+ internal static Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_is_ok(ptr)) {
+ return new Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_OK(null, ptr);
+ } else {
+ return new Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_Err(null, ptr);
+ }
+ }
+ public class Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_OK : Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ {
+ public readonly TwoTuple_DNSSECQueryDNSResolverContextZ res;
+ internal Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
+ long res = bindings.CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_get_ok(ptr);
+ TwoTuple_DNSSECQueryDNSResolverContextZ res_hu_conv = new TwoTuple_DNSSECQueryDNSResolverContextZ(null, res);
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public class Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_Err : Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ {
+ internal Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
+ }
+ }
+
+ /**
+ * Creates a new CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ in the success state.
+ */
+ public static Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ ok(org.ldk.structs.TwoTuple_DNSSECQueryDNSResolverContextZ o) {
+ long ret = bindings.CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_ok(o.ptr);
+ GC.KeepAlive(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ ret_hu_conv = Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ in the error state.
+ */
+ public static Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ err() {
+ long ret = bindings.CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_err();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ ret_hu_conv = Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public bool is_ok() {
+ bool ret = bindings.CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_is_ok(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ clone() {
+ long ret = bindings.CResult_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ ret_hu_conv = Result_C2Tuple_DNSSECQueryDNSResolverContextZNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
+} } }
+++ /dev/null
-using org.ldk.impl;
-using org.ldk.enums;
-using org.ldk.util;
-using System;
-
-namespace org { namespace ldk { namespace structs {
-
-public class Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ : CommonBase {
- Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ(object _dummy, long ptr) : base(ptr) { }
- ~Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ() {
- if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_free(ptr); }
- }
-
- internal 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);
- } else {
- return new Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_Err(null, ptr);
- }
- }
- public class Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_OK : Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ {
- public readonly TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ res;
- internal Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
- long res = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_ok(ptr);
- TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ res_hu_conv = new TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ(null, res);
- if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); };
- this.res = res_hu_conv;
- }
- }
-
- public class Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_Err : Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ {
- public readonly PaymentSendFailure err;
- internal Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
- long err = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_get_err(ptr);
- org.ldk.structs.PaymentSendFailure err_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(err);
- if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); };
- this.err = err_hu_conv;
- }
- }
-
- /**
- * 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.ptr);
- GC.KeepAlive(o);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.constr_from_ptr(ret);
- return ret_hu_conv;
- }
-
- /**
- * Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ in the error state.
- */
- public static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ err(org.ldk.structs.PaymentSendFailure e) {
- long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_err(e.ptr);
- GC.KeepAlive(e);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.constr_from_ptr(ret);
- return ret_hu_conv;
- }
-
- /**
- * Checks if the given object is currently in the success state
- */
- public bool is_ok() {
- bool ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_is_ok(this.ptr);
- GC.KeepAlive(this);
- return ret;
- }
-
- internal long clone_ptr() {
- long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone_ptr(this.ptr);
- GC.KeepAlive(this);
- return ret;
- }
-
- /**
- * Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
- */
- public Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ clone() {
- long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone(this.ptr);
- GC.KeepAlive(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.constr_from_ptr(ret);
- return ret_hu_conv;
- }
-
-}
-} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+public class Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ : CommonBase {
+ Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ(object _dummy, long ptr) : base(ptr) { }
+ ~Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ() {
+ if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_free(ptr); }
+ }
+
+ internal static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_is_ok(ptr)) {
+ return new Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_OK(null, ptr);
+ } else {
+ return new Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_Err(null, ptr);
+ }
+ }
+ public class Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_OK : Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ {
+ public readonly TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ res;
+ internal Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
+ long res = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_ok(ptr);
+ TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ res_hu_conv = new TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ(null, res);
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public class Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_Err : Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ {
+ public readonly ProbeSendFailure err;
+ internal Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
+ long err = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_get_err(ptr);
+ org.ldk.structs.ProbeSendFailure err_hu_conv = org.ldk.structs.ProbeSendFailure.constr_from_ptr(err);
+ if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ in the success state.
+ */
+ public static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesThirtyTwoBytesZ o) {
+ long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_ok(o.ptr);
+ GC.KeepAlive(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ in the error state.
+ */
+ public static Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ err(org.ldk.structs.ProbeSendFailure e) {
+ long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_err(e.ptr);
+ GC.KeepAlive(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public bool is_ok() {
+ bool ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_is_ok(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ clone() {
+ long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZProbeSendFailureZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+public class Result_CVec_C3Tuple_StrStrStrZZIOErrorZ : CommonBase {
+ Result_CVec_C3Tuple_StrStrStrZZIOErrorZ(object _dummy, long ptr) : base(ptr) { }
+ ~Result_CVec_C3Tuple_StrStrStrZZIOErrorZ() {
+ if (ptr != 0) { bindings.CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_free(ptr); }
+ }
+
+ internal static Result_CVec_C3Tuple_StrStrStrZZIOErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_is_ok(ptr)) {
+ return new Result_CVec_C3Tuple_StrStrStrZZIOErrorZ_OK(null, ptr);
+ } else {
+ return new Result_CVec_C3Tuple_StrStrStrZZIOErrorZ_Err(null, ptr);
+ }
+ }
+ public class Result_CVec_C3Tuple_StrStrStrZZIOErrorZ_OK : Result_CVec_C3Tuple_StrStrStrZZIOErrorZ {
+ public readonly ThreeTuple_StrStrStrZ[] res;
+ internal Result_CVec_C3Tuple_StrStrStrZZIOErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
+ long res = bindings.CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_ok(ptr);
+ int res_conv_23_len = InternalUtils.getArrayLength(res);
+ ThreeTuple_StrStrStrZ[] res_conv_23_arr = new ThreeTuple_StrStrStrZ[res_conv_23_len];
+ for (int x = 0; x < res_conv_23_len; x++) {
+ long res_conv_23 = InternalUtils.getU64ArrayElem(res, x);
+ ThreeTuple_StrStrStrZ res_conv_23_hu_conv = new ThreeTuple_StrStrStrZ(null, res_conv_23);
+ if (res_conv_23_hu_conv != null) { res_conv_23_hu_conv.ptrs_to.AddLast(this); };
+ res_conv_23_arr[x] = res_conv_23_hu_conv;
+ }
+ bindings.free_buffer(res);
+ this.res = res_conv_23_arr;
+ }
+ }
+
+ public class Result_CVec_C3Tuple_StrStrStrZZIOErrorZ_Err : Result_CVec_C3Tuple_StrStrStrZZIOErrorZ {
+ public readonly IOError err;
+ internal Result_CVec_C3Tuple_StrStrStrZZIOErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
+ this.err = bindings.CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_get_err(ptr);
+ }
+ }
+
+ /**
+ * Creates a new CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ in the success state.
+ */
+ public static Result_CVec_C3Tuple_StrStrStrZZIOErrorZ ok(ThreeTuple_StrStrStrZ[] o) {
+ long ret = bindings.CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_ok(InternalUtils.encodeUint64Array(InternalUtils.mapArray(o, o_conv_23 => o_conv_23.ptr)));
+ GC.KeepAlive(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_CVec_C3Tuple_StrStrStrZZIOErrorZ ret_hu_conv = Result_CVec_C3Tuple_StrStrStrZZIOErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ in the error state.
+ */
+ public static Result_CVec_C3Tuple_StrStrStrZZIOErrorZ err(IOError e) {
+ long ret = bindings.CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_err(e);
+ GC.KeepAlive(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_CVec_C3Tuple_StrStrStrZZIOErrorZ ret_hu_conv = Result_CVec_C3Tuple_StrStrStrZZIOErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public bool is_ok() {
+ bool ret = bindings.CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_is_ok(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_CVec_C3Tuple_StrStrStrZZIOErrorZ clone() {
+ long ret = bindings.CResult_CVec_C3Tuple_StrStrStrZZIOErrorZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_CVec_C3Tuple_StrStrStrZZIOErrorZ ret_hu_conv = Result_CVec_C3Tuple_StrStrStrZZIOErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+public class Result_DNSResolverContextDecodeErrorZ : CommonBase {
+ Result_DNSResolverContextDecodeErrorZ(object _dummy, long ptr) : base(ptr) { }
+ ~Result_DNSResolverContextDecodeErrorZ() {
+ if (ptr != 0) { bindings.CResult_DNSResolverContextDecodeErrorZ_free(ptr); }
+ }
+
+ internal static Result_DNSResolverContextDecodeErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_DNSResolverContextDecodeErrorZ_is_ok(ptr)) {
+ return new Result_DNSResolverContextDecodeErrorZ_OK(null, ptr);
+ } else {
+ return new Result_DNSResolverContextDecodeErrorZ_Err(null, ptr);
+ }
+ }
+ public class Result_DNSResolverContextDecodeErrorZ_OK : Result_DNSResolverContextDecodeErrorZ {
+ public readonly DNSResolverContext res;
+ internal Result_DNSResolverContextDecodeErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
+ long res = bindings.CResult_DNSResolverContextDecodeErrorZ_get_ok(ptr);
+ org.ldk.structs.DNSResolverContext res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.DNSResolverContext(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public class Result_DNSResolverContextDecodeErrorZ_Err : Result_DNSResolverContextDecodeErrorZ {
+ public readonly DecodeError err;
+ internal Result_DNSResolverContextDecodeErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
+ long err = bindings.CResult_DNSResolverContextDecodeErrorZ_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.AddLast(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_DNSResolverContextDecodeErrorZ in the success state.
+ */
+ public static Result_DNSResolverContextDecodeErrorZ ok(org.ldk.structs.DNSResolverContext o) {
+ long ret = bindings.CResult_DNSResolverContextDecodeErrorZ_ok(o.ptr);
+ GC.KeepAlive(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_DNSResolverContextDecodeErrorZ ret_hu_conv = Result_DNSResolverContextDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_DNSResolverContextDecodeErrorZ in the error state.
+ */
+ public static Result_DNSResolverContextDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+ long ret = bindings.CResult_DNSResolverContextDecodeErrorZ_err(e.ptr);
+ GC.KeepAlive(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_DNSResolverContextDecodeErrorZ ret_hu_conv = Result_DNSResolverContextDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public bool is_ok() {
+ bool ret = bindings.CResult_DNSResolverContextDecodeErrorZ_is_ok(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.CResult_DNSResolverContextDecodeErrorZ_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_DNSResolverContextDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_DNSResolverContextDecodeErrorZ clone() {
+ long ret = bindings.CResult_DNSResolverContextDecodeErrorZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_DNSResolverContextDecodeErrorZ ret_hu_conv = Result_DNSResolverContextDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+public class Result_DNSResolverMessageDecodeErrorZ : CommonBase {
+ Result_DNSResolverMessageDecodeErrorZ(object _dummy, long ptr) : base(ptr) { }
+ ~Result_DNSResolverMessageDecodeErrorZ() {
+ if (ptr != 0) { bindings.CResult_DNSResolverMessageDecodeErrorZ_free(ptr); }
+ }
+
+ internal static Result_DNSResolverMessageDecodeErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_DNSResolverMessageDecodeErrorZ_is_ok(ptr)) {
+ return new Result_DNSResolverMessageDecodeErrorZ_OK(null, ptr);
+ } else {
+ return new Result_DNSResolverMessageDecodeErrorZ_Err(null, ptr);
+ }
+ }
+ public class Result_DNSResolverMessageDecodeErrorZ_OK : Result_DNSResolverMessageDecodeErrorZ {
+ public readonly DNSResolverMessage res;
+ internal Result_DNSResolverMessageDecodeErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
+ long res = bindings.CResult_DNSResolverMessageDecodeErrorZ_get_ok(ptr);
+ org.ldk.structs.DNSResolverMessage res_hu_conv = org.ldk.structs.DNSResolverMessage.constr_from_ptr(res);
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public class Result_DNSResolverMessageDecodeErrorZ_Err : Result_DNSResolverMessageDecodeErrorZ {
+ public readonly DecodeError err;
+ internal Result_DNSResolverMessageDecodeErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
+ long err = bindings.CResult_DNSResolverMessageDecodeErrorZ_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.AddLast(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_DNSResolverMessageDecodeErrorZ in the success state.
+ */
+ public static Result_DNSResolverMessageDecodeErrorZ ok(org.ldk.structs.DNSResolverMessage o) {
+ long ret = bindings.CResult_DNSResolverMessageDecodeErrorZ_ok(o.ptr);
+ GC.KeepAlive(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_DNSResolverMessageDecodeErrorZ ret_hu_conv = Result_DNSResolverMessageDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_DNSResolverMessageDecodeErrorZ in the error state.
+ */
+ public static Result_DNSResolverMessageDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+ long ret = bindings.CResult_DNSResolverMessageDecodeErrorZ_err(e.ptr);
+ GC.KeepAlive(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_DNSResolverMessageDecodeErrorZ ret_hu_conv = Result_DNSResolverMessageDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public bool is_ok() {
+ bool ret = bindings.CResult_DNSResolverMessageDecodeErrorZ_is_ok(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.CResult_DNSResolverMessageDecodeErrorZ_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_DNSResolverMessageDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_DNSResolverMessageDecodeErrorZ clone() {
+ long ret = bindings.CResult_DNSResolverMessageDecodeErrorZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_DNSResolverMessageDecodeErrorZ ret_hu_conv = Result_DNSResolverMessageDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+public class Result_HumanReadableNameDecodeErrorZ : CommonBase {
+ Result_HumanReadableNameDecodeErrorZ(object _dummy, long ptr) : base(ptr) { }
+ ~Result_HumanReadableNameDecodeErrorZ() {
+ if (ptr != 0) { bindings.CResult_HumanReadableNameDecodeErrorZ_free(ptr); }
+ }
+
+ internal static Result_HumanReadableNameDecodeErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_HumanReadableNameDecodeErrorZ_is_ok(ptr)) {
+ return new Result_HumanReadableNameDecodeErrorZ_OK(null, ptr);
+ } else {
+ return new Result_HumanReadableNameDecodeErrorZ_Err(null, ptr);
+ }
+ }
+ public class Result_HumanReadableNameDecodeErrorZ_OK : Result_HumanReadableNameDecodeErrorZ {
+ public readonly HumanReadableName res;
+ internal Result_HumanReadableNameDecodeErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
+ long res = bindings.CResult_HumanReadableNameDecodeErrorZ_get_ok(ptr);
+ org.ldk.structs.HumanReadableName res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.HumanReadableName(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public class Result_HumanReadableNameDecodeErrorZ_Err : Result_HumanReadableNameDecodeErrorZ {
+ public readonly DecodeError err;
+ internal Result_HumanReadableNameDecodeErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
+ long err = bindings.CResult_HumanReadableNameDecodeErrorZ_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.AddLast(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_HumanReadableNameDecodeErrorZ in the success state.
+ */
+ public static Result_HumanReadableNameDecodeErrorZ ok(org.ldk.structs.HumanReadableName o) {
+ long ret = bindings.CResult_HumanReadableNameDecodeErrorZ_ok(o.ptr);
+ GC.KeepAlive(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_HumanReadableNameDecodeErrorZ ret_hu_conv = Result_HumanReadableNameDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_HumanReadableNameDecodeErrorZ in the error state.
+ */
+ public static Result_HumanReadableNameDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+ long ret = bindings.CResult_HumanReadableNameDecodeErrorZ_err(e.ptr);
+ GC.KeepAlive(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_HumanReadableNameDecodeErrorZ ret_hu_conv = Result_HumanReadableNameDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public bool is_ok() {
+ bool ret = bindings.CResult_HumanReadableNameDecodeErrorZ_is_ok(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.CResult_HumanReadableNameDecodeErrorZ_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_HumanReadableNameDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_HumanReadableNameDecodeErrorZ clone() {
+ long ret = bindings.CResult_HumanReadableNameDecodeErrorZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_HumanReadableNameDecodeErrorZ ret_hu_conv = Result_HumanReadableNameDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+public class Result_HumanReadableNameNoneZ : CommonBase {
+ Result_HumanReadableNameNoneZ(object _dummy, long ptr) : base(ptr) { }
+ ~Result_HumanReadableNameNoneZ() {
+ if (ptr != 0) { bindings.CResult_HumanReadableNameNoneZ_free(ptr); }
+ }
+
+ internal static Result_HumanReadableNameNoneZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_HumanReadableNameNoneZ_is_ok(ptr)) {
+ return new Result_HumanReadableNameNoneZ_OK(null, ptr);
+ } else {
+ return new Result_HumanReadableNameNoneZ_Err(null, ptr);
+ }
+ }
+ public class Result_HumanReadableNameNoneZ_OK : Result_HumanReadableNameNoneZ {
+ public readonly HumanReadableName res;
+ internal Result_HumanReadableNameNoneZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
+ long res = bindings.CResult_HumanReadableNameNoneZ_get_ok(ptr);
+ org.ldk.structs.HumanReadableName res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.HumanReadableName(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public class Result_HumanReadableNameNoneZ_Err : Result_HumanReadableNameNoneZ {
+ internal Result_HumanReadableNameNoneZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
+ }
+ }
+
+ /**
+ * Creates a new CResult_HumanReadableNameNoneZ in the success state.
+ */
+ public static Result_HumanReadableNameNoneZ ok(org.ldk.structs.HumanReadableName o) {
+ long ret = bindings.CResult_HumanReadableNameNoneZ_ok(o.ptr);
+ GC.KeepAlive(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_HumanReadableNameNoneZ ret_hu_conv = Result_HumanReadableNameNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_HumanReadableNameNoneZ in the error state.
+ */
+ public static Result_HumanReadableNameNoneZ err() {
+ long ret = bindings.CResult_HumanReadableNameNoneZ_err();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_HumanReadableNameNoneZ ret_hu_conv = Result_HumanReadableNameNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public bool is_ok() {
+ bool ret = bindings.CResult_HumanReadableNameNoneZ_is_ok(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.CResult_HumanReadableNameNoneZ_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_HumanReadableNameNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_HumanReadableNameNoneZ clone() {
+ long ret = bindings.CResult_HumanReadableNameNoneZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_HumanReadableNameNoneZ ret_hu_conv = Result_HumanReadableNameNoneZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+public class Result_InvoiceRequestDecodeErrorZ : CommonBase {
+ Result_InvoiceRequestDecodeErrorZ(object _dummy, long ptr) : base(ptr) { }
+ ~Result_InvoiceRequestDecodeErrorZ() {
+ if (ptr != 0) { bindings.CResult_InvoiceRequestDecodeErrorZ_free(ptr); }
+ }
+
+ internal static Result_InvoiceRequestDecodeErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_InvoiceRequestDecodeErrorZ_is_ok(ptr)) {
+ return new Result_InvoiceRequestDecodeErrorZ_OK(null, ptr);
+ } else {
+ return new Result_InvoiceRequestDecodeErrorZ_Err(null, ptr);
+ }
+ }
+ public class Result_InvoiceRequestDecodeErrorZ_OK : Result_InvoiceRequestDecodeErrorZ {
+ public readonly InvoiceRequest res;
+ internal Result_InvoiceRequestDecodeErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
+ long res = bindings.CResult_InvoiceRequestDecodeErrorZ_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.AddLast(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public class Result_InvoiceRequestDecodeErrorZ_Err : Result_InvoiceRequestDecodeErrorZ {
+ public readonly DecodeError err;
+ internal Result_InvoiceRequestDecodeErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
+ long err = bindings.CResult_InvoiceRequestDecodeErrorZ_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.AddLast(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_InvoiceRequestDecodeErrorZ in the success state.
+ */
+ public static Result_InvoiceRequestDecodeErrorZ ok(org.ldk.structs.InvoiceRequest o) {
+ long ret = bindings.CResult_InvoiceRequestDecodeErrorZ_ok(o.ptr);
+ GC.KeepAlive(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestDecodeErrorZ ret_hu_conv = Result_InvoiceRequestDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_InvoiceRequestDecodeErrorZ in the error state.
+ */
+ public static Result_InvoiceRequestDecodeErrorZ err(org.ldk.structs.DecodeError e) {
+ long ret = bindings.CResult_InvoiceRequestDecodeErrorZ_err(e.ptr);
+ GC.KeepAlive(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestDecodeErrorZ ret_hu_conv = Result_InvoiceRequestDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public bool is_ok() {
+ bool ret = bindings.CResult_InvoiceRequestDecodeErrorZ_is_ok(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.CResult_InvoiceRequestDecodeErrorZ_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_InvoiceRequestDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_InvoiceRequestDecodeErrorZ clone() {
+ long ret = bindings.CResult_InvoiceRequestDecodeErrorZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestDecodeErrorZ ret_hu_conv = Result_InvoiceRequestDecodeErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
+} } }
+++ /dev/null
-using org.ldk.impl;
-using org.ldk.enums;
-using org.ldk.util;
-using System;
-
-namespace org { namespace ldk { namespace structs {
-
-public class Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ : CommonBase {
- Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ(object _dummy, long ptr) : base(ptr) { }
- ~Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ() {
- if (ptr != 0) { bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(ptr); }
- }
-
- internal 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 class Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_OK : Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ {
- public readonly InvoiceRequestWithDerivedPayerIdBuilder res;
- internal Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_OK(object _dummy, long ptr) : base(_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.AddLast(this); };
- this.res = res_hu_conv;
- }
- }
-
- public class Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_Err : Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ {
- public readonly Bolt12SemanticError err;
- internal Result_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_Err(object _dummy, long ptr) : base(_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);
- GC.KeepAlive(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.AddLast(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(Bolt12SemanticError e) {
- long ret = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(e);
- GC.KeepAlive(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 bool is_ok() {
- bool ret = bindings.CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(this.ptr);
- GC.KeepAlive(this);
- return ret;
- }
-
-}
-} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+public class Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ : CommonBase {
+ Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ(object _dummy, long ptr) : base(ptr) { }
+ ~Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ() {
+ if (ptr != 0) { bindings.CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_free(ptr); }
+ }
+
+ internal static Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(ptr)) {
+ return new Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_OK(null, ptr);
+ } else {
+ return new Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_Err(null, ptr);
+ }
+ }
+ public class Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_OK : Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ {
+ public readonly InvoiceRequestWithDerivedPayerSigningPubkeyBuilder res;
+ internal Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
+ long res = bindings.CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_get_ok(ptr);
+ org.ldk.structs.InvoiceRequestWithDerivedPayerSigningPubkeyBuilder res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.InvoiceRequestWithDerivedPayerSigningPubkeyBuilder(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public class Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_Err : Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ {
+ public readonly Bolt12SemanticError err;
+ internal Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
+ this.err = bindings.CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_get_err(ptr);
+ }
+ }
+
+ /**
+ * Creates a new CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ in the success state.
+ */
+ public static Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ ok(org.ldk.structs.InvoiceRequestWithDerivedPayerSigningPubkeyBuilder o) {
+ long ret = bindings.CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o.ptr);
+ GC.KeepAlive(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(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_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ in the error state.
+ */
+ public static Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ err(Bolt12SemanticError e) {
+ long ret = bindings.CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_err(e);
+ GC.KeepAlive(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ ret_hu_conv = Result_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public bool is_ok() {
+ bool ret = bindings.CResult_InvoiceRequestWithDerivedPayerSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+}
+} } }
+++ /dev/null
-using org.ldk.impl;
-using org.ldk.enums;
-using org.ldk.util;
-using System;
-
-namespace org { namespace ldk { namespace structs {
-
-public class Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ : CommonBase {
- Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ(object _dummy, long ptr) : base(ptr) { }
- ~Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ() {
- if (ptr != 0) { bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(ptr); }
- }
-
- internal 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 class Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_OK : Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ {
- public readonly InvoiceRequestWithExplicitPayerIdBuilder res;
- internal Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_OK(object _dummy, long ptr) : base(_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.AddLast(this); };
- this.res = res_hu_conv;
- }
- }
-
- public class Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_Err : Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ {
- public readonly Bolt12SemanticError err;
- internal Result_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_Err(object _dummy, long ptr) : base(_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);
- GC.KeepAlive(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.AddLast(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(Bolt12SemanticError e) {
- long ret = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(e);
- GC.KeepAlive(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 bool is_ok() {
- bool ret = bindings.CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(this.ptr);
- GC.KeepAlive(this);
- return ret;
- }
-
-}
-} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+public class Result_MonitorNameIOErrorZ : CommonBase {
+ Result_MonitorNameIOErrorZ(object _dummy, long ptr) : base(ptr) { }
+ ~Result_MonitorNameIOErrorZ() {
+ if (ptr != 0) { bindings.CResult_MonitorNameIOErrorZ_free(ptr); }
+ }
+
+ internal static Result_MonitorNameIOErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_MonitorNameIOErrorZ_is_ok(ptr)) {
+ return new Result_MonitorNameIOErrorZ_OK(null, ptr);
+ } else {
+ return new Result_MonitorNameIOErrorZ_Err(null, ptr);
+ }
+ }
+ public class Result_MonitorNameIOErrorZ_OK : Result_MonitorNameIOErrorZ {
+ public readonly MonitorName res;
+ internal Result_MonitorNameIOErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
+ long res = bindings.CResult_MonitorNameIOErrorZ_get_ok(ptr);
+ org.ldk.structs.MonitorName res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.MonitorName(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public class Result_MonitorNameIOErrorZ_Err : Result_MonitorNameIOErrorZ {
+ public readonly IOError err;
+ internal Result_MonitorNameIOErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
+ this.err = bindings.CResult_MonitorNameIOErrorZ_get_err(ptr);
+ }
+ }
+
+ /**
+ * Creates a new CResult_MonitorNameIOErrorZ in the success state.
+ */
+ public static Result_MonitorNameIOErrorZ ok(org.ldk.structs.MonitorName o) {
+ long ret = bindings.CResult_MonitorNameIOErrorZ_ok(o.ptr);
+ GC.KeepAlive(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_MonitorNameIOErrorZ ret_hu_conv = Result_MonitorNameIOErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(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_MonitorNameIOErrorZ in the error state.
+ */
+ public static Result_MonitorNameIOErrorZ err(IOError e) {
+ long ret = bindings.CResult_MonitorNameIOErrorZ_err(e);
+ GC.KeepAlive(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_MonitorNameIOErrorZ ret_hu_conv = Result_MonitorNameIOErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public bool is_ok() {
+ bool ret = bindings.CResult_MonitorNameIOErrorZ_is_ok(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+public class Result_NoneBolt12PaymentErrorZ : CommonBase {
+ Result_NoneBolt12PaymentErrorZ(object _dummy, long ptr) : base(ptr) { }
+ ~Result_NoneBolt12PaymentErrorZ() {
+ if (ptr != 0) { bindings.CResult_NoneBolt12PaymentErrorZ_free(ptr); }
+ }
+
+ internal static Result_NoneBolt12PaymentErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_NoneBolt12PaymentErrorZ_is_ok(ptr)) {
+ return new Result_NoneBolt12PaymentErrorZ_OK(null, ptr);
+ } else {
+ return new Result_NoneBolt12PaymentErrorZ_Err(null, ptr);
+ }
+ }
+ public class Result_NoneBolt12PaymentErrorZ_OK : Result_NoneBolt12PaymentErrorZ {
+ internal Result_NoneBolt12PaymentErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
+ }
+ }
+
+ public class Result_NoneBolt12PaymentErrorZ_Err : Result_NoneBolt12PaymentErrorZ {
+ public readonly Bolt12PaymentError err;
+ internal Result_NoneBolt12PaymentErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
+ long err = bindings.CResult_NoneBolt12PaymentErrorZ_get_err(ptr);
+ org.ldk.structs.Bolt12PaymentError err_hu_conv = org.ldk.structs.Bolt12PaymentError.constr_from_ptr(err);
+ if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); };
+ this.err = err_hu_conv;
+ }
+ }
+
+ /**
+ * Creates a new CResult_NoneBolt12PaymentErrorZ in the success state.
+ */
+ public static Result_NoneBolt12PaymentErrorZ ok() {
+ long ret = bindings.CResult_NoneBolt12PaymentErrorZ_ok();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_NoneBolt12PaymentErrorZ ret_hu_conv = Result_NoneBolt12PaymentErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new CResult_NoneBolt12PaymentErrorZ in the error state.
+ */
+ public static Result_NoneBolt12PaymentErrorZ err(org.ldk.structs.Bolt12PaymentError e) {
+ long ret = bindings.CResult_NoneBolt12PaymentErrorZ_err(e.ptr);
+ GC.KeepAlive(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_NoneBolt12PaymentErrorZ ret_hu_conv = Result_NoneBolt12PaymentErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public bool is_ok() {
+ bool ret = bindings.CResult_NoneBolt12PaymentErrorZ_is_ok(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.CResult_NoneBolt12PaymentErrorZ_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a new CResult_NoneBolt12PaymentErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+ public Result_NoneBolt12PaymentErrorZ clone() {
+ long ret = bindings.CResult_NoneBolt12PaymentErrorZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_NoneBolt12PaymentErrorZ ret_hu_conv = Result_NoneBolt12PaymentErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+}
+} } }
+++ /dev/null
-using org.ldk.impl;
-using org.ldk.enums;
-using org.ldk.util;
-using System;
-
-namespace org { namespace ldk { namespace structs {
-
-public class Result_NonePaymentSendFailureZ : CommonBase {
- Result_NonePaymentSendFailureZ(object _dummy, long ptr) : base(ptr) { }
- ~Result_NonePaymentSendFailureZ() {
- if (ptr != 0) { bindings.CResult_NonePaymentSendFailureZ_free(ptr); }
- }
-
- internal static Result_NonePaymentSendFailureZ constr_from_ptr(long ptr) {
- if (bindings.CResult_NonePaymentSendFailureZ_is_ok(ptr)) {
- return new Result_NonePaymentSendFailureZ_OK(null, ptr);
- } else {
- return new Result_NonePaymentSendFailureZ_Err(null, ptr);
- }
- }
- public class Result_NonePaymentSendFailureZ_OK : Result_NonePaymentSendFailureZ {
- internal Result_NonePaymentSendFailureZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
- }
- }
-
- public class Result_NonePaymentSendFailureZ_Err : Result_NonePaymentSendFailureZ {
- public readonly PaymentSendFailure err;
- internal Result_NonePaymentSendFailureZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
- long err = bindings.CResult_NonePaymentSendFailureZ_get_err(ptr);
- org.ldk.structs.PaymentSendFailure err_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(err);
- if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); };
- this.err = err_hu_conv;
- }
- }
-
- /**
- * Creates a new CResult_NonePaymentSendFailureZ in the success state.
- */
- public static Result_NonePaymentSendFailureZ ok() {
- long ret = bindings.CResult_NonePaymentSendFailureZ_ok();
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
- return ret_hu_conv;
- }
-
- /**
- * Creates a new CResult_NonePaymentSendFailureZ in the error state.
- */
- public static Result_NonePaymentSendFailureZ err(org.ldk.structs.PaymentSendFailure e) {
- long ret = bindings.CResult_NonePaymentSendFailureZ_err(e.ptr);
- GC.KeepAlive(e);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
- return ret_hu_conv;
- }
-
- /**
- * Checks if the given object is currently in the success state
- */
- public bool is_ok() {
- bool ret = bindings.CResult_NonePaymentSendFailureZ_is_ok(this.ptr);
- GC.KeepAlive(this);
- return ret;
- }
-
- internal long clone_ptr() {
- long ret = bindings.CResult_NonePaymentSendFailureZ_clone_ptr(this.ptr);
- GC.KeepAlive(this);
- return ret;
- }
-
- /**
- * Creates a new CResult_NonePaymentSendFailureZ which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
- */
- public Result_NonePaymentSendFailureZ clone() {
- long ret = bindings.CResult_NonePaymentSendFailureZ_clone(this.ptr);
- GC.KeepAlive(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
- return ret_hu_conv;
- }
-
-}
-} } }
public readonly Bolt11ParseError err;
internal Result_SiPrefixBolt11ParseErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
long err = bindings.CResult_SiPrefixBolt11ParseErrorZ_get_err(ptr);
- org.ldk.structs.Bolt11ParseError err_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(err);
+ org.ldk.structs.Bolt11ParseError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.Bolt11ParseError(null, err); }
if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); };
this.err = err_hu_conv;
}
public readonly Bolt11ParseError err;
internal Result_SignedRawBolt11InvoiceBolt11ParseErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
long err = bindings.CResult_SignedRawBolt11InvoiceBolt11ParseErrorZ_get_err(ptr);
- org.ldk.structs.Bolt11ParseError err_hu_conv = org.ldk.structs.Bolt11ParseError.constr_from_ptr(err);
+ org.ldk.structs.Bolt11ParseError err_hu_conv = null; if (err < 0 || err > 4096) { err_hu_conv = new org.ldk.structs.Bolt11ParseError(null, err); }
if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); };
this.err = err_hu_conv;
}
+++ /dev/null
-using org.ldk.impl;
-using org.ldk.enums;
-using org.ldk.util;
-using System;
-
-namespace org { namespace ldk { namespace structs {
-
-public class Result_ThirtyTwoBytesPaymentSendFailureZ : CommonBase {
- Result_ThirtyTwoBytesPaymentSendFailureZ(object _dummy, long ptr) : base(ptr) { }
- ~Result_ThirtyTwoBytesPaymentSendFailureZ() {
- if (ptr != 0) { bindings.CResult_ThirtyTwoBytesPaymentSendFailureZ_free(ptr); }
- }
-
- internal static Result_ThirtyTwoBytesPaymentSendFailureZ constr_from_ptr(long ptr) {
- if (bindings.CResult_ThirtyTwoBytesPaymentSendFailureZ_is_ok(ptr)) {
- return new Result_ThirtyTwoBytesPaymentSendFailureZ_OK(null, ptr);
- } else {
- return new Result_ThirtyTwoBytesPaymentSendFailureZ_Err(null, ptr);
- }
- }
- public class Result_ThirtyTwoBytesPaymentSendFailureZ_OK : Result_ThirtyTwoBytesPaymentSendFailureZ {
- public readonly byte[] res;
- internal Result_ThirtyTwoBytesPaymentSendFailureZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
- long res = bindings.CResult_ThirtyTwoBytesPaymentSendFailureZ_get_ok(ptr);
- byte[] res_conv = InternalUtils.decodeUint8Array(res);
- this.res = res_conv;
- }
- }
-
- public class Result_ThirtyTwoBytesPaymentSendFailureZ_Err : Result_ThirtyTwoBytesPaymentSendFailureZ {
- public readonly PaymentSendFailure err;
- internal Result_ThirtyTwoBytesPaymentSendFailureZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
- long err = bindings.CResult_ThirtyTwoBytesPaymentSendFailureZ_get_err(ptr);
- org.ldk.structs.PaymentSendFailure err_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(err);
- if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); };
- this.err = err_hu_conv;
- }
- }
-
- /**
- * Creates a new CResult_ThirtyTwoBytesPaymentSendFailureZ in the success state.
- */
- public static Result_ThirtyTwoBytesPaymentSendFailureZ ok(byte[] o) {
- long ret = bindings.CResult_ThirtyTwoBytesPaymentSendFailureZ_ok(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(o, 32)));
- GC.KeepAlive(o);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_ThirtyTwoBytesPaymentSendFailureZ ret_hu_conv = Result_ThirtyTwoBytesPaymentSendFailureZ.constr_from_ptr(ret);
- return ret_hu_conv;
- }
-
- /**
- * Creates a new CResult_ThirtyTwoBytesPaymentSendFailureZ in the error state.
- */
- public static Result_ThirtyTwoBytesPaymentSendFailureZ err(org.ldk.structs.PaymentSendFailure e) {
- long ret = bindings.CResult_ThirtyTwoBytesPaymentSendFailureZ_err(e.ptr);
- GC.KeepAlive(e);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_ThirtyTwoBytesPaymentSendFailureZ ret_hu_conv = Result_ThirtyTwoBytesPaymentSendFailureZ.constr_from_ptr(ret);
- return ret_hu_conv;
- }
-
- /**
- * Checks if the given object is currently in the success state
- */
- public bool is_ok() {
- bool ret = bindings.CResult_ThirtyTwoBytesPaymentSendFailureZ_is_ok(this.ptr);
- GC.KeepAlive(this);
- return ret;
- }
-
- internal long clone_ptr() {
- long ret = bindings.CResult_ThirtyTwoBytesPaymentSendFailureZ_clone_ptr(this.ptr);
- GC.KeepAlive(this);
- return ret;
- }
-
- /**
- * Creates a new CResult_ThirtyTwoBytesPaymentSendFailureZ which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
- */
- public Result_ThirtyTwoBytesPaymentSendFailureZ clone() {
- long ret = bindings.CResult_ThirtyTwoBytesPaymentSendFailureZ_clone(this.ptr);
- GC.KeepAlive(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_ThirtyTwoBytesPaymentSendFailureZ ret_hu_conv = Result_ThirtyTwoBytesPaymentSendFailureZ.constr_from_ptr(ret);
- return ret_hu_conv;
- }
-
-}
-} } }
+++ /dev/null
-using org.ldk.impl;
-using org.ldk.enums;
-using org.ldk.util;
-using System;
-
-namespace org { namespace ldk { namespace structs {
-
-public class Result_UnknownPaymentContextDecodeErrorZ : CommonBase {
- Result_UnknownPaymentContextDecodeErrorZ(object _dummy, long ptr) : base(ptr) { }
- ~Result_UnknownPaymentContextDecodeErrorZ() {
- if (ptr != 0) { bindings.CResult_UnknownPaymentContextDecodeErrorZ_free(ptr); }
- }
-
- internal 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 class Result_UnknownPaymentContextDecodeErrorZ_OK : Result_UnknownPaymentContextDecodeErrorZ {
- public readonly UnknownPaymentContext res;
- internal Result_UnknownPaymentContextDecodeErrorZ_OK(object _dummy, long ptr) : base(_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.AddLast(this); };
- this.res = res_hu_conv;
- }
- }
-
- public class Result_UnknownPaymentContextDecodeErrorZ_Err : Result_UnknownPaymentContextDecodeErrorZ {
- public readonly DecodeError err;
- internal Result_UnknownPaymentContextDecodeErrorZ_Err(object _dummy, long ptr) : base(_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.AddLast(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);
- GC.KeepAlive(o);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret);
- 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);
- GC.KeepAlive(e);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret);
- return ret_hu_conv;
- }
-
- /**
- * Checks if the given object is currently in the success state
- */
- public bool is_ok() {
- bool ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_is_ok(this.ptr);
- GC.KeepAlive(this);
- return ret;
- }
-
- internal long clone_ptr() {
- long ret = bindings.CResult_UnknownPaymentContextDecodeErrorZ_clone_ptr(this.ptr);
- GC.KeepAlive(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);
- GC.KeepAlive(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret);
- return ret_hu_conv;
- }
-
-}
-} } }
+++ /dev/null
-using org.ldk.impl;
-using org.ldk.enums;
-using org.ldk.util;
-using System;
-
-namespace org { namespace ldk { namespace structs {
-
-public class Result_UnsignedInvoiceRequestBolt12SemanticErrorZ : CommonBase {
- Result_UnsignedInvoiceRequestBolt12SemanticErrorZ(object _dummy, long ptr) : base(ptr) { }
- ~Result_UnsignedInvoiceRequestBolt12SemanticErrorZ() {
- if (ptr != 0) { bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(ptr); }
- }
-
- internal 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 class Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_OK : Result_UnsignedInvoiceRequestBolt12SemanticErrorZ {
- public readonly UnsignedInvoiceRequest res;
- internal Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_OK(object _dummy, long ptr) : base(_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.AddLast(this); };
- this.res = res_hu_conv;
- }
- }
-
- public class Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_Err : Result_UnsignedInvoiceRequestBolt12SemanticErrorZ {
- public readonly Bolt12SemanticError err;
- internal Result_UnsignedInvoiceRequestBolt12SemanticErrorZ_Err(object _dummy, long ptr) : base(_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);
- GC.KeepAlive(o);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret);
- return ret_hu_conv;
- }
-
- /**
- * Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ in the error state.
- */
- public static Result_UnsignedInvoiceRequestBolt12SemanticErrorZ err(Bolt12SemanticError e) {
- long ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e);
- GC.KeepAlive(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 bool is_ok() {
- bool ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(this.ptr);
- GC.KeepAlive(this);
- return ret;
- }
-
- internal long clone_ptr() {
- long ret = bindings.CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone_ptr(this.ptr);
- GC.KeepAlive(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);
- GC.KeepAlive(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_UnsignedInvoiceRequestBolt12SemanticErrorZ ret_hu_conv = Result_UnsignedInvoiceRequestBolt12SemanticErrorZ.constr_from_ptr(ret);
- return ret_hu_conv;
- }
-
-}
-} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+public class Result_UpdateNameIOErrorZ : CommonBase {
+ Result_UpdateNameIOErrorZ(object _dummy, long ptr) : base(ptr) { }
+ ~Result_UpdateNameIOErrorZ() {
+ if (ptr != 0) { bindings.CResult_UpdateNameIOErrorZ_free(ptr); }
+ }
+
+ internal static Result_UpdateNameIOErrorZ constr_from_ptr(long ptr) {
+ if (bindings.CResult_UpdateNameIOErrorZ_is_ok(ptr)) {
+ return new Result_UpdateNameIOErrorZ_OK(null, ptr);
+ } else {
+ return new Result_UpdateNameIOErrorZ_Err(null, ptr);
+ }
+ }
+ public class Result_UpdateNameIOErrorZ_OK : Result_UpdateNameIOErrorZ {
+ public readonly UpdateName res;
+ internal Result_UpdateNameIOErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
+ long res = bindings.CResult_UpdateNameIOErrorZ_get_ok(ptr);
+ org.ldk.structs.UpdateName res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.UpdateName(null, res); }
+ if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); };
+ this.res = res_hu_conv;
+ }
+ }
+
+ public class Result_UpdateNameIOErrorZ_Err : Result_UpdateNameIOErrorZ {
+ public readonly IOError err;
+ internal Result_UpdateNameIOErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
+ this.err = bindings.CResult_UpdateNameIOErrorZ_get_err(ptr);
+ }
+ }
+
+ /**
+ * Creates a new CResult_UpdateNameIOErrorZ in the success state.
+ */
+ public static Result_UpdateNameIOErrorZ ok(org.ldk.structs.UpdateName o) {
+ long ret = bindings.CResult_UpdateNameIOErrorZ_ok(o.ptr);
+ GC.KeepAlive(o);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_UpdateNameIOErrorZ ret_hu_conv = Result_UpdateNameIOErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(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_UpdateNameIOErrorZ in the error state.
+ */
+ public static Result_UpdateNameIOErrorZ err(IOError e) {
+ long ret = bindings.CResult_UpdateNameIOErrorZ_err(e);
+ GC.KeepAlive(e);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_UpdateNameIOErrorZ ret_hu_conv = Result_UpdateNameIOErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if the given object is currently in the success state
+ */
+ public bool is_ok() {
+ bool ret = bindings.CResult_UpdateNameIOErrorZ_is_ok(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+}
+} } }
org.ldk.structs.RouteParameters _route_params_hu_conv = null; if (_route_params < 0 || _route_params > 4096) { _route_params_hu_conv = new org.ldk.structs.RouteParameters(null, _route_params); }
int _first_hops_conv_16_len = InternalUtils.getArrayLength(_first_hops);
ChannelDetails[] _first_hops_conv_16_arr = new ChannelDetails[_first_hops_conv_16_len];
- if (_first_hops != null) {
+ if (_first_hops != 0) {
for (int q = 0; q < _first_hops_conv_16_len; q++) {
long _first_hops_conv_16 = InternalUtils.getU64ArrayElem(_first_hops, q);
org.ldk.structs.ChannelDetails _first_hops_conv_16_hu_conv = null; if (_first_hops_conv_16 < 0 || _first_hops_conv_16 > 4096) { _first_hops_conv_16_hu_conv = new org.ldk.structs.ChannelDetails(null, _first_hops_conv_16); }
org.ldk.structs.RouteParameters _route_params_hu_conv = null; if (_route_params < 0 || _route_params > 4096) { _route_params_hu_conv = new org.ldk.structs.RouteParameters(null, _route_params); }
int _first_hops_conv_16_len = InternalUtils.getArrayLength(_first_hops);
ChannelDetails[] _first_hops_conv_16_arr = new ChannelDetails[_first_hops_conv_16_len];
- if (_first_hops != null) {
+ if (_first_hops != 0) {
for (int q = 0; q < _first_hops_conv_16_len; q++) {
long _first_hops_conv_16 = InternalUtils.getU64ArrayElem(_first_hops, q);
org.ldk.structs.ChannelDetails _first_hops_conv_16_hu_conv = null; if (_first_hops_conv_16 < 0 || _first_hops_conv_16 > 4096) { _first_hops_conv_16_hu_conv = new org.ldk.structs.ChannelDetails(null, _first_hops_conv_16); }
}
/** Creates a new instance of Router from a given implementation */
- public static Router new_impl(RouterInterface arg, MessageRouterInterface messageRouter_impl) {
+ public static Router new_impl(RouterInterface arg) {
LDKRouterHolder impl_holder = new LDKRouterHolder();
LDKRouterImpl impl = new LDKRouterImpl(arg, impl_holder);
- MessageRouter messageRouter = MessageRouter.new_impl(messageRouter_impl);
- long[] ptr_idx = bindings.LDKRouter_new(impl, messageRouter.instance_idx);
+ long[] ptr_idx = bindings.LDKRouter_new(impl);
impl_holder.held = new Router(null, ptr_idx[0]);
impl_holder.held.instance_idx = ptr_idx[1];
impl_holder.held.bindings_instance = impl;
- impl_holder.held.ptrs_to.AddLast(messageRouter);
return impl_holder.held;
}
public interface RoutingMessageHandlerInterface {
/**Handle an incoming `node_announcement` message, returning `true` if it should be forwarded on,
* `false` or returning an `Err` otherwise.
+ *
+ * If `their_node_id` is `None`, the message was generated by our own local node.
+ *
+ * Note that their_node_id (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- Result_boolLightningErrorZ handle_node_announcement(NodeAnnouncement msg);
+ Result_boolLightningErrorZ handle_node_announcement(byte[] their_node_id, NodeAnnouncement msg);
/**Handle a `channel_announcement` message, returning `true` if it should be forwarded on, `false`
* or returning an `Err` otherwise.
+ *
+ * If `their_node_id` is `None`, the message was generated by our own local node.
+ *
+ * Note that their_node_id (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- Result_boolLightningErrorZ handle_channel_announcement(ChannelAnnouncement msg);
+ Result_boolLightningErrorZ handle_channel_announcement(byte[] their_node_id, ChannelAnnouncement msg);
/**Handle an incoming `channel_update` message, returning true if it should be forwarded on,
* `false` or returning an `Err` otherwise.
+ *
+ * If `their_node_id` is `None`, the message was generated by our own local node.
+ *
+ * Note that their_node_id (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- Result_boolLightningErrorZ handle_channel_update(ChannelUpdate msg);
+ Result_boolLightningErrorZ handle_channel_update(byte[] their_node_id, ChannelUpdate msg);
/**Gets channel announcements and updates required to dump our routing table to a remote node,
* starting at the `short_channel_id` indicated by `starting_point` and including announcements
* for a single channel.
internal LDKRoutingMessageHandlerImpl(RoutingMessageHandlerInterface arg, LDKRoutingMessageHandlerHolder impl_holder) { this.arg = arg; this.impl_holder = impl_holder; }
private RoutingMessageHandlerInterface arg;
private LDKRoutingMessageHandlerHolder impl_holder;
- public long handle_node_announcement(long _msg) {
+ public long handle_node_announcement(long _their_node_id, long _msg) {
+ byte[] _their_node_id_conv = InternalUtils.decodeUint8Array(_their_node_id);
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);
+ Result_boolLightningErrorZ ret = arg.handle_node_announcement(_their_node_id_conv, _msg_hu_conv);
GC.KeepAlive(arg);
long result = ret.clone_ptr();
return result;
}
- public long handle_channel_announcement(long _msg) {
+ public long handle_channel_announcement(long _their_node_id, long _msg) {
+ byte[] _their_node_id_conv = InternalUtils.decodeUint8Array(_their_node_id);
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);
+ Result_boolLightningErrorZ ret = arg.handle_channel_announcement(_their_node_id_conv, _msg_hu_conv);
GC.KeepAlive(arg);
long result = ret.clone_ptr();
return result;
}
- public long handle_channel_update(long _msg) {
+ public long handle_channel_update(long _their_node_id, long _msg) {
+ byte[] _their_node_id_conv = InternalUtils.decodeUint8Array(_their_node_id);
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);
+ Result_boolLightningErrorZ ret = arg.handle_channel_update(_their_node_id_conv, _msg_hu_conv);
GC.KeepAlive(arg);
long result = ret.clone_ptr();
return result;
/**
* Handle an incoming `node_announcement` message, returning `true` if it should be forwarded on,
* `false` or returning an `Err` otherwise.
+ *
+ * If `their_node_id` is `None`, the message was generated by our own local node.
+ *
+ * Note that their_node_id (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public Result_boolLightningErrorZ handle_node_announcement(org.ldk.structs.NodeAnnouncement msg) {
- long ret = bindings.RoutingMessageHandler_handle_node_announcement(this.ptr, msg.ptr);
+ public Result_boolLightningErrorZ handle_node_announcement(byte[] their_node_id, org.ldk.structs.NodeAnnouncement msg) {
+ long ret = bindings.RoutingMessageHandler_handle_node_announcement(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr);
GC.KeepAlive(this);
+ GC.KeepAlive(their_node_id);
GC.KeepAlive(msg);
if (ret >= 0 && ret <= 4096) { return null; }
Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
/**
* Handle a `channel_announcement` message, returning `true` if it should be forwarded on, `false`
* or returning an `Err` otherwise.
+ *
+ * If `their_node_id` is `None`, the message was generated by our own local node.
+ *
+ * Note that their_node_id (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public Result_boolLightningErrorZ handle_channel_announcement(org.ldk.structs.ChannelAnnouncement msg) {
- long ret = bindings.RoutingMessageHandler_handle_channel_announcement(this.ptr, msg.ptr);
+ public Result_boolLightningErrorZ handle_channel_announcement(byte[] their_node_id, org.ldk.structs.ChannelAnnouncement msg) {
+ long ret = bindings.RoutingMessageHandler_handle_channel_announcement(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr);
GC.KeepAlive(this);
+ GC.KeepAlive(their_node_id);
GC.KeepAlive(msg);
if (ret >= 0 && ret <= 4096) { return null; }
Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
/**
* Handle an incoming `channel_update` message, returning true if it should be forwarded on,
* `false` or returning an `Err` otherwise.
+ *
+ * If `their_node_id` is `None`, the message was generated by our own local node.
+ *
+ * Note that their_node_id (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public Result_boolLightningErrorZ handle_channel_update(org.ldk.structs.ChannelUpdate msg) {
- long ret = bindings.RoutingMessageHandler_handle_channel_update(this.ptr, msg.ptr);
+ public Result_boolLightningErrorZ handle_channel_update(byte[] their_node_id, org.ldk.structs.ChannelUpdate msg) {
+ long ret = bindings.RoutingMessageHandler_handle_channel_update(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(their_node_id, 33)), msg.ptr);
GC.KeepAlive(this);
+ GC.KeepAlive(their_node_id);
GC.KeepAlive(msg);
if (ret >= 0 && ret <= 4096) { return null; }
Result_boolLightningErrorZ ret_hu_conv = Result_boolLightningErrorZ.constr_from_ptr(ret);
private LDKSignerProviderHolder impl_holder;
public long generate_channel_keys_id(bool _inbound, long _channel_value_satoshis, long _user_channel_id) {
org.ldk.util.UInt128 _user_channel_id_conv = new org.ldk.util.UInt128(_user_channel_id);
+ bindings.free_buffer(_user_channel_id);
byte[] ret = arg.generate_channel_keys_id(_inbound, _channel_value_satoshis, _user_channel_id_conv);
GC.KeepAlive(arg);
long result = InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(ret, 32));
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+/**
+ * A Tuple
+ */
+public class ThreeTuple_StrStrStrZ : CommonBase {
+ internal ThreeTuple_StrStrStrZ(object _dummy, long ptr) : base(ptr) { }
+ ~ThreeTuple_StrStrStrZ() {
+ if (ptr != 0) { bindings.C3Tuple_StrStrStrZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public string get_a() {
+ long ret = bindings.C3Tuple_StrStrStrZ_get_a(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ string ret_conv = InternalUtils.decodeString(ret);
+ return ret_conv;
+ }
+
+ /**
+ *
+ */
+ public string get_b() {
+ long ret = bindings.C3Tuple_StrStrStrZ_get_b(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ string ret_conv = InternalUtils.decodeString(ret);
+ return ret_conv;
+ }
+
+ /**
+ *
+ */
+ public string get_c() {
+ long ret = bindings.C3Tuple_StrStrStrZ_get_c(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ string ret_conv = InternalUtils.decodeString(ret);
+ return ret_conv;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.C3Tuple_StrStrStrZ_clone_ptr(this.ptr);
+ GC.KeepAlive(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_StrStrStrZ clone() {
+ long ret = bindings.C3Tuple_StrStrStrZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ ThreeTuple_StrStrStrZ ret_hu_conv = new ThreeTuple_StrStrStrZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C3Tuple_StrStrStrZ from the contained elements.
+ */
+ public static ThreeTuple_StrStrStrZ of(string a, string b, string c) {
+ long ret = bindings.C3Tuple_StrStrStrZ_new(InternalUtils.encodeString(a), InternalUtils.encodeString(b), InternalUtils.encodeString(c));
+ GC.KeepAlive(a);
+ GC.KeepAlive(b);
+ GC.KeepAlive(c);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ ThreeTuple_StrStrStrZ ret_hu_conv = new ThreeTuple_StrStrStrZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+/**
+ * A Tuple
+ */
+public class TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ : CommonBase {
+ internal TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ(object _dummy, long ptr) : base(ptr) { }
+ ~TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ() {
+ if (ptr != 0) { bindings.C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public TwoTuple_HumanReadableNameThirtyTwoBytesZ[] get_a() {
+ long ret = bindings.C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_get_a(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ int ret_conv_43_len = InternalUtils.getArrayLength(ret);
+ TwoTuple_HumanReadableNameThirtyTwoBytesZ[] ret_conv_43_arr = new TwoTuple_HumanReadableNameThirtyTwoBytesZ[ret_conv_43_len];
+ for (int r = 0; r < ret_conv_43_len; r++) {
+ long ret_conv_43 = InternalUtils.getU64ArrayElem(ret, r);
+ TwoTuple_HumanReadableNameThirtyTwoBytesZ ret_conv_43_hu_conv = new TwoTuple_HumanReadableNameThirtyTwoBytesZ(null, ret_conv_43);
+ if (ret_conv_43_hu_conv != null) { ret_conv_43_hu_conv.ptrs_to.AddLast(this); };
+ ret_conv_43_arr[r] = ret_conv_43_hu_conv;
+ }
+ bindings.free_buffer(ret);
+ return ret_conv_43_arr;
+ }
+
+ /**
+ *
+ */
+ public Offer get_b() {
+ long ret = bindings.C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_get_b(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.Offer ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Offer(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone_ptr(this.ptr);
+ GC.KeepAlive(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_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ clone() {
+ long ret = bindings.C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ ret_hu_conv = new TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ from the contained elements.
+ */
+ public static TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ of(TwoTuple_HumanReadableNameThirtyTwoBytesZ[] a, org.ldk.structs.Offer b) {
+ long ret = bindings.C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ_new(InternalUtils.encodeUint64Array(InternalUtils.mapArray(a, a_conv_43 => a_conv_43.ptr)), b.ptr);
+ GC.KeepAlive(a);
+ GC.KeepAlive(b);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ ret_hu_conv = new TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZOfferZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+/**
+ * A Tuple
+ */
+public class TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ : CommonBase {
+ internal TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ(object _dummy, long ptr) : base(ptr) { }
+ ~TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ() {
+ if (ptr != 0) { bindings.C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public TwoTuple_HumanReadableNameThirtyTwoBytesZ[] get_a() {
+ long ret = bindings.C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_a(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ int ret_conv_43_len = InternalUtils.getArrayLength(ret);
+ TwoTuple_HumanReadableNameThirtyTwoBytesZ[] ret_conv_43_arr = new TwoTuple_HumanReadableNameThirtyTwoBytesZ[ret_conv_43_len];
+ for (int r = 0; r < ret_conv_43_len; r++) {
+ long ret_conv_43 = InternalUtils.getU64ArrayElem(ret, r);
+ TwoTuple_HumanReadableNameThirtyTwoBytesZ ret_conv_43_hu_conv = new TwoTuple_HumanReadableNameThirtyTwoBytesZ(null, ret_conv_43);
+ if (ret_conv_43_hu_conv != null) { ret_conv_43_hu_conv.ptrs_to.AddLast(this); };
+ ret_conv_43_arr[r] = ret_conv_43_hu_conv;
+ }
+ bindings.free_buffer(ret);
+ return ret_conv_43_arr;
+ }
+
+ /**
+ *
+ */
+ public string get_b() {
+ long ret = bindings.C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_get_b(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ string ret_conv = InternalUtils.decodeString(ret);
+ return ret_conv;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone_ptr(this.ptr);
+ GC.KeepAlive(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_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ clone() {
+ long ret = bindings.C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ ret_hu_conv = new TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ from the contained elements.
+ */
+ public static TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ of(TwoTuple_HumanReadableNameThirtyTwoBytesZ[] a, string b) {
+ long ret = bindings.C2Tuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ_new(InternalUtils.encodeUint64Array(InternalUtils.mapArray(a, a_conv_43 => a_conv_43.ptr)), InternalUtils.encodeString(b));
+ GC.KeepAlive(a);
+ GC.KeepAlive(b);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ ret_hu_conv = new TwoTuple_CVec_C2Tuple_HumanReadableNameThirtyTwoBytesZZStrZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+/**
+ * A Tuple
+ */
+public class TwoTuple_DNSResolverMessageMessageSendInstructionsZ : CommonBase {
+ internal TwoTuple_DNSResolverMessageMessageSendInstructionsZ(object _dummy, long ptr) : base(ptr) { }
+ ~TwoTuple_DNSResolverMessageMessageSendInstructionsZ() {
+ if (ptr != 0) { bindings.C2Tuple_DNSResolverMessageMessageSendInstructionsZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public DNSResolverMessage get_a() {
+ long ret = bindings.C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_a(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.DNSResolverMessage ret_hu_conv = org.ldk.structs.DNSResolverMessage.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ *
+ */
+ public MessageSendInstructions get_b() {
+ long ret = bindings.C2Tuple_DNSResolverMessageMessageSendInstructionsZ_get_b(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.MessageSendInstructions ret_hu_conv = org.ldk.structs.MessageSendInstructions.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone_ptr(this.ptr);
+ GC.KeepAlive(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_DNSResolverMessageMessageSendInstructionsZ clone() {
+ long ret = bindings.C2Tuple_DNSResolverMessageMessageSendInstructionsZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_DNSResolverMessageMessageSendInstructionsZ ret_hu_conv = new TwoTuple_DNSResolverMessageMessageSendInstructionsZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_DNSResolverMessageMessageSendInstructionsZ from the contained elements.
+ */
+ public static TwoTuple_DNSResolverMessageMessageSendInstructionsZ of(org.ldk.structs.DNSResolverMessage a, org.ldk.structs.MessageSendInstructions b) {
+ long ret = bindings.C2Tuple_DNSResolverMessageMessageSendInstructionsZ_new(a.ptr, b.ptr);
+ GC.KeepAlive(a);
+ GC.KeepAlive(b);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_DNSResolverMessageMessageSendInstructionsZ ret_hu_conv = new TwoTuple_DNSResolverMessageMessageSendInstructionsZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+/**
+ * A Tuple
+ */
+public class TwoTuple_DNSResolverMessageResponseInstructionZ : CommonBase {
+ internal TwoTuple_DNSResolverMessageResponseInstructionZ(object _dummy, long ptr) : base(ptr) { }
+ ~TwoTuple_DNSResolverMessageResponseInstructionZ() {
+ if (ptr != 0) { bindings.C2Tuple_DNSResolverMessageResponseInstructionZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public DNSResolverMessage get_a() {
+ long ret = bindings.C2Tuple_DNSResolverMessageResponseInstructionZ_get_a(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.DNSResolverMessage ret_hu_conv = org.ldk.structs.DNSResolverMessage.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ *
+ */
+ public ResponseInstruction get_b() {
+ long ret = bindings.C2Tuple_DNSResolverMessageResponseInstructionZ_get_b(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ResponseInstruction ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ResponseInstruction(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.C2Tuple_DNSResolverMessageResponseInstructionZ_clone_ptr(this.ptr);
+ GC.KeepAlive(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_DNSResolverMessageResponseInstructionZ clone() {
+ long ret = bindings.C2Tuple_DNSResolverMessageResponseInstructionZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_DNSResolverMessageResponseInstructionZ ret_hu_conv = new TwoTuple_DNSResolverMessageResponseInstructionZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_DNSResolverMessageResponseInstructionZ from the contained elements.
+ */
+ public static TwoTuple_DNSResolverMessageResponseInstructionZ of(org.ldk.structs.DNSResolverMessage a, org.ldk.structs.ResponseInstruction b) {
+ long ret = bindings.C2Tuple_DNSResolverMessageResponseInstructionZ_new(a.ptr, b.ptr);
+ GC.KeepAlive(a);
+ GC.KeepAlive(b);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_DNSResolverMessageResponseInstructionZ ret_hu_conv = new TwoTuple_DNSResolverMessageResponseInstructionZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+/**
+ * A Tuple
+ */
+public class TwoTuple_DNSSECQueryDNSResolverContextZ : CommonBase {
+ internal TwoTuple_DNSSECQueryDNSResolverContextZ(object _dummy, long ptr) : base(ptr) { }
+ ~TwoTuple_DNSSECQueryDNSResolverContextZ() {
+ if (ptr != 0) { bindings.C2Tuple_DNSSECQueryDNSResolverContextZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public DNSSECQuery get_a() {
+ long ret = bindings.C2Tuple_DNSSECQueryDNSResolverContextZ_get_a(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.DNSSECQuery ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.DNSSECQuery(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ *
+ */
+ public DNSResolverContext get_b() {
+ long ret = bindings.C2Tuple_DNSSECQueryDNSResolverContextZ_get_b(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.DNSResolverContext ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.DNSResolverContext(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.C2Tuple_DNSSECQueryDNSResolverContextZ_clone_ptr(this.ptr);
+ GC.KeepAlive(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_DNSSECQueryDNSResolverContextZ clone() {
+ long ret = bindings.C2Tuple_DNSSECQueryDNSResolverContextZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_DNSSECQueryDNSResolverContextZ ret_hu_conv = new TwoTuple_DNSSECQueryDNSResolverContextZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_DNSSECQueryDNSResolverContextZ from the contained elements.
+ */
+ public static TwoTuple_DNSSECQueryDNSResolverContextZ of(org.ldk.structs.DNSSECQuery a, org.ldk.structs.DNSResolverContext b) {
+ long ret = bindings.C2Tuple_DNSSECQueryDNSResolverContextZ_new(a.ptr, b.ptr);
+ GC.KeepAlive(a);
+ GC.KeepAlive(b);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_DNSSECQueryDNSResolverContextZ ret_hu_conv = new TwoTuple_DNSSECQueryDNSResolverContextZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+/**
+ * A Tuple
+ */
+public class TwoTuple_HumanReadableNameThirtyTwoBytesZ : CommonBase {
+ internal TwoTuple_HumanReadableNameThirtyTwoBytesZ(object _dummy, long ptr) : base(ptr) { }
+ ~TwoTuple_HumanReadableNameThirtyTwoBytesZ() {
+ if (ptr != 0) { bindings.C2Tuple_HumanReadableNameThirtyTwoBytesZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public HumanReadableName get_a() {
+ long ret = bindings.C2Tuple_HumanReadableNameThirtyTwoBytesZ_get_a(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.HumanReadableName ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.HumanReadableName(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ *
+ */
+ public byte[] get_b() {
+ long ret = bindings.C2Tuple_HumanReadableNameThirtyTwoBytesZ_get_b(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone_ptr(this.ptr);
+ GC.KeepAlive(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_HumanReadableNameThirtyTwoBytesZ clone() {
+ long ret = bindings.C2Tuple_HumanReadableNameThirtyTwoBytesZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_HumanReadableNameThirtyTwoBytesZ ret_hu_conv = new TwoTuple_HumanReadableNameThirtyTwoBytesZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_HumanReadableNameThirtyTwoBytesZ from the contained elements.
+ */
+ public static TwoTuple_HumanReadableNameThirtyTwoBytesZ of(org.ldk.structs.HumanReadableName a, byte[] b) {
+ long ret = bindings.C2Tuple_HumanReadableNameThirtyTwoBytesZ_new(a.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(b, 32)));
+ GC.KeepAlive(a);
+ GC.KeepAlive(b);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_HumanReadableNameThirtyTwoBytesZ ret_hu_conv = new TwoTuple_HumanReadableNameThirtyTwoBytesZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+}
+} } }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+/**
+ * A Tuple
+ */
+public class TwoTuple_PublicKeyChannelIdZ : CommonBase {
+ internal TwoTuple_PublicKeyChannelIdZ(object _dummy, long ptr) : base(ptr) { }
+ ~TwoTuple_PublicKeyChannelIdZ() {
+ if (ptr != 0) { bindings.C2Tuple_PublicKeyChannelIdZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public byte[] get_a() {
+ long ret = bindings.C2Tuple_PublicKeyChannelIdZ_get_a(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
+ /**
+ *
+ */
+ public ChannelId get_b() {
+ long ret = bindings.C2Tuple_PublicKeyChannelIdZ_get_b(this.ptr);
+ GC.KeepAlive(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.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.C2Tuple_PublicKeyChannelIdZ_clone_ptr(this.ptr);
+ GC.KeepAlive(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_PublicKeyChannelIdZ clone() {
+ long ret = bindings.C2Tuple_PublicKeyChannelIdZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_PublicKeyChannelIdZ ret_hu_conv = new TwoTuple_PublicKeyChannelIdZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_PublicKeyChannelIdZ from the contained elements.
+ */
+ public static TwoTuple_PublicKeyChannelIdZ of(byte[] a, org.ldk.structs.ChannelId b) {
+ long ret = bindings.C2Tuple_PublicKeyChannelIdZ_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 33)), b.ptr);
+ GC.KeepAlive(a);
+ GC.KeepAlive(b);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_PublicKeyChannelIdZ ret_hu_conv = new TwoTuple_PublicKeyChannelIdZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+}
+} } }
/**
* 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.encodeUint8Array(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));
+ public static TwoTuple_ThirtyTwoBytesChannelManagerZ of(byte[] a, FeeEstimator b_fee_est, Watch b_chain_monitor, BroadcasterInterface b_tx_broadcaster, Router b_router, MessageRouter b_message_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.encodeUint8Array(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_message_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));
GC.KeepAlive(a);
GC.KeepAlive(b_fee_est);
GC.KeepAlive(b_chain_monitor);
GC.KeepAlive(b_tx_broadcaster);
GC.KeepAlive(b_router);
+ GC.KeepAlive(b_message_router);
GC.KeepAlive(b_logger);
GC.KeepAlive(b_entropy_source);
GC.KeepAlive(b_node_signer);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_chain_monitor); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_tx_broadcaster); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_router); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_message_router); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_logger); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_entropy_source); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_node_signer); };
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+/**
+ * A Tuple
+ */
+public class TwoTuple_boolboolZ : CommonBase {
+ internal TwoTuple_boolboolZ(object _dummy, long ptr) : base(ptr) { }
+ ~TwoTuple_boolboolZ() {
+ if (ptr != 0) { bindings.C2Tuple_boolboolZ_free(ptr); }
+ }
+
+ /**
+ *
+ */
+ public bool get_a() {
+ bool ret = bindings.C2Tuple_boolboolZ_get_a(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ *
+ */
+ public bool get_b() {
+ bool ret = bindings.C2Tuple_boolboolZ_get_b(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.C2Tuple_boolboolZ_clone_ptr(this.ptr);
+ GC.KeepAlive(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_boolboolZ clone() {
+ long ret = bindings.C2Tuple_boolboolZ_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_boolboolZ ret_hu_conv = new TwoTuple_boolboolZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates a new C2Tuple_boolboolZ from the contained elements.
+ */
+ public static TwoTuple_boolboolZ of(bool a, bool b) {
+ long ret = bindings.C2Tuple_boolboolZ_new(a, b);
+ GC.KeepAlive(a);
+ GC.KeepAlive(b);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ TwoTuple_boolboolZ ret_hu_conv = new TwoTuple_boolboolZ(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+}
+} } }
/**
- * A tx_abort message which signals the cancellation of an in-progress transaction negotiation.
+ * A [`tx_abort`] message which signals the cancellation of an in-progress transaction negotiation.
+ *
+ * [`tx_abort`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-tx_abort-message
*/
public class TxAbort : CommonBase {
internal TxAbort(object _dummy, long ptr) : base(ptr) { }
/**
- * A tx_ack_rbf message which acknowledges replacement of the transaction after it's been
+ * A [`tx_ack_rbf`] message which acknowledges replacement of the transaction after it's been
* completed.
+ *
+ * [`tx_ack_rbf`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-tx_ack_rbf-message
*/
public class TxAckRbf : CommonBase {
internal TxAckRbf(object _dummy, long ptr) : base(ptr) { }
/**
- * A tx_add_input message for adding an input during interactive transaction construction
+ * A [`tx_add_input`] message for adding an input during interactive transaction construction
+ *
+ * [`tx_add_input`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-tx_add_input-message
*/
public class TxAddInput : CommonBase {
internal TxAddInput(object _dummy, long ptr) : base(ptr) { }
/**
- * A tx_add_output message for adding an output during interactive transaction construction.
+ * A [`tx_add_output`] message for adding an output during interactive transaction construction.
+ *
+ * [`tx_add_output`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-tx_add_output-message
*/
public class TxAddOutput : CommonBase {
internal TxAddOutput(object _dummy, long ptr) : base(ptr) { }
/**
- * A tx_complete message signalling the conclusion of a peer's transaction contributions during
+ * [`A tx_complete`] message signalling the conclusion of a peer's transaction contributions during
* interactive transaction construction.
+ *
+ * [`tx_complete`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-tx_complete-message
*/
public class TxComplete : CommonBase {
internal TxComplete(object _dummy, long ptr) : base(ptr) { }
/**
- * A tx_init_rbf message which initiates a replacement of the transaction after it's been
+ * A [`tx_init_rbf`] message which initiates a replacement of the transaction after it's been
* completed.
+ *
+ * [`tx_init_rbf`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-tx_init_rbf-message
*/
public class TxInitRbf : CommonBase {
internal TxInitRbf(object _dummy, long ptr) : base(ptr) { }
/**
- * A tx_remove_input message for removing an input during interactive transaction construction.
+ * A [`tx_remove_input`] message for removing an input during interactive transaction construction.
+ *
+ * [`tx_remove_input`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-tx_remove_input-and-tx_remove_output-messages
*/
public class TxRemoveInput : CommonBase {
internal TxRemoveInput(object _dummy, long ptr) : base(ptr) { }
/**
- * A tx_remove_output message for removing an output during interactive transaction construction.
+ * A [`tx_remove_output`] message for removing an output during interactive transaction construction.
+ *
+ * [`tx_remove_output`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-tx_remove_input-and-tx_remove_output-messages
*/
public class TxRemoveOutput : CommonBase {
internal TxRemoveOutput(object _dummy, long ptr) : base(ptr) { }
/**
- * A tx_signatures message containing the sender's signatures for a transaction constructed with
+ * A [`tx_signatures`] message containing the sender's signatures for a transaction constructed with
* interactive transaction construction.
+ *
+ * [`tx_signatures`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-tx_signatures-message
*/
public class TxSignatures : CommonBase {
internal TxSignatures(object _dummy, long ptr) : base(ptr) { }
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+/**
+ * An unauthenticated [`ReceiveTlvs`].
+ */
+public class UnauthenticatedReceiveTlvs : CommonBase {
+ internal UnauthenticatedReceiveTlvs(object _dummy, long ptr) : base(ptr) { }
+ ~UnauthenticatedReceiveTlvs() {
+ if (ptr != 0) { bindings.UnauthenticatedReceiveTlvs_free(ptr); }
+ }
+
+ /**
+ * Constructs a new Verification which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned Verification must be freed before this_arg is
+ */
+ public Verification as_Verification() {
+ long ret = bindings.UnauthenticatedReceiveTlvs_as_Verification(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Verification ret_hu_conv = new Verification(null, ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Used to authenticate the sender of a payment to the receiver and tie MPP HTLCs together.
+ */
+ public byte[] get_payment_secret() {
+ long ret = bindings.UnauthenticatedReceiveTlvs_get_payment_secret(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
+ /**
+ * Used to authenticate the sender of a payment to the receiver and tie MPP HTLCs together.
+ */
+ public void set_payment_secret(byte[] val) {
+ bindings.UnauthenticatedReceiveTlvs_set_payment_secret(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 32)));
+ GC.KeepAlive(this);
+ GC.KeepAlive(val);
+ }
+
+ /**
+ * Constraints for the receiver of this payment.
+ */
+ public PaymentConstraints get_payment_constraints() {
+ long ret = bindings.UnauthenticatedReceiveTlvs_get_payment_constraints(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.PaymentConstraints ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PaymentConstraints(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Constraints for the receiver of this payment.
+ */
+ public void set_payment_constraints(org.ldk.structs.PaymentConstraints val) {
+ bindings.UnauthenticatedReceiveTlvs_set_payment_constraints(this.ptr, val.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(val);
+ }
+
+ /**
+ * Context for the receiver of this payment.
+ */
+ public PaymentContext get_payment_context() {
+ long ret = bindings.UnauthenticatedReceiveTlvs_get_payment_context(this.ptr);
+ GC.KeepAlive(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.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Context for the receiver of this payment.
+ */
+ public void set_payment_context(org.ldk.structs.PaymentContext val) {
+ bindings.UnauthenticatedReceiveTlvs_set_payment_context(this.ptr, val.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(val);
+ }
+
+ /**
+ * Constructs a new UnauthenticatedReceiveTlvs given each field
+ */
+ public static UnauthenticatedReceiveTlvs of(byte[] payment_secret_arg, org.ldk.structs.PaymentConstraints payment_constraints_arg, org.ldk.structs.PaymentContext payment_context_arg) {
+ long ret = bindings.UnauthenticatedReceiveTlvs_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_secret_arg, 32)), payment_constraints_arg.ptr, payment_context_arg.ptr);
+ GC.KeepAlive(payment_secret_arg);
+ GC.KeepAlive(payment_constraints_arg);
+ GC.KeepAlive(payment_context_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.UnauthenticatedReceiveTlvs ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnauthenticatedReceiveTlvs(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ internal long clone_ptr() {
+ long ret = bindings.UnauthenticatedReceiveTlvs_clone_ptr(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the UnauthenticatedReceiveTlvs
+ */
+ public UnauthenticatedReceiveTlvs clone() {
+ long ret = bindings.UnauthenticatedReceiveTlvs_clone(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.UnauthenticatedReceiveTlvs ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UnauthenticatedReceiveTlvs(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Creates an authenticated [`ReceiveTlvs`], which includes an HMAC and the provide [`Nonce`]
+ * that can be use later to verify it authenticity.
+ */
+ public ReceiveTlvs authenticate(org.ldk.structs.Nonce nonce, org.ldk.structs.ExpandedKey expanded_key) {
+ long ret = bindings.UnauthenticatedReceiveTlvs_authenticate(this.ptr, nonce.ptr, expanded_key.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(nonce);
+ GC.KeepAlive(expanded_key);
+ 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.AddLast(this); };
+ if (this != null) { this.ptrs_to.AddLast(expanded_key); };
+ ;
+ return ret_hu_conv;
+ }
+
+ /**
+ * Serialize the UnauthenticatedReceiveTlvs object into a byte array which can be read by UnauthenticatedReceiveTlvs_read
+ */
+ public byte[] write() {
+ long ret = bindings.UnauthenticatedReceiveTlvs_write(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
+}
+} } }
+++ /dev/null
-using org.ldk.impl;
-using org.ldk.enums;
-using org.ldk.util;
-using System;
-
-namespace org { namespace ldk { namespace structs {
-
-
-/**
- * An unknown payment context.
- */
-public class UnknownPaymentContext : CommonBase {
- internal UnknownPaymentContext(object _dummy, long ptr) : base(ptr) { }
- ~UnknownPaymentContext() {
- if (ptr != 0) { bindings.UnknownPaymentContext_free(ptr); }
- }
-
- internal long clone_ptr() {
- long ret = bindings.UnknownPaymentContext_clone_ptr(this.ptr);
- GC.KeepAlive(this);
- return ret;
- }
-
- /**
- * Creates a copy of the UnknownPaymentContext
- */
- public UnknownPaymentContext clone() {
- long ret = bindings.UnknownPaymentContext_clone(this.ptr);
- GC.KeepAlive(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.AddLast(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 bool eq(org.ldk.structs.UnknownPaymentContext b) {
- bool ret = bindings.UnknownPaymentContext_eq(this.ptr, b.ptr);
- GC.KeepAlive(this);
- GC.KeepAlive(b);
- if (this != null) { this.ptrs_to.AddLast(b); };
- return ret;
- }
-
- public override bool Equals(object o) {
- if (!(o is 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() {
- long ret = bindings.UnknownPaymentContext_write(this.ptr);
- GC.KeepAlive(this);
- if (ret >= 0 && ret <= 4096) { return null; }
- byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
- return ret_conv;
- }
-
- /**
- * Read a UnknownPaymentContext from a byte array, created by UnknownPaymentContext_write
- */
- public static Result_UnknownPaymentContextDecodeErrorZ read(byte[] ser) {
- long ret = bindings.UnknownPaymentContext_read(InternalUtils.encodeUint8Array(ser));
- GC.KeepAlive(ser);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_UnknownPaymentContextDecodeErrorZ ret_hu_conv = Result_UnknownPaymentContextDecodeErrorZ.constr_from_ptr(ret);
- return ret_hu_conv;
- }
-
-}
-} } }
return ret_hu_conv;
}
+ /**
+ * Paths to the recipient originating from publicly reachable nodes, including information
+ * needed for routing payments across them.
+ *
+ * Blinded paths provide recipient privacy by obfuscating its node id. Note, however, that this
+ * privacy is lost if a public node id is used for
+ * [`UnsignedBolt12Invoice::signing_pubkey`].
+ */
+ public BlindedPaymentPath[] payment_paths() {
+ long ret = bindings.UnsignedBolt12Invoice_payment_paths(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ int ret_conv_20_len = InternalUtils.getArrayLength(ret);
+ BlindedPaymentPath[] ret_conv_20_arr = new BlindedPaymentPath[ret_conv_20_len];
+ for (int u = 0; u < ret_conv_20_len; u++) {
+ long ret_conv_20 = InternalUtils.getU64ArrayElem(ret, u);
+ org.ldk.structs.BlindedPaymentPath ret_conv_20_hu_conv = null; if (ret_conv_20 < 0 || ret_conv_20 > 4096) { ret_conv_20_hu_conv = new org.ldk.structs.BlindedPaymentPath(null, ret_conv_20); }
+ if (ret_conv_20_hu_conv != null) { ret_conv_20_hu_conv.ptrs_to.AddLast(this); };
+ ret_conv_20_arr[u] = ret_conv_20_hu_conv;
+ }
+ bindings.free_buffer(ret);
+ return ret_conv_20_arr;
+ }
+
/**
* Duration since the Unix epoch when the invoice was created.
*/
/**
* Duration since
- * [`Bolt12Invoice::created_at`]
+ * [`UnsignedBolt12Invoice::created_at`]
* when the invoice has expired and therefore should no longer be paid.
*/
public long relative_expiry() {
}
/**
- * The public key corresponding to the key used to sign the invoice.
+ * A typically transient public key corresponding to the key used to sign the invoice.
+ *
+ * If the invoices was created in response to an [`Offer`], then this will be:
+ * - [`Offer::issuer_signing_pubkey`] if it's `Some`, otherwise
+ * - the final blinded node id from a [`BlindedMessagePath`] in [`Offer::paths`] if `None`.
+ *
+ * If the invoice was created in response to a [`Refund`], then it is a valid pubkey chosen by
+ * the recipient.
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ * [`Offer::issuer_signing_pubkey`]: crate::offers::offer::Offer::issuer_signing_pubkey
+ * [`Offer::paths`]: crate::offers::offer::Offer::paths
+ * [`Refund`]: crate::offers::refund::Refund
*/
public byte[] signing_pubkey() {
long ret = bindings.UnsignedBolt12Invoice_signing_pubkey(this.ptr);
return ret_hu_conv;
}
+ /**
+ * The public key used by the recipient to sign invoices.
+ *
+ * From [`Offer::issuer_signing_pubkey`] and may be `None`; also `None` if the invoice was
+ * created in response to a [`Refund`].
+ *
+ * [`Offer::issuer_signing_pubkey`]: crate::offers::offer::Offer::issuer_signing_pubkey
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public byte[] issuer_signing_pubkey() {
+ long ret = bindings.UnsignedBolt12Invoice_issuer_signing_pubkey(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
/**
* An unpredictable series of bytes from the payer.
*
*
* [`message_paths`]: Self::message_paths
*/
- public byte[] payer_id() {
- long ret = bindings.UnsignedBolt12Invoice_payer_id(this.ptr);
+ public byte[] payer_signing_pubkey() {
+ long ret = bindings.UnsignedBolt12Invoice_payer_signing_pubkey(this.ptr);
GC.KeepAlive(this);
if (ret >= 0 && ret <= 4096) { return null; }
byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
}
/**
- * The public key used by the recipient to sign invoices.
+ * The public key corresponding to the key used by the recipient to sign invoices.
+ * - If [`Offer::paths`] is empty, MUST be `Some` and contain the recipient's node id for
+ * sending an [`InvoiceRequest`].
+ * - If [`Offer::paths`] is not empty, MAY be `Some` and contain a transient id.
+ * - If `None`, the signing pubkey will be the final blinded node id from the
+ * [`BlindedMessagePath`] in [`Offer::paths`] used to send the [`InvoiceRequest`].
+ *
+ * See also [`Bolt12Invoice::signing_pubkey`].
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Bolt12Invoice::signing_pubkey`]: crate::offers::invoice::Bolt12Invoice::signing_pubkey
*
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public byte[] signing_pubkey() {
- long ret = bindings.UnsignedInvoiceRequest_signing_pubkey(this.ptr);
+ public byte[] issuer_signing_pubkey() {
+ long ret = bindings.UnsignedInvoiceRequest_issuer_signing_pubkey(this.ptr);
GC.KeepAlive(this);
if (ret >= 0 && ret <= 4096) { return null; }
byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
/**
* An unpredictable series of bytes, typically containing information about the derivation of
- * [`payer_id`].
+ * [`payer_signing_pubkey`].
*
- * [`payer_id`]: Self::payer_id
+ * [`payer_signing_pubkey`]: Self::payer_signing_pubkey
*/
public byte[] payer_metadata() {
long ret = bindings.UnsignedInvoiceRequest_payer_metadata(this.ptr);
return ret_hu_conv;
}
+ /**
+ * Returns whether an amount was set in the request; otherwise, if [`amount_msats`] is `Some`
+ * then it was inferred from the [`Offer::amount`] and [`quantity`].
+ *
+ * [`amount_msats`]: Self::amount_msats
+ * [`quantity`]: Self::quantity
+ */
+ public bool has_amount_msats() {
+ bool ret = bindings.UnsignedInvoiceRequest_has_amount_msats(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
/**
* Features pertaining to requesting an invoice.
*/
/**
* A possibly transient pubkey used to sign the invoice request.
*/
- public byte[] payer_id() {
- long ret = bindings.UnsignedInvoiceRequest_payer_id(this.ptr);
+ public byte[] payer_signing_pubkey() {
+ long ret = bindings.UnsignedInvoiceRequest_payer_signing_pubkey(this.ptr);
GC.KeepAlive(this);
if (ret >= 0 && ret <= 4096) { return null; }
byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
return ret_hu_conv;
}
+ /**
+ * If the [`Offer`] was sourced from a BIP 353 Human Readable Name, this should be set by the
+ * builder to indicate the original [`HumanReadableName`] which was resolved.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public HumanReadableName offer_from_hrn() {
+ long ret = bindings.UnsignedInvoiceRequest_offer_from_hrn(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.HumanReadableName ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.HumanReadableName(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ return ret_hu_conv;
+ }
+
/**
* Serialize the UnsignedInvoiceRequest object into a byte array which can be read by UnsignedInvoiceRequest_read
*/
--- /dev/null
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+/**
+ * A struct representing a name for a channel monitor update.
+ *
+ * [`UpdateName`] is primarily used within the [`MonitorUpdatingPersister`] in
+ * functions that store or retrieve partial updates to channel monitors. It
+ * provides a consistent way to generate and parse unique identifiers for
+ * monitor updates based on their sequence number.
+ *
+ * The name is derived from the update's sequence ID, which is a monotonically
+ * increasing u64 value. This format allows for easy ordering of updates and
+ * efficient storage and retrieval in key-value stores.
+ *
+ * # Usage
+ *
+ * While users of the Lightning Dev Kit library generally won't need to
+ * interact with `UpdateName` directly, it still can be useful for custom
+ * persistence implementations. The u64 value is the update_id that can be
+ * compared with [ChannelMonitor::get_latest_update_id] to check if this update
+ * has been applied to the channel monitor or not, which is useful for pruning
+ * stale channel monitor updates off persistence.
+ *
+ * # Examples
+ *
+ * ```
+ * use lightning::util::persist::UpdateName;
+ *
+ * let update_id: u64 = 42;
+ * let update_name = UpdateName::from(update_id);
+ * assert_eq!(update_name.as_str(), \"42\");
+ *
+ * Using UpdateName to generate a storage key
+ * let monitor_name = \"some_monitor_name\";
+ * let storage_key = format!(\"channel_monitor_updates/{}/{}\", monitor_name, update_name.as_str());
+ * ```
+ */
+public class UpdateName : CommonBase {
+ internal UpdateName(object _dummy, long ptr) : base(ptr) { }
+ ~UpdateName() {
+ if (ptr != 0) { bindings.UpdateName_free(ptr); }
+ }
+
+ public long get_a() {
+ long ret = bindings.UpdateName_get_a(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
+ public void set_a(long val) {
+ bindings.UpdateName_set_a(this.ptr, val);
+ GC.KeepAlive(this);
+ GC.KeepAlive(val);
+ }
+
+ /**
+ * Constructs an [`UpdateName`], after verifying that an update sequence ID
+ * can be derived from the given `name`.
+ */
+ public static Result_UpdateNameIOErrorZ of(string name) {
+ long ret = bindings.UpdateName_new(InternalUtils.encodeString(name));
+ GC.KeepAlive(name);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_UpdateNameIOErrorZ ret_hu_conv = Result_UpdateNameIOErrorZ.constr_from_ptr(ret);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Convert this update name to a string slice.
+ *
+ * This method is particularly useful when you need to use the update name
+ * as part of a key in a key-value store or when logging.
+ *
+ * # Examples
+ *
+ * ```
+ * use lightning::util::persist::UpdateName;
+ *
+ * let update_name = UpdateName::from(42);
+ * assert_eq!(update_name.as_str(), \"42\");
+ * ```
+ */
+ public string as_str() {
+ long ret = bindings.UpdateName_as_str(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ string ret_conv = InternalUtils.decodeString(ret);
+ return ret_conv;
+ }
+
+}
+} } }
GC.KeepAlive(val);
}
- /**
- * If this is set to `false`, when receiving a keysend payment we'll fail it if it has multiple
- * parts. If this is set to `true`, we'll accept the payment.
- *
- * Setting this to `true` will break backwards compatibility upon downgrading to an LDK
- * version prior to 0.0.116 while receiving an MPP keysend. If we have already received an MPP
- * keysend, downgrading will cause us to fail to deserialize [`ChannelManager`].
- *
- * Default value: `false`
- *
- * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
- */
- public bool get_accept_mpp_keysend() {
- bool ret = bindings.UserConfig_get_accept_mpp_keysend(this.ptr);
- GC.KeepAlive(this);
- return ret;
- }
-
- /**
- * If this is set to `false`, when receiving a keysend payment we'll fail it if it has multiple
- * parts. If this is set to `true`, we'll accept the payment.
- *
- * Setting this to `true` will break backwards compatibility upon downgrading to an LDK
- * version prior to 0.0.116 while receiving an MPP keysend. If we have already received an MPP
- * keysend, downgrading will cause us to fail to deserialize [`ChannelManager`].
- *
- * Default value: `false`
- *
- * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
- */
- public void set_accept_mpp_keysend(bool val) {
- bindings.UserConfig_set_accept_mpp_keysend(this.ptr, val);
- GC.KeepAlive(this);
- GC.KeepAlive(val);
- }
-
/**
* If this is set to `true`, the user needs to manually pay [`Bolt12Invoice`]s when received.
*
/**
* 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, bool accept_forwards_to_priv_channels_arg, bool accept_inbound_channels_arg, bool manually_accept_inbound_channels_arg, bool accept_intercept_htlcs_arg, bool accept_mpp_keysend_arg, bool manually_handle_bolt12_invoices_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, manually_handle_bolt12_invoices_arg);
+ 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, bool accept_forwards_to_priv_channels_arg, bool accept_inbound_channels_arg, bool manually_accept_inbound_channels_arg, bool accept_intercept_htlcs_arg, bool manually_handle_bolt12_invoices_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, manually_handle_bolt12_invoices_arg);
GC.KeepAlive(channel_handshake_config_arg);
GC.KeepAlive(channel_handshake_limits_arg);
GC.KeepAlive(channel_config_arg);
GC.KeepAlive(accept_inbound_channels_arg);
GC.KeepAlive(manually_accept_inbound_channels_arg);
GC.KeepAlive(accept_intercept_htlcs_arg);
- GC.KeepAlive(accept_mpp_keysend_arg);
GC.KeepAlive(manually_handle_bolt12_invoices_arg);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.structs.UserConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UserConfig(null, ret); }
GC.KeepAlive(le_bytes);
if (ret >= 0 && ret <= 4096) { return null; }
org.ldk.util.UInt128 ret_conv = new org.ldk.util.UInt128(ret);
+ bindings.free_buffer(ret);
return ret_conv;
}
return ret;
}
+ /**
+ * Migrates all data from one store to another.
+ *
+ * This operation assumes that `target_store` is empty, i.e., any data present under copied keys
+ * might get overriden. User must ensure `source_store` is not modified during operation,
+ * otherwise no consistency guarantees can be given.
+ *
+ * Will abort and return an error if any IO operation fails. Note that in this case the
+ * `target_store` might get left in an intermediate state.
+ */
+ public static Result_NoneIOErrorZ migrate_kv_store_data(org.ldk.structs.MigratableKVStore source_store, org.ldk.structs.MigratableKVStore target_store) {
+ long ret = bindings.migrate_kv_store_data(source_store.ptr, target_store.ptr);
+ GC.KeepAlive(source_store);
+ GC.KeepAlive(target_store);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_NoneIOErrorZ ret_hu_conv = Result_NoneIOErrorZ.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(source_store); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(target_store); };
+ return ret_hu_conv;
+ }
+
/**
* Read previously persisted [`ChannelMonitor`]s from the store.
*/
*
* [`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, bool accept_mpp_keysend, bool allow_skimmed_fees) {
- long ret = bindings.peel_payment_onion(msg.ptr, node_signer.ptr, logger.ptr, cur_height, accept_mpp_keysend, allow_skimmed_fees);
+ 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, bool allow_skimmed_fees) {
+ long ret = bindings.peel_payment_onion(msg.ptr, node_signer.ptr, logger.ptr, cur_height, allow_skimmed_fees);
GC.KeepAlive(msg);
GC.KeepAlive(node_signer);
GC.KeepAlive(logger);
GC.KeepAlive(cur_height);
- GC.KeepAlive(accept_mpp_keysend);
GC.KeepAlive(allow_skimmed_fees);
if (ret >= 0 && ret <= 4096) { return null; }
Result_PendingHTLCInfoInboundHTLCErrZ ret_hu_conv = Result_PendingHTLCInfoInboundHTLCErrZ.constr_from_ptr(ret);
/**
* 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(InternalUtils.encodeUint8Array(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, InternalUtils.encodeUint64Array(InternalUtils.mapArray(arg_channel_monitors, arg_channel_monitors_conv_16 => arg_channel_monitors_conv_16.ptr))));
+ 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, MessageRouter arg_message_router, Logger arg_logger, UserConfig arg_default_config, ChannelMonitor[] arg_channel_monitors) {
+ long ret = bindings.C2Tuple_ThirtyTwoBytesChannelManagerZ_read(InternalUtils.encodeUint8Array(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_message_router.ptr, arg_logger.ptr, arg_default_config.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(arg_channel_monitors, arg_channel_monitors_conv_16 => arg_channel_monitors_conv_16.ptr))));
GC.KeepAlive(ser);
GC.KeepAlive(arg_entropy_source);
GC.KeepAlive(arg_node_signer);
GC.KeepAlive(arg_chain_monitor);
GC.KeepAlive(arg_tx_broadcaster);
GC.KeepAlive(arg_router);
+ GC.KeepAlive(arg_message_router);
GC.KeepAlive(arg_logger);
GC.KeepAlive(arg_default_config);
GC.KeepAlive(arg_channel_monitors);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_chain_monitor); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_tx_broadcaster); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_router); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_message_router); };
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_logger); };
;
foreach (ChannelMonitor arg_channel_monitors_conv_16 in arg_channel_monitors) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(arg_channel_monitors_conv_16); }; };
* `ChannelManager` is required. Useful for generating invoices for [phantom node payments] without
* a `ChannelManager`.
*
- * `keys` is generated by calling [`NodeSigner::get_inbound_payment_key_material`] and then
- * calling [`ExpandedKey::new`] with its result. It is recommended to cache this value and not
- * regenerate it for each new inbound payment.
+ * `keys` is generated by calling [`NodeSigner::get_inbound_payment_key`]. It is recommended to
+ * cache this value and not regenerate it for each new inbound payment.
*
* `current_time` is a Unix timestamp representing the current time.
*
* on versions of LDK prior to 0.0.114.
*
* [phantom node payments]: crate::sign::PhantomKeysManager
- * [`NodeSigner::get_inbound_payment_key_material`]: crate::sign::NodeSigner::get_inbound_payment_key_material
+ * [`NodeSigner::get_inbound_payment_key`]: crate::sign::NodeSigner::get_inbound_payment_key
*/
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.ptr, min_value_msat.ptr, invoice_expiry_delta_secs, entropy_source.ptr, current_time, min_final_cltv_expiry_delta.ptr);
* [`PhantomRouteHints::channels`]: crate::ln::channelmanager::PhantomRouteHints::channels
* [`MIN_FINAL_CLTV_EXPIRY_DETLA`]: crate::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA
*
- * This can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
- * available and the current time is supplied by the caller.
+ * This can be used in a `no_std` environment, where [`std::time::SystemTime`] is not 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, 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, 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, InternalUtils.encodeString(description), invoice_expiry_delta_secs, InternalUtils.encodeUint64Array(InternalUtils.mapArray(phantom_route_hints, phantom_route_hints_conv_19 => phantom_route_hints_conv_19.ptr)), entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch);
* [`ChannelManager::create_inbound_payment_for_hash`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash
* [`PhantomRouteHints::channels`]: crate::ln::channelmanager::PhantomRouteHints::channels
*
- * This can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
- * available and the current time is supplied by the caller.
+ * This version can be used in a `no_std` environment, where [`std::time::SystemTime`] is not 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, 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.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(phantom_route_hints, phantom_route_hints_conv_19 => phantom_route_hints_conv_19.ptr)), entropy_source.ptr, node_signer.ptr, logger.ptr, network, min_final_cltv_expiry_delta.ptr, duration_since_epoch);
*
* [`MIN_FINAL_CLTV_EXPIRY_DETLA`]: crate::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, Currency network, org.ldk.structs.Option_u64Z amt_msat, 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.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, InternalUtils.encodeString(description), invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
+ public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.Option_u64Z amt_msat, 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.ptr, amt_msat.ptr, InternalUtils.encodeString(description), invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
GC.KeepAlive(channelmanager);
- GC.KeepAlive(node_signer);
- GC.KeepAlive(logger);
- GC.KeepAlive(network);
GC.KeepAlive(amt_msat);
GC.KeepAlive(description);
GC.KeepAlive(invoice_expiry_delta_secs);
if (ret >= 0 && ret <= 4096) { return null; }
Result_Bolt11InvoiceSignOrCreationErrorZ ret_hu_conv = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channelmanager); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(node_signer); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(logger); };
return ret_hu_conv;
}
*
* [`MIN_FINAL_CLTV_EXPIRY_DETLA`]: crate::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, 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.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, description_hash.ptr, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
+ public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash(org.ldk.structs.ChannelManager channelmanager, 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.ptr, amt_msat.ptr, description_hash.ptr, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
GC.KeepAlive(channelmanager);
- GC.KeepAlive(node_signer);
- GC.KeepAlive(logger);
- GC.KeepAlive(network);
GC.KeepAlive(amt_msat);
GC.KeepAlive(description_hash);
GC.KeepAlive(invoice_expiry_delta_secs);
if (ret >= 0 && ret <= 4096) { return null; }
Result_Bolt11InvoiceSignOrCreationErrorZ ret_hu_conv = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channelmanager); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(node_signer); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(logger); };
return ret_hu_conv;
}
/**
- * See [`create_invoice_from_channelmanager_with_description_hash`]
- * This version can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
- * available and the current time is supplied by the caller.
+ * See [`create_invoice_from_channelmanager`].
+ *
+ * This version allows for providing custom [`PaymentHash`] and description hash for the invoice.
+ *
+ * This may be useful if you're building an on-chain swap or involving another protocol where
+ * the payment hash is also involved outside the scope of lightning and want to set the
+ * description hash.
*/
- 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, 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.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);
+ public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash_and_payment_hash(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.Option_u64Z amt_msat, org.ldk.structs.Sha256 description_hash, 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_with_description_hash_and_payment_hash(channelmanager.ptr, amt_msat.ptr, description_hash.ptr, invoice_expiry_delta_secs, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), min_final_cltv_expiry_delta.ptr);
GC.KeepAlive(channelmanager);
- GC.KeepAlive(node_signer);
- GC.KeepAlive(logger);
- GC.KeepAlive(network);
GC.KeepAlive(amt_msat);
GC.KeepAlive(description_hash);
- GC.KeepAlive(duration_since_epoch);
- GC.KeepAlive(invoice_expiry_delta_secs);
- GC.KeepAlive(min_final_cltv_expiry_delta);
- if (ret >= 0 && ret <= 4096) { return null; }
- Result_Bolt11InvoiceSignOrCreationErrorZ ret_hu_conv = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channelmanager); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(node_signer); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(logger); };
- return ret_hu_conv;
- }
-
- /**
- * See [`create_invoice_from_channelmanager`]
- * This version can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
- * 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, Currency network, org.ldk.structs.Option_u64Z amt_msat, 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.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, InternalUtils.encodeString(description), duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta.ptr);
- GC.KeepAlive(channelmanager);
- GC.KeepAlive(node_signer);
- GC.KeepAlive(logger);
- GC.KeepAlive(network);
- GC.KeepAlive(amt_msat);
- GC.KeepAlive(description);
- GC.KeepAlive(duration_since_epoch);
GC.KeepAlive(invoice_expiry_delta_secs);
+ GC.KeepAlive(payment_hash);
GC.KeepAlive(min_final_cltv_expiry_delta);
if (ret >= 0 && ret <= 4096) { return null; }
Result_Bolt11InvoiceSignOrCreationErrorZ ret_hu_conv = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channelmanager); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(node_signer); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(logger); };
return ret_hu_conv;
}
/**
- * See [`create_invoice_from_channelmanager_and_duration_since_epoch`]
+ * See [`create_invoice_from_channelmanager`].
+ *
* This version allows for providing a custom [`PaymentHash`] for the invoice.
* This may be useful if you're building an on-chain swap or involving another protocol where
* 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, Currency network, org.ldk.structs.Option_u64Z amt_msat, 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.ptr, node_signer.ptr, logger.ptr, network, amt_msat.ptr, InternalUtils.encodeString(description), duration_since_epoch, invoice_expiry_delta_secs, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), min_final_cltv_expiry_delta.ptr);
+ public static Result_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_payment_hash(org.ldk.structs.ChannelManager channelmanager, org.ldk.structs.Option_u64Z amt_msat, string description, 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_with_payment_hash(channelmanager.ptr, amt_msat.ptr, InternalUtils.encodeString(description), invoice_expiry_delta_secs, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_hash, 32)), min_final_cltv_expiry_delta.ptr);
GC.KeepAlive(channelmanager);
- GC.KeepAlive(node_signer);
- GC.KeepAlive(logger);
- GC.KeepAlive(network);
GC.KeepAlive(amt_msat);
GC.KeepAlive(description);
- GC.KeepAlive(duration_since_epoch);
GC.KeepAlive(invoice_expiry_delta_secs);
GC.KeepAlive(payment_hash);
GC.KeepAlive(min_final_cltv_expiry_delta);
if (ret >= 0 && ret <= 4096) { return null; }
Result_Bolt11InvoiceSignOrCreationErrorZ ret_hu_conv = Result_Bolt11InvoiceSignOrCreationErrorZ.constr_from_ptr(ret);
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(channelmanager); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(node_signer); };
- if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(logger); };
return ret_hu_conv;
}
/**
- * Builds the necessary parameters to pay or pre-flight probe the given zero-amount
- * [`Bolt11Invoice`] using [`ChannelManager::send_payment`] or
- * [`ChannelManager::send_preflight_probes`].
+ * Builds the necessary parameters to pay or pre-flight probe the given variable-amount
+ * (also known as 'zero-amount') [`Bolt11Invoice`] using
+ * [`ChannelManager::send_payment`] or [`ChannelManager::send_preflight_probes`].
*
* Prior to paying, you must ensure that the [`Bolt11Invoice::payment_hash`] is unique and the
* same [`PaymentHash`] has never been paid before.
* [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
* [`ChannelManager::send_preflight_probes`]: crate::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.ptr, amount_msat);
+ public static Result_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ payment_parameters_from_variable_amount_invoice(org.ldk.structs.Bolt11Invoice invoice, long amount_msat) {
+ long ret = bindings.payment_parameters_from_variable_amount_invoice(invoice.ptr, amount_msat);
GC.KeepAlive(invoice);
GC.KeepAlive(amount_msat);
if (ret >= 0 && ret <= 4096) { return null; }
* same [`PaymentHash`] has never been paid before.
*
* Will always succeed unless the invoice has no amount specified, in which case
- * [`payment_parameters_from_zero_amount_invoice`] should be used.
+ * [`payment_parameters_from_variable_amount_invoice`] should be used.
*
* [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
* [`ChannelManager::send_preflight_probes`]: crate::ln::channelmanager::ChannelManager::send_preflight_probes
return ret;
}
+ /**
+ * Returns whether `tlv_type` corresponds to a TLV record for DNS Resolvers.
+ */
+ public static bool DNSResolverMessage_is_known_type(long tlv_type) {
+ bool ret = bindings.DNSResolverMessage_is_known_type(tlv_type);
+ GC.KeepAlive(tlv_type);
+ return ret;
+ }
+
/**
* Creates an [`OnionMessage`] with the given `contents` for sending to the destination of
* `path`, first calling [`Destination::resolve`] on `path.destination` with the given
--- /dev/null
+
+using org.ldk.impl;
+using org.ldk.enums;
+using org.ldk.util;
+using System;
+
+namespace org { namespace ldk { namespace structs {
+
+
+
+/** An implementation of Verification */
+public interface VerificationInterface {
+ /**Constructs an HMAC to include in [`OffersContext`] for the data along with the given
+ * [`Nonce`].
+ */
+ byte[] hmac_for_offer_payment(Nonce nonce, ExpandedKey expanded_key);
+ /**Authenticates the data using an HMAC and a [`Nonce`] taken from an [`OffersContext`].
+ */
+ Result_NoneNoneZ verify_for_offer_payment(byte[] hmac, Nonce nonce, ExpandedKey expanded_key);
+}
+
+/**
+ * A trait defining behavior for creating and verifing the HMAC for authenticating a given data.
+ */
+public class Verification : CommonBase {
+ internal bindings.LDKVerification bindings_instance;
+ internal long instance_idx;
+
+ internal Verification(object _dummy, long ptr) : base(ptr) { bindings_instance = null; }
+ ~Verification() {
+ if (ptr != 0) { bindings.Verification_free(ptr); }
+ }
+
+ private class LDKVerificationHolder { internal Verification held; }
+ private class LDKVerificationImpl : bindings.LDKVerification {
+ internal LDKVerificationImpl(VerificationInterface arg, LDKVerificationHolder impl_holder) { this.arg = arg; this.impl_holder = impl_holder; }
+ private VerificationInterface arg;
+ private LDKVerificationHolder impl_holder;
+ public long hmac_for_offer_payment(long _nonce, long _expanded_key) {
+ org.ldk.structs.Nonce _nonce_hu_conv = null; if (_nonce < 0 || _nonce > 4096) { _nonce_hu_conv = new org.ldk.structs.Nonce(null, _nonce); }
+ if (_nonce_hu_conv != null) { _nonce_hu_conv.ptrs_to.AddLast(this); };
+ org.ldk.structs.ExpandedKey _expanded_key_hu_conv = null; if (_expanded_key < 0 || _expanded_key > 4096) { _expanded_key_hu_conv = new org.ldk.structs.ExpandedKey(null, _expanded_key); }
+ byte[] ret = arg.hmac_for_offer_payment(_nonce_hu_conv, _expanded_key_hu_conv);
+ GC.KeepAlive(arg);
+ long result = InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(ret, 32));
+ return result;
+ }
+ public long verify_for_offer_payment(long _hmac, long _nonce, long _expanded_key) {
+ byte[] _hmac_conv = InternalUtils.decodeUint8Array(_hmac);
+ org.ldk.structs.Nonce _nonce_hu_conv = null; if (_nonce < 0 || _nonce > 4096) { _nonce_hu_conv = new org.ldk.structs.Nonce(null, _nonce); }
+ if (_nonce_hu_conv != null) { _nonce_hu_conv.ptrs_to.AddLast(this); };
+ org.ldk.structs.ExpandedKey _expanded_key_hu_conv = null; if (_expanded_key < 0 || _expanded_key > 4096) { _expanded_key_hu_conv = new org.ldk.structs.ExpandedKey(null, _expanded_key); }
+ Result_NoneNoneZ ret = arg.verify_for_offer_payment(_hmac_conv, _nonce_hu_conv, _expanded_key_hu_conv);
+ GC.KeepAlive(arg);
+ long result = ret.clone_ptr();
+ return result;
+ }
+ }
+
+ /** Creates a new instance of Verification from a given implementation */
+ public static Verification new_impl(VerificationInterface arg) {
+ LDKVerificationHolder impl_holder = new LDKVerificationHolder();
+ LDKVerificationImpl impl = new LDKVerificationImpl(arg, impl_holder);
+ long[] ptr_idx = bindings.LDKVerification_new(impl);
+
+ impl_holder.held = new Verification(null, ptr_idx[0]);
+ impl_holder.held.instance_idx = ptr_idx[1];
+ impl_holder.held.bindings_instance = impl;
+ return impl_holder.held;
+ }
+
+ /**
+ * Constructs an HMAC to include in [`OffersContext`] for the data along with the given
+ * [`Nonce`].
+ */
+ public byte[] hmac_for_offer_payment(org.ldk.structs.Nonce nonce, org.ldk.structs.ExpandedKey expanded_key) {
+ long ret = bindings.Verification_hmac_for_offer_payment(this.ptr, nonce.ptr, expanded_key.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(nonce);
+ GC.KeepAlive(expanded_key);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+ if (this != null) { this.ptrs_to.AddLast(expanded_key); };
+ return ret_conv;
+ }
+
+ /**
+ * Authenticates the data using an HMAC and a [`Nonce`] taken from an [`OffersContext`].
+ */
+ public Result_NoneNoneZ verify_for_offer_payment(byte[] hmac, org.ldk.structs.Nonce nonce, org.ldk.structs.ExpandedKey expanded_key) {
+ long ret = bindings.Verification_verify_for_offer_payment(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(hmac, 32)), nonce.ptr, expanded_key.ptr);
+ GC.KeepAlive(this);
+ GC.KeepAlive(hmac);
+ GC.KeepAlive(nonce);
+ GC.KeepAlive(expanded_key);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Result_NoneNoneZ ret_hu_conv = Result_NoneNoneZ.constr_from_ptr(ret);
+ if (this != null) { this.ptrs_to.AddLast(expanded_key); };
+ return ret_hu_conv;
+ }
+
+}
+} } }
}
/**
- * The public key used by the recipient to sign invoices.
+ * The public key corresponding to the key used by the recipient to sign invoices.
+ * - If [`Offer::paths`] is empty, MUST be `Some` and contain the recipient's node id for
+ * sending an [`InvoiceRequest`].
+ * - If [`Offer::paths`] is not empty, MAY be `Some` and contain a transient id.
+ * - If `None`, the signing pubkey will be the final blinded node id from the
+ * [`BlindedMessagePath`] in [`Offer::paths`] used to send the [`InvoiceRequest`].
+ *
+ * See also [`Bolt12Invoice::signing_pubkey`].
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Bolt12Invoice::signing_pubkey`]: crate::offers::invoice::Bolt12Invoice::signing_pubkey
*
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
- public byte[] signing_pubkey() {
- long ret = bindings.VerifiedInvoiceRequest_signing_pubkey(this.ptr);
+ public byte[] issuer_signing_pubkey() {
+ long ret = bindings.VerifiedInvoiceRequest_issuer_signing_pubkey(this.ptr);
GC.KeepAlive(this);
if (ret >= 0 && ret <= 4096) { return null; }
byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
/**
* An unpredictable series of bytes, typically containing information about the derivation of
- * [`payer_id`].
+ * [`payer_signing_pubkey`].
*
- * [`payer_id`]: Self::payer_id
+ * [`payer_signing_pubkey`]: Self::payer_signing_pubkey
*/
public byte[] payer_metadata() {
long ret = bindings.VerifiedInvoiceRequest_payer_metadata(this.ptr);
return ret_hu_conv;
}
+ /**
+ * Returns whether an amount was set in the request; otherwise, if [`amount_msats`] is `Some`
+ * then it was inferred from the [`Offer::amount`] and [`quantity`].
+ *
+ * [`amount_msats`]: Self::amount_msats
+ * [`quantity`]: Self::quantity
+ */
+ public bool has_amount_msats() {
+ bool ret = bindings.VerifiedInvoiceRequest_has_amount_msats(this.ptr);
+ GC.KeepAlive(this);
+ return ret;
+ }
+
/**
* Features pertaining to requesting an invoice.
*/
/**
* A possibly transient pubkey used to sign the invoice request.
*/
- public byte[] payer_id() {
- long ret = bindings.VerifiedInvoiceRequest_payer_id(this.ptr);
+ public byte[] payer_signing_pubkey() {
+ long ret = bindings.VerifiedInvoiceRequest_payer_signing_pubkey(this.ptr);
GC.KeepAlive(this);
if (ret >= 0 && ret <= 4096) { return null; }
byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
return ret_hu_conv;
}
+ /**
+ * If the [`Offer`] was sourced from a BIP 353 Human Readable Name, this should be set by the
+ * builder to indicate the original [`HumanReadableName`] which was resolved.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public HumanReadableName offer_from_hrn() {
+ long ret = bindings.VerifiedInvoiceRequest_offer_from_hrn(this.ptr);
+ GC.KeepAlive(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.HumanReadableName ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.HumanReadableName(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
+ 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.
* 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.
+ * `created_at`, which is used to set [`Bolt12Invoice::created_at`].
+ * Useful for non-`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`].
+ * [`Offer::issuer_signing_pubkey`].
*
* Errors if the request contains unknown required features.
*