Package org.ldk.structs
Class RouteHop
- java.lang.Object
-
- org.ldk.structs.RouteHop
-
public class RouteHop extends Object
A hop in a route, and additional metadata about it. \"Hop\" is defined as a node and the channel that leads to it.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RouteHop
clone()
Creates a copy of the RouteHopboolean
eq(RouteHop b)
Checks if two RouteHops contain equal inner contents.boolean
equals(Object o)
protected void
finalize()
ChannelFeatures
get_channel_features()
The channel_announcement features of the channel that should be used from the previous hop to reach this node.int
get_cltv_expiry_delta()
The CLTV delta added for this hop.long
get_fee_msat()
The fee taken on this hop (for paying for the use of the *next* channel in the path).NodeFeatures
get_node_features()
The node_announcement features of the node at this hop.byte[]
get_pubkey()
The node_id of the node at this hop.long
get_short_channel_id()
The channel that should be used from the previous hop to reach this node.long
hash()
Generates a non-cryptographic 64-bit hash of the RouteHop.int
hashCode()
static RouteHop
of(byte[] pubkey_arg, NodeFeatures node_features_arg, long short_channel_id_arg, ChannelFeatures channel_features_arg, long fee_msat_arg, int cltv_expiry_delta_arg)
Constructs a new RouteHop given each fieldstatic Result_RouteHopDecodeErrorZ
read(byte[] ser)
Read a RouteHop from a byte array, created by RouteHop_writevoid
set_channel_features(ChannelFeatures val)
The channel_announcement features of the channel that should be used from the previous hop to reach this node.void
set_cltv_expiry_delta(int val)
The CLTV delta added for this hop.void
set_fee_msat(long val)
The fee taken on this hop (for paying for the use of the *next* channel in the path).void
set_node_features(NodeFeatures val)
The node_announcement features of the node at this hop.void
set_pubkey(byte[] val)
The node_id of the node at this hop.void
set_short_channel_id(long val)
The channel that should be used from the previous hop to reach this node.byte[]
write()
Serialize the RouteHop object into a byte array which can be read by RouteHop_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
get_pubkey
public byte[] get_pubkey()
The node_id of the node at this hop.
-
set_pubkey
public void set_pubkey(byte[] val)
The node_id of the node at this hop.
-
get_node_features
public NodeFeatures get_node_features()
The node_announcement features of the node at this hop. For the last hop, these may be amended to match the features present in the invoice this node generated.
-
set_node_features
public void set_node_features(NodeFeatures val)
The node_announcement features of the node at this hop. For the last hop, these may be amended to match the features present in the invoice this node generated.
-
get_short_channel_id
public long get_short_channel_id()
The channel that should be used from the previous hop to reach this node.
-
set_short_channel_id
public void set_short_channel_id(long val)
The channel that should be used from the previous hop to reach this node.
-
get_channel_features
public ChannelFeatures get_channel_features()
The channel_announcement features of the channel that should be used from the previous hop to reach this node.
-
set_channel_features
public void set_channel_features(ChannelFeatures val)
The channel_announcement features of the channel that should be used from the previous hop to reach this node.
-
get_fee_msat
public long get_fee_msat()
The fee taken on this hop (for paying for the use of the *next* channel in the path). If this is the last hop in [`Path::hops`]: if we're sending to a [`BlindedPath`], this is the fee paid for use of the entire blinded path otherwise, this is the full value of this [`Path`]'s part of the payment [`BlindedPath`]: crate::blinded_path::BlindedPath
-
set_fee_msat
public void set_fee_msat(long val)
The fee taken on this hop (for paying for the use of the *next* channel in the path). If this is the last hop in [`Path::hops`]: if we're sending to a [`BlindedPath`], this is the fee paid for use of the entire blinded path otherwise, this is the full value of this [`Path`]'s part of the payment [`BlindedPath`]: crate::blinded_path::BlindedPath
-
get_cltv_expiry_delta
public int get_cltv_expiry_delta()
The CLTV delta added for this hop. If this is the last hop in [`Path::hops`]: if we're sending to a [`BlindedPath`], this is the CLTV delta for the entire blinded path otherwise, this is the CLTV delta expected at the destination [`BlindedPath`]: crate::blinded_path::BlindedPath
-
set_cltv_expiry_delta
public void set_cltv_expiry_delta(int val)
The CLTV delta added for this hop. If this is the last hop in [`Path::hops`]: if we're sending to a [`BlindedPath`], this is the CLTV delta for the entire blinded path otherwise, this is the CLTV delta expected at the destination [`BlindedPath`]: crate::blinded_path::BlindedPath
-
of
public static RouteHop of(byte[] pubkey_arg, NodeFeatures node_features_arg, long short_channel_id_arg, ChannelFeatures channel_features_arg, long fee_msat_arg, int cltv_expiry_delta_arg)
Constructs a new RouteHop given each field
-
hash
public long hash()
Generates a non-cryptographic 64-bit hash of the RouteHop.
-
eq
public boolean eq(RouteHop b)
Checks if two RouteHops contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields. Two objects with NULL inner values will be considered "equal" here.
-
write
public byte[] write()
Serialize the RouteHop object into a byte array which can be read by RouteHop_read
-
read
public static Result_RouteHopDecodeErrorZ read(byte[] ser)
Read a RouteHop from a byte array, created by RouteHop_write
-
-