+ const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
+ return decodeArray(nativeResponseValue);
+ }
+ // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
+ export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
+ return decodeArray(nativeResponseValue);
+ }
+ // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface *NONNULL_PTR this_arg
+ export function KeysInterface_get_shutdown_pubkey(this_arg: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.KeysInterface_get_shutdown_pubkey(this_arg);
+ return decodeArray(nativeResponseValue);
+ }
+ // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
+ export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
+ return nativeResponseValue;
+ }
+ // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
+ export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
+ return decodeArray(nativeResponseValue);
+ }
+ // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
+ export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
+ return nativeResponseValue;
+ }
+ // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
+ export function KeysInterface_sign_invoice(this_arg: number, invoice_preimage: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.KeysInterface_sign_invoice(this_arg, encodeArray(invoice_preimage));
+ return nativeResponseValue;
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKFeeEstimator {
+ get_est_sat_per_1000_weight (confirmation_target: ConfirmationTarget): number;
+ }
+
+ export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
+ export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: ConfirmationTarget): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
+ return nativeResponseValue;
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKLogger {
+ log (record: String): void;
+ }
+
+ export function LDKLogger_new(impl: LDKLogger): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
+ public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
+ public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
+ public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_SiPrefixNoneZ_result_ok(long arg);
+ public static native SiPrefix LDKCResult_SiPrefixNoneZ_get_ok(long arg);
+ public static native void LDKCResult_SiPrefixNoneZ_get_err(long arg);
+ public static native boolean LDKCResult_InvoiceNoneZ_result_ok(long arg);
+ public static native number LDKCResult_InvoiceNoneZ_get_ok(long arg);
+ public static native void LDKCResult_InvoiceNoneZ_get_err(long arg);
+ public static native boolean LDKCResult_SignedRawInvoiceNoneZ_result_ok(long arg);
+ public static native number LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
+ public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
+ public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_new(number a, Uint8Array b, number c);
+ public static native number LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(long ptr);
+ public static native Uint8Array LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(long ptr);
+ public static native number LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(long ptr);
+ public static native boolean LDKCResult_PayeePubKeyErrorZ_result_ok(long arg);
+ public static native number LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
+ public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
+ public static native long LDKCVec_PrivateRouteZ_new(number[] elems);
+ public static native boolean LDKCResult_PositiveTimestampCreationErrorZ_result_ok(long arg);
+ public static native number LDKCResult_PositiveTimestampCreationErrorZ_get_ok(long arg);
+ public static native CreationError LDKCResult_PositiveTimestampCreationErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NoneSemanticErrorZ_result_ok(long arg);
+ public static native void LDKCResult_NoneSemanticErrorZ_get_ok(long arg);
+ public static native SemanticError LDKCResult_NoneSemanticErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_InvoiceSemanticErrorZ_result_ok(long arg);
+ public static native number LDKCResult_InvoiceSemanticErrorZ_get_ok(long arg);
+ public static native SemanticError LDKCResult_InvoiceSemanticErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_DescriptionCreationErrorZ_result_ok(long arg);
+ public static native number LDKCResult_DescriptionCreationErrorZ_get_ok(long arg);
+ public static native CreationError LDKCResult_DescriptionCreationErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ExpiryTimeCreationErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ExpiryTimeCreationErrorZ_get_ok(long arg);
+ public static native CreationError LDKCResult_ExpiryTimeCreationErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_PrivateRouteCreationErrorZ_result_ok(long arg);
+ public static native number LDKCResult_PrivateRouteCreationErrorZ_get_ok(long arg);
+ public static native CreationError LDKCResult_PrivateRouteCreationErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_StringErrorZ_result_ok(long arg);
+ public static native String LDKCResult_StringErrorZ_get_ok(long arg);
+ public static native Secp256k1Error LDKCResult_StringErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
+ public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
+ public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
+ public static native number LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
+ public static native Uint8Array LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
+ public static native long LDKC2Tuple_u32ScriptZ_new(number a, Uint8Array b);
+ public static native number LDKC2Tuple_u32ScriptZ_get_a(long ptr);
+ public static native Uint8Array LDKC2Tuple_u32ScriptZ_get_b(long ptr);
+ public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
+ public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(Uint8Array a, number[] b);
+ public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
+ public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
+ public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
+ public static class LDKEvent {
+ private LDKEvent() {}
+ export class FundingGenerationReady extends LDKEvent {
+ public Uint8Array temporary_channel_id;
+ public number channel_value_satoshis;
+ public Uint8Array output_script;
+ public number user_channel_id;
+ FundingGenerationReady(Uint8Array temporary_channel_id, number channel_value_satoshis, Uint8Array output_script, number user_channel_id) { this.temporary_channel_id = temporary_channel_id; this.channel_value_satoshis = channel_value_satoshis; this.output_script = output_script; this.user_channel_id = user_channel_id; }
+ }
+ export class PaymentReceived extends LDKEvent {
+ public Uint8Array payment_hash;
+ public Uint8Array payment_preimage;
+ public Uint8Array payment_secret;
+ public number amt;
+ public number user_payment_id;
+ PaymentReceived(Uint8Array payment_hash, Uint8Array payment_preimage, Uint8Array payment_secret, number amt, number user_payment_id) { this.payment_hash = payment_hash; this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; this.amt = amt; this.user_payment_id = user_payment_id; }
+ }
+ export class PaymentSent extends LDKEvent {
+ public Uint8Array payment_preimage;
+ PaymentSent(Uint8Array payment_preimage) { this.payment_preimage = payment_preimage; }
+ }
+ export class PaymentFailed extends LDKEvent {
+ public Uint8Array payment_hash;
+ public boolean rejected_by_dest;
+ PaymentFailed(Uint8Array payment_hash, boolean rejected_by_dest) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; }
+ }
+ export class PendingHTLCsForwardable extends LDKEvent {
+ public number time_forwardable;
+ PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
+ }
+ export class SpendableOutputs extends LDKEvent {
+ public number[] outputs;
+ SpendableOutputs(number[] outputs) { this.outputs = outputs; }
+ }
+ static native void init();
+ }
+ static { LDKEvent.init(); }
+ public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
+ public static native long LDKCVec_EventZ_new(number[] elems);
+ public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
+ public static native number LDKC2Tuple_u32TxOutZ_get_a(long ptr);
+ public static native number LDKC2Tuple_u32TxOutZ_get_b(long ptr);
+ public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
+ public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
+ public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
+ public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
+ public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
+ public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
+ public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
+ public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
+ public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
+ public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
+ public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
+ public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
+ public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
+ public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
+ public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
+ public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
+ public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
+ public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
+ public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
+ public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
+ public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
+ public static native long LDKCVec_u64Z_new(number[] elems);
+ public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
+ public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
+ public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
+ public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NetAddressDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_NetAddressDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NetAddressDecodeErrorZ_get_err(long arg);
+ public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
+ public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
+ public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
+ public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
+ public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
+ public static class LDKSignOrCreationError {
+ private LDKSignOrCreationError() {}
+ export class SignError extends LDKSignOrCreationError {
+ SignError() { }
+ }
+ export class CreationError extends LDKSignOrCreationError {
+ public CreationError creation_error;
+ CreationError(CreationError creation_error) { this.creation_error = creation_error; }
+ }
+ static native void init();
+ }
+ static { LDKSignOrCreationError.init(); }
+ public static native LDKSignOrCreationError LDKSignOrCreationError_ref_from_ptr(long ptr);
+ public static native boolean LDKCResult_InvoiceSignOrCreationErrorZ_result_ok(long arg);
+ public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_ok(long arg);
+ public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_err(long arg);
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKMessageSendEventsProvider {
+ get_and_clear_pending_msg_events (): number[];
+ }
+
+ export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
+ export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
+ return nativeResponseValue;
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKEventHandler {
+ handle_event (event: number): void;
+ }
+
+ export function LDKEventHandler_new(impl: LDKEventHandler): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, struct LDKEvent event
+ export function EventHandler_handle_event(this_arg: number, event: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.EventHandler_handle_event(this_arg, event);
+ // debug statements here
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKEventsProvider {
+ process_pending_events (handler: number): void;
+ }
+
+ export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
+ export function EventsProvider_process_pending_events(this_arg: number, handler: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.EventsProvider_process_pending_events(this_arg, handler);
+ // debug statements here
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKAccess {
+ get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
+ }
+
+ export function LDKAccess_new(impl: LDKAccess): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
+ export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
+ return nativeResponseValue;
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKListen {
+ block_connected (block: Uint8Array, height: number): void;
+ block_disconnected (header: Uint8Array, height: number): void;
+ }
+
+ export function LDKListen_new(impl: LDKListen): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
+ export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
+ // debug statements here
+ }
+ // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
+ export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
+ // debug statements here
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKConfirm {
+ transactions_confirmed (header: Uint8Array, txdata: number[], height: number): void;
+ transaction_unconfirmed (txid: Uint8Array): void;
+ best_block_updated (header: Uint8Array, height: number): void;
+ get_relevant_txids (): Uint8Array[];
+ }
+
+ export function LDKConfirm_new(impl: LDKConfirm): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
+ export function Confirm_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Confirm_transactions_confirmed(this_arg, encodeArray(header), txdata, height);
+ // debug statements here
+ }
+ // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
+ export function Confirm_transaction_unconfirmed(this_arg: number, txid: Uint8Array): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Confirm_transaction_unconfirmed(this_arg, encodeArray(txid));
+ // debug statements here
+ }
+ // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
+ export function Confirm_best_block_updated(this_arg: number, header: Uint8Array, height: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Confirm_best_block_updated(this_arg, encodeArray(header), height);
+ // debug statements here
+ }
+ // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
+ export function Confirm_get_relevant_txids(this_arg: number): Uint8Array[] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Confirm_get_relevant_txids(this_arg);
+ return nativeResponseValue;
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKFilter {
+ register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
+ register_output (output: number): number;
+ }
+
+ export function LDKFilter_new(impl: LDKFilter): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
+ export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
+ // debug statements here
+ }
+ // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
+ export function Filter_register_output(this_arg: number, output: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Filter_register_output(this_arg, output);
+ return nativeResponseValue;
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKPersist {
+ persist_new_channel (id: number, data: number): number;
+ update_persisted_channel (id: number, update: number, data: number): number;
+ }
+
+ export function LDKPersist_new(impl: LDKPersist): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
+ export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
+ return nativeResponseValue;
+ }
+ // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data
+ export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
+ return nativeResponseValue;
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKChannelMessageHandler {
+ handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
+ handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
+ handle_funding_created (their_node_id: Uint8Array, msg: number): void;
+ handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
+ handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
+ handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
+ handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
+ handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
+ handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
+ handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
+ handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
+ handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
+ handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
+ handle_update_fee (their_node_id: Uint8Array, msg: number): void;
+ handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
+ peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
+ peer_connected (their_node_id: Uint8Array, msg: number): void;
+ handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
+ handle_channel_update (their_node_id: Uint8Array, msg: number): void;
+ handle_error (their_node_id: Uint8Array, msg: number): void;
+ }
+
+ export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // void ChannelMessageHandler_handle_open_channel LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKOpenChannel *NONNULL_PTR msg
+ export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
+ // debug statements here
+ }
+ // void ChannelMessageHandler_handle_accept_channel LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKAcceptChannel *NONNULL_PTR msg
+ export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
+ // debug statements here
+ }
+ // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
+ export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
+ // debug statements here
+ }
+ // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
+ export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
+ // debug statements here
+ }
+ // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
+ export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
+ // debug statements here
+ }
+ // void ChannelMessageHandler_handle_shutdown LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInitFeatures *NONNULL_PTR their_features, const struct LDKShutdown *NONNULL_PTR msg
+ export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
+ // debug statements here
+ }
+ // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
+ export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
+ // debug statements here
+ }
+ // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
+ export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
+ // debug statements here
+ }
+ // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
+ export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
+ // debug statements here
+ }
+ // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
+ export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
+ // debug statements here
+ }
+ // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
+ export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
+ // debug statements here
+ }
+ // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
+ export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
+ // debug statements here
+ }
+ // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
+ export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
+ // debug statements here
+ }
+ // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
+ export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
+ // debug statements here
+ }
+ // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
+ export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
+ // debug statements here
+ }
+ // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
+ export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
+ // debug statements here
+ }
+ // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
+ export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
+ // debug statements here
+ }
+ // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
+ export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
+ // debug statements here
+ }
+ // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
+ export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: Uint8Array, msg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_update(this_arg, encodeArray(their_node_id), msg);
+ // debug statements here
+ }
+ // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
+ export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
+ // debug statements here
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKRoutingMessageHandler {
+ handle_node_announcement (msg: number): number;
+ handle_channel_announcement (msg: number): number;
+ handle_channel_update (msg: number): number;
+ handle_htlc_fail_channel_update (update: number): void;
+ get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
+ get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
+ sync_routing_table (their_node_id: Uint8Array, init: number): void;
+ handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
+ handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
+ handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
+ handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
+ }
+
+ export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
+ export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
+ return nativeResponseValue;
+ }
+ // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
+ export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
+ return nativeResponseValue;
+ }
+ // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
+ export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
+ return nativeResponseValue;
+ }
+ // void RoutingMessageHandler_handle_htlc_fail_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKHTLCFailChannelUpdate *NONNULL_PTR update
+ export function RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg: number, update: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg, update);
+ // debug statements here
+ }
+ // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
+ export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
+ return nativeResponseValue;
+ }
+ // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
+ export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
+ return nativeResponseValue;
+ }
+ // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
+ export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
+ // debug statements here
+ }
+ // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
+ export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
+ return nativeResponseValue;
+ }
+ // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
+ export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
+ return nativeResponseValue;
+ }
+ // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
+ export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
+ return nativeResponseValue;
+ }
+ // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
+ export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
+ return nativeResponseValue;
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKSocketDescriptor {
+ send_data (data: Uint8Array, resume_read: boolean): number;
+ disconnect_socket (): void;
+ eq (other_arg: number): boolean;
+ hash (): number;
+ }
+
+ export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
+ export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
+ return nativeResponseValue;
+ }
+ // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
+ export function SocketDescriptor_disconnect_socket(this_arg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
+ // debug statements here
+ }
+ // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
+ export function SocketDescriptor_hash(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
+ return nativeResponseValue;
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKChannelManagerPersister {
+ persist_manager (channel_manager: number): number;
+ }
+
+ export function LDKChannelManagerPersister_new(impl: LDKChannelManagerPersister): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // LDKCResult_NoneErrorZ ChannelManagerPersister_persist_manager LDKChannelManagerPersister *NONNULL_PTR this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager
+ export function ChannelManagerPersister_persist_manager(this_arg: number, channel_manager: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelManagerPersister_persist_manager(this_arg, channel_manager);
+ return nativeResponseValue;
+ }
+ public static class LDKFallback {
+ private LDKFallback() {}
+ export class SegWitProgram extends LDKFallback {
+ public number version;
+ public Uint8Array program;
+ SegWitProgram(number version, Uint8Array program) { this.version = version; this.program = program; }
+ }
+ export class PubKeyHash extends LDKFallback {
+ public Uint8Array pub_key_hash;
+ PubKeyHash(Uint8Array pub_key_hash) { this.pub_key_hash = pub_key_hash; }
+ }
+ export class ScriptHash extends LDKFallback {
+ public Uint8Array script_hash;
+ ScriptHash(Uint8Array script_hash) { this.script_hash = script_hash; }
+ }
+ static native void init();
+ }
+ static { LDKFallback.init(); }
+ public static native LDKFallback LDKFallback_ref_from_ptr(long ptr);
+ // struct LDKStr _ldk_get_compiled_version(void);
+ export function _ldk_get_compiled_version(): String {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm._ldk_get_compiled_version();
+ return nativeResponseValue;
+ }
+ // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
+ export function _ldk_c_bindings_get_compiled_version(): String {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm._ldk_c_bindings_get_compiled_version();
+ return nativeResponseValue;
+ }
+ // void Transaction_free(struct LDKTransaction _res);
+ export function Transaction_free(_res: Uint8Array): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
+ // debug statements here
+ }
+ // void TxOut_free(struct LDKTxOut _res);
+ export function TxOut_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TxOut_free(_res);
+ // debug statements here
+ }
+ // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
+ export function TxOut_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TxOut_clone(orig);
+ return nativeResponseValue;
+ }
+ // void Str_free(struct LDKStr _res);
+ export function Str_free(_res: String): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Str_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
+ export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
+ export function CResult_SecretKeyErrorZ_err(e: Secp256k1Error): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
+ export function CResult_SecretKeyErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
+ export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
+ export function CResult_PublicKeyErrorZ_err(e: Secp256k1Error): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
+ export function CResult_PublicKeyErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
+ export function CResult_PublicKeyErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
+ export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
+ export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
+ export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
+ export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
+ export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
+ export function CResult_TxCreationKeysErrorZ_err(e: Secp256k1Error): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
+ export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
+ export function CResult_TxCreationKeysErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
+ export function COption_u32Z_some(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u32Z_some(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_u32Z COption_u32Z_none(void);
+ export function COption_u32Z_none(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u32Z_none();
+ return nativeResponseValue;
+ }
+ // void COption_u32Z_free(struct LDKCOption_u32Z _res);
+ export function COption_u32Z_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u32Z_free(_res);
+ // debug statements here
+ }
+ // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
+ export function COption_u32Z_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u32Z_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
+ export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
+ export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
+ export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
+ export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
+ export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
+ export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
+ export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
+ export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
+ export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
+ export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
+ export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
+ export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
+ export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
+ export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
+ export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
+ return nativeResponseValue;
+ }
+ // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
+ export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
+ export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
+ export function CResult_CVec_SignatureZNoneZ_err(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
+ return nativeResponseValue;
+ }
+ // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
+ export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
+ export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
+ export function CResult_NoneErrorZ_ok(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneErrorZ_ok();
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
+ export function CResult_NoneErrorZ_err(e: IOError): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res);
+ export function CResult_NoneErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_clone(const struct LDKCResult_NoneErrorZ *NONNULL_PTR orig);
+ export function CResult_NoneErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
+ export function CResult_RouteHopDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_RouteHopDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
+ export function CResult_RouteHopDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_RouteHopDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
+ export function CVec_RouteHopZ_free(_res: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
+ // debug statements here
+ }
+ // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
+ export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
+ export function CResult_RouteDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_RouteDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
+ export function CResult_RouteDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
+ export function COption_u64Z_some(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u64Z_some(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_u64Z COption_u64Z_none(void);
+ export function COption_u64Z_none(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u64Z_none();
+ return nativeResponseValue;
+ }
+ // void COption_u64Z_free(struct LDKCOption_u64Z _res);
+ export function COption_u64Z_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u64Z_free(_res);
+ // debug statements here
+ }
+ // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
+ export function COption_u64Z_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u64Z_clone(orig);
+ return nativeResponseValue;
+ }
+ // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
+ export function CVec_ChannelDetailsZ_free(_res: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
+ // debug statements here
+ }
+ // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
+ export function CVec_RouteHintZ_free(_res: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
+ export function CResult_RouteLightningErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
+ export function CResult_RouteLightningErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
+ export function CResult_RouteLightningErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
+ export function CResult_RouteLightningErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
+ export function CResult_TxOutAccessErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
+ export function CResult_TxOutAccessErrorZ_err(e: AccessError): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
+ export function CResult_TxOutAccessErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
+ export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
+ export function C2Tuple_usizeTransactionZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
+ export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
+ return nativeResponseValue;
+ }
+ // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
+ export function C2Tuple_usizeTransactionZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
+ // debug statements here
+ }
+ // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
+ export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
+ // debug statements here
+ }
+ // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
+ export function CVec_TxidZ_free(_res: Uint8Array[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_TxidZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
+ export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
+ export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
+ export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
+ export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
+ export function CVec_MonitorEventZ_free(_res: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
+ export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_some(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
+ export function COption_C2Tuple_usizeTransactionZZ_none(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_none();
+ return nativeResponseValue;
+ }
+ // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
+ export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
+ export function COption_C2Tuple_usizeTransactionZZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
+ export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
+ // debug statements here
+ }
+ // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
+ export function CVec_MessageSendEventZ_free(_res: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
+ export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
+ export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
+ export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
+ export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
+ export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
+ export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
+ export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
+ export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
+ export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
+ export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
+ export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
+ export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
+ export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
+ export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
+ export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
+ export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
+ return nativeResponseValue;
+ }
+ // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
+ export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
+ export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
+ export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
+ return nativeResponseValue;
+ }
+ // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
+ export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
+ export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
+ export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
+ export function CResult_SignatureNoneZ_err(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
+ return nativeResponseValue;
+ }
+ // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
+ export function CResult_SignatureNoneZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
+ export function CResult_SignatureNoneZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
+ export function CResult_SignDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_SignDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
+ export function CResult_SignDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_SignDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
+ export function CVec_u8Z_free(_res: Uint8Array): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
+ // debug statements here
+ }
+ // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
+ export function CResult_RecoverableSignatureNoneZ_ok(arg: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_ok(encodeArray(arg));
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
+ export function CResult_RecoverableSignatureNoneZ_err(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_err();
+ return nativeResponseValue;
+ }
+ // void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
+ export function CResult_RecoverableSignatureNoneZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
+ export function CResult_RecoverableSignatureNoneZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
+ export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
+ export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
+ export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
+ return nativeResponseValue;
+ }
+ // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
+ export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
+ export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
+ export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
+ export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
+ export function CVec_TxOutZ_free(_res: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
+ export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
+ export function CResult_TransactionNoneZ_err(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
+ return nativeResponseValue;
+ }
+ // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
+ export function CResult_TransactionNoneZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
+ export function CResult_TransactionNoneZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TransactionNoneZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
+ export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
+ return nativeResponseValue;
+ }
+ // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
+ export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
+ // debug statements here
+ }
+ // void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res);
+ export function CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o);
+ export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o: number[]): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e);
+ export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e: IOError): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
+ export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
+ export function COption_u16Z_some(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u16Z_some(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_u16Z COption_u16Z_none(void);
+ export function COption_u16Z_none(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u16Z_none();
+ return nativeResponseValue;
+ }
+ // void COption_u16Z_free(struct LDKCOption_u16Z _res);
+ export function COption_u16Z_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u16Z_free(_res);
+ // debug statements here
+ }
+ // struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
+ export function COption_u16Z_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u16Z_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
+ export function CResult_NoneAPIErrorZ_ok(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
+ export function CResult_NoneAPIErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
+ export function CResult_NoneAPIErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
+ export function CResult_NoneAPIErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
+ export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
+ // debug statements here
+ }
+ // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
+ export function CVec_APIErrorZ_free(_res: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
+ export function CResult_NonePaymentSendFailureZ_ok(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
+ export function CResult_NonePaymentSendFailureZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
+ export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
+ export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
+ export function CVec_NetAddressZ_free(_res: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
+ export function C2Tuple_PaymentHashPaymentSecretZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
+ export function C2Tuple_PaymentHashPaymentSecretZ_new(a: Uint8Array, b: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_new(encodeArray(a), encodeArray(b));
+ return nativeResponseValue;
+ }
+ // void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
+ export function C2Tuple_PaymentHashPaymentSecretZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
+ export function CResult_PaymentSecretAPIErrorZ_ok(o: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_ok(encodeArray(o));
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e);
+ export function CResult_PaymentSecretAPIErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res);
+ export function CResult_PaymentSecretAPIErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig);
+ export function CResult_PaymentSecretAPIErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
+ export function CVec_ChannelMonitorZ_free(_res: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
+ export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
+ return nativeResponseValue;
+ }
+ // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
+ export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
+ export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
+ export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
+ export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
+ export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
+ export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
+ return nativeResponseValue;