6 namespace org { namespace ldk { namespace structs {
12 public class PayeePubKey : CommonBase {
13 internal PayeePubKey(object _dummy, long ptr) : base(ptr) { }
15 if (ptr != 0) { bindings.PayeePubKey_free(ptr); }
18 public byte[] get_a() {
19 byte[] ret = bindings.PayeePubKey_get_a(this.ptr);
24 public void set_a(byte[] val) {
25 bindings.PayeePubKey_set_a(this.ptr, InternalUtils.check_arr_len(val, 33));
31 * Constructs a new PayeePubKey given each field
33 public static PayeePubKey of(byte[] a_arg) {
34 long ret = bindings.PayeePubKey_new(InternalUtils.check_arr_len(a_arg, 33));
36 if (ret >= 0 && ret <= 4096) { return null; }
37 org.ldk.structs.PayeePubKey ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PayeePubKey(null, ret); }
38 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
42 internal long clone_ptr() {
43 long ret = bindings.PayeePubKey_clone_ptr(this.ptr);
49 * Creates a copy of the PayeePubKey
51 public PayeePubKey clone() {
52 long ret = bindings.PayeePubKey_clone(this.ptr);
54 if (ret >= 0 && ret <= 4096) { return null; }
55 org.ldk.structs.PayeePubKey ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PayeePubKey(null, ret); }
56 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
61 * Checks if two PayeePubKeys contain equal inner contents.
64 long ret = bindings.PayeePubKey_hash(this.ptr);
69 public override int GetHashCode() {
70 return (int)this.hash();
73 * Checks if two PayeePubKeys contain equal inner contents.
74 * This ignores pointers and is_owned flags and looks at the values in fields.
75 * Two objects with NULL inner values will be considered "equal" here.
77 public bool eq(org.ldk.structs.PayeePubKey b) {
78 bool ret = bindings.PayeePubKey_eq(this.ptr, b == null ? 0 : b.ptr);
81 if (this != null) { this.ptrs_to.AddLast(b); };
85 public override bool Equals(object o) {
86 if (!(o is PayeePubKey)) return false;
87 return this.eq((PayeePubKey)o);