X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FInvoiceError.java;h=658186fe088f4a4021765bea6772fbc0787981b2;hb=981f68200795eef6fffe8171ec55c7be0fc5486e;hp=0ac16f01bfa3ae377e3d899d0156620d14245290;hpb=7811d2191440c55034e1abfbf3be442d4b25481b;p=ldk-java diff --git a/src/main/java/org/ldk/structs/InvoiceError.java b/src/main/java/org/ldk/structs/InvoiceError.java index 0ac16f01..658186fe 100644 --- a/src/main/java/org/ldk/structs/InvoiceError.java +++ b/src/main/java/org/ldk/structs/InvoiceError.java @@ -113,6 +113,18 @@ public class InvoiceError extends CommonBase { return ret_hu_conv; } + /** + * Creates an [`InvoiceError`] with the given message. + */ + public static InvoiceError from_string(java.lang.String s) { + long ret = bindings.InvoiceError_from_string(s); + Reference.reachabilityFence(s); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.InvoiceError ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceError(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }; + return ret_hu_conv; + } + /** * Serialize the InvoiceError object into a byte array which can be read by InvoiceError_read */