X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=inline;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FDirectedChannelInfo.cs;h=07be5945f0e41582a039b83887727b41552f7b85;hb=592c64eb658d92e314a2b983cea16cecf3882474;hp=fea5e7fb3229d0ab89594b7e456f314038a024d8;hpb=239d70ea23fdf148440dfedf9479944dc0fbf394;p=ldk-java diff --git a/c_sharp/src/org/ldk/structs/DirectedChannelInfo.cs b/c_sharp/src/org/ldk/structs/DirectedChannelInfo.cs index fea5e7fb..07be5945 100644 --- a/c_sharp/src/org/ldk/structs/DirectedChannelInfo.cs +++ b/c_sharp/src/org/ldk/structs/DirectedChannelInfo.cs @@ -62,5 +62,33 @@ public class DirectedChannelInfo : CommonBase { return ret_hu_conv; } + /** + * Returns the `node_id` of the source hop. + * + * Refers to the `node_id` forwarding the payment to the next hop. + */ + public NodeId source() { + long ret = bindings.DirectedChannelInfo_source(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.NodeId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Returns the `node_id` of the target hop. + * + * Refers to the `node_id` receiving the payment from the previous hop. + */ + public NodeId target() { + long ret = bindings.DirectedChannelInfo_target(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.NodeId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.NodeId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + } } } }