6 namespace org { namespace ldk { namespace structs {
10 * A tx_ack_rbf message which acknowledges replacement of the transaction after it's been
13 public class TxAckRbf : CommonBase {
14 internal TxAckRbf(object _dummy, long ptr) : base(ptr) { }
16 if (ptr != 0) { bindings.TxAckRbf_free(ptr); }
22 public byte[] get_channel_id() {
23 byte[] ret = bindings.TxAckRbf_get_channel_id(this.ptr);
31 public void set_channel_id(byte[] val) {
32 bindings.TxAckRbf_set_channel_id(this.ptr, InternalUtils.check_arr_len(val, 32));
38 * The number of satoshis the sender will contribute to or, if negative, remove from
39 * (e.g. splice-out) the funding output of the transaction
41 public Option_i64Z get_funding_output_contribution() {
42 long ret = bindings.TxAckRbf_get_funding_output_contribution(this.ptr);
44 if (ret >= 0 && ret <= 4096) { return null; }
45 org.ldk.structs.Option_i64Z ret_hu_conv = org.ldk.structs.Option_i64Z.constr_from_ptr(ret);
46 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
51 * The number of satoshis the sender will contribute to or, if negative, remove from
52 * (e.g. splice-out) the funding output of the transaction
54 public void set_funding_output_contribution(org.ldk.structs.Option_i64Z val) {
55 bindings.TxAckRbf_set_funding_output_contribution(this.ptr, val.ptr);
58 if (this != null) { this.ptrs_to.AddLast(val); };
62 * Constructs a new TxAckRbf given each field
64 public static TxAckRbf of(byte[] channel_id_arg, org.ldk.structs.Option_i64Z funding_output_contribution_arg) {
65 long ret = bindings.TxAckRbf_new(InternalUtils.check_arr_len(channel_id_arg, 32), funding_output_contribution_arg.ptr);
66 GC.KeepAlive(channel_id_arg);
67 GC.KeepAlive(funding_output_contribution_arg);
68 if (ret >= 0 && ret <= 4096) { return null; }
69 org.ldk.structs.TxAckRbf ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxAckRbf(null, ret); }
70 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
71 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(funding_output_contribution_arg); };
75 internal long clone_ptr() {
76 long ret = bindings.TxAckRbf_clone_ptr(this.ptr);
82 * Creates a copy of the TxAckRbf
84 public TxAckRbf clone() {
85 long ret = bindings.TxAckRbf_clone(this.ptr);
87 if (ret >= 0 && ret <= 4096) { return null; }
88 org.ldk.structs.TxAckRbf ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.TxAckRbf(null, ret); }
89 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
94 * Checks if two TxAckRbfs contain equal inner contents.
95 * This ignores pointers and is_owned flags and looks at the values in fields.
96 * Two objects with NULL inner values will be considered "equal" here.
98 public bool eq(org.ldk.structs.TxAckRbf b) {
99 bool ret = bindings.TxAckRbf_eq(this.ptr, b == null ? 0 : b.ptr);
102 if (this != null) { this.ptrs_to.AddLast(b); };
106 public override bool Equals(object o) {
107 if (!(o is TxAckRbf)) return false;
108 return this.eq((TxAckRbf)o);
111 * Serialize the TxAckRbf object into a byte array which can be read by TxAckRbf_read
113 public byte[] write() {
114 byte[] ret = bindings.TxAckRbf_write(this.ptr);
120 * Read a TxAckRbf from a byte array, created by TxAckRbf_write
122 public static Result_TxAckRbfDecodeErrorZ read(byte[] ser) {
123 long ret = bindings.TxAckRbf_read(ser);
125 if (ret >= 0 && ret <= 4096) { return null; }
126 Result_TxAckRbfDecodeErrorZ ret_hu_conv = Result_TxAckRbfDecodeErrorZ.constr_from_ptr(ret);