*/
public static native long LDKCVec_u8Z_new(number[] elems);
+ // struct LDKCVec_u8Z TxOut_get_script_pubkey (struct LDKTxOut* thing)
+ export function TxOut_get_script_pubkey(thing: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TxOut_get_script_pubkey(thing);
+ return decodeArray(nativeResponseValue);
+ }
+ // uint64_t TxOut_get_value (struct LDKTxOut* thing)
+ export function TxOut_get_value(thing: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TxOut_get_value(thing);
+ return nativeResponseValue;
+ }
public static native boolean LDKCResult_SecretKeyErrorZ_result_ok(long arg);
public static native Uint8Array LDKCResult_SecretKeyErrorZ_get_ok(long arg);
public static native Secp256k1Error LDKCResult_SecretKeyErrorZ_get_err(long arg);
export class IgnoreError extends LDKErrorAction {
IgnoreError() { }
}
+ export class IgnoreAndLog extends LDKErrorAction {
+ public Level ignore_and_log;
+ IgnoreAndLog(Level ignore_and_log) { this.ignore_and_log = ignore_and_log; }
+ }
export class SendErrorMessage extends LDKErrorAction {
public number msg;
SendErrorMessage(number msg) { this.msg = msg; }
public number msg;
BroadcastChannelUpdate(number msg) { this.msg = msg; }
}
+ export class SendChannelUpdate extends LDKMessageSendEvent {
+ public Uint8Array node_id;
+ public number msg;
+ SendChannelUpdate(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
+ }
export class HandleError extends LDKMessageSendEvent {
public Uint8Array node_id;
public number action;
public static native boolean LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(long arg);
public static native number[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
public static native IOError LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_err(long arg);
+ public static class LDKCOption_u16Z {
+ private LDKCOption_u16Z() {}
+ export class Some extends LDKCOption_u16Z {
+ public number some;
+ Some(number some) { this.some = some; }
+ }
+ export class None extends LDKCOption_u16Z {
+ None() { }
+ }
+ static native void init();
+ }
+ static { LDKCOption_u16Z.init(); }
+ public static native LDKCOption_u16Z LDKCOption_u16Z_ref_from_ptr(long ptr);
public static class LDKAPIError {
private LDKAPIError() {}
export class APIMisuseError extends LDKAPIError {
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) {
const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res);
// debug statements here
}
+ // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
+ export function COption_u16Z_some(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u16Z_some(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_u16Z COption_u16Z_none(void);
+ export function COption_u16Z_none(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u16Z_none();
+ return nativeResponseValue;
+ }
+ // void COption_u16Z_free(struct LDKCOption_u16Z _res);
+ export function COption_u16Z_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u16Z_free(_res);
+ // debug statements here
+ }
+ // struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
+ export function COption_u16Z_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u16Z_clone(orig);
+ return nativeResponseValue;
+ }
// struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
export function CResult_NoneAPIErrorZ_ok(): number {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.Event_clone(orig);
return nativeResponseValue;
}
+ // struct LDKEvent Event_funding_generation_ready(struct LDKThirtyTwoBytes temporary_channel_id, uint64_t channel_value_satoshis, struct LDKCVec_u8Z output_script, uint64_t user_channel_id);
+ export function Event_funding_generation_ready(temporary_channel_id: Uint8Array, channel_value_satoshis: number, output_script: Uint8Array, user_channel_id: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Event_funding_generation_ready(encodeArray(temporary_channel_id), channel_value_satoshis, encodeArray(output_script), user_channel_id);
+ return nativeResponseValue;
+ }
+ // struct LDKEvent Event_payment_received(struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret, uint64_t amt, uint64_t user_payment_id);
+ export function Event_payment_received(payment_hash: Uint8Array, payment_preimage: Uint8Array, payment_secret: Uint8Array, amt: number, user_payment_id: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Event_payment_received(encodeArray(payment_hash), encodeArray(payment_preimage), encodeArray(payment_secret), amt, user_payment_id);
+ return nativeResponseValue;
+ }
+ // struct LDKEvent Event_payment_sent(struct LDKThirtyTwoBytes payment_preimage);
+ export function Event_payment_sent(payment_preimage: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Event_payment_sent(encodeArray(payment_preimage));
+ return nativeResponseValue;
+ }
+ // struct LDKEvent Event_payment_failed(struct LDKThirtyTwoBytes payment_hash, bool rejected_by_dest);
+ export function Event_payment_failed(payment_hash: Uint8Array, rejected_by_dest: boolean): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Event_payment_failed(encodeArray(payment_hash), rejected_by_dest);
+ return nativeResponseValue;
+ }
+ // struct LDKEvent Event_pending_htlcs_forwardable(uint64_t time_forwardable);
+ export function Event_pending_htlcs_forwardable(time_forwardable: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Event_pending_htlcs_forwardable(time_forwardable);
+ return nativeResponseValue;
+ }
+ // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs);
+ export function Event_spendable_outputs(outputs: number[]): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Event_spendable_outputs(outputs);
+ return nativeResponseValue;
+ }
// struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
export function Event_write(obj: number): Uint8Array {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
return nativeResponseValue;
}
+ // struct LDKMessageSendEvent MessageSendEvent_send_accept_channel(struct LDKPublicKey node_id, struct LDKAcceptChannel msg);
+ export function MessageSendEvent_send_accept_channel(node_id: Uint8Array, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_send_accept_channel(encodeArray(node_id), msg);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_send_open_channel(struct LDKPublicKey node_id, struct LDKOpenChannel msg);
+ export function MessageSendEvent_send_open_channel(node_id: Uint8Array, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_send_open_channel(encodeArray(node_id), msg);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_send_funding_created(struct LDKPublicKey node_id, struct LDKFundingCreated msg);
+ export function MessageSendEvent_send_funding_created(node_id: Uint8Array, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_send_funding_created(encodeArray(node_id), msg);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_send_funding_signed(struct LDKPublicKey node_id, struct LDKFundingSigned msg);
+ export function MessageSendEvent_send_funding_signed(node_id: Uint8Array, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_send_funding_signed(encodeArray(node_id), msg);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_send_funding_locked(struct LDKPublicKey node_id, struct LDKFundingLocked msg);
+ export function MessageSendEvent_send_funding_locked(node_id: Uint8Array, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_send_funding_locked(encodeArray(node_id), msg);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_send_announcement_signatures(struct LDKPublicKey node_id, struct LDKAnnouncementSignatures msg);
+ export function MessageSendEvent_send_announcement_signatures(node_id: Uint8Array, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_send_announcement_signatures(encodeArray(node_id), msg);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_update_htlcs(struct LDKPublicKey node_id, struct LDKCommitmentUpdate updates);
+ export function MessageSendEvent_update_htlcs(node_id: Uint8Array, updates: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_update_htlcs(encodeArray(node_id), updates);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_send_revoke_and_ack(struct LDKPublicKey node_id, struct LDKRevokeAndACK msg);
+ export function MessageSendEvent_send_revoke_and_ack(node_id: Uint8Array, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_send_revoke_and_ack(encodeArray(node_id), msg);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_send_closing_signed(struct LDKPublicKey node_id, struct LDKClosingSigned msg);
+ export function MessageSendEvent_send_closing_signed(node_id: Uint8Array, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_send_closing_signed(encodeArray(node_id), msg);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_send_shutdown(struct LDKPublicKey node_id, struct LDKShutdown msg);
+ export function MessageSendEvent_send_shutdown(node_id: Uint8Array, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_send_shutdown(encodeArray(node_id), msg);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_send_channel_reestablish(struct LDKPublicKey node_id, struct LDKChannelReestablish msg);
+ export function MessageSendEvent_send_channel_reestablish(node_id: Uint8Array, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_send_channel_reestablish(encodeArray(node_id), msg);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
+ export function MessageSendEvent_broadcast_channel_announcement(msg: number, update_msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_announcement(msg, update_msg);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_broadcast_node_announcement(struct LDKNodeAnnouncement msg);
+ export function MessageSendEvent_broadcast_node_announcement(msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_broadcast_node_announcement(msg);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_update(struct LDKChannelUpdate msg);
+ export function MessageSendEvent_broadcast_channel_update(msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_update(msg);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_send_channel_update(struct LDKPublicKey node_id, struct LDKChannelUpdate msg);
+ export function MessageSendEvent_send_channel_update(node_id: Uint8Array, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_send_channel_update(encodeArray(node_id), msg);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_handle_error(struct LDKPublicKey node_id, struct LDKErrorAction action);
+ export function MessageSendEvent_handle_error(node_id: Uint8Array, action: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_handle_error(encodeArray(node_id), action);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_payment_failure_network_update(struct LDKHTLCFailChannelUpdate update);
+ export function MessageSendEvent_payment_failure_network_update(update: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_payment_failure_network_update(update);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_send_channel_range_query(struct LDKPublicKey node_id, struct LDKQueryChannelRange msg);
+ export function MessageSendEvent_send_channel_range_query(node_id: Uint8Array, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_send_channel_range_query(encodeArray(node_id), msg);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_send_short_ids_query(struct LDKPublicKey node_id, struct LDKQueryShortChannelIds msg);
+ export function MessageSendEvent_send_short_ids_query(node_id: Uint8Array, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_send_short_ids_query(encodeArray(node_id), msg);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_send_reply_channel_range(struct LDKPublicKey node_id, struct LDKReplyChannelRange msg);
+ export function MessageSendEvent_send_reply_channel_range(node_id: Uint8Array, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_send_reply_channel_range(encodeArray(node_id), msg);
+ return nativeResponseValue;
+ }
// void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
export function MessageSendEventsProvider_free(this_ptr: number): void {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.APIError_clone(orig);
return nativeResponseValue;
}
- // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, struct LDKSecretKey sk);
+ // struct LDKAPIError APIError_apimisuse_error(struct LDKStr err);
+ export function APIError_apimisuse_error(err: String): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.APIError_apimisuse_error(err);
+ return nativeResponseValue;
+ }
+ // struct LDKAPIError APIError_fee_rate_too_high(struct LDKStr err, uint32_t feerate);
+ export function APIError_fee_rate_too_high(err: String, feerate: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.APIError_fee_rate_too_high(err, feerate);
+ return nativeResponseValue;
+ }
+ // struct LDKAPIError APIError_route_error(struct LDKStr err);
+ export function APIError_route_error(err: String): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.APIError_route_error(err);
+ return nativeResponseValue;
+ }
+ // struct LDKAPIError APIError_channel_unavailable(struct LDKStr err);
+ export function APIError_channel_unavailable(err: String): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.APIError_channel_unavailable(err);
+ return nativeResponseValue;
+ }
+ // struct LDKAPIError APIError_monitor_update_failed(void);
+ export function APIError_monitor_update_failed(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.APIError_monitor_update_failed();
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
export function sign(msg: Uint8Array, sk: Uint8Array): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
const nativeResponseValue = wasm.Level_clone(orig);
return nativeResponseValue;
}
+ // enum LDKLevel Level_trace(void);
+ export function Level_trace(): Level {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Level_trace();
+ return nativeResponseValue;
+ }
+ // enum LDKLevel Level_debug(void);
+ export function Level_debug(): Level {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Level_debug();
+ return nativeResponseValue;
+ }
+ // enum LDKLevel Level_info(void);
+ export function Level_info(): Level {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Level_info();
+ return nativeResponseValue;
+ }
+ // enum LDKLevel Level_warn(void);
+ export function Level_warn(): Level {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Level_warn();
+ return nativeResponseValue;
+ }
+ // enum LDKLevel Level_error(void);
+ export function Level_error(): Level {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Level_error();
+ return nativeResponseValue;
+ }
// bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
export function Level_eq(a: number, b: number): boolean {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
// debug statements here
}
- // uint32_t ChannelConfig_get_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
- export function ChannelConfig_get_fee_proportional_millionths(this_ptr: number): number {
+ // uint32_t ChannelConfig_get_forwarding_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
+ export function ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr);
+ return nativeResponseValue;
+ }
+ // void ChannelConfig_set_forwarding_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
+ export function ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr, val);
+ // debug statements here
+ }
+ // uint32_t ChannelConfig_get_forwarding_fee_base_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
+ export function ChannelConfig_get_forwarding_fee_base_msat(this_ptr: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.ChannelConfig_get_fee_proportional_millionths(this_ptr);
+ const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_base_msat(this_ptr);
return nativeResponseValue;
}
- // void ChannelConfig_set_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
- export function ChannelConfig_set_fee_proportional_millionths(this_ptr: number, val: number): void {
+ // void ChannelConfig_set_forwarding_fee_base_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
+ export function ChannelConfig_set_forwarding_fee_base_msat(this_ptr: number, val: number): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.ChannelConfig_set_fee_proportional_millionths(this_ptr, val);
+ const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_base_msat(this_ptr, val);
// debug statements here
}
// uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
// debug statements here
}
- // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t fee_proportional_millionths_arg, uint16_t cltv_expiry_delta_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
- export function ChannelConfig_new(fee_proportional_millionths_arg: number, cltv_expiry_delta_arg: number, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean): number {
+ // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t forwarding_fee_proportional_millionths_arg, uint32_t forwarding_fee_base_msat_arg, uint16_t cltv_expiry_delta_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
+ export function ChannelConfig_new(forwarding_fee_proportional_millionths_arg: number, forwarding_fee_base_msat_arg: number, cltv_expiry_delta_arg: number, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.ChannelConfig_new(fee_proportional_millionths_arg, cltv_expiry_delta_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
+ const nativeResponseValue = wasm.ChannelConfig_new(forwarding_fee_proportional_millionths_arg, forwarding_fee_base_msat_arg, cltv_expiry_delta_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
return nativeResponseValue;
}
// struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
// debug statements here
}
- // MUST_USE_RES struct LDKUserConfig UserConfig_new(struct LDKChannelHandshakeConfig own_channel_config_arg, struct LDKChannelHandshakeLimits peer_channel_config_limits_arg, struct LDKChannelConfig channel_options_arg);
- export function UserConfig_new(own_channel_config_arg: number, peer_channel_config_limits_arg: number, channel_options_arg: number): number {
+ // bool UserConfig_get_accept_forwards_to_priv_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
+ export function UserConfig_get_accept_forwards_to_priv_channels(this_ptr: number): boolean {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg);
+ const nativeResponseValue = wasm.UserConfig_get_accept_forwards_to_priv_channels(this_ptr);
+ return nativeResponseValue;
+ }
+ // void UserConfig_set_accept_forwards_to_priv_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
+ export function UserConfig_set_accept_forwards_to_priv_channels(this_ptr: number, val: boolean): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.UserConfig_set_accept_forwards_to_priv_channels(this_ptr, val);
+ // debug statements here
+ }
+ // MUST_USE_RES struct LDKUserConfig UserConfig_new(struct LDKChannelHandshakeConfig own_channel_config_arg, struct LDKChannelHandshakeLimits peer_channel_config_limits_arg, struct LDKChannelConfig channel_options_arg, bool accept_forwards_to_priv_channels_arg);
+ export function UserConfig_new(own_channel_config_arg: number, peer_channel_config_limits_arg: number, channel_options_arg: number, accept_forwards_to_priv_channels_arg: boolean): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg, accept_forwards_to_priv_channels_arg);
return nativeResponseValue;
}
// struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
const nativeResponseValue = wasm.UserConfig_default();
return nativeResponseValue;
}
+ // void BestBlock_free(struct LDKBestBlock this_obj);
+ export function BestBlock_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.BestBlock_free(this_obj);
+ // debug statements here
+ }
+ // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
+ export function BestBlock_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.BestBlock_clone(orig);
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
+ export function BestBlock_from_genesis(network: Network): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.BestBlock_from_genesis(network);
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
+ export function BestBlock_new(block_hash: Uint8Array, height: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.BestBlock_new(encodeArray(block_hash), height);
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
+ export function BestBlock_block_hash(this_arg: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.BestBlock_block_hash(this_arg);
+ return decodeArray(nativeResponseValue);
+ }
+ // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
+ export function BestBlock_height(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.BestBlock_height(this_arg);
+ return nativeResponseValue;
+ }
// enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
export function AccessError_clone(orig: number): AccessError {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.AccessError_clone(orig);
return nativeResponseValue;
}
+ // enum LDKAccessError AccessError_unknown_chain(void);
+ export function AccessError_unknown_chain(): AccessError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.AccessError_unknown_chain();
+ return nativeResponseValue;
+ }
+ // enum LDKAccessError AccessError_unknown_tx(void);
+ export function AccessError_unknown_tx(): AccessError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.AccessError_unknown_tx();
+ return nativeResponseValue;
+ }
// void Access_free(struct LDKAccess this_ptr);
export function Access_free(this_ptr: number): void {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
return nativeResponseValue;
}
+ // enum LDKConfirmationTarget ConfirmationTarget_background(void);
+ export function ConfirmationTarget_background(): ConfirmationTarget {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ConfirmationTarget_background();
+ return nativeResponseValue;
+ }
+ // enum LDKConfirmationTarget ConfirmationTarget_normal(void);
+ export function ConfirmationTarget_normal(): ConfirmationTarget {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ConfirmationTarget_normal();
+ return nativeResponseValue;
+ }
+ // enum LDKConfirmationTarget ConfirmationTarget_high_priority(void);
+ export function ConfirmationTarget_high_priority(): ConfirmationTarget {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ConfirmationTarget_high_priority();
+ return nativeResponseValue;
+ }
// void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
export function FeeEstimator_free(this_ptr: number): void {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
return nativeResponseValue;
}
+ // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
+ export function ChannelMonitorUpdateErr_temporary_failure(): ChannelMonitorUpdateErr {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMonitorUpdateErr_temporary_failure();
+ return nativeResponseValue;
+ }
+ // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
+ export function ChannelMonitorUpdateErr_permanent_failure(): ChannelMonitorUpdateErr {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMonitorUpdateErr_permanent_failure();
+ return nativeResponseValue;
+ }
// void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
export function MonitorUpdateError_free(this_obj: number): void {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.MonitorEvent_clone(orig);
return nativeResponseValue;
}
+ // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
+ export function MonitorEvent_htlcevent(a: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MonitorEvent_htlcevent(a);
+ return nativeResponseValue;
+ }
+ // struct LDKMonitorEvent MonitorEvent_commitment_tx_broadcasted(struct LDKOutPoint a);
+ export function MonitorEvent_commitment_tx_broadcasted(a: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MonitorEvent_commitment_tx_broadcasted(a);
+ return nativeResponseValue;
+ }
// void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
export function HTLCUpdate_free(this_obj: number): void {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.ChannelMonitor_get_relevant_txids(this_arg);
return nativeResponseValue;
}
+ // MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
+ export function ChannelMonitor_current_best_block(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelMonitor_current_best_block(this_arg);
+ return nativeResponseValue;
+ }
// void Persist_free(struct LDKPersist this_ptr);
export function Persist_free(this_ptr: number): void {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
return nativeResponseValue;
}
+ // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_output(struct LDKOutPoint outpoint, struct LDKTxOut output);
+ export function SpendableOutputDescriptor_static_output(outpoint: number, output: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SpendableOutputDescriptor_static_output(outpoint, output);
+ return nativeResponseValue;
+ }
+ // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_delayed_payment_output(struct LDKDelayedPaymentOutputDescriptor a);
+ export function SpendableOutputDescriptor_delayed_payment_output(a: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SpendableOutputDescriptor_delayed_payment_output(a);
+ return nativeResponseValue;
+ }
+ // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
+ export function SpendableOutputDescriptor_static_payment_output(a: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SpendableOutputDescriptor_static_payment_output(a);
+ return nativeResponseValue;
+ }
// struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.ChainParameters_clone(orig);
return nativeResponseValue;
}
- // void BestBlock_free(struct LDKBestBlock this_obj);
- export function BestBlock_free(this_obj: number): void {
+ // void ChannelCounterparty_free(struct LDKChannelCounterparty this_obj);
+ export function ChannelCounterparty_free(this_obj: number): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.BestBlock_free(this_obj);
+ const nativeResponseValue = wasm.ChannelCounterparty_free(this_obj);
// debug statements here
}
- // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
- export function BestBlock_clone(orig: number): number {
+ // struct LDKPublicKey ChannelCounterparty_get_node_id(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
+ export function ChannelCounterparty_get_node_id(this_ptr: number): Uint8Array {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.BestBlock_clone(orig);
- return nativeResponseValue;
+ const nativeResponseValue = wasm.ChannelCounterparty_get_node_id(this_ptr);
+ return decodeArray(nativeResponseValue);
}
- // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
- export function BestBlock_from_genesis(network: Network): number {
+ // void ChannelCounterparty_set_node_id(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ export function ChannelCounterparty_set_node_id(this_ptr: number, val: Uint8Array): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.BestBlock_from_genesis(network);
+ const nativeResponseValue = wasm.ChannelCounterparty_set_node_id(this_ptr, encodeArray(val));
+ // debug statements here
+ }
+ // struct LDKInitFeatures ChannelCounterparty_get_features(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
+ export function ChannelCounterparty_get_features(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelCounterparty_get_features(this_ptr);
return nativeResponseValue;
}
- // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
- export function BestBlock_new(block_hash: Uint8Array, height: number): number {
+ // void ChannelCounterparty_set_features(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
+ export function ChannelCounterparty_set_features(this_ptr: number, val: number): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.BestBlock_new(encodeArray(block_hash), height);
+ const nativeResponseValue = wasm.ChannelCounterparty_set_features(this_ptr, val);
+ // debug statements here
+ }
+ // uint64_t ChannelCounterparty_get_unspendable_punishment_reserve(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
+ export function ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr);
return nativeResponseValue;
}
- // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
- export function BestBlock_block_hash(this_arg: number): Uint8Array {
+ // void ChannelCounterparty_set_unspendable_punishment_reserve(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, uint64_t val);
+ export function ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.BestBlock_block_hash(this_arg);
- return decodeArray(nativeResponseValue);
+ const nativeResponseValue = wasm.ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr, val);
+ // debug statements here
}
- // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
- export function BestBlock_height(this_arg: number): number {
+ // struct LDKChannelCounterparty ChannelCounterparty_clone(const struct LDKChannelCounterparty *NONNULL_PTR orig);
+ export function ChannelCounterparty_clone(orig: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.BestBlock_height(this_arg);
+ const nativeResponseValue = wasm.ChannelCounterparty_clone(orig);
return nativeResponseValue;
}
// void ChannelDetails_free(struct LDKChannelDetails this_obj);
const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
// debug statements here
}
- // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
- export function ChannelDetails_get_funding_txo(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.ChannelDetails_get_funding_txo(this_ptr);
- return nativeResponseValue;
- }
- // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
- export function ChannelDetails_set_funding_txo(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.ChannelDetails_set_funding_txo(this_ptr, val);
- // debug statements here
- }
- // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
- export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
+ // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
+ export function ChannelDetails_get_counterparty(this_ptr: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.ChannelDetails_get_short_channel_id(this_ptr);
+ const nativeResponseValue = wasm.ChannelDetails_get_counterparty(this_ptr);
return nativeResponseValue;
}
- // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
- export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
+ // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
+ export function ChannelDetails_set_counterparty(this_ptr: number, val: number): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.ChannelDetails_set_short_channel_id(this_ptr, val);
+ const nativeResponseValue = wasm.ChannelDetails_set_counterparty(this_ptr, val);
// debug statements here
}
- // struct LDKPublicKey ChannelDetails_get_remote_network_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
- export function ChannelDetails_get_remote_network_id(this_ptr: number): Uint8Array {
+ // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
+ export function ChannelDetails_get_funding_txo(this_ptr: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.ChannelDetails_get_remote_network_id(this_ptr);
- return decodeArray(nativeResponseValue);
+ const nativeResponseValue = wasm.ChannelDetails_get_funding_txo(this_ptr);
+ return nativeResponseValue;
}
- // void ChannelDetails_set_remote_network_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- export function ChannelDetails_set_remote_network_id(this_ptr: number, val: Uint8Array): void {
+ // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
+ export function ChannelDetails_set_funding_txo(this_ptr: number, val: number): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.ChannelDetails_set_remote_network_id(this_ptr, encodeArray(val));
+ const nativeResponseValue = wasm.ChannelDetails_set_funding_txo(this_ptr, val);
// debug statements here
}
- // struct LDKInitFeatures ChannelDetails_get_counterparty_features(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
- export function ChannelDetails_get_counterparty_features(this_ptr: number): number {
+ // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
+ export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.ChannelDetails_get_counterparty_features(this_ptr);
+ const nativeResponseValue = wasm.ChannelDetails_get_short_channel_id(this_ptr);
return nativeResponseValue;
}
- // void ChannelDetails_set_counterparty_features(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
- export function ChannelDetails_set_counterparty_features(this_ptr: number, val: number): void {
+ // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+ export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.ChannelDetails_set_counterparty_features(this_ptr, val);
+ const nativeResponseValue = wasm.ChannelDetails_set_short_channel_id(this_ptr, val);
// debug statements here
}
// uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
// debug statements here
}
+ // struct LDKCOption_u64Z ChannelDetails_get_unspendable_punishment_reserve(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
+ export function ChannelDetails_get_unspendable_punishment_reserve(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelDetails_get_unspendable_punishment_reserve(this_ptr);
+ return nativeResponseValue;
+ }
+ // void ChannelDetails_set_unspendable_punishment_reserve(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+ export function ChannelDetails_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelDetails_set_unspendable_punishment_reserve(this_ptr, val);
+ // debug statements here
+ }
// uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
export function ChannelDetails_get_user_id(this_ptr: number): number {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
// debug statements here
}
+ // struct LDKCOption_u32Z ChannelDetails_get_confirmations_required(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
+ export function ChannelDetails_get_confirmations_required(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelDetails_get_confirmations_required(this_ptr);
+ return nativeResponseValue;
+ }
+ // void ChannelDetails_set_confirmations_required(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
+ export function ChannelDetails_set_confirmations_required(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelDetails_set_confirmations_required(this_ptr, val);
+ // debug statements here
+ }
+ // struct LDKCOption_u16Z ChannelDetails_get_force_close_spend_delay(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
+ export function ChannelDetails_get_force_close_spend_delay(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelDetails_get_force_close_spend_delay(this_ptr);
+ return nativeResponseValue;
+ }
+ // void ChannelDetails_set_force_close_spend_delay(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u16Z val);
+ export function ChannelDetails_set_force_close_spend_delay(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelDetails_set_force_close_spend_delay(this_ptr, val);
+ // debug statements here
+ }
// bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
export function ChannelDetails_get_is_outbound(this_ptr: number): boolean {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.ChannelDetails_set_is_public(this_ptr, val);
// debug statements here
}
+ // MUST_USE_RES struct LDKChannelDetails ChannelDetails_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKChannelCounterparty counterparty_arg, struct LDKOutPoint funding_txo_arg, struct LDKCOption_u64Z short_channel_id_arg, uint64_t channel_value_satoshis_arg, struct LDKCOption_u64Z unspendable_punishment_reserve_arg, uint64_t user_id_arg, uint64_t outbound_capacity_msat_arg, uint64_t inbound_capacity_msat_arg, struct LDKCOption_u32Z confirmations_required_arg, struct LDKCOption_u16Z force_close_spend_delay_arg, bool is_outbound_arg, bool is_funding_locked_arg, bool is_usable_arg, bool is_public_arg);
+ export function ChannelDetails_new(channel_id_arg: Uint8Array, counterparty_arg: number, funding_txo_arg: number, short_channel_id_arg: number, channel_value_satoshis_arg: number, unspendable_punishment_reserve_arg: number, user_id_arg: number, outbound_capacity_msat_arg: number, inbound_capacity_msat_arg: number, confirmations_required_arg: number, force_close_spend_delay_arg: number, is_outbound_arg: boolean, is_funding_locked_arg: boolean, is_usable_arg: boolean, is_public_arg: boolean): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelDetails_new(encodeArray(channel_id_arg), counterparty_arg, funding_txo_arg, short_channel_id_arg, channel_value_satoshis_arg, unspendable_punishment_reserve_arg, user_id_arg, outbound_capacity_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg, force_close_spend_delay_arg, is_outbound_arg, is_funding_locked_arg, is_usable_arg, is_public_arg);
+ return nativeResponseValue;
+ }
// struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
export function ChannelDetails_clone(orig: number): number {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
return nativeResponseValue;
}
+ // struct LDKPaymentSendFailure PaymentSendFailure_parameter_error(struct LDKAPIError a);
+ export function PaymentSendFailure_parameter_error(a: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.PaymentSendFailure_parameter_error(a);
+ return nativeResponseValue;
+ }
+ // struct LDKPaymentSendFailure PaymentSendFailure_path_parameter_error(struct LDKCVec_CResult_NoneAPIErrorZZ a);
+ export function PaymentSendFailure_path_parameter_error(a: number[]): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.PaymentSendFailure_path_parameter_error(a);
+ return nativeResponseValue;
+ }
+ // struct LDKPaymentSendFailure PaymentSendFailure_all_failed_retry_safe(struct LDKCVec_APIErrorZ a);
+ export function PaymentSendFailure_all_failed_retry_safe(a: number[]): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.PaymentSendFailure_all_failed_retry_safe(a);
+ return nativeResponseValue;
+ }
+ // struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ a);
+ export function PaymentSendFailure_partial_failure(a: number[]): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.PaymentSendFailure_partial_failure(a);
+ return nativeResponseValue;
+ }
// MUST_USE_RES struct LDKChannelManager ChannelManager_new(struct LDKFeeEstimator fee_est, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKLogger logger, struct LDKKeysInterface keys_manager, struct LDKUserConfig config, struct LDKChainParameters params);
export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
// debug statements here
}
+ // MUST_USE_RES struct LDKBestBlock ChannelManager_current_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg);
+ export function ChannelManager_current_best_block(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelManager_current_best_block(this_arg);
+ return nativeResponseValue;
+ }
// struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.NetAddress_clone(orig);
return nativeResponseValue;
}
+ // struct LDKNetAddress NetAddress_ipv4(struct LDKFourBytes addr, uint16_t port);
+ export function NetAddress_ipv4(addr: Uint8Array, port: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.NetAddress_ipv4(encodeArray(addr), port);
+ return nativeResponseValue;
+ }
+ // struct LDKNetAddress NetAddress_ipv6(struct LDKSixteenBytes addr, uint16_t port);
+ export function NetAddress_ipv6(addr: Uint8Array, port: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.NetAddress_ipv6(encodeArray(addr), port);
+ return nativeResponseValue;
+ }
+ // struct LDKNetAddress NetAddress_onion_v2(struct LDKTenBytes addr, uint16_t port);
+ export function NetAddress_onion_v2(addr: Uint8Array, port: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.NetAddress_onion_v2(encodeArray(addr), port);
+ return nativeResponseValue;
+ }
+ // struct LDKNetAddress NetAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
+ export function NetAddress_onion_v3(ed25519_pubkey: Uint8Array, checksum: number, version: number, port: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.NetAddress_onion_v3(encodeArray(ed25519_pubkey), checksum, version, port);
+ return nativeResponseValue;
+ }
// struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
export function NetAddress_write(obj: number): Uint8Array {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.ErrorAction_clone(orig);
return nativeResponseValue;
}
+ // struct LDKErrorAction ErrorAction_disconnect_peer(struct LDKErrorMessage msg);
+ export function ErrorAction_disconnect_peer(msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ErrorAction_disconnect_peer(msg);
+ return nativeResponseValue;
+ }
+ // struct LDKErrorAction ErrorAction_ignore_error(void);
+ export function ErrorAction_ignore_error(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ErrorAction_ignore_error();
+ return nativeResponseValue;
+ }
+ // struct LDKErrorAction ErrorAction_ignore_and_log(enum LDKLevel a);
+ export function ErrorAction_ignore_and_log(a: Level): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ErrorAction_ignore_and_log(a);
+ return nativeResponseValue;
+ }
+ // struct LDKErrorAction ErrorAction_send_error_message(struct LDKErrorMessage msg);
+ export function ErrorAction_send_error_message(msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ErrorAction_send_error_message(msg);
+ return nativeResponseValue;
+ }
// void LightningError_free(struct LDKLightningError this_obj);
export function LightningError_free(this_obj: number): void {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.HTLCFailChannelUpdate_clone(orig);
return nativeResponseValue;
}
+ // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_channel_update_message(struct LDKChannelUpdate msg);
+ export function HTLCFailChannelUpdate_channel_update_message(msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.HTLCFailChannelUpdate_channel_update_message(msg);
+ return nativeResponseValue;
+ }
+ // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_channel_closed(uint64_t short_channel_id, bool is_permanent);
+ export function HTLCFailChannelUpdate_channel_closed(short_channel_id: number, is_permanent: boolean): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.HTLCFailChannelUpdate_channel_closed(short_channel_id, is_permanent);
+ return nativeResponseValue;
+ }
+ // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
+ export function HTLCFailChannelUpdate_node_failure(node_id: Uint8Array, is_permanent: boolean): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.HTLCFailChannelUpdate_node_failure(encodeArray(node_id), is_permanent);
+ return nativeResponseValue;
+ }
// void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
export function ChannelMessageHandler_free(this_ptr: number): void {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.SiPrefix_clone(orig);
return nativeResponseValue;
}
+ // enum LDKSiPrefix SiPrefix_milli(void);
+ export function SiPrefix_milli(): SiPrefix {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SiPrefix_milli();
+ return nativeResponseValue;
+ }
+ // enum LDKSiPrefix SiPrefix_micro(void);
+ export function SiPrefix_micro(): SiPrefix {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SiPrefix_micro();
+ return nativeResponseValue;
+ }
+ // enum LDKSiPrefix SiPrefix_nano(void);
+ export function SiPrefix_nano(): SiPrefix {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SiPrefix_nano();
+ return nativeResponseValue;
+ }
+ // enum LDKSiPrefix SiPrefix_pico(void);
+ export function SiPrefix_pico(): SiPrefix {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SiPrefix_pico();
+ return nativeResponseValue;
+ }
// bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b);
export function SiPrefix_eq(a: number, b: number): boolean {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.Currency_clone(orig);
return nativeResponseValue;
}
+ // enum LDKCurrency Currency_bitcoin(void);
+ export function Currency_bitcoin(): Currency {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Currency_bitcoin();
+ return nativeResponseValue;
+ }
+ // enum LDKCurrency Currency_bitcoin_testnet(void);
+ export function Currency_bitcoin_testnet(): Currency {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Currency_bitcoin_testnet();
+ return nativeResponseValue;
+ }
+ // enum LDKCurrency Currency_regtest(void);
+ export function Currency_regtest(): Currency {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Currency_regtest();
+ return nativeResponseValue;
+ }
+ // enum LDKCurrency Currency_simnet(void);
+ export function Currency_simnet(): Currency {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Currency_simnet();
+ return nativeResponseValue;
+ }
+ // enum LDKCurrency Currency_signet(void);
+ export function Currency_signet(): Currency {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Currency_signet();
+ return nativeResponseValue;
+ }
// bool Currency_eq(const enum LDKCurrency *NONNULL_PTR a, const enum LDKCurrency *NONNULL_PTR b);
export function Currency_eq(a: number, b: number): boolean {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.Fallback_clone(orig);
return nativeResponseValue;
}
+ // struct LDKFallback Fallback_seg_wit_program(struct LDKu5 version, struct LDKCVec_u8Z program);
+ export function Fallback_seg_wit_program(version: number, program: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Fallback_seg_wit_program(version, encodeArray(program));
+ return nativeResponseValue;
+ }
+ // struct LDKFallback Fallback_pub_key_hash(struct LDKTwentyBytes a);
+ export function Fallback_pub_key_hash(a: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Fallback_pub_key_hash(encodeArray(a));
+ return nativeResponseValue;
+ }
+ // struct LDKFallback Fallback_script_hash(struct LDKTwentyBytes a);
+ export function Fallback_script_hash(a: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Fallback_script_hash(encodeArray(a));
+ return nativeResponseValue;
+ }
// bool Fallback_eq(const struct LDKFallback *NONNULL_PTR a, const struct LDKFallback *NONNULL_PTR b);
export function Fallback_eq(a: number, b: number): boolean {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.CreationError_clone(orig);
return nativeResponseValue;
}
+ // enum LDKCreationError CreationError_description_too_long(void);
+ export function CreationError_description_too_long(): CreationError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CreationError_description_too_long();
+ return nativeResponseValue;
+ }
+ // enum LDKCreationError CreationError_route_too_long(void);
+ export function CreationError_route_too_long(): CreationError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CreationError_route_too_long();
+ return nativeResponseValue;
+ }
+ // enum LDKCreationError CreationError_timestamp_out_of_bounds(void);
+ export function CreationError_timestamp_out_of_bounds(): CreationError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CreationError_timestamp_out_of_bounds();
+ return nativeResponseValue;
+ }
+ // enum LDKCreationError CreationError_expiry_time_out_of_bounds(void);
+ export function CreationError_expiry_time_out_of_bounds(): CreationError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CreationError_expiry_time_out_of_bounds();
+ return nativeResponseValue;
+ }
// bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b);
export function CreationError_eq(a: number, b: number): boolean {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.SemanticError_clone(orig);
return nativeResponseValue;
}
+ // enum LDKSemanticError SemanticError_no_payment_hash(void);
+ export function SemanticError_no_payment_hash(): SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SemanticError_no_payment_hash();
+ return nativeResponseValue;
+ }
+ // enum LDKSemanticError SemanticError_multiple_payment_hashes(void);
+ export function SemanticError_multiple_payment_hashes(): SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SemanticError_multiple_payment_hashes();
+ return nativeResponseValue;
+ }
+ // enum LDKSemanticError SemanticError_no_description(void);
+ export function SemanticError_no_description(): SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SemanticError_no_description();
+ return nativeResponseValue;
+ }
+ // enum LDKSemanticError SemanticError_multiple_descriptions(void);
+ export function SemanticError_multiple_descriptions(): SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SemanticError_multiple_descriptions();
+ return nativeResponseValue;
+ }
+ // enum LDKSemanticError SemanticError_multiple_payment_secrets(void);
+ export function SemanticError_multiple_payment_secrets(): SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SemanticError_multiple_payment_secrets();
+ return nativeResponseValue;
+ }
+ // enum LDKSemanticError SemanticError_invalid_features(void);
+ export function SemanticError_invalid_features(): SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SemanticError_invalid_features();
+ return nativeResponseValue;
+ }
+ // enum LDKSemanticError SemanticError_invalid_recovery_id(void);
+ export function SemanticError_invalid_recovery_id(): SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SemanticError_invalid_recovery_id();
+ return nativeResponseValue;
+ }
+ // enum LDKSemanticError SemanticError_invalid_signature(void);
+ export function SemanticError_invalid_signature(): SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SemanticError_invalid_signature();
+ return nativeResponseValue;
+ }
// bool SemanticError_eq(const enum LDKSemanticError *NONNULL_PTR a, const enum LDKSemanticError *NONNULL_PTR b);
export function SemanticError_eq(a: number, b: number): boolean {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.SignOrCreationError_clone(orig);
return nativeResponseValue;
}
+ // struct LDKSignOrCreationError SignOrCreationError_sign_error(void);
+ export function SignOrCreationError_sign_error(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SignOrCreationError_sign_error();
+ return nativeResponseValue;
+ }
+ // struct LDKSignOrCreationError SignOrCreationError_creation_error(enum LDKCreationError a);
+ export function SignOrCreationError_creation_error(a: CreationError): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.SignOrCreationError_creation_error(a);
+ return nativeResponseValue;
+ }
// bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a, const struct LDKSignOrCreationError *NONNULL_PTR b);
export function SignOrCreationError_eq(a: number, b: number): boolean {
if(!isWasmInitialized) {