ocr3cap

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataFeedsConsensus

type DataFeedsConsensus struct {
	// Config corresponds to the JSON schema field "config".
	Config DataFeedsConsensusConfig `json:"config" yaml:"config" mapstructure:"config"`

	// Inputs corresponds to the JSON schema field "inputs".
	Inputs DataFeedsConsensusInputs `json:"inputs" yaml:"inputs" mapstructure:"inputs"`

	// Outputs corresponds to the JSON schema field "outputs".
	Outputs SignedReport `json:"outputs" yaml:"outputs" mapstructure:"outputs"`
}

OCR3 consensus exposed as a capability.

func (*DataFeedsConsensus) UnmarshalJSON

func (j *DataFeedsConsensus) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type DataFeedsConsensusConfig

type DataFeedsConsensusConfig struct {
	// AggregationConfig corresponds to the JSON schema field "aggregation_config".
	AggregationConfig DataFeedsConsensusConfigAggregationConfig `json:"aggregation_config" yaml:"aggregation_config" mapstructure:"aggregation_config"`

	// AggregationMethod corresponds to the JSON schema field "aggregation_method".
	AggregationMethod DataFeedsConsensusConfigAggregationMethod `json:"aggregation_method" yaml:"aggregation_method" mapstructure:"aggregation_method"`

	// Encoder corresponds to the JSON schema field "encoder".
	Encoder Encoder `json:"encoder" yaml:"encoder" mapstructure:"encoder"`

	// EncoderConfig corresponds to the JSON schema field "encoder_config".
	EncoderConfig EncoderConfig `json:"encoder_config" yaml:"encoder_config" mapstructure:"encoder_config"`

	// ReportId corresponds to the JSON schema field "report_id".
	ReportId ReportId `json:"report_id" yaml:"report_id" mapstructure:"report_id"`
}

func (DataFeedsConsensusConfig) New

func (*DataFeedsConsensusConfig) UnmarshalJSON

func (j *DataFeedsConsensusConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type DataFeedsConsensusConfigAggregationConfig

type DataFeedsConsensusConfigAggregationConfig struct {
	// Allowed partial staleness as a number between 0 and 1.
	AllowedPartialStaleness string `json:"allowedPartialStaleness" yaml:"allowedPartialStaleness" mapstructure:"allowedPartialStaleness"`

	// Feeds corresponds to the JSON schema field "feeds".
	Feeds DataFeedsConsensusConfigAggregationConfigFeeds `json:"feeds" yaml:"feeds" mapstructure:"feeds"`
}

func (*DataFeedsConsensusConfigAggregationConfig) UnmarshalJSON

UnmarshalJSON implements json.Unmarshaler.

type DataFeedsConsensusConfigAggregationConfigFeeds

type DataFeedsConsensusConfigAggregationConfigFeeds map[string]FeedValue

type DataFeedsConsensusConfigAggregationMethod

type DataFeedsConsensusConfigAggregationMethod string
const DataFeedsConsensusConfigAggregationMethodDataFeeds DataFeedsConsensusConfigAggregationMethod = "data_feeds"

func (*DataFeedsConsensusConfigAggregationMethod) UnmarshalJSON

UnmarshalJSON implements json.Unmarshaler.

type DataFeedsConsensusInput

type DataFeedsConsensusInput struct {
	Observations sdk.CapDefinition[[]streams.Feed]
}

func (DataFeedsConsensusInput) ToSteps

func (input DataFeedsConsensusInput) ToSteps() sdk.StepInputs

type DataFeedsConsensusInputs

type DataFeedsConsensusInputs struct {
	// Observations corresponds to the JSON schema field "observations".
	Observations []streams.Feed `json:"observations" yaml:"observations" mapstructure:"observations"`
}

func (*DataFeedsConsensusInputs) UnmarshalJSON

func (j *DataFeedsConsensusInputs) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Encoder

type Encoder string
const EncoderEVM Encoder = "EVM"
const EncoderValueMap Encoder = "ValueMap"

func Encoders added in v0.1.1

func Encoders() []Encoder

func (*Encoder) UnmarshalJSON

func (j *Encoder) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type EncoderCap

type EncoderCap sdk.CapDefinition[Encoder]

type EncoderConfig

type EncoderConfig map[string]interface{}

type EncoderConfigCap

type EncoderConfigCap sdk.CapDefinition[EncoderConfig]

type FeedValue

type FeedValue struct {
	// The deviation that is required to generate a new report. Expressed as a
	// percentage. For example, 0.01 is 1% deviation.
	Deviation string `json:"deviation" yaml:"deviation" mapstructure:"deviation"`

	// The interval in seconds after which a new report is generated, regardless of
	// whether any deviations have occurred. New reports reset the timer.
	Heartbeat uint64 `json:"heartbeat" yaml:"heartbeat" mapstructure:"heartbeat"`

	// An optional remapped ID for the feed.
	RemappedID *string `json:"remappedID,omitempty" yaml:"remappedID,omitempty" mapstructure:"remappedID,omitempty"`
}

func (*FeedValue) UnmarshalJSON

func (j *FeedValue) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type FeedValueCap

type FeedValueCap interface {
	sdk.CapDefinition[FeedValue]
	Deviation() sdk.CapDefinition[string]
	Heartbeat() sdk.CapDefinition[uint64]
	RemappedID() sdk.CapDefinition[string]
	// contains filtered or unexported methods
}

func FeedValueCapFromStep

func FeedValueCapFromStep(w *sdk.WorkflowSpecFactory, step sdk.Step[FeedValue]) FeedValueCap

FeedValueCapFromStep should only be called from generated code to assure type safety

func NewFeedValueFromFields

func NewFeedValueFromFields(
	deviation sdk.CapDefinition[string],
	heartbeat sdk.CapDefinition[uint64],
	remappedID sdk.CapDefinition[string]) FeedValueCap

type IdenticalConsensusConfig

type IdenticalConsensusConfig[T any] struct {
	Encoder       Encoder
	EncoderConfig EncoderConfig
	ReportID      ReportId
}

func (IdenticalConsensusConfig[T]) New

type IdenticalConsensusInput

type IdenticalConsensusInput[T any] struct {
	Observation   sdk.CapDefinition[T]
	Encoder       Encoder
	EncoderConfig EncoderConfig
}

func (IdenticalConsensusInput[T]) ToSteps

func (input IdenticalConsensusInput[T]) ToSteps() sdk.StepInputs

type ReportId

type ReportId string

func (*ReportId) UnmarshalJSON

func (j *ReportId) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type ReportIdCap

type ReportIdCap sdk.CapDefinition[ReportId]

type SignedReport

type SignedReport struct {
	// Context corresponds to the JSON schema field "Context".
	Context []uint8 `json:"Context" yaml:"Context" mapstructure:"Context"`

	// ID corresponds to the JSON schema field "ID".
	ID []uint8 `json:"ID" yaml:"ID" mapstructure:"ID"`

	// Report corresponds to the JSON schema field "Report".
	Report []uint8 `json:"Report" yaml:"Report" mapstructure:"Report"`

	// Signatures corresponds to the JSON schema field "Signatures".
	Signatures [][]uint8 `json:"Signatures" yaml:"Signatures" mapstructure:"Signatures"`
}

func (*SignedReport) UnmarshalJSON

func (j *SignedReport) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type SignedReportCap

type SignedReportCap interface {
	sdk.CapDefinition[SignedReport]
	Context() sdk.CapDefinition[[]uint8]
	ID() sdk.CapDefinition[[]uint8]
	Report() sdk.CapDefinition[[]uint8]
	Signatures() sdk.CapDefinition[[][]uint8]
	// contains filtered or unexported methods
}

func NewSignedReportFromFields

func NewSignedReportFromFields(
	context sdk.CapDefinition[[]uint8],
	iD sdk.CapDefinition[[]uint8],
	report sdk.CapDefinition[[]uint8],
	signatures sdk.CapDefinition[[][]uint8]) SignedReportCap

func SignedReportCapFromStep

func SignedReportCapFromStep(w *sdk.WorkflowSpecFactory, step sdk.Step[SignedReport]) SignedReportCap

SignedReportCapFromStep should only be called from generated code to assure type safety

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL