Documentation ¶
Index ¶
- Constants
- func RawReportContext(repctx types.ReportContext) [3][32]byte
- func SplitReport(report types.Report) ([][]byte, error)
- type OnchainConfigCodec
- func (codec OnchainConfigCodec) Decode(ctx context.Context, b []byte) (median.OnchainConfig, error)
- func (codec OnchainConfigCodec) DecodeToFelts(b []byte) ([]*big.Int, error)
- func (codec OnchainConfigCodec) Encode(ctx context.Context, c median.OnchainConfig) ([]byte, error)
- func (codec OnchainConfigCodec) EncodeFromFelt(version, min, max *big.Int) ([]byte, error)
- type ReportCodec
Constants ¶
View Source
const (
OnchainConfigVersion = 1
)
Variables ¶
This section is empty.
Functions ¶
func RawReportContext ¶
func RawReportContext(repctx types.ReportContext) [3][32]byte
NOTE: this should sit in the ocr2 package but that causes import cycles
Types ¶
type OnchainConfigCodec ¶
type OnchainConfigCodec struct{}
func (OnchainConfigCodec) Decode ¶
func (codec OnchainConfigCodec) Decode(ctx context.Context, b []byte) (median.OnchainConfig, error)
Decode converts the onchainconfig via the outputs of DecodeToFelts into unsigned big.Ints that libocr expects
func (OnchainConfigCodec) DecodeToFelts ¶
func (codec OnchainConfigCodec) DecodeToFelts(b []byte) ([]*big.Int, error)
DecodeToFelts decodes the onchainconfig into felt values (used in config digest hashing)
func (OnchainConfigCodec) Encode ¶
func (codec OnchainConfigCodec) Encode(ctx context.Context, c median.OnchainConfig) ([]byte, error)
Encode takes the interface that libocr uses (big.Ints) and serializes it into 3 felts
func (OnchainConfigCodec) EncodeFromFelt ¶
func (codec OnchainConfigCodec) EncodeFromFelt(version, min, max *big.Int) ([]byte, error)
EncodeFromFelt encodes the config where min & max are big.Int representations of a felt Cairo has no notion of signed values: min and max values will be non-negative
type ReportCodec ¶
type ReportCodec struct{}
func (ReportCodec) BuildReport ¶
func (c ReportCodec) BuildReport(ctx context.Context, oo []median.ParsedAttributedObservation) (types.Report, error)
func (ReportCodec) MaxReportLength ¶
func (ReportCodec) MedianFromReport ¶
Click to show internal directories.
Click to hide internal directories.