- // void Type_free(struct LDKType this_ptr);
- export function Type_free(this_ptr: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Type_free(this_ptr);
- // debug statements here
- }
- // void NodeId_free(struct LDKNodeId this_obj);
- export function NodeId_free(this_obj: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeId_free(this_obj);
- // debug statements here
- }
- // uint64_t NodeId_clone_ptr(LDKNodeId *NONNULL_PTR arg);
- export function NodeId_clone_ptr(arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeId_clone_ptr(arg);
- return nativeResponseValue;
- }
- // struct LDKNodeId NodeId_clone(const struct LDKNodeId *NONNULL_PTR orig);
- export function NodeId_clone(orig: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeId_clone(orig);
- return nativeResponseValue;
- }
- // MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey);
- export function NodeId_from_pubkey(pubkey: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeId_from_pubkey(encodeUint8Array(pubkey));
- return nativeResponseValue;
- }
- // MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg);
- export function NodeId_as_slice(this_arg: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeId_as_slice(this_arg);
- return decodeUint8Array(nativeResponseValue);
- }
- // uint64_t NodeId_hash(const struct LDKNodeId *NONNULL_PTR o);
- export function NodeId_hash(o: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeId_hash(o);
- return nativeResponseValue;
- }
- // struct LDKCVec_u8Z NodeId_write(const struct LDKNodeId *NONNULL_PTR obj);
- export function NodeId_write(obj: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeId_write(obj);
- return decodeUint8Array(nativeResponseValue);
- }
- // struct LDKCResult_NodeIdDecodeErrorZ NodeId_read(struct LDKu8slice ser);
- export function NodeId_read(ser: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeId_read(encodeUint8Array(ser));
- return nativeResponseValue;
- }
- // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
- export function NetworkGraph_free(this_obj: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkGraph_free(this_obj);
- // debug statements here
- }
- // uint64_t NetworkGraph_clone_ptr(LDKNetworkGraph *NONNULL_PTR arg);
- export function NetworkGraph_clone_ptr(arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkGraph_clone_ptr(arg);
- return nativeResponseValue;
- }
- // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
- export function NetworkGraph_clone(orig: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkGraph_clone(orig);
- return nativeResponseValue;
- }
- // void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
- export function ReadOnlyNetworkGraph_free(this_obj: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ReadOnlyNetworkGraph_free(this_obj);
- // debug statements here
- }
- // void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
- export function NetworkUpdate_free(this_ptr: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkUpdate_free(this_ptr);
- // debug statements here
- }
- // uint64_t NetworkUpdate_clone_ptr(LDKNetworkUpdate *NONNULL_PTR arg);
- export function NetworkUpdate_clone_ptr(arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkUpdate_clone_ptr(arg);
- return nativeResponseValue;
- }
- // struct LDKNetworkUpdate NetworkUpdate_clone(const struct LDKNetworkUpdate *NONNULL_PTR orig);
- export function NetworkUpdate_clone(orig: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkUpdate_clone(orig);
- return nativeResponseValue;
- }
- // struct LDKNetworkUpdate NetworkUpdate_channel_update_message(struct LDKChannelUpdate msg);
- export function NetworkUpdate_channel_update_message(msg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkUpdate_channel_update_message(msg);
- return nativeResponseValue;
- }
- // struct LDKNetworkUpdate NetworkUpdate_channel_closed(uint64_t short_channel_id, bool is_permanent);
- export function NetworkUpdate_channel_closed(short_channel_id: number, is_permanent: boolean): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkUpdate_channel_closed(short_channel_id, is_permanent);
- return nativeResponseValue;
- }
- // struct LDKNetworkUpdate NetworkUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
- export function NetworkUpdate_node_failure(node_id: Uint8Array, is_permanent: boolean): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkUpdate_node_failure(encodeUint8Array(node_id), is_permanent);
- return nativeResponseValue;
- }
- // struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
- export function NetworkUpdate_write(obj: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkUpdate_write(obj);
- return decodeUint8Array(nativeResponseValue);
- }
- // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ NetworkUpdate_read(struct LDKu8slice ser);
- export function NetworkUpdate_read(ser: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkUpdate_read(encodeUint8Array(ser));
- return nativeResponseValue;
- }
- // struct LDKEventHandler NetGraphMsgHandler_as_EventHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
- export function NetGraphMsgHandler_as_EventHandler(this_arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetGraphMsgHandler_as_EventHandler(this_arg);
- return nativeResponseValue;
- }
- // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
- export function NetGraphMsgHandler_free(this_obj: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetGraphMsgHandler_free(this_obj);
- // debug statements here
- }
- // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKCOption_AccessZ chain_access, struct LDKLogger logger);
- export function NetGraphMsgHandler_new(network_graph: number, chain_access: number, logger: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetGraphMsgHandler_new(network_graph, chain_access, logger);
- return nativeResponseValue;
- }
- // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKCOption_AccessZ chain_access);
- export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
- // debug statements here
- }
- // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
- export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
- return nativeResponseValue;
- }
- // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
- export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
- return nativeResponseValue;
- }
- // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
- export function DirectionalChannelInfo_free(this_obj: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_free(this_obj);
- // debug statements here
- }
- // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
- export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_last_update(this_ptr);
- return nativeResponseValue;
- }
- // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
- export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_last_update(this_ptr, val);
- // debug statements here
- }
- // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
- export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_enabled(this_ptr);
- return nativeResponseValue;
- }
- // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
- export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_enabled(this_ptr, val);
- // debug statements here
- }
- // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
- export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
- return nativeResponseValue;
- }
- // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
- export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
- // debug statements here
- }
- // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
- export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
- return nativeResponseValue;
- }
- // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
- export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
- // debug statements here
- }
- // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
- export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
- return nativeResponseValue;
- }
- // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
- export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
- // debug statements here
- }
- // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
- export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_fees(this_ptr);
- return nativeResponseValue;
- }
- // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
- export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_fees(this_ptr, val);
- // debug statements here
- }
- // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
- export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_last_update_message(this_ptr);
- return nativeResponseValue;
- }
- // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
- export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_last_update_message(this_ptr, val);
- // debug statements here
- }
- // MUST_USE_RES struct LDKDirectionalChannelInfo DirectionalChannelInfo_new(uint32_t last_update_arg, bool enabled_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg, struct LDKRoutingFees fees_arg, struct LDKChannelUpdate last_update_message_arg);
- export function DirectionalChannelInfo_new(last_update_arg: number, enabled_arg: boolean, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number, htlc_maximum_msat_arg: number, fees_arg: number, last_update_message_arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, fees_arg, last_update_message_arg);
- return nativeResponseValue;
- }
- // uint64_t DirectionalChannelInfo_clone_ptr(LDKDirectionalChannelInfo *NONNULL_PTR arg);
- export function DirectionalChannelInfo_clone_ptr(arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_clone_ptr(arg);
- return nativeResponseValue;
- }
- // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
- export function DirectionalChannelInfo_clone(orig: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_clone(orig);
- return nativeResponseValue;
- }
- // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
- export function DirectionalChannelInfo_write(obj: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_write(obj);
- return decodeUint8Array(nativeResponseValue);
- }
- // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
- export function DirectionalChannelInfo_read(ser: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_DirectionalChannelInfo_read(encodeUint8Array(ser));
- return nativeResponseValue;
- }
- // void ChannelInfo_free(struct LDKChannelInfo this_obj);
- export function ChannelInfo_free(this_obj: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelInfo_free(this_obj);
- // debug statements here
- }
- // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
- export function ChannelInfo_get_features(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelInfo_get_features(this_ptr);
- return nativeResponseValue;
- }
- // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
- export function ChannelInfo_set_features(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelInfo_set_features(this_ptr, val);
- // debug statements here
- }
- // struct LDKNodeId ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
- export function ChannelInfo_get_node_one(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelInfo_get_node_one(this_ptr);
- return nativeResponseValue;
- }
- // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
- export function ChannelInfo_set_node_one(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelInfo_set_node_one(this_ptr, val);
- // debug statements here
- }
- // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
- export function ChannelInfo_get_one_to_two(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelInfo_get_one_to_two(this_ptr);
- return nativeResponseValue;
- }
- // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
- export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelInfo_set_one_to_two(this_ptr, val);
- // debug statements here
- }
- // struct LDKNodeId ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
- export function ChannelInfo_get_node_two(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelInfo_get_node_two(this_ptr);
- return nativeResponseValue;
- }
- // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
- export function ChannelInfo_set_node_two(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelInfo_set_node_two(this_ptr, val);
- // debug statements here
- }
- // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
- export function ChannelInfo_get_two_to_one(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelInfo_get_two_to_one(this_ptr);
- return nativeResponseValue;
- }
- // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
- export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelInfo_set_two_to_one(this_ptr, val);
- // debug statements here
- }
- // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
- export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelInfo_get_capacity_sats(this_ptr);
- return nativeResponseValue;
- }
- // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
- export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelInfo_set_capacity_sats(this_ptr, val);
- // debug statements here
- }
- // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
- export function ChannelInfo_get_announcement_message(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelInfo_get_announcement_message(this_ptr);
- return nativeResponseValue;
- }
- // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
- export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelInfo_set_announcement_message(this_ptr, val);
- // debug statements here
- }
- // uint64_t ChannelInfo_clone_ptr(LDKChannelInfo *NONNULL_PTR arg);
- export function ChannelInfo_clone_ptr(arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelInfo_clone_ptr(arg);
- return nativeResponseValue;
- }
- // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
- export function ChannelInfo_clone(orig: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelInfo_clone(orig);
- return nativeResponseValue;
- }
- // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
- export function ChannelInfo_write(obj: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelInfo_write(obj);
- return decodeUint8Array(nativeResponseValue);
- }
- // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
- export function ChannelInfo_read(ser: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelInfo_read(encodeUint8Array(ser));
- return nativeResponseValue;
- }
- // void RoutingFees_free(struct LDKRoutingFees this_obj);
- export function RoutingFees_free(this_obj: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RoutingFees_free(this_obj);
- // debug statements here
- }
- // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
- export function RoutingFees_get_base_msat(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RoutingFees_get_base_msat(this_ptr);
- return nativeResponseValue;
- }
- // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
- export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RoutingFees_set_base_msat(this_ptr, val);
- // debug statements here
- }
- // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
- export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RoutingFees_get_proportional_millionths(this_ptr);
- return nativeResponseValue;
- }
- // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
- export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RoutingFees_set_proportional_millionths(this_ptr, val);
- // debug statements here
- }
- // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
- export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RoutingFees_new(base_msat_arg, proportional_millionths_arg);
- return nativeResponseValue;
- }
- // bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
- export function RoutingFees_eq(a: number, b: number): boolean {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RoutingFees_eq(a, b);
- return nativeResponseValue;
- }
- // uint64_t RoutingFees_clone_ptr(LDKRoutingFees *NONNULL_PTR arg);
- export function RoutingFees_clone_ptr(arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RoutingFees_clone_ptr(arg);
- return nativeResponseValue;
- }
- // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
- export function RoutingFees_clone(orig: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RoutingFees_clone(orig);
- return nativeResponseValue;
- }
- // uint64_t RoutingFees_hash(const struct LDKRoutingFees *NONNULL_PTR o);
- export function RoutingFees_hash(o: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RoutingFees_hash(o);
- return nativeResponseValue;
- }
- // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
- export function RoutingFees_write(obj: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RoutingFees_write(obj);
- return decodeUint8Array(nativeResponseValue);
- }
- // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
- export function RoutingFees_read(ser: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RoutingFees_read(encodeUint8Array(ser));
- return nativeResponseValue;
- }
- // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
- export function NodeAnnouncementInfo_free(this_obj: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_free(this_obj);
- // debug statements here
- }
- // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
- export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_features(this_ptr);
- return nativeResponseValue;
- }
- // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
- export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_features(this_ptr, val);
- // debug statements here
- }
- // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
- export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_last_update(this_ptr);
- return nativeResponseValue;
- }
- // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
- export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_last_update(this_ptr, val);
- // debug statements here
- }
- // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
- export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_rgb(this_ptr);
- return decodeUint8Array(nativeResponseValue);
- }
- // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
- export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_rgb(this_ptr, encodeUint8Array(val));
- // debug statements here
- }
- // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
- export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_alias(this_ptr);
- return decodeUint8Array(nativeResponseValue);
- }
- // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
- export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_alias(this_ptr, encodeUint8Array(val));
- // debug statements here
- }
- // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
- export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_addresses(this_ptr, val);
- // debug statements here
- }
- // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
- export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_announcement_message(this_ptr);
- return nativeResponseValue;
- }
- // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
- export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
- // debug statements here
- }
- // MUST_USE_RES struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_new(struct LDKNodeFeatures features_arg, uint32_t last_update_arg, struct LDKThreeBytes rgb_arg, struct LDKThirtyTwoBytes alias_arg, struct LDKCVec_NetAddressZ addresses_arg, struct LDKNodeAnnouncement announcement_message_arg);
- export function NodeAnnouncementInfo_new(features_arg: number, last_update_arg: number, rgb_arg: Uint8Array, alias_arg: Uint8Array, addresses_arg: number[], announcement_message_arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeUint8Array(rgb_arg), encodeUint8Array(alias_arg), addresses_arg, announcement_message_arg);
- return nativeResponseValue;
- }
- // uint64_t NodeAnnouncementInfo_clone_ptr(LDKNodeAnnouncementInfo *NONNULL_PTR arg);
- export function NodeAnnouncementInfo_clone_ptr(arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_clone_ptr(arg);
- return nativeResponseValue;
- }
- // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
- export function NodeAnnouncementInfo_clone(orig: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_clone(orig);
- return nativeResponseValue;
- }
- // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
- export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_write(obj);
- return decodeUint8Array(nativeResponseValue);
- }
- // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
- export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_read(encodeUint8Array(ser));
- return nativeResponseValue;
- }
- // void NodeInfo_free(struct LDKNodeInfo this_obj);
- export function NodeInfo_free(this_obj: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeInfo_free(this_obj);
- // debug statements here
- }
- // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
- export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeInfo_set_channels(this_ptr, val);
- // debug statements here
- }
- // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
- export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
- return nativeResponseValue;
- }
- // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
- export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
- // debug statements here
- }
- // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
- export function NodeInfo_get_announcement_info(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeInfo_get_announcement_info(this_ptr);
- return nativeResponseValue;
- }
- // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
- export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeInfo_set_announcement_info(this_ptr, val);
- // debug statements here
- }
- // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
- export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
- return nativeResponseValue;
- }
- // uint64_t NodeInfo_clone_ptr(LDKNodeInfo *NONNULL_PTR arg);
- export function NodeInfo_clone_ptr(arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeInfo_clone_ptr(arg);
- return nativeResponseValue;
- }
- // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
- export function NodeInfo_clone(orig: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeInfo_clone(orig);
- return nativeResponseValue;
- }
- // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
- export function NodeInfo_write(obj: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeInfo_write(obj);
- return decodeUint8Array(nativeResponseValue);
- }
- // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
- export function NodeInfo_read(ser: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NodeInfo_read(encodeUint8Array(ser));
- return nativeResponseValue;
- }
- // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
- export function NetworkGraph_write(obj: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkGraph_write(obj);
- return decodeUint8Array(nativeResponseValue);
- }
- // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
- export function NetworkGraph_read(ser: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkGraph_read(encodeUint8Array(ser));
- return nativeResponseValue;
- }
- // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
- export function NetworkGraph_new(genesis_hash: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkGraph_new(encodeUint8Array(genesis_hash));
- return nativeResponseValue;
- }
- // MUST_USE_RES struct LDKReadOnlyNetworkGraph NetworkGraph_read_only(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
- export function NetworkGraph_read_only(this_arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkGraph_read_only(this_arg);
- return nativeResponseValue;
- }
- // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
- export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkGraph_update_node_from_announcement(this_arg, msg);
- return nativeResponseValue;
- }
- // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
- export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
- return nativeResponseValue;
- }
- // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_AccessZ chain_access);
- export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
- return nativeResponseValue;
- }
- // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_AccessZ chain_access);
- export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
- return nativeResponseValue;
- }
- // void NetworkGraph_close_channel_from_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
- export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
- // debug statements here
- }
- // void NetworkGraph_fail_node(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey _node_id, bool is_permanent);
- export function NetworkGraph_fail_node(this_arg: number, _node_id: Uint8Array, is_permanent: boolean): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkGraph_fail_node(this_arg, encodeUint8Array(_node_id), is_permanent);
- // debug statements here
- }
- // void NetworkGraph_remove_stale_channels_with_time(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t current_time_unix);
- export function NetworkGraph_remove_stale_channels_with_time(this_arg: number, current_time_unix: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkGraph_remove_stale_channels_with_time(this_arg, current_time_unix);
- // debug statements here
- }
- // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
- export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkGraph_update_channel(this_arg, msg);
- return nativeResponseValue;
- }
- // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
- export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_NetworkGraph_update_channel_unsigned(this_arg, msg);
- return nativeResponseValue;
- }
- // MUST_USE_RES struct LDKCOption_CVec_NetAddressZZ ReadOnlyNetworkGraph_get_addresses(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey pubkey);
- export function ReadOnlyNetworkGraph_get_addresses(this_arg: number, pubkey: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ReadOnlyNetworkGraph_get_addresses(this_arg, encodeUint8Array(pubkey));
- return nativeResponseValue;
- }
- // void RouteHop_free(struct LDKRouteHop this_obj);
- export function RouteHop_free(this_obj: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_free(this_obj);
- // debug statements here
- }
- // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
- export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_get_pubkey(this_ptr);
- return decodeUint8Array(nativeResponseValue);
- }
- // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_set_pubkey(this_ptr, encodeUint8Array(val));
- // debug statements here
- }
- // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
- export function RouteHop_get_node_features(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_get_node_features(this_ptr);
- return nativeResponseValue;
- }
- // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
- export function RouteHop_set_node_features(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_set_node_features(this_ptr, val);
- // debug statements here
- }
- // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
- export function RouteHop_get_short_channel_id(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_get_short_channel_id(this_ptr);
- return nativeResponseValue;
- }
- // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
- export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_set_short_channel_id(this_ptr, val);
- // debug statements here
- }
- // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
- export function RouteHop_get_channel_features(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_get_channel_features(this_ptr);
- return nativeResponseValue;
- }
- // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
- export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_set_channel_features(this_ptr, val);
- // debug statements here
- }
- // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
- export function RouteHop_get_fee_msat(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_get_fee_msat(this_ptr);
- return nativeResponseValue;
- }
- // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
- export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_set_fee_msat(this_ptr, val);
- // debug statements here
- }
- // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
- export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_get_cltv_expiry_delta(this_ptr);
- return nativeResponseValue;
- }
- // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
- export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_set_cltv_expiry_delta(this_ptr, val);
- // debug statements here
- }
- // MUST_USE_RES struct LDKRouteHop RouteHop_new(struct LDKPublicKey pubkey_arg, struct LDKNodeFeatures node_features_arg, uint64_t short_channel_id_arg, struct LDKChannelFeatures channel_features_arg, uint64_t fee_msat_arg, uint32_t cltv_expiry_delta_arg);
- export function RouteHop_new(pubkey_arg: Uint8Array, node_features_arg: number, short_channel_id_arg: number, channel_features_arg: number, fee_msat_arg: number, cltv_expiry_delta_arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_new(encodeUint8Array(pubkey_arg), node_features_arg, short_channel_id_arg, channel_features_arg, fee_msat_arg, cltv_expiry_delta_arg);
- return nativeResponseValue;
- }
- // uint64_t RouteHop_clone_ptr(LDKRouteHop *NONNULL_PTR arg);
- export function RouteHop_clone_ptr(arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_clone_ptr(arg);
- return nativeResponseValue;
- }
- // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
- export function RouteHop_clone(orig: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_clone(orig);
- return nativeResponseValue;
- }
- // uint64_t RouteHop_hash(const struct LDKRouteHop *NONNULL_PTR o);
- export function RouteHop_hash(o: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_hash(o);
- return nativeResponseValue;
- }
- // bool RouteHop_eq(const struct LDKRouteHop *NONNULL_PTR a, const struct LDKRouteHop *NONNULL_PTR b);
- export function RouteHop_eq(a: number, b: number): boolean {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_eq(a, b);
- return nativeResponseValue;
- }
- // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
- export function RouteHop_write(obj: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_write(obj);
- return decodeUint8Array(nativeResponseValue);
- }
- // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
- export function RouteHop_read(ser: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHop_read(encodeUint8Array(ser));
- return nativeResponseValue;
- }
- // void Route_free(struct LDKRoute this_obj);
- export function Route_free(this_obj: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Route_free(this_obj);
- // debug statements here
- }
- // struct LDKCVec_CVec_RouteHopZZ Route_get_paths(const struct LDKRoute *NONNULL_PTR this_ptr);
- export function Route_get_paths(this_ptr: number): number[][] {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Route_get_paths(this_ptr);
- return nativeResponseValue;
- }
- // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
- export function Route_set_paths(this_ptr: number, val: number[][]): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Route_set_paths(this_ptr, val);
- // debug statements here
- }
- // struct LDKPayee Route_get_payee(const struct LDKRoute *NONNULL_PTR this_ptr);
- export function Route_get_payee(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Route_get_payee(this_ptr);
- return nativeResponseValue;
- }
- // void Route_set_payee(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKPayee val);
- export function Route_set_payee(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Route_set_payee(this_ptr, val);
- // debug statements here
- }
- // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg, struct LDKPayee payee_arg);
- export function Route_new(paths_arg: number[][], payee_arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Route_new(paths_arg, payee_arg);
- return nativeResponseValue;
- }
- // uint64_t Route_clone_ptr(LDKRoute *NONNULL_PTR arg);
- export function Route_clone_ptr(arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Route_clone_ptr(arg);
- return nativeResponseValue;
- }
- // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
- export function Route_clone(orig: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Route_clone(orig);
- return nativeResponseValue;
- }
- // uint64_t Route_hash(const struct LDKRoute *NONNULL_PTR o);
- export function Route_hash(o: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Route_hash(o);
- return nativeResponseValue;
- }
- // bool Route_eq(const struct LDKRoute *NONNULL_PTR a, const struct LDKRoute *NONNULL_PTR b);
- export function Route_eq(a: number, b: number): boolean {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Route_eq(a, b);
- return nativeResponseValue;
- }
- // MUST_USE_RES uint64_t Route_get_total_fees(const struct LDKRoute *NONNULL_PTR this_arg);
- export function Route_get_total_fees(this_arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Route_get_total_fees(this_arg);
- return nativeResponseValue;
- }
- // MUST_USE_RES uint64_t Route_get_total_amount(const struct LDKRoute *NONNULL_PTR this_arg);
- export function Route_get_total_amount(this_arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Route_get_total_amount(this_arg);
- return nativeResponseValue;
- }
- // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
- export function Route_write(obj: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Route_write(obj);
- return decodeUint8Array(nativeResponseValue);
- }
- // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
- export function Route_read(ser: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Route_read(encodeUint8Array(ser));
- return nativeResponseValue;
- }
- // void RouteParameters_free(struct LDKRouteParameters this_obj);
- export function RouteParameters_free(this_obj: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteParameters_free(this_obj);
- // debug statements here
- }
- // struct LDKPayee RouteParameters_get_payee(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
- export function RouteParameters_get_payee(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteParameters_get_payee(this_ptr);
- return nativeResponseValue;
- }
- // void RouteParameters_set_payee(struct LDKRouteParameters *NONNULL_PTR this_ptr, struct LDKPayee val);
- export function RouteParameters_set_payee(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteParameters_set_payee(this_ptr, val);
- // debug statements here
- }
- // uint64_t RouteParameters_get_final_value_msat(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
- export function RouteParameters_get_final_value_msat(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteParameters_get_final_value_msat(this_ptr);
- return nativeResponseValue;
- }
- // void RouteParameters_set_final_value_msat(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint64_t val);
- export function RouteParameters_set_final_value_msat(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteParameters_set_final_value_msat(this_ptr, val);
- // debug statements here
- }
- // uint32_t RouteParameters_get_final_cltv_expiry_delta(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
- export function RouteParameters_get_final_cltv_expiry_delta(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteParameters_get_final_cltv_expiry_delta(this_ptr);
- return nativeResponseValue;
- }
- // void RouteParameters_set_final_cltv_expiry_delta(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint32_t val);
- export function RouteParameters_set_final_cltv_expiry_delta(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteParameters_set_final_cltv_expiry_delta(this_ptr, val);
- // debug statements here
- }
- // MUST_USE_RES struct LDKRouteParameters RouteParameters_new(struct LDKPayee payee_arg, uint64_t final_value_msat_arg, uint32_t final_cltv_expiry_delta_arg);
- export function RouteParameters_new(payee_arg: number, final_value_msat_arg: number, final_cltv_expiry_delta_arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteParameters_new(payee_arg, final_value_msat_arg, final_cltv_expiry_delta_arg);
- return nativeResponseValue;
- }
- // uint64_t RouteParameters_clone_ptr(LDKRouteParameters *NONNULL_PTR arg);
- export function RouteParameters_clone_ptr(arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteParameters_clone_ptr(arg);
- return nativeResponseValue;
- }
- // struct LDKRouteParameters RouteParameters_clone(const struct LDKRouteParameters *NONNULL_PTR orig);
- export function RouteParameters_clone(orig: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteParameters_clone(orig);
- return nativeResponseValue;
- }
- // struct LDKCVec_u8Z RouteParameters_write(const struct LDKRouteParameters *NONNULL_PTR obj);
- export function RouteParameters_write(obj: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteParameters_write(obj);
- return decodeUint8Array(nativeResponseValue);
- }
- // struct LDKCResult_RouteParametersDecodeErrorZ RouteParameters_read(struct LDKu8slice ser);
- export function RouteParameters_read(ser: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteParameters_read(encodeUint8Array(ser));
- return nativeResponseValue;
- }
- // void Payee_free(struct LDKPayee this_obj);
- export function Payee_free(this_obj: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Payee_free(this_obj);
- // debug statements here
- }
- // struct LDKPublicKey Payee_get_pubkey(const struct LDKPayee *NONNULL_PTR this_ptr);
- export function Payee_get_pubkey(this_ptr: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Payee_get_pubkey(this_ptr);
- return decodeUint8Array(nativeResponseValue);
- }
- // void Payee_set_pubkey(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- export function Payee_set_pubkey(this_ptr: number, val: Uint8Array): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Payee_set_pubkey(this_ptr, encodeUint8Array(val));
- // debug statements here
- }
- // struct LDKInvoiceFeatures Payee_get_features(const struct LDKPayee *NONNULL_PTR this_ptr);
- export function Payee_get_features(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Payee_get_features(this_ptr);
- return nativeResponseValue;
- }
- // void Payee_set_features(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKInvoiceFeatures val);
- export function Payee_set_features(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Payee_set_features(this_ptr, val);
- // debug statements here
- }
- // struct LDKCVec_RouteHintZ Payee_get_route_hints(const struct LDKPayee *NONNULL_PTR this_ptr);
- export function Payee_get_route_hints(this_ptr: number): number[] {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Payee_get_route_hints(this_ptr);
- return nativeResponseValue;
- }
- // void Payee_set_route_hints(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintZ val);
- export function Payee_set_route_hints(this_ptr: number, val: number[]): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Payee_set_route_hints(this_ptr, val);
- // debug statements here
- }
- // struct LDKCOption_u64Z Payee_get_expiry_time(const struct LDKPayee *NONNULL_PTR this_ptr);
- export function Payee_get_expiry_time(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Payee_get_expiry_time(this_ptr);
- return nativeResponseValue;
- }
- // void Payee_set_expiry_time(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
- export function Payee_set_expiry_time(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Payee_set_expiry_time(this_ptr, val);
- // debug statements here
- }
- // MUST_USE_RES struct LDKPayee Payee_new(struct LDKPublicKey pubkey_arg, struct LDKInvoiceFeatures features_arg, struct LDKCVec_RouteHintZ route_hints_arg, struct LDKCOption_u64Z expiry_time_arg);
- export function Payee_new(pubkey_arg: Uint8Array, features_arg: number, route_hints_arg: number[], expiry_time_arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Payee_new(encodeUint8Array(pubkey_arg), features_arg, route_hints_arg, expiry_time_arg);
- return nativeResponseValue;
- }
- // uint64_t Payee_clone_ptr(LDKPayee *NONNULL_PTR arg);
- export function Payee_clone_ptr(arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Payee_clone_ptr(arg);
- return nativeResponseValue;
- }
- // struct LDKPayee Payee_clone(const struct LDKPayee *NONNULL_PTR orig);
- export function Payee_clone(orig: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Payee_clone(orig);
- return nativeResponseValue;
- }
- // uint64_t Payee_hash(const struct LDKPayee *NONNULL_PTR o);
- export function Payee_hash(o: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Payee_hash(o);
- return nativeResponseValue;
- }
- // bool Payee_eq(const struct LDKPayee *NONNULL_PTR a, const struct LDKPayee *NONNULL_PTR b);
- export function Payee_eq(a: number, b: number): boolean {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Payee_eq(a, b);
- return nativeResponseValue;
- }
- // struct LDKCVec_u8Z Payee_write(const struct LDKPayee *NONNULL_PTR obj);
- export function Payee_write(obj: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Payee_write(obj);
- return decodeUint8Array(nativeResponseValue);
- }
- // struct LDKCResult_PayeeDecodeErrorZ Payee_read(struct LDKu8slice ser);
- export function Payee_read(ser: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Payee_read(encodeUint8Array(ser));
- return nativeResponseValue;
- }
- // MUST_USE_RES struct LDKPayee Payee_from_node_id(struct LDKPublicKey pubkey);
- export function Payee_from_node_id(pubkey: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Payee_from_node_id(encodeUint8Array(pubkey));
- return nativeResponseValue;
- }
- // MUST_USE_RES struct LDKPayee Payee_for_keysend(struct LDKPublicKey pubkey);
- export function Payee_for_keysend(pubkey: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Payee_for_keysend(encodeUint8Array(pubkey));
- return nativeResponseValue;
- }
- // void RouteHint_free(struct LDKRouteHint this_obj);
- export function RouteHint_free(this_obj: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHint_free(this_obj);
- // debug statements here
- }
- // struct LDKCVec_RouteHintHopZ RouteHint_get_a(const struct LDKRouteHint *NONNULL_PTR this_ptr);
- export function RouteHint_get_a(this_ptr: number): number[] {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHint_get_a(this_ptr);
- return nativeResponseValue;
- }
- // void RouteHint_set_a(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintHopZ val);
- export function RouteHint_set_a(this_ptr: number, val: number[]): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHint_set_a(this_ptr, val);
- // debug statements here
- }
- // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKCVec_RouteHintHopZ a_arg);
- export function RouteHint_new(a_arg: number[]): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHint_new(a_arg);
- return nativeResponseValue;
- }
- // uint64_t RouteHint_clone_ptr(LDKRouteHint *NONNULL_PTR arg);
- export function RouteHint_clone_ptr(arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHint_clone_ptr(arg);
- return nativeResponseValue;
- }
- // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
- export function RouteHint_clone(orig: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHint_clone(orig);
- return nativeResponseValue;
- }
- // uint64_t RouteHint_hash(const struct LDKRouteHint *NONNULL_PTR o);
- export function RouteHint_hash(o: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHint_hash(o);
- return nativeResponseValue;
- }
- // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
- export function RouteHint_eq(a: number, b: number): boolean {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHint_eq(a, b);
- return nativeResponseValue;
- }
- // struct LDKCVec_u8Z RouteHint_write(const struct LDKRouteHint *NONNULL_PTR obj);
- export function RouteHint_write(obj: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHint_write(obj);
- return decodeUint8Array(nativeResponseValue);
- }
- // struct LDKCResult_RouteHintDecodeErrorZ RouteHint_read(struct LDKu8slice ser);
- export function RouteHint_read(ser: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHint_read(encodeUint8Array(ser));
- return nativeResponseValue;
- }
- // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
- export function RouteHintHop_free(this_obj: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_free(this_obj);
- // debug statements here
- }
- // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
- export function RouteHintHop_get_src_node_id(this_ptr: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_get_src_node_id(this_ptr);
- return decodeUint8Array(nativeResponseValue);
- }
- // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
- export function RouteHintHop_set_src_node_id(this_ptr: number, val: Uint8Array): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_set_src_node_id(this_ptr, encodeUint8Array(val));
- // debug statements here
- }
- // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
- export function RouteHintHop_get_short_channel_id(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_get_short_channel_id(this_ptr);
- return nativeResponseValue;
- }
- // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
- export function RouteHintHop_set_short_channel_id(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_set_short_channel_id(this_ptr, val);
- // debug statements here
- }
- // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
- export function RouteHintHop_get_fees(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_get_fees(this_ptr);
- return nativeResponseValue;
- }
- // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
- export function RouteHintHop_set_fees(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_set_fees(this_ptr, val);
- // debug statements here
- }
- // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
- export function RouteHintHop_get_cltv_expiry_delta(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_get_cltv_expiry_delta(this_ptr);
- return nativeResponseValue;
- }
- // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
- export function RouteHintHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_set_cltv_expiry_delta(this_ptr, val);
- // debug statements here
- }
- // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
- export function RouteHintHop_get_htlc_minimum_msat(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_get_htlc_minimum_msat(this_ptr);
- return nativeResponseValue;
- }
- // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
- export function RouteHintHop_set_htlc_minimum_msat(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_set_htlc_minimum_msat(this_ptr, val);
- // debug statements here
- }
- // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
- export function RouteHintHop_get_htlc_maximum_msat(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_get_htlc_maximum_msat(this_ptr);
- return nativeResponseValue;
- }
- // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
- export function RouteHintHop_set_htlc_maximum_msat(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_set_htlc_maximum_msat(this_ptr, val);
- // debug statements here
- }
- // MUST_USE_RES struct LDKRouteHintHop RouteHintHop_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg);
- export function RouteHintHop_new(src_node_id_arg: Uint8Array, short_channel_id_arg: number, fees_arg: number, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number, htlc_maximum_msat_arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_new(encodeUint8Array(src_node_id_arg), short_channel_id_arg, fees_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg);
- return nativeResponseValue;
- }
- // uint64_t RouteHintHop_clone_ptr(LDKRouteHintHop *NONNULL_PTR arg);
- export function RouteHintHop_clone_ptr(arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_clone_ptr(arg);
- return nativeResponseValue;
- }
- // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
- export function RouteHintHop_clone(orig: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_clone(orig);
- return nativeResponseValue;
- }
- // uint64_t RouteHintHop_hash(const struct LDKRouteHintHop *NONNULL_PTR o);
- export function RouteHintHop_hash(o: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_hash(o);
- return nativeResponseValue;
- }
- // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
- export function RouteHintHop_eq(a: number, b: number): boolean {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_eq(a, b);
- return nativeResponseValue;
- }
- // struct LDKCVec_u8Z RouteHintHop_write(const struct LDKRouteHintHop *NONNULL_PTR obj);
- export function RouteHintHop_write(obj: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_write(obj);
- return decodeUint8Array(nativeResponseValue);
- }
- // struct LDKCResult_RouteHintHopDecodeErrorZ RouteHintHop_read(struct LDKu8slice ser);
- export function RouteHintHop_read(ser: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_RouteHintHop_read(encodeUint8Array(ser));
- return nativeResponseValue;
- }
- // struct LDKCResult_RouteLightningErrorZ find_route(struct LDKPublicKey our_node_pubkey, const struct LDKRouteParameters *NONNULL_PTR params, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKLogger logger, const struct LDKScore *NONNULL_PTR scorer);
- export function find_route(our_node_pubkey: Uint8Array, params: number, network: number, first_hops: number[], logger: number, scorer: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_find_route(encodeUint8Array(our_node_pubkey), params, network, first_hops, logger, scorer);
- return nativeResponseValue;
- }
- // void Score_free(struct LDKScore this_ptr);
- export function Score_free(this_ptr: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_Score_free(this_ptr);
- // debug statements here
- }
- // void LockableScore_free(struct LDKLockableScore this_ptr);
- export function LockableScore_free(this_ptr: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_LockableScore_free(this_ptr);
- // debug statements here
- }
- // void MultiThreadedLockableScore_free(struct LDKMultiThreadedLockableScore this_obj);
- export function MultiThreadedLockableScore_free(this_obj: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_MultiThreadedLockableScore_free(this_obj);
- // debug statements here
- }
- // MUST_USE_RES struct LDKMultiThreadedLockableScore MultiThreadedLockableScore_new(struct LDKScore score);
- export function MultiThreadedLockableScore_new(score: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_MultiThreadedLockableScore_new(score);
- return nativeResponseValue;
- }
- // void ScoringParameters_free(struct LDKScoringParameters this_obj);
- export function ScoringParameters_free(this_obj: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ScoringParameters_free(this_obj);
- // debug statements here
- }
- // uint64_t ScoringParameters_get_base_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
- export function ScoringParameters_get_base_penalty_msat(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ScoringParameters_get_base_penalty_msat(this_ptr);
- return nativeResponseValue;
- }
- // void ScoringParameters_set_base_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
- export function ScoringParameters_set_base_penalty_msat(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ScoringParameters_set_base_penalty_msat(this_ptr, val);
- // debug statements here
- }
- // uint64_t ScoringParameters_get_failure_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
- export function ScoringParameters_get_failure_penalty_msat(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ScoringParameters_get_failure_penalty_msat(this_ptr);
- return nativeResponseValue;
- }
- // void ScoringParameters_set_failure_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
- export function ScoringParameters_set_failure_penalty_msat(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ScoringParameters_set_failure_penalty_msat(this_ptr, val);
- // debug statements here
- }
- // uint16_t ScoringParameters_get_overuse_penalty_start_1024th(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
- export function ScoringParameters_get_overuse_penalty_start_1024th(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ScoringParameters_get_overuse_penalty_start_1024th(this_ptr);
- return nativeResponseValue;
- }
- // void ScoringParameters_set_overuse_penalty_start_1024th(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint16_t val);
- export function ScoringParameters_set_overuse_penalty_start_1024th(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ScoringParameters_set_overuse_penalty_start_1024th(this_ptr, val);
- // debug statements here
- }
- // uint64_t ScoringParameters_get_overuse_penalty_msat_per_1024th(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
- export function ScoringParameters_get_overuse_penalty_msat_per_1024th(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ScoringParameters_get_overuse_penalty_msat_per_1024th(this_ptr);
- return nativeResponseValue;
- }
- // void ScoringParameters_set_overuse_penalty_msat_per_1024th(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
- export function ScoringParameters_set_overuse_penalty_msat_per_1024th(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ScoringParameters_set_overuse_penalty_msat_per_1024th(this_ptr, val);
- // debug statements here
- }
- // uint64_t ScoringParameters_get_failure_penalty_half_life(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
- export function ScoringParameters_get_failure_penalty_half_life(this_ptr: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ScoringParameters_get_failure_penalty_half_life(this_ptr);
- return nativeResponseValue;
- }
- // void ScoringParameters_set_failure_penalty_half_life(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
- export function ScoringParameters_set_failure_penalty_half_life(this_ptr: number, val: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ScoringParameters_set_failure_penalty_half_life(this_ptr, val);
- // debug statements here
- }
- // MUST_USE_RES struct LDKScoringParameters ScoringParameters_new(uint64_t base_penalty_msat_arg, uint64_t failure_penalty_msat_arg, uint16_t overuse_penalty_start_1024th_arg, uint64_t overuse_penalty_msat_per_1024th_arg, uint64_t failure_penalty_half_life_arg);
- export function ScoringParameters_new(base_penalty_msat_arg: number, failure_penalty_msat_arg: number, overuse_penalty_start_1024th_arg: number, overuse_penalty_msat_per_1024th_arg: number, failure_penalty_half_life_arg: number): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ScoringParameters_new(base_penalty_msat_arg, failure_penalty_msat_arg, overuse_penalty_start_1024th_arg, overuse_penalty_msat_per_1024th_arg, failure_penalty_half_life_arg);
- return nativeResponseValue;
- }
- // struct LDKCVec_u8Z ScoringParameters_write(const struct LDKScoringParameters *NONNULL_PTR obj);
- export function ScoringParameters_write(obj: number): Uint8Array {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ScoringParameters_write(obj);
- return decodeUint8Array(nativeResponseValue);
- }
- // struct LDKCResult_ScoringParametersDecodeErrorZ ScoringParameters_read(struct LDKu8slice ser);
- export function ScoringParameters_read(ser: Uint8Array): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ScoringParameters_read(encodeUint8Array(ser));
- return nativeResponseValue;
- }
- // MUST_USE_RES struct LDKScoringParameters ScoringParameters_default(void);
- export function ScoringParameters_default(): number {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ScoringParameters_default();
- return nativeResponseValue;