X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FAnchorDescriptor.cs;fp=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FAnchorDescriptor.cs;h=0fd351310cbc08a5a2e84734f977a5e490776717;hb=8de7213fbf663ff60322896282dad51e8ab2f001;hp=d1821b34156b2e43a3a3e9e9d514d0a41a920914;hpb=afc50e5d491a11364849383b75a8f939df703bac;p=ldk-java diff --git a/c_sharp/src/org/ldk/structs/AnchorDescriptor.cs b/c_sharp/src/org/ldk/structs/AnchorDescriptor.cs index d1821b34..0fd35131 100644 --- a/c_sharp/src/org/ldk/structs/AnchorDescriptor.cs +++ b/c_sharp/src/org/ldk/structs/AnchorDescriptor.cs @@ -139,9 +139,11 @@ public class AnchorDescriptor : CommonBase { * Returns the witness script of the anchor output in the commitment transaction. */ public byte[] witness_script() { - byte[] ret = bindings.AnchorDescriptor_witness_script(this.ptr); + long ret = bindings.AnchorDescriptor_witness_script(this.ptr); GC.KeepAlive(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; } /** @@ -149,10 +151,12 @@ public class AnchorDescriptor : CommonBase { * transaction. */ public byte[] tx_input_witness(byte[] signature) { - byte[] ret = bindings.AnchorDescriptor_tx_input_witness(this.ptr, InternalUtils.check_arr_len(signature, 64)); + long ret = bindings.AnchorDescriptor_tx_input_witness(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(signature, 64))); GC.KeepAlive(this); GC.KeepAlive(signature); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; } /**