Documentation
¶
Index ¶
- type DataFeedsConsensus
- type DataFeedsConsensusConfig
- type DataFeedsConsensusConfigAggregationConfig
- type DataFeedsConsensusConfigAggregationConfigFeeds
- type DataFeedsConsensusConfigAggregationMethod
- type DataFeedsConsensusInput
- type DataFeedsConsensusInputs
- type Encoder
- type EncoderCap
- type EncoderConfig
- type EncoderConfigCap
- type FeedValue
- type FeedValueCap
- type IdenticalConsensusConfig
- type IdenticalConsensusInput
- type IdenticalConsensusMergedInput
- type ReportId
- type ReportIdCap
- type SignedReport
- type SignedReportCap
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 (cfg DataFeedsConsensusConfig) New(w *sdk.WorkflowSpecFactory, ref string, input DataFeedsConsensusInput) SignedReportCap
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 ¶
func (j *DataFeedsConsensusConfigAggregationConfig) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DataFeedsConsensusConfigAggregationMethod ¶
type DataFeedsConsensusConfigAggregationMethod string
const DataFeedsConsensusConfigAggregationMethodDataFeeds DataFeedsConsensusConfigAggregationMethod = "data_feeds"
func (*DataFeedsConsensusConfigAggregationMethod) UnmarshalJSON ¶
func (j *DataFeedsConsensusConfigAggregationMethod) UnmarshalJSON(b []byte) error
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"
func (*Encoder) UnmarshalJSON ¶
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 ¶
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 ¶
func (c IdenticalConsensusConfig[T]) New(w *sdk.WorkflowSpecFactory, ref string, input IdenticalConsensusInput[T]) SignedReportCap
type IdenticalConsensusInput ¶
type IdenticalConsensusInput[T any] struct { Observations sdk.CapDefinition[T] }
func (IdenticalConsensusInput[T]) ToSteps ¶
func (input IdenticalConsensusInput[T]) ToSteps() sdk.StepInputs
type IdenticalConsensusMergedInput ¶
type IdenticalConsensusMergedInput[T any] struct { Observations []T }
type ReportId ¶
type ReportId string
func (*ReportId) UnmarshalJSON ¶
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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.