Package com.privatechain.core.spi
package com.privatechain.core.spi
Service Provider Interfaces (SPIs) — the primary extension points of the library.
Consumers implement these interfaces to plug in their own behaviour:
ConsensusEngine— validates and produces blocks; built-in implementations are inblockchain-consensus(FR-CONS-01).TransactionValidator— validates transactions before they enter the mempool; chain-of-responsibility composable (FR-TX-01).BlockchainStorage— persists and retrieves blocks; built-in implementations are inblockchain-storage(FR-STOR-01).TransactionPrioritizer— orders transactions in the mempool; built-in implementations are inblockchain-core(FR-MEMPOOL-02).ValidationResult— immutable result of a validator run, carrying a status enum and a list of error messages (FR-TX-02).
- Since:
- 1.0.0
-
ClassDescriptionService Provider Interface (SPI) for persistent block storage.Service Provider Interface (SPI) for pluggable consensus algorithms.Service Provider Interface (SPI) for ordering transactions in the mempool.Service Provider Interface (SPI) for pluggable transaction validation logic.Immutable result returned by
TransactionValidator.validate(com.privatechain.core.model.Transaction, com.privatechain.core.builder.Blockchain).Classification of a transaction validation outcome.