public class UTXO
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
UTXO(java.io.InputStream in) |
UTXO(Sha256Hash hash,
long index,
Coin value,
int height,
boolean coinbase,
Script script)
Creates a stored transaction output.
|
UTXO(Sha256Hash hash,
long index,
Coin value,
int height,
boolean coinbase,
Script script,
java.lang.String address)
Creates a stored transaction output.
|
Modifier and Type | Method and Description |
---|---|
void |
deserializeFromStream(java.io.InputStream in) |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getAddress()
The address of this output, can be the empty string if none was provided at construction time or was deserialized
|
Sha256Hash |
getHash()
The hash of the transaction which holds this output.
|
int |
getHeight()
Gets the height of the block that created this output.
|
long |
getIndex()
The index of this output in the transaction which holds it.
|
Script |
getScript()
The Script object which you can use to get address, script bytes or script type.
|
Coin |
getValue()
The value which this Transaction output holds.
|
int |
hashCode() |
boolean |
isCoinbase()
Gets the flag of whether this was created by a coinbase tx.
|
void |
serializeToStream(java.io.OutputStream bos) |
java.lang.String |
toString() |
public UTXO(Sha256Hash hash, long index, Coin value, int height, boolean coinbase, Script script)
hash
- The hash of the containing transaction.index
- The outpoint.value
- The value available.height
- The height this output was created in.coinbase
- The coinbase flag.public UTXO(Sha256Hash hash, long index, Coin value, int height, boolean coinbase, Script script, java.lang.String address)
hash
- The hash of the containing transaction.index
- The outpoint.value
- The value available.height
- The height this output was created in.coinbase
- The coinbase flag.address
- The address.public UTXO(java.io.InputStream in) throws java.io.IOException
java.io.IOException
public Coin getValue()
public Script getScript()
public Sha256Hash getHash()
public long getIndex()
public int getHeight()
public boolean isCoinbase()
public java.lang.String getAddress()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public void serializeToStream(java.io.OutputStream bos) throws java.io.IOException
java.io.IOException
public void deserializeFromStream(java.io.InputStream in) throws java.io.IOException
java.io.IOException