[Java] Update auto-generated bindings to 0.0.105.0
[ldk-java] / src / main / java / org / ldk / structs / Invoice.java
index 80a987eb146d57d241ff6d009b18241891f97da7..e46ac1743d0e02ec98fc6077c1a8c0784065cbd6 100644 (file)
@@ -115,7 +115,7 @@ public class Invoice extends CommonBase {
        }
 
        /**
-        * Returns the `Invoice`'s timestamp (should equal it's creation time)
+        * Returns the `Invoice`'s timestamp (should equal its creation time)
         */
        public long timestamp() {
                long ret = bindings.Invoice_timestamp(this.ptr);
@@ -123,6 +123,15 @@ public class Invoice extends CommonBase {
                return ret;
        }
 
+       /**
+        * Returns the `Invoice`'s timestamp as a duration since the Unix epoch
+        */
+       public long duration_since_epoch() {
+               long ret = bindings.Invoice_duration_since_epoch(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
        /**
         * Returns the hash to which we will receive the preimage on completion of the payment
         */
@@ -195,6 +204,17 @@ public class Invoice extends CommonBase {
                return ret;
        }
 
+       /**
+        * Returns whether the expiry time would pass at the given point in time.
+        * `at_time` is the timestamp as a duration since the Unix epoch.
+        */
+       public boolean would_expire(long at_time) {
+               boolean ret = bindings.Invoice_would_expire(this.ptr, at_time);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(at_time);
+               return ret;
+       }
+
        /**
         * Returns the invoice's `min_final_cltv_expiry` time, if present, otherwise
         * [`DEFAULT_MIN_FINAL_CLTV_EXPIRY`].