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
- Errors for the
kona-preimagecrate.
Structs§
- Hint
Reader - 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.
- Hint
Writer - A HintWriter is a high-level interface to the hint channel. It provides a way to write hints to the host.
- Oracle
Reader - An OracleReader is a high-level interface to the preimage oracle channel.
- Oracle
Server - An OracleServer is a router for the host to serve data back to the client OracleReader.
- Preimage
Key - A preimage key is a 32-byte value that identifies a preimage that may be fetched from the oracle.
Enums§
Traits§
- Channel
- A Channel is a high-level interface to read and write data to a counterparty.
- Comms
Client - A CommsClient is a trait that combines the PreimageOracleClient and HintWriterClient
- Hint
Reader Server - A HintReaderServer is a high-level interface to read preimage hints from the HintWriterClient and prepare them for consumption by the client program.
- Hint
Router - A HintRouter is a high-level interface to route hints to the appropriate handler.
- Hint
Writer Client - A HintWriterClient is a high-level interface to the hint pipe. It provides a way to write hints to the host.
- Preimage
Fetcher - A PreimageFetcher is a high-level interface to fetch preimages during preimage requests.
- Preimage
Oracle Client - A PreimageOracleClient is a high-level interface to read data from the host, keyed by a PreimageKey.
- Preimage
Oracle Server - A PreimageOracleServer is a high-level interface to accept read requests from the client and write the preimage data to the client pipe.
- Preimage
Server Backend - A PreimageServerBackend is a trait that combines the PreimageFetcher and HintRouter traits.