X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FNodeId.ts;h=9f288e0accc09edc6efe30496cd3f8778392f7e6;hb=f3e670e9341decac613d33fc52febf19cea32f20;hp=c08e56322c916fa4cdb362dee89a1b173d6a3259;hpb=e30b350e325e7d517ea744578876d473839ad495;p=ldk-java diff --git a/ts/structs/NodeId.ts b/ts/structs/NodeId.ts index c08e5632..9f288e0a 100644 --- a/ts/structs/NodeId.ts +++ b/ts/structs/NodeId.ts @@ -18,6 +18,11 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.NodeId_free(this.ptr); } } + public number clone_ptr() { + number ret = bindings.NodeId_clone_ptr(this.ptr); + return ret; + } + public NodeId clone() { number ret = bindings.NodeId_clone(this.ptr); const ret_hu_conv: NodeId = new NodeId(null, ret); @@ -26,7 +31,7 @@ import * as bindings from '../bindings' // TODO: figure out location } public static NodeId constructor_from_pubkey(Uint8Array pubkey) { - number ret = bindings.NodeId_from_pubkey(pubkey); + number ret = bindings.NodeId_from_pubkey(InternalUtils.check_arr_len(pubkey, 33)); const ret_hu_conv: NodeId = new NodeId(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv;