Package ch.bitagent.bitcoin.lib.tx
Class TxIn
- java.lang.Object
-
- ch.bitagent.bitcoin.lib.tx.TxIn
-
public class TxIn extends Object
TxIn class.
-
-
Field Summary
Fields Modifier and Type Field Description static IntSEQUENCE_DEFstatic IntSEQUENCE_RBF
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IntgetPrevIndex()Getter for the fieldprevIndex.IntgetPrevTx()Getter for the fieldprevTx.ScriptgetScriptSig()Getter for the fieldscriptSig.IntgetSequence()Getter for the fieldsequence.UtxogetUtxo()ScriptgetWitness()Getter for the fieldwitness.static TxInparse(ByteArrayInputStream stream)Takes a byte stream and parses the txInput at the start.ScriptscriptPubkey(Boolean testnet, Map<String,String> cache)Get the ScriptPubKey by looking up the tx hash Returns a Script objectbyte[]serialize()Returns the byte serialization of the transaction inputvoidsetScriptSig(Script scriptSig)Setter for the fieldscriptSig.voidsetWitness(Script witness)Setter for the fieldwitness.StringtoString()Intvalue(Boolean testnet, Map<String,String> cache)Get the outpoint value by looking up the tx hash Returns the amount in satoshi
-
-
-
Method Detail
-
parse
public static TxIn parse(ByteArrayInputStream stream)
Takes a byte stream and parses the txInput at the start. Returns a TxIn object.- Parameters:
stream- aByteArrayInputStreamobject- Returns:
- a
TxInobject
-
serialize
public byte[] serialize()
Returns the byte serialization of the transaction input- Returns:
- an array of
byteobjects
-
value
public Int value(Boolean testnet, Map<String,String> cache)
Get the outpoint value by looking up the tx hash Returns the amount in satoshi
-
scriptPubkey
public Script scriptPubkey(Boolean testnet, Map<String,String> cache)
Get the ScriptPubKey by looking up the tx hash Returns a Script object
-
setScriptSig
public void setScriptSig(Script scriptSig)
Setter for the field
scriptSig.- Parameters:
scriptSig- aScriptobject
-
setWitness
public void setWitness(Script witness)
Setter for the field
witness.- Parameters:
witness- aScriptobject
-
getUtxo
public Utxo getUtxo()
-
-