+ // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
+ export function C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
+ export function C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple);
+ return decodeArray(nativeResponseValue);
+ }
+ public static native number LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_ok(long arg);
+ public static native void LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_err(long arg);
+ public static native number LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_ok(long arg);
+ public static native number LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_err(long arg);
+ public static native Uint8Array LDKCResult_PaymentSecretNoneZ_get_ok(long arg);
+ public static native void LDKCResult_PaymentSecretNoneZ_get_err(long arg);
+ public static native Uint8Array LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
+ public static native number LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
+ public static native Uint8Array LDKCResult_PaymentPreimageAPIErrorZ_get_ok(long arg);
+ public static native number LDKCResult_PaymentPreimageAPIErrorZ_get_err(long arg);
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKWatch {
+ watch_channel (funding_txo: number, monitor: number): number;
+ update_channel (funding_txo: number, update: number): number;
+ release_pending_monitor_events (): number[];
+ }
+
+ export function LDKWatch_new(impl: LDKWatch): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
+ export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
+ return nativeResponseValue;
+ }
+ // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
+ export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
+ return nativeResponseValue;
+ }
+ // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
+ export function Watch_release_pending_monitor_events(this_arg: number): number[] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
+ return nativeResponseValue;
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKBroadcasterInterface {
+ broadcast_transaction (tx: Uint8Array): void;
+ }
+
+ export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
+ export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
+ // debug statements here
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKKeysInterface {
+ get_node_secret (): Uint8Array;
+ get_destination_script (): Uint8Array;
+ get_shutdown_scriptpubkey (): number;
+ get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
+ get_secure_random_bytes (): Uint8Array;
+ read_chan_signer (reader: Uint8Array): number;
+ sign_invoice (invoice_preimage: Uint8Array): number;
+ get_inbound_payment_key_material (): Uint8Array;
+ }
+
+ export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
+ export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ 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);
+ }
+ // LDKShutdownScript KeysInterface_get_shutdown_scriptpubkey LDKKeysInterface *NONNULL_PTR this_arg
+ export function KeysInterface_get_shutdown_scriptpubkey(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.KeysInterface_get_shutdown_scriptpubkey(this_arg);
+ return 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;
+ }
+ // LDKThirtyTwoBytes KeysInterface_get_inbound_payment_key_material LDKKeysInterface *NONNULL_PTR this_arg
+ export function KeysInterface_get_inbound_payment_key_material(this_arg: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.KeysInterface_get_inbound_payment_key_material(this_arg);
+ return decodeArray(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: number): void;
+ }
+
+ export function LDKLogger_new(impl: LDKLogger): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
+ export function C2Tuple_BlockHashChannelManagerZ_get_a(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_get_a(tuple);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
+ export function C2Tuple_BlockHashChannelManagerZ_get_b(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_get_b(tuple);
+ return nativeResponseValue;
+ }
+ 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 number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
+ public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKType {
+ type_id (): number;
+ debug_str (): String;
+ write (): Uint8Array;
+ }
+
+ export function LDKType_new(impl: LDKType): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // uint16_t Type_type_id LDKType *NONNULL_PTR this_arg
+ export function Type_type_id(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Type_type_id(this_arg);
+ return nativeResponseValue;
+ }
+ // LDKStr Type_debug_str LDKType *NONNULL_PTR this_arg
+ export function Type_debug_str(this_arg: number): String {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Type_debug_str(this_arg);
+ return nativeResponseValue;
+ }
+ // LDKCVec_u8Z Type_write LDKType *NONNULL_PTR this_arg
+ export function Type_write(this_arg: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Type_write(this_arg);
+ return decodeArray(nativeResponseValue);
+ }
+ public static class LDKCOption_TypeZ {
+ private LDKCOption_TypeZ() {}
+ export class Some extends LDKCOption_TypeZ {
+ public number some;
+ Some(number some) { this.some = some; }
+ }
+ export class None extends LDKCOption_TypeZ {
+ None() { }
+ }
+ static native void init();
+ }
+ static { LDKCOption_TypeZ.init(); }
+ public static native LDKCOption_TypeZ LDKCOption_TypeZ_ref_from_ptr(long ptr);
+ public static native number LDKCResult_COption_TypeZDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_COption_TypeZDecodeErrorZ_get_err(long arg);
+ public static class LDKPaymentError {
+ private LDKPaymentError() {}
+ export class Invoice extends LDKPaymentError {
+ public String invoice;
+ Invoice(String invoice) { this.invoice = invoice; }
+ }
+ export class Routing extends LDKPaymentError {
+ public number routing;
+ Routing(number routing) { this.routing = routing; }
+ }
+ export class Sending extends LDKPaymentError {
+ public number sending;
+ Sending(number sending) { this.sending = sending; }
+ }
+ static native void init();
+ }
+ static { LDKPaymentError.init(); }
+ public static native LDKPaymentError LDKPaymentError_ref_from_ptr(long ptr);
+ public static native Uint8Array LDKCResult_PaymentIdPaymentErrorZ_get_ok(long arg);
+ public static native number LDKCResult_PaymentIdPaymentErrorZ_get_err(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 number LDKCResult_InvoiceNoneZ_get_ok(long arg);
+ public static native void LDKCResult_InvoiceNoneZ_get_err(long arg);
+ public static native number LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
+ public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
+ // struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
+ export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple);
+ return nativeResponseValue;
+ }
+ // struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
+ export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
+ export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple);
+ return nativeResponseValue;
+ }
+ public static native number LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
+ public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(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 void LDKCResult_NoneSemanticErrorZ_get_ok(long arg);
+ public static native SemanticError LDKCResult_NoneSemanticErrorZ_get_err(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 number LDKCResult_DescriptionCreationErrorZ_get_ok(long arg);
+ public static native CreationError LDKCResult_DescriptionCreationErrorZ_get_err(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 number LDKCResult_PrivateRouteCreationErrorZ_get_ok(long arg);
+ public static native CreationError LDKCResult_PrivateRouteCreationErrorZ_get_err(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 number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
+ public static class LDKCOption_MonitorEventZ {
+ private LDKCOption_MonitorEventZ() {}
+ export class Some extends LDKCOption_MonitorEventZ {
+ public number some;
+ Some(number some) { this.some = some; }
+ }
+ export class None extends LDKCOption_MonitorEventZ {
+ None() { }
+ }
+ static native void init();
+ }
+ static { LDKCOption_MonitorEventZ.init(); }
+ public static native LDKCOption_MonitorEventZ LDKCOption_MonitorEventZ_ref_from_ptr(long ptr);
+ public static native number LDKCResult_COption_MonitorEventZDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_COption_MonitorEventZDecodeErrorZ_get_err(long arg);
+ public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
+ // struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
+ export function C2Tuple_OutPointScriptZ_get_a(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_get_a(tuple);
+ return nativeResponseValue;
+ }
+ // struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
+ export function C2Tuple_OutPointScriptZ_get_b(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_get_b(tuple);
+ return decodeArray(nativeResponseValue);
+ }
+ // uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
+ export function C2Tuple_u32ScriptZ_get_a(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_get_a(tuple);
+ return nativeResponseValue;
+ }
+ // struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
+ export function C2Tuple_u32ScriptZ_get_b(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_get_b(tuple);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
+ export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
+ export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple: number): number[] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple);
+ return nativeResponseValue;
+ }
+ // uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
+ export function C2Tuple_u32TxOutZ_get_a(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_get_a(tuple);
+ return nativeResponseValue;
+ }
+ // struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
+ export function C2Tuple_u32TxOutZ_get_b(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_get_b(tuple);
+ return nativeResponseValue;
+ }
+ // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
+ export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
+ export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple: number): number[] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple);
+ return nativeResponseValue;
+ }
+ public static class LDKBalance {
+ private LDKBalance() {}
+ export class ClaimableOnChannelClose extends LDKBalance {
+ public number claimable_amount_satoshis;
+ ClaimableOnChannelClose(number claimable_amount_satoshis) { this.claimable_amount_satoshis = claimable_amount_satoshis; }
+ }
+ export class ClaimableAwaitingConfirmations extends LDKBalance {
+ public number claimable_amount_satoshis;
+ public number confirmation_height;
+ ClaimableAwaitingConfirmations(number claimable_amount_satoshis, number confirmation_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.confirmation_height = confirmation_height; }
+ }
+ export class ContentiousClaimable extends LDKBalance {
+ public number claimable_amount_satoshis;
+ public number timeout_height;
+ ContentiousClaimable(number claimable_amount_satoshis, number timeout_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.timeout_height = timeout_height; }
+ }
+ export class MaybeClaimableHTLCAwaitingTimeout extends LDKBalance {
+ public number claimable_amount_satoshis;
+ public number claimable_height;
+ MaybeClaimableHTLCAwaitingTimeout(number claimable_amount_satoshis, number claimable_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.claimable_height = claimable_height; }
+ }
+ static native void init();
+ }
+ static { LDKBalance.init(); }
+ public static native LDKBalance LDKBalance_ref_from_ptr(long ptr);
+ 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 void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
+ // struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
+ export function C2Tuple_PublicKeyTypeZ_get_a(tuple: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_get_a(tuple);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
+ export function C2Tuple_PublicKeyTypeZ_get_b(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_get_b(tuple);
+ return nativeResponseValue;
+ }
+ public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
+ public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
+ // struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
+ export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple);
+ return nativeResponseValue;
+ }
+ // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
+ export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple);
+ return nativeResponseValue;
+ }
+ // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
+ export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple);
+ return nativeResponseValue;
+ }
+ 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 void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NonePeerHandleErrorZ_get_err(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 number LDKCResult_NodeIdDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NodeIdDecodeErrorZ_get_err(long arg);
+ public static native number LDKCResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_COption_NetworkUpdateZDecodeErrorZ_get_err(long arg);
+
+
+
+// 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;
+ }
+ public static class LDKCOption_AccessZ {
+ private LDKCOption_AccessZ() {}
+ export class Some extends LDKCOption_AccessZ {
+ public number some;
+ Some(number some) { this.some = some; }
+ }
+ export class None extends LDKCOption_AccessZ {
+ None() { }
+ }
+ static native void init();
+ }
+ static { LDKCOption_AccessZ.init(); }
+ public static native LDKCOption_AccessZ LDKCOption_AccessZ_ref_from_ptr(long ptr);
+ public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(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 number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(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 number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
+ public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
+ public static class LDKCOption_CVec_NetAddressZZ {
+ private LDKCOption_CVec_NetAddressZZ() {}
+ export class Some extends LDKCOption_CVec_NetAddressZZ {
+ public number[] some;
+ Some(number[] some) { this.some = some; }
+ }
+ export class None extends LDKCOption_CVec_NetAddressZZ {
+ None() { }
+ }
+ static native void init();
+ }
+ static { LDKCOption_CVec_NetAddressZZ.init(); }
+ public static native LDKCOption_CVec_NetAddressZZ LDKCOption_CVec_NetAddressZZ_ref_from_ptr(long ptr);
+ public static native number LDKCResult_NetAddressDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NetAddressDecodeErrorZ_get_err(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 number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(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 number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
+ public static native number LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(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 number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(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 number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(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 number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(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 number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(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 number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(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 number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(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 number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_PingDecodeErrorZ_get_err(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 number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(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 number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(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 number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(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 number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(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 number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(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 number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(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 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 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;
+ }
+ public static class LDKCOption_FilterZ {
+ private LDKCOption_FilterZ() {}
+ export class Some extends LDKCOption_FilterZ {
+ public number some;
+ Some(number some) { this.some = some; }
+ }
+ export class None extends LDKCOption_FilterZ {
+ None() { }
+ }
+ static native void init();
+ }
+ static { LDKCOption_FilterZ.init(); }
+ public static native LDKCOption_FilterZ LDKCOption_FilterZ_ref_from_ptr(long ptr);
+ public static native number LDKCResult_LockedChannelMonitorNoneZ_get_ok(long arg);
+ public static native void LDKCResult_LockedChannelMonitorNoneZ_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, const struct LDKEvent *NONNULL_PTR 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 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 LDKPersist {
+ persist_new_channel (channel_id: number, data: number, update_id: number): number;
+ update_persisted_channel (channel_id: number, update: number, data: number, update_id: 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 channel_id, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
+ export function Persist_persist_new_channel(this_arg: number, channel_id: number, data: number, update_id: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, channel_id, data, update_id);
+ return nativeResponseValue;
+ }
+ // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
+ export function Persist_update_persisted_channel(this_arg: number, channel_id: number, update: number, data: number, update_id: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, channel_id, update, data, update_id);
+ 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;
+ 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;
+ }
+ // 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 LDKCustomMessageReader {
+ read (message_type: number, buffer: Uint8Array): number;
+ }
+
+ export function LDKCustomMessageReader_new(impl: LDKCustomMessageReader): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // LDKCResult_COption_TypeZDecodeErrorZ CustomMessageReader_read LDKCustomMessageReader *NONNULL_PTR this_arg, uint16_t message_type, struct LDKu8slice buffer
+ export function CustomMessageReader_read(this_arg: number, message_type: number, buffer: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CustomMessageReader_read(this_arg, message_type, encodeArray(buffer));
+ return nativeResponseValue;
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKCustomMessageHandler {
+ handle_custom_message (msg: number, sender_node_id: Uint8Array): number;
+ get_and_clear_pending_msg (): number[];
+ }
+
+ export function LDKCustomMessageHandler_new(impl: LDKCustomMessageHandler, CustomMessageReader: LDKCustomMessageReader): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // LDKCResult_NoneLightningErrorZ CustomMessageHandler_handle_custom_message LDKCustomMessageHandler *NONNULL_PTR this_arg, struct LDKType msg, struct LDKPublicKey sender_node_id
+ export function CustomMessageHandler_handle_custom_message(this_arg: number, msg: number, sender_node_id: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CustomMessageHandler_handle_custom_message(this_arg, msg, encodeArray(sender_node_id));
+ return nativeResponseValue;
+ }
+ // LDKCVec_C2Tuple_PublicKeyTypeZZ CustomMessageHandler_get_and_clear_pending_msg LDKCustomMessageHandler *NONNULL_PTR this_arg
+ export function CustomMessageHandler_get_and_clear_pending_msg(this_arg: number): number[] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CustomMessageHandler_get_and_clear_pending_msg(this_arg);
+ 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 LDKScore {
+ channel_penalty_msat (short_channel_id: number, send_amt_msat: number, channel_capacity_msat: number, source: number, target: number): number;
+ payment_path_failed (path: number[], short_channel_id: number): void;
+ payment_path_successful (path: number[]): void;
+ write (): Uint8Array;
+ }
+
+ export function LDKScore_new(impl: LDKScore): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // uint64_t Score_channel_penalty_msat LDKScore *NONNULL_PTR this_arg, uint64_t short_channel_id, uint64_t send_amt_msat, struct LDKCOption_u64Z channel_capacity_msat, const struct LDKNodeId *NONNULL_PTR source, const struct LDKNodeId *NONNULL_PTR target
+ export function Score_channel_penalty_msat(this_arg: number, short_channel_id: number, send_amt_msat: number, channel_capacity_msat: number, source: number, target: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Score_channel_penalty_msat(this_arg, short_channel_id, send_amt_msat, channel_capacity_msat, source, target);
+ return nativeResponseValue;
+ }
+ // void Score_payment_path_failed LDKScore *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ path, uint64_t short_channel_id
+ export function Score_payment_path_failed(this_arg: number, path: number[], short_channel_id: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Score_payment_path_failed(this_arg, path, short_channel_id);
+ // debug statements here
+ }
+ // void Score_payment_path_successful LDKScore *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ path
+ export function Score_payment_path_successful(this_arg: number, path: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Score_payment_path_successful(this_arg, path);
+ // debug statements here
+ }
+ // LDKCVec_u8Z Score_write LDKScore *NONNULL_PTR this_arg
+ export function Score_write(this_arg: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Score_write(this_arg);
+ return decodeArray(nativeResponseValue);
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKLockableScore {
+ lock (): number;
+ }
+
+ export function LDKLockableScore_new(impl: LDKLockableScore): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // LDKScore LockableScore_lock LDKLockableScore *NONNULL_PTR this_arg
+ export function LockableScore_lock(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.LockableScore_lock(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);
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKPayer {
+ node_id (): Uint8Array;
+ first_hops (): number[];
+ send_payment (route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number;
+ send_spontaneous_payment (route: number, payment_preimage: Uint8Array): number;
+ retry_payment (route: number, payment_id: Uint8Array): number;
+ abandon_payment (payment_id: Uint8Array): void;
+ }
+
+ export function LDKPayer_new(impl: LDKPayer): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // LDKPublicKey Payer_node_id LDKPayer *NONNULL_PTR this_arg
+ export function Payer_node_id(this_arg: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payer_node_id(this_arg);
+ return decodeArray(nativeResponseValue);
+ }
+ // LDKCVec_ChannelDetailsZ Payer_first_hops LDKPayer *NONNULL_PTR this_arg
+ export function Payer_first_hops(this_arg: number): number[] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payer_first_hops(this_arg);
+ return nativeResponseValue;
+ }
+ // LDKCResult_PaymentIdPaymentSendFailureZ Payer_send_payment LDKPayer *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret
+ export function Payer_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payer_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
+ return nativeResponseValue;
+ }
+ // LDKCResult_PaymentIdPaymentSendFailureZ Payer_send_spontaneous_payment LDKPayer *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_preimage
+ export function Payer_send_spontaneous_payment(this_arg: number, route: number, payment_preimage: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payer_send_spontaneous_payment(this_arg, route, encodeArray(payment_preimage));
+ return nativeResponseValue;
+ }
+ // LDKCResult_NonePaymentSendFailureZ Payer_retry_payment LDKPayer *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_id
+ export function Payer_retry_payment(this_arg: number, route: number, payment_id: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payer_retry_payment(this_arg, route, encodeArray(payment_id));
+ return nativeResponseValue;
+ }
+ // void Payer_abandon_payment LDKPayer *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_id
+ export function Payer_abandon_payment(this_arg: number, payment_id: Uint8Array): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payer_abandon_payment(this_arg, encodeArray(payment_id));
+ // debug statements here
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKRouter {
+ find_route (payer: Uint8Array, params: number, payment_hash: Uint8Array, first_hops: number[], scorer: number): number;
+ }
+
+ export function LDKRouter_new(impl: LDKRouter): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // LDKCResult_RouteLightningErrorZ Router_find_route LDKRouter *NONNULL_PTR this_arg, struct LDKPublicKey payer, const struct LDKRouteParameters *NONNULL_PTR params, const uint8_t (*payment_hash)[32], struct LDKCVec_ChannelDetailsZ *first_hops, const struct LDKScore *NONNULL_PTR scorer
+ export function Router_find_route(this_arg: number, payer: Uint8Array, params: number, payment_hash: Uint8Array, first_hops: number[], scorer: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Router_find_route(this_arg, encodeArray(payer), params, encodeArray(payment_hash), first_hops, scorer);
+ return nativeResponseValue;
+ }
+ // 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
+ }
+ // struct LDKTxOut TxOut_new(struct LDKCVec_u8Z script_pubkey, uint64_t value);
+ export function TxOut_new(script_pubkey: Uint8Array, value: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TxOut_new(encodeArray(script_pubkey), value);
+ return nativeResponseValue;
+ }
+ // 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
+ }
+ // uint64_t TxOut_clone_ptr(LDKTxOut *NONNULL_PTR arg);
+ export function TxOut_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TxOut_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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;
+ }
+ // bool CResult_SecretKeyErrorZ_is_ok(const struct LDKCResult_SecretKeyErrorZ *NONNULL_PTR o);
+ export function CResult_SecretKeyErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_is_ok(o);
+ 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;
+ }
+ // bool CResult_PublicKeyErrorZ_is_ok(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR o);
+ export function CResult_PublicKeyErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_PublicKeyErrorZ_clone_ptr(LDKCResult_PublicKeyErrorZ *NONNULL_PTR arg);
+ export function CResult_PublicKeyErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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;
+ }
+ // bool CResult_TxCreationKeysDecodeErrorZ_is_ok(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_TxCreationKeysDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_TxCreationKeysDecodeErrorZ_clone_ptr(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_TxCreationKeysDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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;
+ }
+ // bool CResult_ChannelPublicKeysDecodeErrorZ_is_ok(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_ChannelPublicKeysDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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;
+ }
+ // bool CResult_TxCreationKeysErrorZ_is_ok(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR o);
+ export function CResult_TxCreationKeysErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_TxCreationKeysErrorZ_clone_ptr(LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR arg);
+ export function CResult_TxCreationKeysErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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
+ }
+ // uint64_t COption_u32Z_clone_ptr(LDKCOption_u32Z *NONNULL_PTR arg);
+ export function COption_u32Z_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u32Z_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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;
+ }
+ // bool CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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;
+ }
+ // enum LDKCOption_NoneZ COption_NoneZ_some(void);
+ export function COption_NoneZ_some(): COption_NoneZ {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_NoneZ_some();
+ return nativeResponseValue;
+ }
+ // enum LDKCOption_NoneZ COption_NoneZ_none(void);
+ export function COption_NoneZ_none(): COption_NoneZ {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_NoneZ_none();
+ return nativeResponseValue;
+ }
+ // void COption_NoneZ_free(enum LDKCOption_NoneZ _res);
+ export function COption_NoneZ_free(_res: COption_NoneZ): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_NoneZ_free(_res);
+ // debug statements here
+ }
+ // 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;
+ }
+ // bool CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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;
+ }
+ // bool CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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;
+ }
+ // bool CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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;
+ }
+ // bool CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_ok(struct LDKTrustedClosingTransaction o);
+ export function CResult_TrustedClosingTransactionNoneZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_err(void);
+ export function CResult_TrustedClosingTransactionNoneZ_err(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_err();
+ return nativeResponseValue;
+ }
+ // bool CResult_TrustedClosingTransactionNoneZ_is_ok(const struct LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR o);
+ export function CResult_TrustedClosingTransactionNoneZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_is_ok(o);
+ return nativeResponseValue;
+ }
+ // void CResult_TrustedClosingTransactionNoneZ_free(struct LDKCResult_TrustedClosingTransactionNoneZ _res);
+ export function CResult_TrustedClosingTransactionNoneZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_free(_res);
+ // debug statements here
+ }
+ // 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;
+ }
+ // bool CResult_CommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_CommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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;
+ }
+ // bool CResult_TrustedCommitmentTransactionNoneZ_is_ok(const struct LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR o);
+ export function CResult_TrustedCommitmentTransactionNoneZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_is_ok(o);
+ 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;
+ }
+ // bool CResult_CVec_SignatureZNoneZ_is_ok(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR o);
+ export function CResult_CVec_SignatureZNoneZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_CVec_SignatureZNoneZ_clone_ptr(LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR arg);
+ export function CResult_CVec_SignatureZNoneZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_ok(struct LDKShutdownScript o);
+ export function CResult_ShutdownScriptDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_ShutdownScriptDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // bool CResult_ShutdownScriptDecodeErrorZ_is_ok(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_ShutdownScriptDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_is_ok(o);
+ return nativeResponseValue;
+ }
+ // void CResult_ShutdownScriptDecodeErrorZ_free(struct LDKCResult_ShutdownScriptDecodeErrorZ _res);
+ export function CResult_ShutdownScriptDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // uint64_t CResult_ShutdownScriptDecodeErrorZ_clone_ptr(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_ShutdownScriptDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_clone(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_ShutdownScriptDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_ok(struct LDKShutdownScript o);
+ export function CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_err(struct LDKInvalidShutdownScript e);
+ export function CResult_ShutdownScriptInvalidShutdownScriptZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_err(e);
+ return nativeResponseValue;
+ }
+ // bool CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR o);
+ export function CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(o);
+ return nativeResponseValue;
+ }
+ // void CResult_ShutdownScriptInvalidShutdownScriptZ_free(struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ _res);
+ export function CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res);
+ // debug statements here
+ }
+ // uint64_t CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR arg);
+ export function CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_clone(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR orig);
+ export function CResult_ShutdownScriptInvalidShutdownScriptZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_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;
+ }
+ // bool CResult_NoneErrorZ_is_ok(const struct LDKCResult_NoneErrorZ *NONNULL_PTR o);
+ export function CResult_NoneErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneErrorZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_NoneErrorZ_clone_ptr(LDKCResult_NoneErrorZ *NONNULL_PTR arg);
+ export function CResult_NoneErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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;
+ }
+ // bool CResult_RouteHopDecodeErrorZ_is_ok(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_RouteHopDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_RouteHopDecodeErrorZ_clone_ptr(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_RouteHopDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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;
+ }
+ // bool CResult_RouteDecodeErrorZ_is_ok(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_RouteDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_RouteDecodeErrorZ_clone_ptr(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_RouteDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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 LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_ok(struct LDKRouteParameters o);
+ export function CResult_RouteParametersDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_RouteParametersDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // bool CResult_RouteParametersDecodeErrorZ_is_ok(const struct LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_RouteParametersDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_is_ok(o);
+ return nativeResponseValue;
+ }
+ // void CResult_RouteParametersDecodeErrorZ_free(struct LDKCResult_RouteParametersDecodeErrorZ _res);
+ export function CResult_RouteParametersDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // uint64_t CResult_RouteParametersDecodeErrorZ_clone_ptr(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_RouteParametersDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_clone(const struct LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_RouteParametersDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // 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 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
+ }
+ // uint64_t COption_u64Z_clone_ptr(LDKCOption_u64Z *NONNULL_PTR arg);
+ export function COption_u64Z_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u64Z_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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;
+ }
+ // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_ok(struct LDKPayee o);
+ export function CResult_PayeeDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_PayeeDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // bool CResult_PayeeDecodeErrorZ_is_ok(const struct LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_PayeeDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_is_ok(o);
+ return nativeResponseValue;
+ }
+ // void CResult_PayeeDecodeErrorZ_free(struct LDKCResult_PayeeDecodeErrorZ _res);
+ export function CResult_PayeeDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // uint64_t CResult_PayeeDecodeErrorZ_clone_ptr(LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_PayeeDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_clone(const struct LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_PayeeDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // void CVec_RouteHintHopZ_free(struct LDKCVec_RouteHintHopZ _res);
+ export function CVec_RouteHintHopZ_free(_res: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_RouteHintHopZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_ok(struct LDKRouteHint o);
+ export function CResult_RouteHintDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_RouteHintDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // bool CResult_RouteHintDecodeErrorZ_is_ok(const struct LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_RouteHintDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_is_ok(o);
+ return nativeResponseValue;
+ }
+ // void CResult_RouteHintDecodeErrorZ_free(struct LDKCResult_RouteHintDecodeErrorZ _res);
+ export function CResult_RouteHintDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // uint64_t CResult_RouteHintDecodeErrorZ_clone_ptr(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_RouteHintDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_clone(const struct LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_RouteHintDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_ok(struct LDKRouteHintHop o);
+ export function CResult_RouteHintHopDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_RouteHintHopDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // bool CResult_RouteHintHopDecodeErrorZ_is_ok(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_RouteHintHopDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_is_ok(o);
+ return nativeResponseValue;
+ }
+ // void CResult_RouteHintHopDecodeErrorZ_free(struct LDKCResult_RouteHintHopDecodeErrorZ _res);
+ export function CResult_RouteHintHopDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // uint64_t CResult_RouteHintHopDecodeErrorZ_clone_ptr(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_RouteHintHopDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_clone(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_RouteHintHopDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_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
+ }
+ // 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;
+ }
+ // bool CResult_RouteLightningErrorZ_is_ok(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR o);
+ export function CResult_RouteLightningErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_RouteLightningErrorZ_clone_ptr(LDKCResult_RouteLightningErrorZ *NONNULL_PTR arg);
+ export function CResult_RouteLightningErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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;
+ }
+ // bool CResult_TxOutAccessErrorZ_is_ok(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR o);
+ export function CResult_TxOutAccessErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_TxOutAccessErrorZ_clone_ptr(LDKCResult_TxOutAccessErrorZ *NONNULL_PTR arg);
+ export function CResult_TxOutAccessErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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;
+ }
+ // uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg);
+ export function C2Tuple_usizeTransactionZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_clone_ptr(arg);
+ 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;
+ }
+ // bool CResult_NoneChannelMonitorUpdateErrZ_is_ok(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR o);
+ export function CResult_NoneChannelMonitorUpdateErrZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR arg);
+ export function CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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
+ }
+ // uint64_t COption_C2Tuple_usizeTransactionZZ_clone_ptr(LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR arg);
+ export function COption_C2Tuple_usizeTransactionZZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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;
+ }
+ // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_some(struct LDKClosureReason o);
+ export function COption_ClosureReasonZ_some(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_ClosureReasonZ_some(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_none(void);
+ export function COption_ClosureReasonZ_none(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_ClosureReasonZ_none();
+ return nativeResponseValue;
+ }
+ // void COption_ClosureReasonZ_free(struct LDKCOption_ClosureReasonZ _res);
+ export function COption_ClosureReasonZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_ClosureReasonZ_free(_res);
+ // debug statements here
+ }
+ // uint64_t COption_ClosureReasonZ_clone_ptr(LDKCOption_ClosureReasonZ *NONNULL_PTR arg);
+ export function COption_ClosureReasonZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_ClosureReasonZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_clone(const struct LDKCOption_ClosureReasonZ *NONNULL_PTR orig);
+ export function COption_ClosureReasonZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_ClosureReasonZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_ok(struct LDKCOption_ClosureReasonZ o);
+ export function CResult_COption_ClosureReasonZDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_COption_ClosureReasonZDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_COption_ClosureReasonZDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_COption_ClosureReasonZDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // bool CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(const struct LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(o);
+ return nativeResponseValue;
+ }
+ // void CResult_COption_ClosureReasonZDecodeErrorZ_free(struct LDKCResult_COption_ClosureReasonZDecodeErrorZ _res);
+ export function CResult_COption_ClosureReasonZDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_COption_ClosureReasonZDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // uint64_t CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_clone(const struct LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_COption_ClosureReasonZDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_COption_ClosureReasonZDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o);
+ export function COption_NetworkUpdateZ_some(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_NetworkUpdateZ_some(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_none(void);
+ export function COption_NetworkUpdateZ_none(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_NetworkUpdateZ_none();
+ return nativeResponseValue;
+ }
+ // void COption_NetworkUpdateZ_free(struct LDKCOption_NetworkUpdateZ _res);
+ export function COption_NetworkUpdateZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_NetworkUpdateZ_free(_res);
+ // debug statements here
+ }
+ // uint64_t COption_NetworkUpdateZ_clone_ptr(LDKCOption_NetworkUpdateZ *NONNULL_PTR arg);
+ export function COption_NetworkUpdateZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_NetworkUpdateZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_clone(const struct LDKCOption_NetworkUpdateZ *NONNULL_PTR orig);
+ export function COption_NetworkUpdateZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_NetworkUpdateZ_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
+ }
+ // struct LDKCOption_EventZ COption_EventZ_some(struct LDKEvent o);
+ export function COption_EventZ_some(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_EventZ_some(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_EventZ COption_EventZ_none(void);
+ export function COption_EventZ_none(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_EventZ_none();
+ return nativeResponseValue;
+ }
+ // void COption_EventZ_free(struct LDKCOption_EventZ _res);
+ export function COption_EventZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_EventZ_free(_res);
+ // debug statements here
+ }
+ // uint64_t COption_EventZ_clone_ptr(LDKCOption_EventZ *NONNULL_PTR arg);
+ export function COption_EventZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_EventZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_EventZ COption_EventZ_clone(const struct LDKCOption_EventZ *NONNULL_PTR orig);
+ export function COption_EventZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_EventZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_ok(struct LDKCOption_EventZ o);
+ export function CResult_COption_EventZDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_COption_EventZDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_COption_EventZDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_COption_EventZDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // bool CResult_COption_EventZDecodeErrorZ_is_ok(const struct LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_COption_EventZDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_COption_EventZDecodeErrorZ_is_ok(o);
+ return nativeResponseValue;
+ }
+ // void CResult_COption_EventZDecodeErrorZ_free(struct LDKCResult_COption_EventZDecodeErrorZ _res);
+ export function CResult_COption_EventZDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_COption_EventZDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // uint64_t CResult_COption_EventZDecodeErrorZ_clone_ptr(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_COption_EventZDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_COption_EventZDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_clone(const struct LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_COption_EventZDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_COption_EventZDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // 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_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_ok(struct LDKScoringParameters o);
+ export function CResult_ScoringParametersDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ScoringParametersDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_ScoringParametersDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ScoringParametersDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // bool CResult_ScoringParametersDecodeErrorZ_is_ok(const struct LDKCResult_ScoringParametersDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_ScoringParametersDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ScoringParametersDecodeErrorZ_is_ok(o);
+ return nativeResponseValue;
+ }
+ // void CResult_ScoringParametersDecodeErrorZ_free(struct LDKCResult_ScoringParametersDecodeErrorZ _res);
+ export function CResult_ScoringParametersDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ScoringParametersDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_ScorerDecodeErrorZ CResult_ScorerDecodeErrorZ_ok(struct LDKScorer o);
+ export function CResult_ScorerDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ScorerDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_ScorerDecodeErrorZ CResult_ScorerDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_ScorerDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ScorerDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // bool CResult_ScorerDecodeErrorZ_is_ok(const struct LDKCResult_ScorerDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_ScorerDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ScorerDecodeErrorZ_is_ok(o);
+ return nativeResponseValue;
+ }
+ // void CResult_ScorerDecodeErrorZ_free(struct LDKCResult_ScorerDecodeErrorZ _res);
+ export function CResult_ScorerDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ScorerDecodeErrorZ_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;
+ }
+ // bool CResult_InitFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_InitFeaturesDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_is_ok(o);
+ 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_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;
+ }
+ // bool CResult_ChannelFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_ChannelFeaturesDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_is_ok(o);
+ 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_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;
+ }
+ // bool CResult_NodeFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_NodeFeaturesDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_is_ok(o);
+ 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_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;
+ }
+ // bool CResult_InvoiceFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_InvoiceFeaturesDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_is_ok(o);
+ 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_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_ok(struct LDKChannelTypeFeatures o);
+ export function CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_ChannelTypeFeaturesDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelTypeFeaturesDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // bool CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(o);
+ return nativeResponseValue;
+ }
+ // void CResult_ChannelTypeFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ _res);
+ export function CResult_ChannelTypeFeaturesDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelTypeFeaturesDecodeErrorZ_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;
+ }
+ // bool CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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;
+ }
+ // bool CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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;
+ }
+ // bool CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
+ export function CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(o);
+ 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
+ }
+ // uint64_t CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
+ export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // 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 LDKCResult_NoneNoneZ CResult_NoneNoneZ_ok(void);
+ export function CResult_NoneNoneZ_ok(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneNoneZ_ok();
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_err(void);
+ export function CResult_NoneNoneZ_err(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneNoneZ_err();
+ return nativeResponseValue;
+ }
+ // bool CResult_NoneNoneZ_is_ok(const struct LDKCResult_NoneNoneZ *NONNULL_PTR o);
+ export function CResult_NoneNoneZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneNoneZ_is_ok(o);
+ return nativeResponseValue;
+ }
+ // void CResult_NoneNoneZ_free(struct LDKCResult_NoneNoneZ _res);
+ export function CResult_NoneNoneZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneNoneZ_free(_res);
+ // debug statements here
+ }
+ // uint64_t CResult_NoneNoneZ_clone_ptr(LDKCResult_NoneNoneZ *NONNULL_PTR arg);
+ export function CResult_NoneNoneZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneNoneZ_clone_ptr(arg);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_clone(const struct LDKCResult_NoneNoneZ *NONNULL_PTR orig);
+ export function CResult_NoneNoneZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneNoneZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // uint64_t C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR arg);
+ export function C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(arg);
+ 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;
+ }