X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FNodeAnnouncementInfo.mts;fp=ts%2Fstructs%2FNodeAnnouncementInfo.mts;h=216a2db9ece952715817852d7440ff4e6c61d125;hb=bbf1ef578b7cfe9fc7d3ad8b6626ae6204e370e5;hp=65e911d7ce8587851518cb9774c4b9e1c9dc76e1;hpb=65e786e1912ddad0d749508b8830cf30b37e784e;p=ldk-java diff --git a/ts/structs/NodeAnnouncementInfo.mts b/ts/structs/NodeAnnouncementInfo.mts index 65e911d7..216a2db9 100644 --- a/ts/structs/NodeAnnouncementInfo.mts +++ b/ts/structs/NodeAnnouncementInfo.mts @@ -436,6 +436,25 @@ export class NodeAnnouncementInfo extends CommonBase { bindings.NodeAnnouncementInfo_set_alias(this.ptr, val == null ? 0 : CommonBase.get_ptr_of(val) & ~1); } + /** + * Internet-level addresses via which one can connect to the node + * + * Returns a copy of the field. + */ + public get_addresses(): NetAddress[] { + const ret: number = bindings.NodeAnnouncementInfo_get_addresses(this.ptr); + const ret_conv_12_len: number = bindings.getArrayLength(ret); + const ret_conv_12_arr: NetAddress[] = new Array(ret_conv_12_len).fill(null); + for (var m = 0; m < ret_conv_12_len; m++) { + const ret_conv_12: number = bindings.getU32ArrayElem(ret, m); + const ret_conv_12_hu_conv: NetAddress = NetAddress.constr_from_ptr(ret_conv_12); + CommonBase.add_ref_from(ret_conv_12_hu_conv, this); + ret_conv_12_arr[m] = ret_conv_12_hu_conv; + } + bindings.freeWasmMemory(ret) + return ret_conv_12_arr; + } + /** * Internet-level addresses via which one can connect to the node */