public class Blockchain
extends java.lang.Object
| Constructor and Description |
|---|
Blockchain() |
| Modifier and Type | Method and Description |
|---|---|
static Block |
getBlock(byte[] hash)
Gets the block with the given block hash.
|
static Block |
getBlock(int height)
Gets the block at the given block height.
|
static int |
getHeight() |
static Transaction |
getTransaction(byte[] hash)
Gets the transaction with the given transaction hash.
|
static Transaction |
getTransactionFromBlock(byte[] blockHash,
int txIndex)
Gets the transaction at the given index in the block with the given block hash.
|
static Transaction |
getTransactionFromBlock(int blockHeight,
int txIndex)
Gets the transaction at the given index in the block with the given height.
|
static int |
getTransactionHeight(byte[] transactionHash)
Gets the transaction height of the transaction with the given hash.
|
public static int getHeight()
public static Block getBlock(int height)
height - The block height.public static Block getBlock(byte[] hash)
hash - The 32-byte block hash.public static Transaction getTransaction(byte[] hash)
hash - The 32-byte transaction hash.public static Transaction getTransactionFromBlock(byte[] blockHash, int txIndex)
blockHash - The 32-byte hash of the block to get the transaction from.txIndex - The index of the transaction in the block.public static Transaction getTransactionFromBlock(int blockHeight, int txIndex)
blockHeight - The height of the block to get the transaction from.txIndex - The index of the transaction in the block.public static int getTransactionHeight(byte[] transactionHash)
transactionHash - The hash of the transaction.