X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FHTLCOutputInCommitment.java;h=97a054bf3f58162809460ff18b19ecd9bf20224f;hb=b6cc0960eaee5a5bbc7fde79a56152d6dcd649d8;hp=0f47affa2de9ab11b68100ce2eb881dfc3e00482;hpb=1b870a3ffab1c0024411e30102bc6d198300f095;p=ldk-java diff --git a/src/main/java/org/ldk/structs/HTLCOutputInCommitment.java b/src/main/java/org/ldk/structs/HTLCOutputInCommitment.java index 0f47affa..97a054bf 100644 --- a/src/main/java/org/ldk/structs/HTLCOutputInCommitment.java +++ b/src/main/java/org/ldk/structs/HTLCOutputInCommitment.java @@ -86,6 +86,37 @@ public class HTLCOutputInCommitment extends CommonBase { bindings.HTLCOutputInCommitment_set_payment_hash(this.ptr, val); } + /** + * The position within the commitment transactions' outputs. This may be None if the value is + * below the dust limit (in which case no output appears in the commitment transaction and the + * value is spent to additional transaction fees). + */ + public Option_u32Z get_transaction_output_index() { + long ret = bindings.HTLCOutputInCommitment_get_transaction_output_index(this.ptr); + Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + + /** + * The position within the commitment transactions' outputs. This may be None if the value is + * below the dust limit (in which case no output appears in the commitment transaction and the + * value is spent to additional transaction fees). + */ + public void set_transaction_output_index(Option_u32Z val) { + bindings.HTLCOutputInCommitment_set_transaction_output_index(this.ptr, val.ptr); + } + + /** + * Constructs a new HTLCOutputInCommitment given each field + */ + public static HTLCOutputInCommitment of(boolean offered_arg, long amount_msat_arg, int cltv_expiry_arg, byte[] payment_hash_arg, Option_u32Z transaction_output_index_arg) { + long ret = bindings.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, payment_hash_arg, transaction_output_index_arg.ptr); + HTLCOutputInCommitment ret_hu_conv = new HTLCOutputInCommitment(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + /** * Creates a copy of the HTLCOutputInCommitment */ @@ -107,7 +138,7 @@ public class HTLCOutputInCommitment extends CommonBase { /** * Read a HTLCOutputInCommitment from a byte array, created by HTLCOutputInCommitment_write */ - public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor_read(byte[] ser) { + public static Result_HTLCOutputInCommitmentDecodeErrorZ read(byte[] ser) { long ret = bindings.HTLCOutputInCommitment_read(ser); Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv;