X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FPayeePubKey.ts;h=e7d9c9306e4faad05f142fd42e4c16b3f41c1a25;hb=f3e670e9341decac613d33fc52febf19cea32f20;hp=0fb9f5974cf151f329e1fbe390a2734bf2a9bdcc;hpb=b6cc0960eaee5a5bbc7fde79a56152d6dcd649d8;p=ldk-java diff --git a/ts/structs/PayeePubKey.ts b/ts/structs/PayeePubKey.ts index 0fb9f597..e7d9c930 100644 --- a/ts/structs/PayeePubKey.ts +++ b/ts/structs/PayeePubKey.ts @@ -18,9 +18,24 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.PayeePubKey_free(this.ptr); } } - public boolean eq(PayeePubKey b) { - boolean ret = bindings.PayeePubKey_eq(this.ptr, b == null ? 0 : b.ptr & ~1); - this.ptrs_to.add(b); + public Uint8Array get_a() { + Uint8Array ret = bindings.PayeePubKey_get_a(this.ptr); + return ret; + } + + public void set_a(Uint8Array val) { + bindings.PayeePubKey_set_a(this.ptr, InternalUtils.check_arr_len(val, 33)); + } + + public static PayeePubKey constructor_new(Uint8Array a_arg) { + number ret = bindings.PayeePubKey_new(InternalUtils.check_arr_len(a_arg, 33)); + const ret_hu_conv: PayeePubKey = new PayeePubKey(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + + public number clone_ptr() { + number ret = bindings.PayeePubKey_clone_ptr(this.ptr); return ret; } @@ -31,4 +46,15 @@ import * as bindings from '../bindings' // TODO: figure out location return ret_hu_conv; } + public number hash() { + number ret = bindings.PayeePubKey_hash(this.ptr); + return ret; + } + + public boolean eq(PayeePubKey b) { + boolean ret = bindings.PayeePubKey_eq(this.ptr, b == null ? 0 : b.ptr & ~1); + this.ptrs_to.add(b); + return ret; + } + }