+ // void ShutdownScript_free(struct LDKShutdownScript this_obj);
+ export function ShutdownScript_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ShutdownScript_free(this_obj);
+ // debug statements here
+ }
+ // struct LDKShutdownScript ShutdownScript_clone(const struct LDKShutdownScript *NONNULL_PTR orig);
+ export function ShutdownScript_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ShutdownScript_clone(orig);
+ return nativeResponseValue;
+ }
+ // void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
+ export function InvalidShutdownScript_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.InvalidShutdownScript_free(this_obj);
+ // debug statements here
+ }
+ // struct LDKu8slice InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
+ export function InvalidShutdownScript_get_script(this_ptr: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.InvalidShutdownScript_get_script(this_ptr);
+ return decodeArray(nativeResponseValue);
+ }
+ // void InvalidShutdownScript_set_script(struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+ export function InvalidShutdownScript_set_script(this_ptr: number, val: Uint8Array): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.InvalidShutdownScript_set_script(this_ptr, encodeArray(val));
+ // debug statements here
+ }
+ // MUST_USE_RES struct LDKInvalidShutdownScript InvalidShutdownScript_new(struct LDKCVec_u8Z script_arg);
+ export function InvalidShutdownScript_new(script_arg: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.InvalidShutdownScript_new(encodeArray(script_arg));
+ return nativeResponseValue;
+ }
+ // struct LDKCVec_u8Z ShutdownScript_write(const struct LDKShutdownScript *NONNULL_PTR obj);
+ export function ShutdownScript_write(obj: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ShutdownScript_write(obj);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKCResult_ShutdownScriptDecodeErrorZ ShutdownScript_read(struct LDKu8slice ser);
+ export function ShutdownScript_read(ser: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ShutdownScript_read(encodeArray(ser));
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2pkh(const uint8_t (*pubkey_hash)[20]);
+ export function ShutdownScript_new_p2pkh(pubkey_hash: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ShutdownScript_new_p2pkh(encodeArray(pubkey_hash));
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2sh(const uint8_t (*script_hash)[20]);
+ export function ShutdownScript_new_p2sh(script_hash: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ShutdownScript_new_p2sh(encodeArray(script_hash));
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wpkh(const uint8_t (*pubkey_hash)[20]);
+ export function ShutdownScript_new_p2wpkh(pubkey_hash: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ShutdownScript_new_p2wpkh(encodeArray(pubkey_hash));
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wsh(const uint8_t (*script_hash)[32]);
+ export function ShutdownScript_new_p2wsh(script_hash: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ShutdownScript_new_p2wsh(encodeArray(script_hash));
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ ShutdownScript_new_witness_program(uint8_t version, struct LDKu8slice program);
+ export function ShutdownScript_new_witness_program(version: number, program: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ShutdownScript_new_witness_program(version, encodeArray(program));
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES struct LDKCVec_u8Z ShutdownScript_into_inner(struct LDKShutdownScript this_arg);
+ export function ShutdownScript_into_inner(this_arg: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ShutdownScript_into_inner(this_arg);
+ return decodeArray(nativeResponseValue);
+ }
+ // MUST_USE_RES struct LDKPublicKey ShutdownScript_as_legacy_pubkey(const struct LDKShutdownScript *NONNULL_PTR this_arg);
+ export function ShutdownScript_as_legacy_pubkey(this_arg: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ShutdownScript_as_legacy_pubkey(this_arg);
+ return decodeArray(nativeResponseValue);
+ }
+ // MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
+ export function ShutdownScript_is_compatible(this_arg: number, features: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ShutdownScript_is_compatible(this_arg, features);
+ return nativeResponseValue;
+ }