Expand description
§kona-preimage
This crate offers a high-level API over the Preimage Oracle
. It is no_std
compatible to be used in
client
programs, and the host
handles are async
colored to allow for the host
programs to reach out to external
data sources to populate the Preimage Oracle
.
Modules§
- Errors for the
kona-preimage
crate.
Structs§
- A HintReader is a router for hints sent by the HintWriter from the client program. It provides a way for the host to prepare preimages for reading.
- A HintWriter is a high-level interface to the hint channel. It provides a way to write hints to the host.
- An OracleReader is a high-level interface to the preimage oracle channel.
- An OracleServer is a router for the host to serve data back to the client OracleReader.
- A preimage key is a 32-byte value that identifies a preimage that may be fetched from the oracle.
Enums§
Traits§
- A Channel is a high-level interface to read and write data to a counterparty.
- A HintReaderServer is a high-level interface to read preimage hints from the HintWriterClient and prepare them for consumption by the client program.
- A HintRouter is a high-level interface to route hints to the appropriate handler.
- A HintWriterClient is a high-level interface to the hint pipe. It provides a way to write hints to the host.
- A PreimageFetcher is a high-level interface to fetch preimages during preimage requests.
- A PreimageOracleClient is a high-level interface to read data from the host, keyed by a PreimageKey.
- A PreimageOracleServer is a high-level interface to accept read requests from the client and write the preimage data to the client pipe.