X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=ts%2Fstructs%2FNetAddress.ts;h=269741b9da8792956a732f5817984d9beffdcaf9;hp=3de3d2eff2ff75d90a671cfda2a192739ef4e1d6;hb=c3ae2d6897e5a809459c8d9a72a4b3aa0052c8c8;hpb=a9a6f1747f8466e99abd5972bf675d310f6d7222 diff --git a/ts/structs/NetAddress.ts b/ts/structs/NetAddress.ts index 3de3d2ef..269741b9 100644 --- a/ts/structs/NetAddress.ts +++ b/ts/structs/NetAddress.ts @@ -65,4 +65,17 @@ export class OnionV3 extends NetAddress { this.version = obj.version; this.port = obj.port; } +} + public NetAddress clone() { + number ret = bindings.NetAddress_clone(this.ptr); + NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + + public Uint8Array write() { + Uint8Array ret = bindings.NetAddress_write(this.ptr); + return ret; + } + }