X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FChannelMonitor.java;fp=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FChannelMonitor.java;h=532cf9ed769e99eb20614515190c94b846409c0d;hb=8f5edad2f310a130b658e1b530fe2516724c4d99;hp=ceb031725c680aa922769700489b63c9191147c2;hpb=976cee7605402903ce1de9e566a48e4cbe18ee29;p=ldk-java diff --git a/src/main/java/org/ldk/structs/ChannelMonitor.java b/src/main/java/org/ldk/structs/ChannelMonitor.java index ceb03172..532cf9ed 100644 --- a/src/main/java/org/ldk/structs/ChannelMonitor.java +++ b/src/main/java/org/ldk/structs/ChannelMonitor.java @@ -176,6 +176,21 @@ public class ChannelMonitor extends CommonBase { return ret_conv_7_arr; } + /** + * Gets the `node_id` of the counterparty for this channel. + * + * Will be `None` for channels constructed on LDK versions prior to 0.0.110 and always `Some` + * otherwise. + * + * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None + */ + @Nullable + public byte[] get_counterparty_node_id() { + byte[] ret = bindings.ChannelMonitor_get_counterparty_node_id(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + /** * Used by ChannelManager deserialization to broadcast the latest holder state if its copy of * the Channel was out-of-date. You may use it to get a broadcastable holder toxic tx in case of