X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=ts%2Fstructs%2FNetAddress.ts;h=0c93f092731777c077962a208073c7dd5cc0b64b;hb=ba1af51214a8ea2de62b84cd23b6145173c71752;hp=b1d54a1700e446965059ed470b85f0d5c62ace3d;hpb=b0c50b891cbca28d3bd1d86276c132ff5221d8e4;p=ldk-java diff --git a/ts/structs/NetAddress.ts b/ts/structs/NetAddress.ts index b1d54a17..0c93f092 100644 --- a/ts/structs/NetAddress.ts +++ b/ts/structs/NetAddress.ts @@ -73,6 +73,34 @@ export class OnionV3 extends NetAddress { return ret_hu_conv; } + public static NetAddress constructor_ipv4(Uint8Array addr, number port) { + number ret = bindings.NetAddress_ipv4(addr, port); + NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + + public static NetAddress constructor_ipv6(Uint8Array addr, number port) { + number ret = bindings.NetAddress_ipv6(addr, port); + NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + + public static NetAddress constructor_onion_v2(Uint8Array addr, number port) { + number ret = bindings.NetAddress_onion_v2(addr, port); + NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + + public static NetAddress constructor_onion_v3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { + number ret = bindings.NetAddress_onion_v3(ed25519_pubkey, checksum, version, port); + NetAddress ret_hu_conv = NetAddress.constr_from_ptr(ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + public Uint8Array write() { Uint8Array ret = bindings.NetAddress_write(this.ptr); return ret;