Package org.ldk.structs
Class WatchedOutput
- java.lang.Object
-
- org.ldk.structs.WatchedOutput
-
public class WatchedOutput extends Object
A transaction output watched by a [`ChannelMonitor`] for spends on-chain. Used to convey to a [`Filter`] such an output with a given spending condition. Any transaction spending the output must be given to [`ChannelMonitor::block_connected`] either directly or via [`Confirm::transactions_confirmed`]. If `block_hash` is `Some`, this indicates the output was created in the corresponding block and may have been spent there. See [`Filter::register_output`] for details. [`ChannelMonitor`]: channelmonitor::ChannelMonitor [`ChannelMonitor::block_connected`]: channelmonitor::ChannelMonitor::block_connected
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description WatchedOutput
clone()
Creates a copy of the WatchedOutputboolean
eq(WatchedOutput b)
Checks if two WatchedOutputs contain equal inner contents.boolean
equals(Object o)
protected void
finalize()
byte[]
get_block_hash()
First block where the transaction output may have been spent.OutPoint
get_outpoint()
Outpoint identifying the transaction output.byte[]
get_script_pubkey()
Spending condition of the transaction output.long
hash()
Generates a non-cryptographic 64-bit hash of the WatchedOutput.int
hashCode()
static WatchedOutput
of(byte[] block_hash_arg, OutPoint outpoint_arg, byte[] script_pubkey_arg)
Constructs a new WatchedOutput given each fieldvoid
set_block_hash(byte[] val)
First block where the transaction output may have been spent.void
set_outpoint(OutPoint val)
Outpoint identifying the transaction output.void
set_script_pubkey(byte[] val)
Spending condition of the transaction output.
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
get_block_hash
@Nullable public byte[] get_block_hash()
First block where the transaction output may have been spent. Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
-
set_block_hash
public void set_block_hash(@Nullable byte[] val)
First block where the transaction output may have been spent. Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
-
get_outpoint
public OutPoint get_outpoint()
Outpoint identifying the transaction output.
-
set_outpoint
public void set_outpoint(OutPoint val)
Outpoint identifying the transaction output.
-
get_script_pubkey
public byte[] get_script_pubkey()
Spending condition of the transaction output.
-
set_script_pubkey
public void set_script_pubkey(byte[] val)
Spending condition of the transaction output.
-
of
public static WatchedOutput of(byte[] block_hash_arg, OutPoint outpoint_arg, byte[] script_pubkey_arg)
Constructs a new WatchedOutput given each field
-
clone
public WatchedOutput clone()
Creates a copy of the WatchedOutput
-
eq
public boolean eq(WatchedOutput b)
Checks if two WatchedOutputs 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.
-
hash
public long hash()
Generates a non-cryptographic 64-bit hash of the WatchedOutput.
-
-