X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FDelayedPaymentOutputDescriptor.cs;fp=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FDelayedPaymentOutputDescriptor.cs;h=b5536ec450da76fd94388d61f2e58cde0122446d;hb=3d1f246d05172683acd3b81836de4e4e9f0c1afd;hp=cb13ce907ab29174d8d8334a0fb844c6448f3e5a;hpb=a32b8843c44637ebd82c83390d17db573b972153;p=ldk-java diff --git a/c_sharp/src/org/ldk/structs/DelayedPaymentOutputDescriptor.cs b/c_sharp/src/org/ldk/structs/DelayedPaymentOutputDescriptor.cs index cb13ce90..b5536ec4 100644 --- a/c_sharp/src/org/ldk/structs/DelayedPaymentOutputDescriptor.cs +++ b/c_sharp/src/org/ldk/structs/DelayedPaymentOutputDescriptor.cs @@ -103,22 +103,24 @@ public class DelayedPaymentOutputDescriptor : CommonBase { * The revocation point specific to the commitment transaction which was broadcast. Used to * derive the witnessScript for this output. */ - public byte[] get_revocation_pubkey() { + public RevocationKey get_revocation_pubkey() { long ret = bindings.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this.ptr); GC.KeepAlive(this); if (ret >= 0 && ret <= 4096) { return null; } - byte[] ret_conv = InternalUtils.decodeUint8Array(ret); - return ret_conv; + org.ldk.structs.RevocationKey ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.RevocationKey(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; } /** * The revocation point specific to the commitment transaction which was broadcast. Used to * derive the witnessScript for this output. */ - public void set_revocation_pubkey(byte[] val) { - bindings.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(val, 33))); + public void set_revocation_pubkey(org.ldk.structs.RevocationKey val) { + bindings.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this.ptr, val == null ? 0 : val.ptr); GC.KeepAlive(this); GC.KeepAlive(val); + if (this != null) { this.ptrs_to.AddLast(val); }; } /** @@ -164,8 +166,8 @@ public class DelayedPaymentOutputDescriptor : CommonBase { /** * Constructs a new DelayedPaymentOutputDescriptor given each field */ - public static DelayedPaymentOutputDescriptor of(org.ldk.structs.OutPoint outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, org.ldk.structs.TxOut output_arg, byte[] revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg) { - long ret = bindings.DelayedPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point_arg, 33)), to_self_delay_arg, output_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(revocation_pubkey_arg, 33)), InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_keys_id_arg, 32)), channel_value_satoshis_arg); + public static DelayedPaymentOutputDescriptor of(org.ldk.structs.OutPoint outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, org.ldk.structs.TxOut output_arg, org.ldk.structs.RevocationKey revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg) { + long ret = bindings.DelayedPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(per_commitment_point_arg, 33)), to_self_delay_arg, output_arg.ptr, revocation_pubkey_arg == null ? 0 : revocation_pubkey_arg.ptr, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(channel_keys_id_arg, 32)), channel_value_satoshis_arg); GC.KeepAlive(outpoint_arg); GC.KeepAlive(per_commitment_point_arg); GC.KeepAlive(to_self_delay_arg); @@ -177,6 +179,7 @@ public class DelayedPaymentOutputDescriptor : CommonBase { org.ldk.structs.DelayedPaymentOutputDescriptor ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.DelayedPaymentOutputDescriptor(null, ret); } if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(outpoint_arg); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(revocation_pubkey_arg); }; return ret_hu_conv; }