Package org.ldk.structs
Class BlindedHop
- java.lang.Object
-
- org.ldk.structs.BlindedHop
-
public class BlindedHop extends Object
An encrypted payload and node id corresponding to a hop in a payment or onion message path, to be encoded in the sender's onion packet. These hops cannot be identified by outside observers and thus can be used to hide the identity of the recipient.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BlindedHopclone()Creates a copy of the BlindedHopbooleaneq(BlindedHop b)Checks if two BlindedHops contain equal inner contents.booleanequals(Object o)protected voidfinalize()byte[]get_blinded_node_id()The blinded node id of this hop in a [`BlindedPath`].byte[]get_encrypted_payload()The encrypted payload intended for this hop in a [`BlindedPath`].longhash()Generates a non-cryptographic 64-bit hash of the BlindedHop.inthashCode()static BlindedHopof(byte[] blinded_node_id_arg, byte[] encrypted_payload_arg)Constructs a new BlindedHop given each fieldstatic Result_BlindedHopDecodeErrorZread(byte[] ser)Read a BlindedHop from a byte array, created by BlindedHop_writevoidset_blinded_node_id(byte[] val)The blinded node id of this hop in a [`BlindedPath`].voidset_encrypted_payload(byte[] val)The encrypted payload intended for this hop in a [`BlindedPath`].byte[]write()Serialize the BlindedHop object into a byte array which can be read by BlindedHop_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
get_blinded_node_id
public byte[] get_blinded_node_id()
The blinded node id of this hop in a [`BlindedPath`].
-
set_blinded_node_id
public void set_blinded_node_id(byte[] val)
The blinded node id of this hop in a [`BlindedPath`].
-
get_encrypted_payload
public byte[] get_encrypted_payload()
The encrypted payload intended for this hop in a [`BlindedPath`]. Returns a copy of the field.
-
set_encrypted_payload
public void set_encrypted_payload(byte[] val)
The encrypted payload intended for this hop in a [`BlindedPath`].
-
of
public static BlindedHop of(byte[] blinded_node_id_arg, byte[] encrypted_payload_arg)
Constructs a new BlindedHop given each field
-
clone
public BlindedHop clone()
Creates a copy of the BlindedHop
-
hash
public long hash()
Generates a non-cryptographic 64-bit hash of the BlindedHop.
-
eq
public boolean eq(BlindedHop b)
Checks if two BlindedHops 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 BlindedHop object into a byte array which can be read by BlindedHop_read
-
read
public static Result_BlindedHopDecodeErrorZ read(byte[] ser)
Read a BlindedHop from a byte array, created by BlindedHop_write
-
-