6 namespace org { namespace ldk { namespace structs {
12 public class TwoTuple_PublicKeyOnionMessageZ : CommonBase {
13 internal TwoTuple_PublicKeyOnionMessageZ(object _dummy, long ptr) : base(ptr) { }
14 ~TwoTuple_PublicKeyOnionMessageZ() {
15 if (ptr != 0) { bindings.C2Tuple_PublicKeyOnionMessageZ_free(ptr); }
21 public byte[] get_a() {
22 long ret = bindings.C2Tuple_PublicKeyOnionMessageZ_get_a(this.ptr);
24 if (ret >= 0 && ret <= 4096) { return null; }
25 byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
32 public OnionMessage get_b() {
33 long ret = bindings.C2Tuple_PublicKeyOnionMessageZ_get_b(this.ptr);
35 if (ret >= 0 && ret <= 4096) { return null; }
36 org.ldk.structs.OnionMessage ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OnionMessage(null, ret); }
37 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
41 internal long clone_ptr() {
42 long ret = bindings.C2Tuple_PublicKeyOnionMessageZ_clone_ptr(this.ptr);
48 * Creates a new tuple which has the same data as `orig`
49 * but with all dynamically-allocated buffers duplicated in new buffers.
51 public TwoTuple_PublicKeyOnionMessageZ clone() {
52 long ret = bindings.C2Tuple_PublicKeyOnionMessageZ_clone(this.ptr);
54 if (ret >= 0 && ret <= 4096) { return null; }
55 TwoTuple_PublicKeyOnionMessageZ ret_hu_conv = new TwoTuple_PublicKeyOnionMessageZ(null, ret);
56 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
61 * Creates a new C2Tuple_PublicKeyOnionMessageZ from the contained elements.
63 public static TwoTuple_PublicKeyOnionMessageZ of(byte[] a, org.ldk.structs.OnionMessage b) {
64 long ret = bindings.C2Tuple_PublicKeyOnionMessageZ_new(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(a, 33)), b == null ? 0 : b.ptr);
67 if (ret >= 0 && ret <= 4096) { return null; }
68 TwoTuple_PublicKeyOnionMessageZ ret_hu_conv = new TwoTuple_PublicKeyOnionMessageZ(null, ret);
69 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
70 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b); };