|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.bitcoin.core.Message
com.google.bitcoin.core.TransactionInput
public class TransactionInput
A transfer of coins from one address to another creates a transaction in which the outputs can be claimed by the recipient in the input of another transaction. You can imagine a transaction as being a module which is wired up to others, the inputs of one have to be wired to the outputs of another. The exceptions are coinbase transactions, which create new coins.
Field Summary | |
---|---|
static byte[] |
EMPTY_ARRAY
|
Fields inherited from class com.google.bitcoin.core.Message |
---|
bytes, cursor, MAX_SIZE, offset, params, protocolVersion |
Constructor Summary | |
---|---|
TransactionInput(NetworkParameters params,
Transaction parentTransaction,
byte[] payload,
int offset)
Deserializes an input message. |
Method Summary | |
---|---|
void |
bitcoinSerializeToStream(OutputStream stream)
Serializes this message to the provided stream. |
Address |
getFromAddress()
Convenience method that returns the from address of this input by parsing the scriptSig. |
Script |
getScriptSig()
Returns the input script. |
boolean |
isCoinBase()
Coinbase transactions have special inputs with hashes of zero. |
String |
toString()
Returns a human readable debug string. |
Methods inherited from class com.google.bitcoin.core.Message |
---|
bitcoinSerialize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final byte[] EMPTY_ARRAY
Constructor Detail |
---|
public TransactionInput(NetworkParameters params, Transaction parentTransaction, byte[] payload, int offset) throws ProtocolException
ProtocolException
Method Detail |
---|
public void bitcoinSerializeToStream(OutputStream stream) throws IOException
Message
IOException
public boolean isCoinBase()
public Script getScriptSig() throws ScriptException
ScriptException
public Address getFromAddress() throws ScriptException
ScriptException
- if the scriptSig could not be understood (eg, if this is a coinbase transaction).public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |