[Java] Update auto-generated bindings to 0.0.117
[ldk-java] / src / main / java / org / ldk / structs / Refund.java
index d8886a4e95f6cb08117e1194e41ba09feb6539e8..f31b52dff25cd3199aff81107bd2882bffece53e 100644 (file)
@@ -9,13 +9,13 @@ import javax.annotation.Nullable;
 
 
 /**
- * A `Refund` is a request to send an [`Invoice`] without a preceding [`Offer`].
+ * A `Refund` is a request to send an [`Bolt12Invoice`] without a preceding [`Offer`].
  * 
  * Typically, after an invoice is paid, the recipient may publish a refund allowing the sender to
  * recoup their funds. A refund may be used more generally as an \"offer for money\", such as with a
  * bitcoin ATM.
  * 
- * [`Invoice`]: crate::offers::invoice::Invoice
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
  * [`Offer`]: crate::offers::offer::Offer
  */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
@@ -63,11 +63,11 @@ public class Refund extends CommonBase {
         * 
         * If `None`, the refund does not expire.
         */
-       public Option_DurationZ absolute_expiry() {
+       public Option_u64Z absolute_expiry() {
                long ret = bindings.Refund_absolute_expiry(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               org.ldk.structs.Option_DurationZ ret_hu_conv = org.ldk.structs.Option_DurationZ.constr_from_ptr(ret);
+               org.ldk.structs.Option_u64Z ret_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(ret);
                if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
@@ -121,8 +121,8 @@ public class Refund extends CommonBase {
         * 
         * [`payer_id`]: Self::payer_id
         */
-       public byte[] metadata() {
-               byte[] ret = bindings.Refund_metadata(this.ptr);
+       public byte[] payer_metadata() {
+               byte[] ret = bindings.Refund_payer_metadata(this.ptr);
                Reference.reachabilityFence(this);
                return ret;
        }
@@ -207,4 +207,15 @@ public class Refund extends CommonBase {
                return ret;
        }
 
+       /**
+        * Read a Refund object from a string
+        */
+       public static Result_RefundBolt12ParseErrorZ from_str(java.lang.String s) {
+               long ret = bindings.Refund_from_str(s);
+               Reference.reachabilityFence(s);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               Result_RefundBolt12ParseErrorZ ret_hu_conv = Result_RefundBolt12ParseErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }