X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FNetworkGraph.ts;h=5d2deab201008ce70819abc98ec940a65a734857;hb=276893d3b8bd3fcb2bb10e3cab73a69d34831909;hp=9729f3317b69ad6f2fd66c741746625605a9aeee;hpb=22f5f4208b1f3b5542292250f1612b944f5cd7fd;p=ldk-java diff --git a/ts/structs/NetworkGraph.ts b/ts/structs/NetworkGraph.ts index 9729f331..5d2deab2 100644 --- a/ts/structs/NetworkGraph.ts +++ b/ts/structs/NetworkGraph.ts @@ -18,6 +18,13 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.NetworkGraph_free(this.ptr); } } + public NetworkGraph clone() { + number ret = bindings.NetworkGraph_clone(this.ptr); + const ret_hu_conv: NetworkGraph = new NetworkGraph(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + public Uint8Array write() { Uint8Array ret = bindings.NetworkGraph_write(this.ptr); return ret; @@ -32,6 +39,7 @@ import * as bindings from '../bindings' // TODO: figure out location public static NetworkGraph constructor_new(Uint8Array genesis_hash) { number ret = bindings.NetworkGraph_new(genesis_hash); const ret_hu_conv: NetworkGraph = new NetworkGraph(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; }