X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FSendError.cs;fp=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FSendError.cs;h=c20659b38b661220c6574db77cd1e822b43fcbf1;hb=3d1f246d05172683acd3b81836de4e4e9f0c1afd;hp=5e557bd1965ca060177803e0a30fb1607d658402;hpb=a32b8843c44637ebd82c83390d17db573b972153;p=ldk-java diff --git a/c_sharp/src/org/ldk/structs/SendError.cs b/c_sharp/src/org/ldk/structs/SendError.cs index 5e557bd1..c20659b3 100644 --- a/c_sharp/src/org/ldk/structs/SendError.cs +++ b/c_sharp/src/org/ldk/structs/SendError.cs @@ -23,10 +23,11 @@ public class SendError : CommonBase { case 1: return new SendError_TooBigPacket(ptr); case 2: return new SendError_TooFewBlindedHops(ptr); case 3: return new SendError_InvalidFirstHop(ptr); - case 4: return new SendError_InvalidMessage(ptr); - case 5: return new SendError_BufferFull(ptr); - case 6: return new SendError_GetNodeIdFailed(ptr); - case 7: return new SendError_BlindedPathAdvanceFailed(ptr); + case 4: return new SendError_PathNotFound(ptr); + case 5: return new SendError_InvalidMessage(ptr); + case 6: return new SendError_BufferFull(ptr); + case 7: return new SendError_GetNodeIdFailed(ptr); + case 8: return new SendError_BlindedPathAdvanceFailed(ptr); default: throw new ArgumentException("Impossible enum variant"); } @@ -51,7 +52,16 @@ public class SendError : CommonBase { } /** A SendError of type InvalidFirstHop */ public class SendError_InvalidFirstHop : SendError { + public byte[] invalid_first_hop; internal SendError_InvalidFirstHop(long ptr) : base(null, ptr) { + long invalid_first_hop = bindings.LDKSendError_InvalidFirstHop_get_invalid_first_hop(ptr); + byte[] invalid_first_hop_conv = InternalUtils.decodeUint8Array(invalid_first_hop); + this.invalid_first_hop = invalid_first_hop_conv; + } + } + /** A SendError of type PathNotFound */ + public class SendError_PathNotFound : SendError { + internal SendError_PathNotFound(long ptr) : base(null, ptr) { } } /** A SendError of type InvalidMessage */ @@ -129,8 +139,20 @@ public class SendError : CommonBase { /** * Utility method to constructs a new InvalidFirstHop-variant SendError */ - public static SendError invalid_first_hop() { - long ret = bindings.SendError_invalid_first_hop(); + public static SendError invalid_first_hop(byte[] a) { + long ret = bindings.SendError_invalid_first_hop(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 33))); + GC.KeepAlive(a); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.SendError ret_hu_conv = org.ldk.structs.SendError.constr_from_ptr(ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + return ret_hu_conv; + } + + /** + * Utility method to constructs a new PathNotFound-variant SendError + */ + public static SendError path_not_found() { + long ret = bindings.SendError_path_not_found(); if (ret >= 0 && ret <= 4096) { return null; } org.ldk.structs.SendError ret_hu_conv = org.ldk.structs.SendError.constr_from_ptr(ret); if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };