eth-repository
Module Contents
alltypes
Module Contents
enum class BlockHeaderFields
class BlockchainIndex : BlockchainIndexWriter, BlockchainIndexReader
Module Contents
BlockchainIndex(indexWriter: IndexWriter)
fun findBy(: BlockHeaderFields, : Bytes): List<Hash>
fun findBy(: BlockHeaderFields, : Long): List<Hash>
fun findBy(: BlockHeaderFields, : Gas): List<Hash>
fun findBy(: BlockHeaderFields, : UInt256): List<Hash>
fun findBy(: BlockHeaderFields, : Address): List<Hash>
fun findBy(: BlockHeaderFields, : Hash): List<Hash>
fun findBy(field: TransactionReceiptFields, value: Bytes): List<Hash>
fun findBy(field: TransactionReceiptFields, value: Int): List<Hash>
fun findBy(field: TransactionReceiptFields, value: Long): List<Hash>
fun findBy(field: TransactionReceiptFields, value: Gas): List<Hash>
fun findBy(field: TransactionReceiptFields, value: UInt256): List<Hash>
fun findBy(field: TransactionReceiptFields, value: Address): List<Hash>
fun findBy(field: TransactionReceiptFields, value: Hash): List<Hash>
fun findByBlockHashAndIndex(blockHash: Hash, index: Int): Hash?
fun findByHashOrNumber(hashOrNumber: Bytes32): List<Hash>
fun findByLargest(: BlockHeaderFields): Hash?
fun findByLargest(field: TransactionReceiptFields): Hash?
fun findInRange(: BlockHeaderFields, : UInt256, : UInt256): List<Hash>
fun findInRange(field: TransactionReceiptFields, minValue: UInt256, maxValue: UInt256): List<Hash>
fun index(indexer: (BlockchainIndexWriter) -> Unit): Unit
fun indexBlockHeader(: BlockHeader): Unit
fun indexTransactionReceipt(: TransactionReceipt, : Int, : Hash, : Hash): Unit
fun totalDifficulty(hash: Hash): UInt256?
interface BlockchainIndexReader
Module Contents
abstract fun findBy(: BlockHeaderFields, : Bytes): List<Hash>
abstract fun findBy(: BlockHeaderFields, : Long): List<Hash>
abstract fun findBy(: BlockHeaderFields, : Gas): List<Hash>
abstract fun findBy(: BlockHeaderFields, : UInt256): List<Hash>
abstract fun findBy(: BlockHeaderFields, : Address): List<Hash>
abstract fun findBy(: BlockHeaderFields, : Hash): List<Hash>
abstract fun findBy(field: TransactionReceiptFields, value: Bytes): List<Hash>
abstract fun findBy(field: TransactionReceiptFields, value: Int): List<Hash>
abstract fun findBy(field: TransactionReceiptFields, value: Long): List<Hash>
abstract fun findBy(field: TransactionReceiptFields, value: Gas): List<Hash>
abstract fun findBy(field: TransactionReceiptFields, value: UInt256): List<Hash>
abstract fun findBy(field: TransactionReceiptFields, value: Address): List<Hash>
abstract fun findBy(field: TransactionReceiptFields, value: Hash): List<Hash>
abstract fun findByBlockHashAndIndex(blockHash: Hash, index: Int): Hash?
abstract fun findByHashOrNumber(hashOrNumber: Bytes32): List<Hash>
abstract fun findByLargest(: BlockHeaderFields): Hash?
abstract fun findByLargest(field: TransactionReceiptFields): Hash?
abstract fun findInRange(: BlockHeaderFields, : UInt256, : UInt256): List<Hash>
abstract fun findInRange(field: TransactionReceiptFields, minValue: UInt256, maxValue: UInt256): List<Hash>
abstract fun totalDifficulty(hash: Hash): UInt256?
interface BlockchainIndexWriter
class BlockchainRepository
Module Contents
BlockchainRepository(chainMetadata: KeyValueStore, blockBodyStore: KeyValueStore, : KeyValueStore, transactionReceiptsStore: KeyValueStore, blockchainIndex: BlockchainIndex)
val GENESIS_BLOCK: Bytes
fun findBlockByHashOrNumber(blockNumberOrBlockHash: Bytes32): List<Hash>
fun findBlocksByParentHash(parentHash: Hash): List<Hash>
suspend fun init(blockBodyStore: KeyValueStore, : KeyValueStore, chainMetadata: KeyValueStore, transactionReceiptsStore: KeyValueStore, blockchainIndex: BlockchainIndex, genesisBlock: Block): BlockchainRepository
suspend fun retrieveBlock(blockHash: Hash): Block?
suspend fun retrieveBlock(blockHash: Bytes): Block?
suspend fun retrieveBlockBody(blockHash: Hash): BlockBody?
suspend fun retrieveBlockBody(blockHash: Bytes): BlockBody?
suspend fun retrieveBlockBodyBytes(blockHash: Hash): Bytes?
suspend fun retrieveBlockBodyBytes(blockHash: Bytes): Bytes?
suspend fun retrieveBlockHeader(: Hash): BlockHeader?
suspend fun retrieveBlockHeader(: Bytes): BlockHeader?
suspend fun retrieveBlockHeaderBytes(: Hash): Bytes?
suspend fun retrieveBlockHeaderBytes(: Bytes): Bytes?
suspend fun retrieveChainHead(): Block?
suspend fun retrieveChainHeadHeader(): BlockHeader?
suspend fun retrieveGenesisBlock(): Block?
suspend fun retrieveTransactionReceipt(blockHash: Hash, index: Int): TransactionReceipt?
suspend fun retrieveTransactionReceipt(txHash: Hash): TransactionReceipt?
suspend fun retrieveTransactionReceipts(blockHash: Hash): List<TransactionReceipt?>
suspend fun storeBlock(block: Block): Unit
suspend fun storeBlockBody(blockHash: Hash, blockBody: BlockBody): Unit
suspend fun storeBlockHeader(: BlockHeader): Unit
suspend fun storeTransactionReceipt(transactionReceipt: TransactionReceipt, txIndex: Int, txHash: Hash, blockHash: Hash): Unit
suspend fun storeTransactionReceipts(vararg transactionReceipts: TransactionReceipt, txHash: Hash, blockHash: Hash): Unit
enum class TransactionReceiptFields
package org.apache.tuweni.eth.repository
Module Contents
enum class BlockHeaderFields
class BlockchainIndex : BlockchainIndexWriter, BlockchainIndexReader
Module Contents
BlockchainIndex(indexWriter: IndexWriter)
fun findBy(: BlockHeaderFields, : Bytes): List<Hash>
fun findBy(: BlockHeaderFields, : Long): List<Hash>
fun findBy(: BlockHeaderFields, : Gas): List<Hash>
fun findBy(: BlockHeaderFields, : UInt256): List<Hash>
fun findBy(: BlockHeaderFields, : Address): List<Hash>
fun findBy(: BlockHeaderFields, : Hash): List<Hash>
fun findBy(field: TransactionReceiptFields, value: Bytes): List<Hash>
fun findBy(field: TransactionReceiptFields, value: Int): List<Hash>
fun findBy(field: TransactionReceiptFields, value: Long): List<Hash>
fun findBy(field: TransactionReceiptFields, value: Gas): List<Hash>
fun findBy(field: TransactionReceiptFields, value: UInt256): List<Hash>
fun findBy(field: TransactionReceiptFields, value: Address): List<Hash>
fun findBy(field: TransactionReceiptFields, value: Hash): List<Hash>
fun findByBlockHashAndIndex(blockHash: Hash, index: Int): Hash?
fun findByHashOrNumber(hashOrNumber: Bytes32): List<Hash>
fun findByLargest(: BlockHeaderFields): Hash?
fun findByLargest(field: TransactionReceiptFields): Hash?
fun findInRange(: BlockHeaderFields, : UInt256, : UInt256): List<Hash>
fun findInRange(field: TransactionReceiptFields, minValue: UInt256, maxValue: UInt256): List<Hash>
fun index(indexer: (BlockchainIndexWriter) -> Unit): Unit
fun indexBlockHeader(: BlockHeader): Unit
fun indexTransactionReceipt(: TransactionReceipt, : Int, : Hash, : Hash): Unit
fun totalDifficulty(hash: Hash): UInt256?
interface BlockchainIndexReader
Module Contents
abstract fun findBy(: BlockHeaderFields, : Bytes): List<Hash>
abstract fun findBy(: BlockHeaderFields, : Long): List<Hash>
abstract fun findBy(: BlockHeaderFields, : Gas): List<Hash>
abstract fun findBy(: BlockHeaderFields, : UInt256): List<Hash>
abstract fun findBy(: BlockHeaderFields, : Address): List<Hash>
abstract fun findBy(: BlockHeaderFields, : Hash): List<Hash>
abstract fun findBy(field: TransactionReceiptFields, value: Bytes): List<Hash>
abstract fun findBy(field: TransactionReceiptFields, value: Int): List<Hash>
abstract fun findBy(field: TransactionReceiptFields, value: Long): List<Hash>
abstract fun findBy(field: TransactionReceiptFields, value: Gas): List<Hash>
abstract fun findBy(field: TransactionReceiptFields, value: UInt256): List<Hash>
abstract fun findBy(field: TransactionReceiptFields, value: Address): List<Hash>
abstract fun findBy(field: TransactionReceiptFields, value: Hash): List<Hash>
abstract fun findByBlockHashAndIndex(blockHash: Hash, index: Int): Hash?
abstract fun findByHashOrNumber(hashOrNumber: Bytes32): List<Hash>
abstract fun findByLargest(: BlockHeaderFields): Hash?
abstract fun findByLargest(field: TransactionReceiptFields): Hash?
abstract fun findInRange(: BlockHeaderFields, : UInt256, : UInt256): List<Hash>
abstract fun findInRange(field: TransactionReceiptFields, minValue: UInt256, maxValue: UInt256): List<Hash>
abstract fun totalDifficulty(hash: Hash): UInt256?
interface BlockchainIndexWriter
class BlockchainRepository
Module Contents
BlockchainRepository(chainMetadata: KeyValueStore, blockBodyStore: KeyValueStore, : KeyValueStore, transactionReceiptsStore: KeyValueStore, blockchainIndex: BlockchainIndex)
val GENESIS_BLOCK: Bytes
fun findBlockByHashOrNumber(blockNumberOrBlockHash: Bytes32): List<Hash>
fun findBlocksByParentHash(parentHash: Hash): List<Hash>
suspend fun init(blockBodyStore: KeyValueStore, : KeyValueStore, chainMetadata: KeyValueStore, transactionReceiptsStore: KeyValueStore, blockchainIndex: BlockchainIndex, genesisBlock: Block): BlockchainRepository
suspend fun retrieveBlock(blockHash: Hash): Block?
suspend fun retrieveBlock(blockHash: Bytes): Block?
suspend fun retrieveBlockBody(blockHash: Hash): BlockBody?
suspend fun retrieveBlockBody(blockHash: Bytes): BlockBody?
suspend fun retrieveBlockBodyBytes(blockHash: Hash): Bytes?
suspend fun retrieveBlockBodyBytes(blockHash: Bytes): Bytes?
suspend fun retrieveBlockHeader(: Hash): BlockHeader?
suspend fun retrieveBlockHeader(: Bytes): BlockHeader?
suspend fun retrieveBlockHeaderBytes(: Hash): Bytes?
suspend fun retrieveBlockHeaderBytes(: Bytes): Bytes?
suspend fun retrieveChainHead(): Block?
suspend fun retrieveChainHeadHeader(): BlockHeader?
suspend fun retrieveGenesisBlock(): Block?
suspend fun retrieveTransactionReceipt(blockHash: Hash, index: Int): TransactionReceipt?
suspend fun retrieveTransactionReceipt(txHash: Hash): TransactionReceipt?
suspend fun retrieveTransactionReceipts(blockHash: Hash): List<TransactionReceipt?>
suspend fun storeBlock(block: Block): Unit
suspend fun storeBlockBody(blockHash: Hash, blockBody: BlockBody): Unit
suspend fun storeBlockHeader(: BlockHeader): Unit
suspend fun storeTransactionReceipt(transactionReceipt: TransactionReceipt, txIndex: Int, txHash: Hash, blockHash: Hash): Unit
suspend fun storeTransactionReceipts(vararg transactionReceipts: TransactionReceipt, txHash: Hash, blockHash: Hash): Unit
enum class TransactionReceiptFields