X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FShutdownScript.cs;h=cb9709f2f50299c80a22b3a5476bf65e447252fb;hb=3d1f246d05172683acd3b81836de4e4e9f0c1afd;hp=30bf39a305b7cb48c3d98b37e01021916836f939;hpb=afb5ef3730c7175ccdd22a20ea4e071c663cb709;p=ldk-java diff --git a/c_sharp/src/org/ldk/structs/ShutdownScript.cs b/c_sharp/src/org/ldk/structs/ShutdownScript.cs index 30bf39a3..cb9709f2 100644 --- a/c_sharp/src/org/ldk/structs/ShutdownScript.cs +++ b/c_sharp/src/org/ldk/structs/ShutdownScript.cs @@ -108,17 +108,16 @@ public class ShutdownScript : CommonBase { * * This function may return an error if `program` is invalid for the segwit `version`. */ - public static Result_ShutdownScriptInvalidShutdownScriptZ new_witness_program(org.ldk.util.WitnessVersion version, byte[] program) { - long ret = bindings.ShutdownScript_new_witness_program(version.getVal(), InternalUtils.encodeUint8Array(program)); - GC.KeepAlive(version); - GC.KeepAlive(program); + public static Result_ShutdownScriptInvalidShutdownScriptZ new_witness_program(org.ldk.structs.WitnessProgram witness_program) { + long ret = bindings.ShutdownScript_new_witness_program(witness_program.ptr); + GC.KeepAlive(witness_program); if (ret >= 0 && ret <= 4096) { return null; } Result_ShutdownScriptInvalidShutdownScriptZ ret_hu_conv = Result_ShutdownScriptInvalidShutdownScriptZ.constr_from_ptr(ret); return ret_hu_conv; } /** - * Converts the shutdown script into the underlying [`Script`]. + * Converts the shutdown script into the underlying [`ScriptBuf`]. */ public byte[] into_inner() { long ret = bindings.ShutdownScript_into_inner(this.ptr);