X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FUtilMethods.java;h=575a448aa27f02f45e01241e1dce16ee79c08b0b;hb=8f5edad2f310a130b658e1b530fe2516724c4d99;hp=bbb6689de698ca3e244e62b5a25f0231eb4c285d;hpb=976cee7605402903ce1de9e566a48e4cbe18ee29;p=ldk-java diff --git a/src/main/java/org/ldk/structs/UtilMethods.java b/src/main/java/org/ldk/structs/UtilMethods.java index bbb6689d..575a448a 100644 --- a/src/main/java/org/ldk/structs/UtilMethods.java +++ b/src/main/java/org/ldk/structs/UtilMethods.java @@ -34,6 +34,17 @@ public class UtilMethods { return ret_hu_conv; } + /** + * Read a HTLCDestination from a byte array, created by HTLCDestination_write + */ + public static Result_COption_HTLCDestinationZDecodeErrorZ HTLCDestination_read(byte[] ser) { + long ret = bindings.HTLCDestination_read(ser); + Reference.reachabilityFence(ser); + if (ret >= 0 && ret <= 4096) { return null; } + Result_COption_HTLCDestinationZDecodeErrorZ ret_hu_conv = Result_COption_HTLCDestinationZDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + /** * Read a Event from a byte array, created by Event_write */