Package org.ldk.structs
Class Payee
- java.lang.Object
-
- org.ldk.structs.Payee
-
public class Payee extends Object
The recipient of a payment.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Payeeclone()Creates a copy of the Payeebooleaneq(Payee b)Checks if two Payees contain equal inner contents.protected voidfinalize()static Payeefor_keysend(byte[] pubkey)Creates a payee with the node id of the given `pubkey` to use for keysend payments.static Payeefrom_node_id(byte[] pubkey)Creates a payee with the node id of the given `pubkey`.Option_u64Zget_expiry_time()Expiration of a payment to the payee, in seconds relative to the UNIX epoch.InvoiceFeaturesget_features()Features supported by the payee.byte[]get_pubkey()The node id of the payee.RouteHint[]get_route_hints()Hints for routing to the payee, containing channels connecting the payee to public nodes.longhash()Checks if two Payees contain equal inner contents.static Payeeof(byte[] pubkey_arg, InvoiceFeatures features_arg, RouteHint[] route_hints_arg, Option_u64Z expiry_time_arg)Constructs a new Payee given each fieldstatic Result_PayeeDecodeErrorZread(byte[] ser)Read a Payee from a byte array, created by Payee_writevoidset_expiry_time(Option_u64Z val)Expiration of a payment to the payee, in seconds relative to the UNIX epoch.voidset_features(InvoiceFeatures val)Features supported by the payee.voidset_pubkey(byte[] val)The node id of the payee.voidset_route_hints(RouteHint[] val)Hints for routing to the payee, containing channels connecting the payee to public nodes.byte[]write()Serialize the Payee object into a byte array which can be read by Payee_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
get_pubkey
public byte[] get_pubkey()
The node id of the payee.
-
set_pubkey
public void set_pubkey(byte[] val)
The node id of the payee.
-
get_features
@Nullable public InvoiceFeatures get_features()
Features supported by the payee. May be set from the payee's invoice or via [`for_keysend`]. May be `None` if the invoice does not contain any features. [`for_keysend`]: Self::for_keysend Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
-
set_features
public void set_features(@Nullable InvoiceFeatures val)
Features supported by the payee. May be set from the payee's invoice or via [`for_keysend`]. May be `None` if the invoice does not contain any features. [`for_keysend`]: Self::for_keysend Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
-
get_route_hints
public RouteHint[] get_route_hints()
Hints for routing to the payee, containing channels connecting the payee to public nodes.
-
set_route_hints
public void set_route_hints(RouteHint[] val)
Hints for routing to the payee, containing channels connecting the payee to public nodes.
-
get_expiry_time
public Option_u64Z get_expiry_time()
Expiration of a payment to the payee, in seconds relative to the UNIX epoch.
-
set_expiry_time
public void set_expiry_time(Option_u64Z val)
Expiration of a payment to the payee, in seconds relative to the UNIX epoch.
-
of
public static Payee of(byte[] pubkey_arg, InvoiceFeatures features_arg, RouteHint[] route_hints_arg, Option_u64Z expiry_time_arg)
Constructs a new Payee given each field
-
hash
public long hash()
Checks if two Payees contain equal inner contents.
-
eq
public boolean eq(Payee b)
Checks if two Payees 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 Payee object into a byte array which can be read by Payee_read
-
read
public static Result_PayeeDecodeErrorZ read(byte[] ser)
Read a Payee from a byte array, created by Payee_write
-
from_node_id
public static Payee from_node_id(byte[] pubkey)
Creates a payee with the node id of the given `pubkey`.
-
for_keysend
public static Payee for_keysend(byte[] pubkey)
Creates a payee with the node id of the given `pubkey` to use for keysend payments.
-
-