public class UTXO extends Object
Constructor and Description |
---|
UTXO(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,
String address)
Creates a stored transaction output.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
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(OutputStream bos) |
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, 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(InputStream in) throws IOException
IOException
public Coin getValue()
public Script getScript()
public Sha256Hash getHash()
public long getIndex()
public int getHeight()
public boolean isCoinbase()
public String getAddress()
public void serializeToStream(OutputStream bos) throws IOException
IOException
Copyright © 2016. All rights reserved.