eth-repository
Module Contents
alltypes
Module Contents
class BlockchainIndex : BlockchainIndexWriter, BlockchainIndexReader
Module Contents
BlockchainIndex(indexWriter: IndexWriter)
fun chainHeadTotalDifficulty(): UInt256
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: Bytes, index: Int): Hash?
fun findByHashOrNumber(hashOrNumber: Bytes): 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 indexTransaction(: Transaction): Unit
fun indexTransactionReceipt(: TransactionReceipt, : Int, : Bytes, : Bytes): Unit
fun totalDifficulty(hash: Bytes): UInt256?
interface BlockchainIndexReader
Module Contents
abstract fun chainHeadTotalDifficulty(): UInt256?
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: Bytes, index: Int): Hash?
abstract fun findByHashOrNumber(hashOrNumber: Bytes): 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: Bytes): UInt256?
interface BlockchainIndexWriter
class BlockchainRepository
Module Contents
BlockchainRepository(chainMetadata: KeyValueStore<Bytes, Bytes>, blockBodyStore: KeyValueStore<Bytes, Bytes>, : KeyValueStore<Bytes, Bytes>, transactionReceiptStore: KeyValueStore<Bytes, Bytes>, transactionStore: KeyValueStore<Bytes, Bytes>, stateStore: KeyValueStore<Bytes, Bytes>, blockchainIndex: BlockchainIndex)
fun findBlockByHashOrNumber(blockNumberOrBlockHash: Bytes): List<Hash>
fun findBlocksByParentHash(parentHash: Bytes): List<Hash>
val GENESIS_BLOCK: Bytes!
suspend fun hasBlockBody(blockHash: Bytes): Boolean
suspend fun hasBlockHeader(: Bytes): Boolean
suspend fun init(blockBodyStore: KeyValueStore<Bytes, Bytes>, : KeyValueStore<Bytes, Bytes>, chainMetadata: KeyValueStore<Bytes, Bytes>, transactionReceiptsStore: KeyValueStore<Bytes, Bytes>, transactionStore: KeyValueStore<Bytes, Bytes>, stateStore: KeyValueStore<Bytes, Bytes>, blockchainIndex: BlockchainIndex, genesisBlock: Block): BlockchainRepository
val logger: Logger!
suspend fun retrieveBlock(blockHash: Bytes): Block?
suspend fun retrieveBlockBody(blockHash: Bytes): BlockBody?
suspend fun retrieveBlockBodyBytes(blockHash: Bytes): Bytes?
suspend fun retrieveBlockHeader(: Bytes): BlockHeader?
suspend fun retrieveBlockHeaderBytes(: Bytes): Bytes?
suspend fun retrieveChainHead(): Block
suspend fun retrieveChainHeadHeader(): BlockHeader?
fun retrieveChainHeadTotalDifficulty(): UInt256
suspend fun retrieveGenesisBlock(): Block
suspend fun retrieveNodeData(hashes: List<Hash>): List<Bytes?>
suspend fun retrieveTransactionReceipt(blockHash: Bytes, index: Int): TransactionReceipt?
suspend fun retrieveTransactionReceipt(txHash: Hash): TransactionReceipt?
suspend fun retrieveTransactionReceipts(blockHash: Bytes): List<TransactionReceipt>
suspend fun storeBlock(block: Block): Unit
suspend fun storeBlockBody(blockHash: Hash, blockBody: BlockBody): Unit
suspend fun storeBlockHeader(: BlockHeader): Unit
suspend fun storeNodeData(hash: Hash, bytes: Bytes): Unit
suspend fun storeTransaction(transaction: Transaction): Unit
suspend fun storeTransactionReceipt(transactionReceipt: TransactionReceipt, txIndex: Int, txHash: Bytes, blockHash: Bytes): Unit
enum class BlockHeaderFields
enum class TransactionReceiptFields
package org.apache.tuweni.eth.repository
Module Contents
class BlockchainIndex : BlockchainIndexWriter, BlockchainIndexReader
Module Contents
BlockchainIndex(indexWriter: IndexWriter)
fun chainHeadTotalDifficulty(): UInt256
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: Bytes, index: Int): Hash?
fun findByHashOrNumber(hashOrNumber: Bytes): 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 indexTransaction(: Transaction): Unit
fun indexTransactionReceipt(: TransactionReceipt, : Int, : Bytes, : Bytes): Unit
fun totalDifficulty(hash: Bytes): UInt256?
interface BlockchainIndexReader
Module Contents
abstract fun chainHeadTotalDifficulty(): UInt256?
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: Bytes, index: Int): Hash?
abstract fun findByHashOrNumber(hashOrNumber: Bytes): 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: Bytes): UInt256?
interface BlockchainIndexWriter
class BlockchainRepository
Module Contents
BlockchainRepository(chainMetadata: KeyValueStore<Bytes, Bytes>, blockBodyStore: KeyValueStore<Bytes, Bytes>, : KeyValueStore<Bytes, Bytes>, transactionReceiptStore: KeyValueStore<Bytes, Bytes>, transactionStore: KeyValueStore<Bytes, Bytes>, stateStore: KeyValueStore<Bytes, Bytes>, blockchainIndex: BlockchainIndex)
fun findBlockByHashOrNumber(blockNumberOrBlockHash: Bytes): List<Hash>
fun findBlocksByParentHash(parentHash: Bytes): List<Hash>
val GENESIS_BLOCK: Bytes!
suspend fun hasBlockBody(blockHash: Bytes): Boolean
suspend fun hasBlockHeader(: Bytes): Boolean
suspend fun init(blockBodyStore: KeyValueStore<Bytes, Bytes>, : KeyValueStore<Bytes, Bytes>, chainMetadata: KeyValueStore<Bytes, Bytes>, transactionReceiptsStore: KeyValueStore<Bytes, Bytes>, transactionStore: KeyValueStore<Bytes, Bytes>, stateStore: KeyValueStore<Bytes, Bytes>, blockchainIndex: BlockchainIndex, genesisBlock: Block): BlockchainRepository
val logger: Logger!
suspend fun retrieveBlock(blockHash: Bytes): Block?
suspend fun retrieveBlockBody(blockHash: Bytes): BlockBody?
suspend fun retrieveBlockBodyBytes(blockHash: Bytes): Bytes?
suspend fun retrieveBlockHeader(: Bytes): BlockHeader?
suspend fun retrieveBlockHeaderBytes(: Bytes): Bytes?
suspend fun retrieveChainHead(): Block
suspend fun retrieveChainHeadHeader(): BlockHeader?
fun retrieveChainHeadTotalDifficulty(): UInt256
suspend fun retrieveGenesisBlock(): Block
suspend fun retrieveNodeData(hashes: List<Hash>): List<Bytes?>
suspend fun retrieveTransactionReceipt(blockHash: Bytes, index: Int): TransactionReceipt?
suspend fun retrieveTransactionReceipt(txHash: Hash): TransactionReceipt?
suspend fun retrieveTransactionReceipts(blockHash: Bytes): List<TransactionReceipt>
suspend fun storeBlock(block: Block): Unit
suspend fun storeBlockBody(blockHash: Hash, blockBody: BlockBody): Unit
suspend fun storeBlockHeader(: BlockHeader): Unit
suspend fun storeNodeData(hash: Hash, bytes: Bytes): Unit
suspend fun storeTransaction(transaction: Transaction): Unit
suspend fun storeTransactionReceipt(transactionReceipt: TransactionReceipt, txIndex: Int, txHash: Bytes, blockHash: Bytes): Unit
enum class BlockHeaderFields
enum class TransactionReceiptFields