6 namespace org { namespace ldk { namespace structs {
10 * Used to construct the blinded hops portion of a blinded path. These hops cannot be identified
11 * by outside observers and thus can be used to hide the identity of the recipient.
13 public class BlindedHop : CommonBase {
14 internal BlindedHop(object _dummy, long ptr) : base(ptr) { }
16 if (ptr != 0) { bindings.BlindedHop_free(ptr); }
19 internal long clone_ptr() {
20 long ret = bindings.BlindedHop_clone_ptr(this.ptr);
26 * Creates a copy of the BlindedHop
28 public BlindedHop clone() {
29 long ret = bindings.BlindedHop_clone(this.ptr);
31 if (ret >= 0 && ret <= 4096) { return null; }
32 org.ldk.structs.BlindedHop ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BlindedHop(null, ret); }
33 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
38 * Serialize the BlindedHop object into a byte array which can be read by BlindedHop_read
40 public byte[] write() {
41 byte[] ret = bindings.BlindedHop_write(this.ptr);
47 * Read a BlindedHop from a byte array, created by BlindedHop_write
49 public static Result_BlindedHopDecodeErrorZ read(byte[] ser) {
50 long ret = bindings.BlindedHop_read(ser);
52 if (ret >= 0 && ret <= 4096) { return null; }
53 Result_BlindedHopDecodeErrorZ ret_hu_conv = Result_BlindedHopDecodeErrorZ.constr_from_ptr(ret);