# README
op-preimage
op-preimage
offers simple Go bindings to interact as client or sever over the Pre-image Oracle ABI.
Read more about the Preimage Oracle in the specs.
See op-program and Cannon client examples for client-side usage.
See Cannon mipsevm
for server-side usage.
# Functions
No description provided by the author
ClientPreimageChannel returns a FileChannel for the preimage oracle in a detached context.
CreateBidirectionalChannel creates a pair of FileChannels that are connected to each other.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewReadWritePair creates a new FileChannel that uses the given files.
# Constants
No description provided by the author
No description provided by the author
Keccak256KeyType is for keccak256 pre-images, for any global shared pre-images.
LocalKeyType is for input-type pre-images, specific to the local program instance.
No description provided by the author
No description provided by the author
# Structs
HintReader reads the hints of HintWriter and passes them to a router for preparation of the requested pre-images.
HintWriter writes hints to an io.Writer (e.g.
OracleClient implements the Oracle by writing the pre-image key to the given stream, and reading back a length-prefixed value.
OracleServer serves the pre-image requests of the OracleClient, implementing the same protocol as the onchain VM.
No description provided by the author
# Interfaces
FileChannel is a unidirectional channel for file I/O.
Hint is an interface to enable any program type to function as a hint, when passed to the Hinter interface, returning a string representation of what data the host should prepare pre-images for.
Hinter is an interface to write hints to the host.
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
Keccak256Key wraps a keccak256 hash to use it as a typed pre-image key.
KeyType is the key-type of a pre-image, used to prefix the pre-image key with.
LocalIndexKey is a key local to the program, indexing a special program input.
No description provided by the author
No description provided by the author