Class TxIn


  • public class TxIn
    extends Object

    TxIn class.

    • Field Detail

      • SEQUENCE_DEF

        public static final Int SEQUENCE_DEF
      • SEQUENCE_RBF

        public static final Int SEQUENCE_RBF
    • Constructor Detail

      • TxIn

        public TxIn​(Int prevTx,
                    Int prevIndex,
                    Script scriptSig,
                    Int sequence)

        Constructor for TxIn.

        Parameters:
        prevTx - a Int object
        prevIndex - a Int object
        scriptSig - a Script object
        sequence - a Int object
      • TxIn

        public TxIn​(Utxo utxo)
    • Method Detail

      • serialize

        public byte[] serialize()
        Returns the byte serialization of the transaction input
        Returns:
        an array of byte objects
      • value

        public Int value​(Boolean testnet)
        Get the outpoint value by looking up the tx hash Returns the amount in satoshi
        Parameters:
        testnet - a Boolean object
        Returns:
        a Int object
      • scriptPubkey

        public Script scriptPubkey​(Boolean testnet)
        Get the ScriptPubKey by looking up the tx hash Returns a Script object
        Parameters:
        testnet - a Boolean object
        Returns:
        a Script object
      • getPrevTx

        public Int getPrevTx()

        Getter for the field prevTx.

        Returns:
        a Int object
      • getPrevIndex

        public Int getPrevIndex()

        Getter for the field prevIndex.

        Returns:
        a Int object
      • getScriptSig

        public Script getScriptSig()

        Getter for the field scriptSig.

        Returns:
        a Script object
      • setScriptSig

        public void setScriptSig​(Script scriptSig)

        Setter for the field scriptSig.

        Parameters:
        scriptSig - a Script object
      • getSequence

        public Int getSequence()

        Getter for the field sequence.

        Returns:
        a Int object
      • getWitness

        public Script getWitness()

        Getter for the field witness.

        Returns:
        a Script object
      • setWitness

        public void setWitness​(Script witness)

        Setter for the field witness.

        Parameters:
        witness - a Script object
      • getUtxo

        public Utxo getUtxo()