Package org.ldk.structs
Class OutPoint
- java.lang.Object
-
- org.ldk.structs.OutPoint
-
public class OutPoint extends Object
A reference to a transaction output. Differs from bitcoin::blockdata::transaction::OutPoint as the index is a u16 instead of u32 due to LN's restrictions on index values. Should reduce (possibly) unsafe conversions this way.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OutPoint
clone()
Creates a copy of the OutPointboolean
eq(OutPoint b)
Checks if two OutPoints contain equal inner contents.boolean
equals(Object o)
protected void
finalize()
short
get_index()
The index of the referenced output in its transaction's vout.byte[]
get_txid()
The referenced transaction's txid.long
hash()
Generates a non-cryptographic 64-bit hash of the OutPoint.int
hashCode()
static OutPoint
of(byte[] txid_arg, short index_arg)
Constructs a new OutPoint given each fieldstatic Result_OutPointDecodeErrorZ
read(byte[] ser)
Read a OutPoint from a byte array, created by OutPoint_writevoid
set_index(short val)
The index of the referenced output in its transaction's vout.void
set_txid(byte[] val)
The referenced transaction's txid.byte[]
to_channel_id()
Convert an `OutPoint` to a lightning channel id.byte[]
write()
Serialize the OutPoint object into a byte array which can be read by OutPoint_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
get_txid
public byte[] get_txid()
The referenced transaction's txid.
-
set_txid
public void set_txid(byte[] val)
The referenced transaction's txid.
-
get_index
public short get_index()
The index of the referenced output in its transaction's vout.
-
set_index
public void set_index(short val)
The index of the referenced output in its transaction's vout.
-
of
public static OutPoint of(byte[] txid_arg, short index_arg)
Constructs a new OutPoint given each field
-
eq
public boolean eq(OutPoint b)
Checks if two OutPoints 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 OutPoint.
-
to_channel_id
public byte[] to_channel_id()
Convert an `OutPoint` to a lightning channel id.
-
write
public byte[] write()
Serialize the OutPoint object into a byte array which can be read by OutPoint_read
-
read
public static Result_OutPointDecodeErrorZ read(byte[] ser)
Read a OutPoint from a byte array, created by OutPoint_write
-
-