Class 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 Detail

      • 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
      • clone

        public OutPoint clone()
        Creates a copy of the OutPoint
        Overrides:
        clone in class Object
      • 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()
        Checks if two OutPoints contain equal inner contents.
      • 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