X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FNodeId.ts;fp=ts%2Fstructs%2FNodeId.ts;h=0000000000000000000000000000000000000000;hb=dbac7c579e163870c759f7cd11b2b254ab0fdb10;hp=9f288e0accc09edc6efe30496cd3f8778392f7e6;hpb=0fee03a8095f5599f8eccd920c1b1af6b3a20260;p=ldk-java diff --git a/ts/structs/NodeId.ts b/ts/structs/NodeId.ts deleted file mode 100644 index 9f288e0a..00000000 --- a/ts/structs/NodeId.ts +++ /dev/null @@ -1,61 +0,0 @@ - - -import CommonBase from './CommonBase'; -import * as bindings from '../bindings' // TODO: figure out location - - - - export default class NodeId extends CommonBase { - constructor(_dummy: object, ptr: number) { - super(ptr); - } - - - protected finalize() { - super.finalize(); - - if (this.ptr != 0) { - 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); - ret_hu_conv.ptrs_to.add(this); - return ret_hu_conv; - } - - public static NodeId constructor_from_pubkey(Uint8Array 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; - } - - public Uint8Array as_slice() { - Uint8Array ret = bindings.NodeId_as_slice(this.ptr); - return ret; - } - - public number hash() { - number ret = bindings.NodeId_hash(this.ptr); - return ret; - } - - public Uint8Array write() { - Uint8Array ret = bindings.NodeId_write(this.ptr); - return ret; - } - - public static Result_NodeIdDecodeErrorZ constructor_read(Uint8Array ser) { - number ret = bindings.NodeId_read(ser); - Result_NodeIdDecodeErrorZ ret_hu_conv = Result_NodeIdDecodeErrorZ.constr_from_ptr(ret); - return ret_hu_conv; - } - -}