[TS] Test OnionMessenger in TypeScript tests
[ldk-java] / ts / structs / ShutdownScript.mts
index cc9e03cee00e64d58e6cfba2c31396f074ec6d8d..3f81c6ed64e22777a17f341af7e9b8942642c9b9 100644 (file)
@@ -66,6 +66,9 @@ import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurp
 import { ClosureReason } from '../structs/ClosureReason.mjs';
 import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
 import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
+import { HTLCDestination } from '../structs/HTLCDestination.mjs';
+import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
+import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
 import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
 import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
 import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
@@ -103,10 +106,13 @@ import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransaction
 import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
 import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
 import { MonitorEvent } from '../structs/MonitorEvent.mjs';
-import { TwoTuple_OutPointCVec_MonitorEventZZ } from '../structs/TwoTuple_OutPointCVec_MonitorEventZZ.mjs';
+import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
 import { Option_C2Tuple_usizeTransactionZZ } from '../structs/Option_C2Tuple_usizeTransactionZZ.mjs';
 import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
 import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
+import { TwoTuple_u64u64Z } from '../structs/TwoTuple_u64u64Z.mjs';
+import { Option_C2Tuple_u64u64ZZ } from '../structs/Option_C2Tuple_u64u64ZZ.mjs';
+import { NodeId } from '../structs/NodeId.mjs';
 import { Record } from '../structs/Record.mjs';
 import { Logger, LoggerInterface } from '../structs/Logger.mjs';
 import { NetworkGraph } from '../structs/NetworkGraph.mjs';
@@ -121,7 +127,6 @@ import { Result_NodeFeaturesDecodeErrorZ } from '../structs/Result_NodeFeaturesD
 import { InvoiceFeatures } from '../structs/InvoiceFeatures.mjs';
 import { Result_InvoiceFeaturesDecodeErrorZ } from '../structs/Result_InvoiceFeaturesDecodeErrorZ.mjs';
 import { Result_ChannelTypeFeaturesDecodeErrorZ } from '../structs/Result_ChannelTypeFeaturesDecodeErrorZ.mjs';
-import { NodeId } from '../structs/NodeId.mjs';
 import { Result_NodeIdDecodeErrorZ } from '../structs/Result_NodeIdDecodeErrorZ.mjs';
 import { Result_COption_NetworkUpdateZDecodeErrorZ } from '../structs/Result_COption_NetworkUpdateZDecodeErrorZ.mjs';
 import { Access, AccessInterface } from '../structs/Access.mjs';
@@ -135,9 +140,12 @@ import { ChannelInfo } from '../structs/ChannelInfo.mjs';
 import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
 import { RoutingFees } from '../structs/RoutingFees.mjs';
 import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
+import { Hostname } from '../structs/Hostname.mjs';
 import { NetAddress } from '../structs/NetAddress.mjs';
 import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
 import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
+import { NodeAlias } from '../structs/NodeAlias.mjs';
+import { Result_NodeAliasDecodeErrorZ } from '../structs/Result_NodeAliasDecodeErrorZ.mjs';
 import { NodeInfo } from '../structs/NodeInfo.mjs';
 import { Result_NodeInfoDecodeErrorZ } from '../structs/Result_NodeInfoDecodeErrorZ.mjs';
 import { Result_NetworkGraphDecodeErrorZ } from '../structs/Result_NetworkGraphDecodeErrorZ.mjs';
@@ -355,12 +363,12 @@ import * as bindings from '../bindings.mjs'
  */
 export class ShutdownScript extends CommonBase {
        /* @internal */
-       public constructor(_dummy: object, ptr: number) {
+       public constructor(_dummy: object, ptr: bigint) {
                super(ptr, bindings.ShutdownScript_free);
        }
 
-       public clone_ptr(): number {
-               const ret: number = bindings.ShutdownScript_clone_ptr(this.ptr);
+       public clone_ptr(): bigint {
+               const ret: bigint = bindings.ShutdownScript_clone_ptr(this.ptr);
                return ret;
        }
 
@@ -368,7 +376,7 @@ export class ShutdownScript extends CommonBase {
         * Creates a copy of the ShutdownScript
         */
        public clone(): ShutdownScript {
-               const ret: number = bindings.ShutdownScript_clone(this.ptr);
+               const ret: bigint = bindings.ShutdownScript_clone(this.ptr);
                const ret_hu_conv: ShutdownScript = new ShutdownScript(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, this);
                return ret_hu_conv;
@@ -387,7 +395,7 @@ export class ShutdownScript extends CommonBase {
         * Read a ShutdownScript from a byte array, created by ShutdownScript_write
         */
        public static constructor_read(ser: Uint8Array): Result_ShutdownScriptDecodeErrorZ {
-               const ret: number = bindings.ShutdownScript_read(bindings.encodeUint8Array(ser));
+               const ret: bigint = bindings.ShutdownScript_read(bindings.encodeUint8Array(ser));
                const ret_hu_conv: Result_ShutdownScriptDecodeErrorZ = Result_ShutdownScriptDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
@@ -396,7 +404,7 @@ export class ShutdownScript extends CommonBase {
         * Generates a P2WPKH script pubkey from the given [`WPubkeyHash`].
         */
        public static constructor_new_p2wpkh(pubkey_hash: Uint8Array): ShutdownScript {
-               const ret: number = bindings.ShutdownScript_new_p2wpkh(bindings.encodeUint8Array(bindings.check_arr_len(pubkey_hash, 20)));
+               const ret: bigint = bindings.ShutdownScript_new_p2wpkh(bindings.encodeUint8Array(bindings.check_arr_len(pubkey_hash, 20)));
                const ret_hu_conv: ShutdownScript = new ShutdownScript(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
                return ret_hu_conv;
@@ -406,7 +414,7 @@ export class ShutdownScript extends CommonBase {
         * Generates a P2WSH script pubkey from the given [`WScriptHash`].
         */
        public static constructor_new_p2wsh(script_hash: Uint8Array): ShutdownScript {
-               const ret: number = bindings.ShutdownScript_new_p2wsh(bindings.encodeUint8Array(bindings.check_arr_len(script_hash, 32)));
+               const ret: bigint = bindings.ShutdownScript_new_p2wsh(bindings.encodeUint8Array(bindings.check_arr_len(script_hash, 32)));
                const ret_hu_conv: ShutdownScript = new ShutdownScript(null, ret);
                CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
                return ret_hu_conv;
@@ -423,7 +431,7 @@ export class ShutdownScript extends CommonBase {
         * This function may return an error if `program` is invalid for the segwit `version`.
         */
        public static constructor_new_witness_program(version: WitnessVersion, program: Uint8Array): Result_ShutdownScriptInvalidShutdownScriptZ {
-               const ret: number = bindings.ShutdownScript_new_witness_program(version.getVal(), bindings.encodeUint8Array(program));
+               const ret: bigint = bindings.ShutdownScript_new_witness_program(version.getVal(), bindings.encodeUint8Array(program));
                const ret_hu_conv: Result_ShutdownScriptInvalidShutdownScriptZ = Result_ShutdownScriptInvalidShutdownScriptZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
@@ -454,7 +462,7 @@ export class ShutdownScript extends CommonBase {
         * Specifically, checks for compliance with feature `option_shutdown_anysegwit`.
         */
        public is_compatible(features: InitFeatures): boolean {
-               const ret: boolean = bindings.ShutdownScript_is_compatible(this.ptr, features == null ? 0 : CommonBase.get_ptr_of(features) & ~1);
+               const ret: boolean = bindings.ShutdownScript_is_compatible(this.ptr, features == null ? 0n : CommonBase.get_ptr_of(features));
                CommonBase.add_ref_from(this, features);
                return ret;
        }