- public static native long LDKCVec_NetAddressZ_new(uint32_t[] elems);
- public static native long LDKCVec_ChannelMonitorZ_new(uint32_t[] elems);
- public interface LDKWatch {
- uint32_t watch_channel(uint32_t funding_txo, uint32_t monitor);
- uint32_t update_channel(uint32_t funding_txo, uint32_t update);
- uint32_t[] release_pending_monitor_events();
- }
- public static native long LDKWatch_new(LDKWatch impl);
- public static native LDKWatch LDKWatch_get_obj_from_jcalls(long val);
- // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch* this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
- public static native uint32_t Watch_watch_channel(uint32_t this_arg, uint32_t funding_txo, uint32_t monitor);
- // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch* this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
- public static native uint32_t Watch_update_channel(uint32_t this_arg, uint32_t funding_txo, uint32_t update);
- // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch* this_arg
- public static native uint32_t[] Watch_release_pending_monitor_events(uint32_t this_arg);
- public interface LDKBroadcasterInterface {
- void broadcast_transaction(byte[] tx);
- }
- public static native long LDKBroadcasterInterface_new(LDKBroadcasterInterface impl);
- public static native LDKBroadcasterInterface LDKBroadcasterInterface_get_obj_from_jcalls(long val);
- // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface* this_arg, struct LDKTransaction tx
- public static native void BroadcasterInterface_broadcast_transaction(uint32_t this_arg, byte[] tx);
- public interface LDKKeysInterface {
- byte[] get_node_secret();
- byte[] get_destination_script();
- byte[] get_shutdown_pubkey();
- uint32_t get_channel_keys(boolean inbound, long channel_value_satoshis);
- byte[] get_secure_random_bytes();
- uint32_t read_chan_signer(byte[] reader);
- }
- public static native long LDKKeysInterface_new(LDKKeysInterface impl);
- public static native LDKKeysInterface LDKKeysInterface_get_obj_from_jcalls(long val);
- // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface* this_arg
- public static native byte[] KeysInterface_get_node_secret(uint32_t this_arg);
- // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface* this_arg
- public static native byte[] KeysInterface_get_destination_script(uint32_t this_arg);
- // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface* this_arg
- public static native byte[] KeysInterface_get_shutdown_pubkey(uint32_t this_arg);
- // LDKChannelKeys KeysInterface_get_channel_keys LDKKeysInterface* this_arg, bool inbound, uint64_t channel_value_satoshis
- public static native uint32_t KeysInterface_get_channel_keys(uint32_t this_arg, boolean inbound, long channel_value_satoshis);
- // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface* this_arg
- public static native byte[] KeysInterface_get_secure_random_bytes(uint32_t this_arg);
- // LDKCResult_ChanKeySignerDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface* this_arg, struct LDKu8slice reader
- public static native uint32_t KeysInterface_read_chan_signer(uint32_t this_arg, byte[] reader);
- public interface LDKFeeEstimator {
- int get_est_sat_per_1000_weight(LDKConfirmationTarget confirmation_target);
- }
- public static native long LDKFeeEstimator_new(LDKFeeEstimator impl);
- public static native LDKFeeEstimator LDKFeeEstimator_get_obj_from_jcalls(long val);
- // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator* this_arg, enum LDKConfirmationTarget confirmation_target
- public static native int FeeEstimator_get_est_sat_per_1000_weight(uint32_t this_arg, LDKConfirmationTarget confirmation_target);
- public interface LDKLogger {
- void log(String record);
- }
- public static native long LDKLogger_new(LDKLogger impl);
- public static native LDKLogger LDKLogger_get_obj_from_jcalls(long val);
- public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(byte[] a, uint32_t b);
- public static native byte[] LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
- public static native uint32_t LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
- public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
- public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
- public static native uint32_t LDKCResult_NetAddressu8Z_get_ok(long arg);
- public static native byte LDKCResult_NetAddressu8Z_get_err(long arg);
- public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
- public static native long LDKCVec_u64Z_new(long[] elems);
- public static native long LDKCVec_UpdateAddHTLCZ_new(uint32_t[] elems);
- public static native long LDKCVec_UpdateFulfillHTLCZ_new(uint32_t[] elems);
- public static native long LDKCVec_UpdateFailHTLCZ_new(uint32_t[] elems);
- public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(uint32_t[] elems);
- public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
- public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_boolLightningErrorZ_get_err(long arg);
- public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(uint32_t a, uint32_t b, uint32_t c);
- public static native uint32_t LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
- public static native uint32_t LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
- public static native uint32_t LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
- public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(uint32_t[] elems);
- public static native long LDKCVec_NodeAnnouncementZ_new(uint32_t[] elems);
- public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
- public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_NoneLightningErrorZ_get_err(long arg);
- public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
- public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_InitDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_InitDecodeErrorZ_get_err(long arg);
- public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_PingDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_PingDecodeErrorZ_get_err(long arg);
- public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_PongDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_PongDecodeErrorZ_get_err(long arg);
- public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
- public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
- public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
- public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
- public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
- public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
- public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
- public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
- public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
- public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
- public static native byte[] LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
- public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
- public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
- public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
- public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
- public static native boolean LDKCResult_SecretKeySecpErrorZ_result_ok(long arg);
- public static native byte[] LDKCResult_SecretKeySecpErrorZ_get_ok(long arg);
- public static native LDKSecp256k1Error LDKCResult_SecretKeySecpErrorZ_get_err(long arg);
- public static native boolean LDKCResult_PublicKeySecpErrorZ_result_ok(long arg);
- public static native byte[] LDKCResult_PublicKeySecpErrorZ_get_ok(long arg);
- public static native LDKSecp256k1Error LDKCResult_PublicKeySecpErrorZ_get_err(long arg);
- public static native boolean LDKCResult_TxCreationKeysSecpErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_TxCreationKeysSecpErrorZ_get_ok(long arg);
- public static native LDKSecp256k1Error LDKCResult_TxCreationKeysSecpErrorZ_get_err(long arg);
- public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
- public static native uint32_t LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
- public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
- public static native long LDKCVec_RouteHopZ_new(uint32_t[] elems);
- public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_RouteDecodeErrorZ_get_err(long arg);
- public static native long LDKCVec_RouteHintZ_new(uint32_t[] elems);
- public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_RouteLightningErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_RouteLightningErrorZ_get_err(long arg);
- public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
- public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
- public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
- public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
- public static native uint32_t LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
- public static native uint32_t LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
- public interface LDKMessageSendEventsProvider {
- uint32_t[] get_and_clear_pending_msg_events();
- }
- public static native long LDKMessageSendEventsProvider_new(LDKMessageSendEventsProvider impl);
- public static native LDKMessageSendEventsProvider LDKMessageSendEventsProvider_get_obj_from_jcalls(long val);
- // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider* this_arg
- public static native uint32_t[] MessageSendEventsProvider_get_and_clear_pending_msg_events(uint32_t this_arg);
- public interface LDKEventsProvider {
- uint32_t[] get_and_clear_pending_events();
- }
- public static native long LDKEventsProvider_new(LDKEventsProvider impl);
- public static native LDKEventsProvider LDKEventsProvider_get_obj_from_jcalls(long val);
- // LDKCVec_EventZ EventsProvider_get_and_clear_pending_events LDKEventsProvider* this_arg
- public static native uint32_t[] EventsProvider_get_and_clear_pending_events(uint32_t this_arg);
- public interface LDKAccess {
- uint32_t get_utxo(byte[] genesis_hash, long short_channel_id);
- }
- public static native long LDKAccess_new(LDKAccess impl);
- public static native LDKAccess LDKAccess_get_obj_from_jcalls(long val);
- // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess* this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
- public static native uint32_t Access_get_utxo(uint32_t this_arg, byte[] genesis_hash, long short_channel_id);
- public interface LDKFilter {
- void register_tx(byte[] txid, byte[] script_pubkey);
- void register_output(uint32_t outpoint, byte[] script_pubkey);
- }
- public static native long LDKFilter_new(LDKFilter impl);
- public static native LDKFilter LDKFilter_get_obj_from_jcalls(long val);
- // void Filter_register_tx LDKFilter* this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
- public static native void Filter_register_tx(uint32_t this_arg, byte[] txid, byte[] script_pubkey);
- // void Filter_register_output LDKFilter* this_arg, const struct LDKOutPoint *NONNULL_PTR outpoint, struct LDKu8slice script_pubkey
- public static native void Filter_register_output(uint32_t this_arg, uint32_t outpoint, byte[] script_pubkey);
- public interface LDKPersist {
- uint32_t persist_new_channel(uint32_t id, uint32_t data);
- uint32_t update_persisted_channel(uint32_t id, uint32_t update, uint32_t data);
- }
- public static native long LDKPersist_new(LDKPersist impl);
- public static native LDKPersist LDKPersist_get_obj_from_jcalls(long val);
- // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist* this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
- public static native uint32_t Persist_persist_new_channel(uint32_t this_arg, uint32_t id, uint32_t data);
- // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist* this_arg, struct LDKOutPoint id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data
- public static native uint32_t Persist_update_persisted_channel(uint32_t this_arg, uint32_t id, uint32_t update, uint32_t data);
- public interface LDKChannelMessageHandler {
- void handle_open_channel(byte[] their_node_id, uint32_t their_features, uint32_t msg);
- void handle_accept_channel(byte[] their_node_id, uint32_t their_features, uint32_t msg);
- void handle_funding_created(byte[] their_node_id, uint32_t msg);
- void handle_funding_signed(byte[] their_node_id, uint32_t msg);
- void handle_funding_locked(byte[] their_node_id, uint32_t msg);
- void handle_shutdown(byte[] their_node_id, uint32_t msg);
- void handle_closing_signed(byte[] their_node_id, uint32_t msg);
- void handle_update_add_htlc(byte[] their_node_id, uint32_t msg);
- void handle_update_fulfill_htlc(byte[] their_node_id, uint32_t msg);
- void handle_update_fail_htlc(byte[] their_node_id, uint32_t msg);
- void handle_update_fail_malformed_htlc(byte[] their_node_id, uint32_t msg);
- void handle_commitment_signed(byte[] their_node_id, uint32_t msg);
- void handle_revoke_and_ack(byte[] their_node_id, uint32_t msg);
- void handle_update_fee(byte[] their_node_id, uint32_t msg);
- void handle_announcement_signatures(byte[] their_node_id, uint32_t msg);
- void peer_disconnected(byte[] their_node_id, boolean no_connection_possible);
- void peer_connected(byte[] their_node_id, uint32_t msg);
- void handle_channel_reestablish(byte[] their_node_id, uint32_t msg);
- void handle_error(byte[] their_node_id, uint32_t msg);
- }
- public static native long LDKChannelMessageHandler_new(LDKChannelMessageHandler impl, LDKMessageSendEventsProvider MessageSendEventsProvider);
- public static native LDKChannelMessageHandler LDKChannelMessageHandler_get_obj_from_jcalls(long val);
- // void ChannelMessageHandler_handle_open_channel LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKOpenChannel *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_open_channel(uint32_t this_arg, byte[] their_node_id, uint32_t their_features, uint32_t msg);
- // void ChannelMessageHandler_handle_accept_channel LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKAcceptChannel *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_accept_channel(uint32_t this_arg, byte[] their_node_id, uint32_t their_features, uint32_t msg);
- // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_funding_created(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_funding_signed(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_funding_locked(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- // void ChannelMessageHandler_handle_shutdown LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKShutdown *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_shutdown(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_closing_signed(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_update_add_htlc(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_update_fulfill_htlc(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_update_fail_htlc(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_update_fail_malformed_htlc(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_commitment_signed(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_revoke_and_ack(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_update_fee(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_announcement_signatures(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
- public static native void ChannelMessageHandler_peer_disconnected(uint32_t this_arg, byte[] their_node_id, boolean no_connection_possible);
- // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
- public static native void ChannelMessageHandler_peer_connected(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_channel_reestablish(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- // void ChannelMessageHandler_handle_error LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
- public static native void ChannelMessageHandler_handle_error(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- public interface LDKRoutingMessageHandler {
- uint32_t handle_node_announcement(uint32_t msg);
- uint32_t handle_channel_announcement(uint32_t msg);
- uint32_t handle_channel_update(uint32_t msg);
- void handle_htlc_fail_channel_update(uint32_t update);
- uint32_t[] get_next_channel_announcements(long starting_point, byte batch_amount);
- uint32_t[] get_next_node_announcements(byte[] starting_point, byte batch_amount);
- void sync_routing_table(byte[] their_node_id, uint32_t init);
- uint32_t handle_reply_channel_range(byte[] their_node_id, uint32_t msg);
- uint32_t handle_reply_short_channel_ids_end(byte[] their_node_id, uint32_t msg);
- uint32_t handle_query_channel_range(byte[] their_node_id, uint32_t msg);
- uint32_t handle_query_short_channel_ids(byte[] their_node_id, uint32_t msg);
- }
- public static native long LDKRoutingMessageHandler_new(LDKRoutingMessageHandler impl, LDKMessageSendEventsProvider MessageSendEventsProvider);
- public static native LDKRoutingMessageHandler LDKRoutingMessageHandler_get_obj_from_jcalls(long val);
- // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler* this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
- public static native uint32_t RoutingMessageHandler_handle_node_announcement(uint32_t this_arg, uint32_t msg);
- // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler* this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
- public static native uint32_t RoutingMessageHandler_handle_channel_announcement(uint32_t this_arg, uint32_t msg);
- // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler* this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
- public static native uint32_t RoutingMessageHandler_handle_channel_update(uint32_t this_arg, uint32_t msg);
- // void RoutingMessageHandler_handle_htlc_fail_channel_update LDKRoutingMessageHandler* this_arg, const struct LDKHTLCFailChannelUpdate *NONNULL_PTR update
- public static native void RoutingMessageHandler_handle_htlc_fail_channel_update(uint32_t this_arg, uint32_t update);
- // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler* this_arg, uint64_t starting_point, uint8_t batch_amount
- public static native uint32_t[] RoutingMessageHandler_get_next_channel_announcements(uint32_t this_arg, long starting_point, byte batch_amount);
- // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler* this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
- public static native uint32_t[] RoutingMessageHandler_get_next_node_announcements(uint32_t this_arg, byte[] starting_point, byte batch_amount);
- // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
- public static native void RoutingMessageHandler_sync_routing_table(uint32_t this_arg, byte[] their_node_id, uint32_t init);
- // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
- public static native uint32_t RoutingMessageHandler_handle_reply_channel_range(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
- public static native uint32_t RoutingMessageHandler_handle_reply_short_channel_ids_end(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
- public static native uint32_t RoutingMessageHandler_handle_query_channel_range(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
- public static native uint32_t RoutingMessageHandler_handle_query_short_channel_ids(uint32_t this_arg, byte[] their_node_id, uint32_t msg);
- public interface LDKSocketDescriptor {
- long send_data(byte[] data, boolean resume_read);
- void disconnect_socket();
- boolean eq(uint32_t other_arg);
- long hash();
- }
- public static native long LDKSocketDescriptor_new(LDKSocketDescriptor impl);
- public static native LDKSocketDescriptor LDKSocketDescriptor_get_obj_from_jcalls(long val);
- // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor* this_arg, struct LDKu8slice data, bool resume_read
- public static native long SocketDescriptor_send_data(uint32_t this_arg, byte[] data, boolean resume_read);
- // void SocketDescriptor_disconnect_socket LDKSocketDescriptor* this_arg
- public static native void SocketDescriptor_disconnect_socket(uint32_t this_arg);
- // uint64_t SocketDescriptor_hash LDKSocketDescriptor* this_arg
- public static native long SocketDescriptor_hash(uint32_t this_arg);
- // void Transaction_free(struct LDKTransaction _res);
- public static native void Transaction_free(byte[] _res);
- // void TxOut_free(struct LDKTxOut _res);
- public static native void TxOut_free(uint32_t _res);
- // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
- public static native void CVec_SpendableOutputDescriptorZ_free(uint32_t[] _res);
- // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
- public static native void CVec_MessageSendEventZ_free(uint32_t[] _res);
- // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
- public static native void CVec_EventZ_free(uint32_t[] _res);
- // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
- public static native void C2Tuple_usizeTransactionZ_free(uint32_t _res);
- // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
- public static native uint32_t C2Tuple_usizeTransactionZ_new(long a, byte[] b);
- // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
- public static native void CVec_C2Tuple_usizeTransactionZZ_free(uint32_t[] _res);
- // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
- public static native uint32_t CResult_NoneChannelMonitorUpdateErrZ_ok();
- // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
- public static native uint32_t CResult_NoneChannelMonitorUpdateErrZ_err(LDKChannelMonitorUpdateErr e);
- // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
- public static native void CResult_NoneChannelMonitorUpdateErrZ_free(uint32_t _res);
- // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
- public static native void CVec_MonitorEventZ_free(uint32_t[] _res);
- // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
- public static native uint32_t CResult_ChannelMonitorUpdateDecodeErrorZ_ok(uint32_t o);
- // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
- public static native uint32_t CResult_ChannelMonitorUpdateDecodeErrorZ_err(uint32_t e);
- // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
- public static native void CResult_ChannelMonitorUpdateDecodeErrorZ_free(uint32_t _res);
- // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
- public static native uint32_t CResult_NoneMonitorUpdateErrorZ_ok();
- // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
- public static native uint32_t CResult_NoneMonitorUpdateErrorZ_err(uint32_t e);
- // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
- public static native void CResult_NoneMonitorUpdateErrorZ_free(uint32_t _res);
- // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
- public static native void C2Tuple_OutPointScriptZ_free(uint32_t _res);
- // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
- public static native uint32_t C2Tuple_OutPointScriptZ_new(uint32_t a, byte[] b);
- // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
- public static native void CVec_TransactionZ_free(byte[][] _res);
- // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
- public static native void C2Tuple_u32TxOutZ_free(uint32_t _res);
- // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
- public static native uint32_t C2Tuple_u32TxOutZ_new(int a, uint32_t b);
- // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
- public static native void CVec_C2Tuple_u32TxOutZZ_free(uint32_t[] _res);
- // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
- public static native void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(uint32_t _res);
- // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
- public static native uint32_t C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(byte[] a, uint32_t[] b);
- // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
- public static native void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(uint32_t[] _res);
- // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
- public static native void C2Tuple_BlockHashChannelMonitorZ_free(uint32_t _res);
- // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
- public static native uint32_t C2Tuple_BlockHashChannelMonitorZ_new(byte[] a, uint32_t b);
- // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
- public static native uint32_t CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(uint32_t o);
- // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
- public static native uint32_t CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(uint32_t e);
- // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
- public static native void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(uint32_t _res);
- // void C2Tuple_u64u64Z_free(struct LDKC2Tuple_u64u64Z _res);
- public static native void C2Tuple_u64u64Z_free(uint32_t _res);
- // struct LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_new(uint64_t a, uint64_t b);
- public static native uint32_t C2Tuple_u64u64Z_new(long a, long b);
- // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
- public static native uint32_t CResult_SpendableOutputDescriptorDecodeErrorZ_ok(uint32_t o);
- // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
- public static native uint32_t CResult_SpendableOutputDescriptorDecodeErrorZ_err(uint32_t e);
- // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
- public static native void CResult_SpendableOutputDescriptorDecodeErrorZ_free(uint32_t _res);
- // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
- public static native void CVec_SignatureZ_free(byte[][] _res);
- // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
- public static native void C2Tuple_SignatureCVec_SignatureZZ_free(uint32_t _res);
- // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
- public static native uint32_t C2Tuple_SignatureCVec_SignatureZZ_new(byte[] a, byte[][] b);
- // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
- public static native uint32_t CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(uint32_t o);
- // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
- public static native uint32_t CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
+ public static native long LDKCVec_NetAddressZ_new(number[] elems);
+ // 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 boolean LDKCResult_PaymentSecretAPIErrorZ_result_ok(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 long LDKCVec_ChannelMonitorZ_new(number[] elems);
+
+
+
+// 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;
+ }
+
+ 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;
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKFeeEstimator {
+ get_est_sat_per_1000_weight (confirmation_target: ConfirmationTarget): number;
+ }
+
+ export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
+ export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: ConfirmationTarget): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
+ return nativeResponseValue;
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKLogger {
+ log (record: String): void;
+ }
+
+ export function LDKLogger_new(impl: LDKLogger): number {
+ throw new Error('unimplemented'); // TODO: bind to WASM
+ }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+ // 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 boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
+
+
+
+// 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 boolean LDKCResult_COption_TypeZDecodeErrorZ_result_ok(long arg);
+ 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 boolean LDKCResult_PaymentIdPaymentErrorZ_result_ok(long arg);
+ public static native Uint8Array LDKCResult_PaymentIdPaymentErrorZ_get_ok(long arg);
+ public static native number LDKCResult_PaymentIdPaymentErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_SiPrefixNoneZ_result_ok(long arg);
+ public static native SiPrefix LDKCResult_SiPrefixNoneZ_get_ok(long arg);
+ public static native void LDKCResult_SiPrefixNoneZ_get_err(long arg);
+ public static native boolean LDKCResult_InvoiceNoneZ_result_ok(long arg);
+ public static native number LDKCResult_InvoiceNoneZ_get_ok(long arg);
+ public static native void LDKCResult_InvoiceNoneZ_get_err(long arg);
+ public static native boolean LDKCResult_SignedRawInvoiceNoneZ_result_ok(long arg);
+ public static native number LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
+ public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
+ // 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 boolean LDKCResult_PayeePubKeyErrorZ_result_ok(long arg);
+ public static native number LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
+ public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
+ public static native long LDKCVec_PrivateRouteZ_new(number[] elems);
+ public static native boolean LDKCResult_PositiveTimestampCreationErrorZ_result_ok(long arg);
+ public static native number LDKCResult_PositiveTimestampCreationErrorZ_get_ok(long arg);
+ public static native CreationError LDKCResult_PositiveTimestampCreationErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NoneSemanticErrorZ_result_ok(long arg);
+ public static native void LDKCResult_NoneSemanticErrorZ_get_ok(long arg);
+ public static native SemanticError LDKCResult_NoneSemanticErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_InvoiceSemanticErrorZ_result_ok(long arg);
+ public static native number LDKCResult_InvoiceSemanticErrorZ_get_ok(long arg);
+ public static native SemanticError LDKCResult_InvoiceSemanticErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_DescriptionCreationErrorZ_result_ok(long arg);
+ public static native number LDKCResult_DescriptionCreationErrorZ_get_ok(long arg);
+ public static native CreationError LDKCResult_DescriptionCreationErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ExpiryTimeCreationErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ExpiryTimeCreationErrorZ_get_ok(long arg);
+ public static native CreationError LDKCResult_ExpiryTimeCreationErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_PrivateRouteCreationErrorZ_result_ok(long arg);
+ public static native number LDKCResult_PrivateRouteCreationErrorZ_get_ok(long arg);
+ public static native CreationError LDKCResult_PrivateRouteCreationErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_StringErrorZ_result_ok(long arg);
+ public static native String LDKCResult_StringErrorZ_get_ok(long arg);
+ public static native Secp256k1Error LDKCResult_StringErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
+ public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
+ // 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);
+ }
+ public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
+ // 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;
+ }
+ public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
+ public static class LDKPaymentPurpose {
+ private LDKPaymentPurpose() {}
+ export class InvoicePayment extends LDKPaymentPurpose {
+ public Uint8Array payment_preimage;
+ public Uint8Array payment_secret;
+ public number user_payment_id;
+ InvoicePayment(Uint8Array payment_preimage, Uint8Array payment_secret, number user_payment_id) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; this.user_payment_id = user_payment_id; }
+ }
+ export class SpontaneousPayment extends LDKPaymentPurpose {
+ public Uint8Array spontaneous_payment;
+ SpontaneousPayment(Uint8Array spontaneous_payment) { this.spontaneous_payment = spontaneous_payment; }
+ }
+ static native void init();
+ }
+ static { LDKPaymentPurpose.init(); }
+ public static native LDKPaymentPurpose LDKPaymentPurpose_ref_from_ptr(long ptr);
+ public static class LDKClosureReason {
+ private LDKClosureReason() {}
+ export class CounterpartyForceClosed extends LDKClosureReason {
+ public String peer_msg;
+ CounterpartyForceClosed(String peer_msg) { this.peer_msg = peer_msg; }
+ }
+ export class HolderForceClosed extends LDKClosureReason {
+ HolderForceClosed() { }
+ }
+ export class CooperativeClosure extends LDKClosureReason {
+ CooperativeClosure() { }
+ }
+ export class CommitmentTxConfirmed extends LDKClosureReason {
+ CommitmentTxConfirmed() { }
+ }
+ export class ProcessingError extends LDKClosureReason {
+ public String err;
+ ProcessingError(String err) { this.err = err; }
+ }
+ export class DisconnectedPeer extends LDKClosureReason {
+ DisconnectedPeer() { }
+ }
+ export class OutdatedChannelManager extends LDKClosureReason {
+ OutdatedChannelManager() { }
+ }
+ static native void init();
+ }
+ static { LDKClosureReason.init(); }
+ public static native LDKClosureReason LDKClosureReason_ref_from_ptr(long ptr);
+ public static class LDKEvent {
+ private LDKEvent() {}
+ export class FundingGenerationReady extends LDKEvent {
+ public Uint8Array temporary_channel_id;
+ public number channel_value_satoshis;
+ public Uint8Array output_script;
+ public number user_channel_id;
+ FundingGenerationReady(Uint8Array temporary_channel_id, number channel_value_satoshis, Uint8Array output_script, number user_channel_id) { this.temporary_channel_id = temporary_channel_id; this.channel_value_satoshis = channel_value_satoshis; this.output_script = output_script; this.user_channel_id = user_channel_id; }
+ }
+ export class PaymentReceived extends LDKEvent {
+ public Uint8Array payment_hash;
+ public number amt;
+ public number purpose;
+ PaymentReceived(Uint8Array payment_hash, number amt, number purpose) { this.payment_hash = payment_hash; this.amt = amt; this.purpose = purpose; }
+ }
+ export class PaymentSent extends LDKEvent {
+ public Uint8Array payment_id;
+ public Uint8Array payment_preimage;
+ public Uint8Array payment_hash;
+ public number fee_paid_msat;
+ PaymentSent(Uint8Array payment_id, Uint8Array payment_preimage, Uint8Array payment_hash, number fee_paid_msat) { this.payment_id = payment_id; this.payment_preimage = payment_preimage; this.payment_hash = payment_hash; this.fee_paid_msat = fee_paid_msat; }
+ }
+ export class PaymentPathFailed extends LDKEvent {
+ public Uint8Array payment_id;
+ public Uint8Array payment_hash;
+ public boolean rejected_by_dest;
+ public number network_update;
+ public boolean all_paths_failed;
+ public number[] path;
+ public number short_channel_id;
+ public number retry;
+ PaymentPathFailed(Uint8Array payment_id, Uint8Array payment_hash, boolean rejected_by_dest, number network_update, boolean all_paths_failed, number[] path, number short_channel_id, number retry) { this.payment_id = payment_id; this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; this.network_update = network_update; this.all_paths_failed = all_paths_failed; this.path = path; this.short_channel_id = short_channel_id; this.retry = retry; }
+ }
+ export class PendingHTLCsForwardable extends LDKEvent {
+ public number time_forwardable;
+ PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
+ }
+ export class SpendableOutputs extends LDKEvent {
+ public number[] outputs;
+ SpendableOutputs(number[] outputs) { this.outputs = outputs; }
+ }
+ export class PaymentForwarded extends LDKEvent {
+ public number fee_earned_msat;
+ public boolean claim_from_onchain_tx;
+ PaymentForwarded(number fee_earned_msat, boolean claim_from_onchain_tx) { this.fee_earned_msat = fee_earned_msat; this.claim_from_onchain_tx = claim_from_onchain_tx; }
+ }
+ export class ChannelClosed extends LDKEvent {
+ public Uint8Array channel_id;
+ public number user_channel_id;
+ public number reason;
+ ChannelClosed(Uint8Array channel_id, number user_channel_id, number reason) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.reason = reason; }
+ }
+ export class DiscardFunding extends LDKEvent {
+ public Uint8Array channel_id;
+ public Uint8Array transaction;
+ DiscardFunding(Uint8Array channel_id, Uint8Array transaction) { this.channel_id = channel_id; this.transaction = transaction; }
+ }
+ static native void init();
+ }
+ static { LDKEvent.init(); }
+ public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
+ public static native long LDKCVec_EventZ_new(number[] elems);
+ // 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;
+ }
+ public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
+ // 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 native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
+ 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 long LDKCVec_BalanceZ_new(number[] elems);
+ public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
+ public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
+ // 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 long LDKCVec_C2Tuple_PublicKeyTypeZZ_new(number[] elems);
+ public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
+ public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
+ public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
+ // 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 long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
+ public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
+ public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
+ public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
+ public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
+ public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
+ public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
+ public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NodeIdDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_NodeIdDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NodeIdDecodeErrorZ_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 boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
+ public static native long LDKCVec_u64Z_new(number[] elems);
+ public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
+ public static 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 boolean LDKCResult_NetAddressDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_NetAddressDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NetAddressDecodeErrorZ_get_err(long arg);
+ public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
+ public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
+ public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
+ public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
+ public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_result_ok(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 boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
+ public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
+ public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
+ public static class LDKSignOrCreationError {
+ private LDKSignOrCreationError() {}
+ export class SignError extends LDKSignOrCreationError {
+ SignError() { }
+ }
+ export class CreationError extends LDKSignOrCreationError {
+ public CreationError creation_error;
+ CreationError(CreationError creation_error) { this.creation_error = creation_error; }
+ }
+ static native void init();
+ }
+ static { LDKSignOrCreationError.init(); }
+ public static native LDKSignOrCreationError LDKSignOrCreationError_ref_from_ptr(long ptr);
+ public static native boolean LDKCResult_InvoiceSignOrCreationErrorZ_result_ok(long arg);
+ public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_ok(long arg);
+ public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_err(long arg);
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface 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 boolean LDKCResult_LockedChannelMonitorNoneZ_result_ok(long arg);
+ public static native number LDKCResult_LockedChannelMonitorNoneZ_get_ok(long arg);
+ public static native void LDKCResult_LockedChannelMonitorNoneZ_get_err(long arg);
+ public static native long LDKCVec_OutPointZ_new(number[] elems);
+
+
+
+// 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, source: number, target: number): number;
+ payment_path_failed (path: number[], short_channel_id: 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, 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, 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, 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
+ }
+ // 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 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;
+ retry_payment (route: number, payment_id: Uint8Array): number;
+ }
+
+ 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_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;
+ }
+
+
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+ export interface LDKRouter {
+ find_route (payer: Uint8Array, params: number, 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, struct LDKCVec_ChannelDetailsZ *first_hops, const struct LDKScore *NONNULL_PTR scorer
+ export function Router_find_route(this_arg: number, payer: Uint8Array, params: number, 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, 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
+ }
+ // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
+ export function TxOut_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TxOut_clone(orig);
+ return nativeResponseValue;
+ }
+ // void Str_free(struct LDKStr _res);
+ export function Str_free(_res: String): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Str_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
+ export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
+ export function CResult_SecretKeyErrorZ_err(e: Secp256k1Error): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
+ export function CResult_SecretKeyErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
+ export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
+ export function CResult_PublicKeyErrorZ_err(e: Secp256k1Error): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
+ export function CResult_PublicKeyErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
+ export function CResult_PublicKeyErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
+ export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
+ export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
+ export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
+ export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
+ export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
+ export function CResult_TxCreationKeysErrorZ_err(e: Secp256k1Error): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
+ export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
+ export function CResult_TxCreationKeysErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
+ export function COption_u32Z_some(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u32Z_some(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_u32Z COption_u32Z_none(void);
+ export function COption_u32Z_none(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u32Z_none();
+ return nativeResponseValue;
+ }
+ // void COption_u32Z_free(struct LDKCOption_u32Z _res);
+ export function COption_u32Z_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u32Z_free(_res);
+ // debug statements here
+ }
+ // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
+ export function COption_u32Z_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_u32Z_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
+ export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
+ export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
+ export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
+ export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
+ export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
+ export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
+ export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
+ export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
+ export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
+ export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
+ export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_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;
+ }
+ // 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;
+ }
+ // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
+ export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
+ export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
+ export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
+ return nativeResponseValue;
+ }
+ // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
+ export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
+ export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
+ export function CResult_CVec_SignatureZNoneZ_err(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
+ return nativeResponseValue;
+ }
+ // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
+ export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
+ export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_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;
+ }
+ // 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
+ }
+ // 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;
+ }
+ // 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
+ }
+ // 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;
+ }
+ // void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res);
+ export function CResult_NoneErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_clone(const struct LDKCResult_NoneErrorZ *NONNULL_PTR orig);
+ export function CResult_NoneErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
+ export function CResult_RouteHopDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_RouteHopDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
+ export function CResult_RouteHopDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_RouteHopDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
+ export function CVec_RouteHopZ_free(_res: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
+ // debug statements here
+ }
+ // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
+ export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
+ export function CResult_RouteDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_RouteDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
+ export function CResult_RouteDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct 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;
+ }
+ // 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
+ }
+ // 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
+ }
+ // 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;
+ }
+ // 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
+ }
+ // 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;
+ }
+ // 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
+ }
+ // 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;
+ }
+ // 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
+ }
+ // 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;
+ }
+ // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
+ export function CResult_RouteLightningErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
+ export function CResult_RouteLightningErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
+ export function CResult_TxOutAccessErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
+ export function CResult_TxOutAccessErrorZ_err(e: AccessError): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
+ export function CResult_TxOutAccessErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
+ export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
+ export function C2Tuple_usizeTransactionZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
+ export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
+ return nativeResponseValue;
+ }
+ // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
+ export function C2Tuple_usizeTransactionZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
+ // debug statements here
+ }
+ // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
+ export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
+ // debug statements here
+ }
+ // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
+ export function CVec_TxidZ_free(_res: Uint8Array[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_TxidZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
+ export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
+ export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
+ export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
+ export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
+ export function CVec_MonitorEventZ_free(_res: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
+ export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_some(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
+ export function COption_C2Tuple_usizeTransactionZZ_none(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_none();
+ return nativeResponseValue;
+ }
+ // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
+ export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
+ export function COption_C2Tuple_usizeTransactionZZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // 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
+ }
+ // 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
+ }
+ // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
+ export function CVec_MessageSendEventZ_free(_res: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
+ export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
+ export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
+ export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
+ export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
+ export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
+ export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
+ export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
+ export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_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;
+ }
+ // 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;
+ }
+ // 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_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
+ export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
+ export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
+ export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
+ export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
+ export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
+ export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
+ return nativeResponseValue;
+ }
+ // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
+ export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
+ export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct 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;
+ }
+ // 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
+ }
+ // 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;
+ }
+ // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
+ export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
+ export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
+ return nativeResponseValue;
+ }
+ // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
+ export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
+ // debug statements here
+ }
+ // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
+ export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
+ export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
+ return nativeResponseValue;
+ }