Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Feed ¶
type Feed struct {
// Metadata corresponds to the JSON schema field "Metadata".
Metadata SignersMetadata `json:"Metadata" yaml:"Metadata" mapstructure:"Metadata"`
// Payload corresponds to the JSON schema field "Payload".
Payload []FeedReport `json:"Payload" yaml:"Payload" mapstructure:"Payload"`
// Timestamp corresponds to the JSON schema field "Timestamp".
Timestamp int64 `json:"Timestamp" yaml:"Timestamp" mapstructure:"Timestamp"`
}
func (*Feed) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type FeedCap ¶
type FeedCap interface {
sdk.CapDefinition[Feed]
Metadata() SignersMetadataCap
Payload() sdk.CapDefinition[[]FeedReport]
Timestamp() sdk.CapDefinition[int64]
// contains filtered or unexported methods
}
func FeedCapFromStep ¶
FeedCapFromStep should only be called from generated code to assure type safety
func NewFeedFromFields ¶
func NewFeedFromFields( metadata SignersMetadataCap, payload sdk.CapDefinition[[]FeedReport], timestamp sdk.CapDefinition[int64]) FeedCap
type FeedId ¶
type FeedId string
The ID of the data feed.
func (*FeedId) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type FeedIdCap ¶
type FeedIdCap sdk.CapDefinition[FeedId]
type FeedReport ¶
type FeedReport struct {
// BenchmarkPrice corresponds to the JSON schema field "BenchmarkPrice".
BenchmarkPrice []uint8 `json:"BenchmarkPrice" yaml:"BenchmarkPrice" mapstructure:"BenchmarkPrice"`
// FeedID corresponds to the JSON schema field "FeedID".
FeedID FeedId `json:"FeedID" yaml:"FeedID" mapstructure:"FeedID"`
// FullReport corresponds to the JSON schema field "FullReport".
FullReport []uint8 `json:"FullReport" yaml:"FullReport" mapstructure:"FullReport"`
// ObservationTimestamp corresponds to the JSON schema field
// "ObservationTimestamp".
ObservationTimestamp int64 `json:"ObservationTimestamp" yaml:"ObservationTimestamp" mapstructure:"ObservationTimestamp"`
// ReportContext corresponds to the JSON schema field "ReportContext".
ReportContext []uint8 `json:"ReportContext" yaml:"ReportContext" mapstructure:"ReportContext"`
// Signatures corresponds to the JSON schema field "Signatures".
Signatures [][]uint8 `json:"Signatures" yaml:"Signatures" mapstructure:"Signatures"`
}
func (*FeedReport) UnmarshalJSON ¶
func (j *FeedReport) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type FeedReportCap ¶
type FeedReportCap interface {
sdk.CapDefinition[FeedReport]
BenchmarkPrice() sdk.CapDefinition[[]uint8]
FeedID() FeedIdCap
FullReport() sdk.CapDefinition[[]uint8]
ObservationTimestamp() sdk.CapDefinition[int64]
ReportContext() sdk.CapDefinition[[]uint8]
Signatures() sdk.CapDefinition[[][]uint8]
// contains filtered or unexported methods
}
func FeedReportCapFromStep ¶
func FeedReportCapFromStep(w *sdk.WorkflowSpecFactory, step sdk.Step[FeedReport]) FeedReportCap
FeedReportCapFromStep should only be called from generated code to assure type safety
func NewFeedReportFromFields ¶
func NewFeedReportFromFields( benchmarkPrice sdk.CapDefinition[[]uint8], feedID FeedIdCap, fullReport sdk.CapDefinition[[]uint8], observationTimestamp sdk.CapDefinition[int64], reportContext sdk.CapDefinition[[]uint8], signatures sdk.CapDefinition[[][]uint8]) FeedReportCap
type SignersMetadata ¶
type SignersMetadata struct {
// MinRequiredSignatures corresponds to the JSON schema field
// "MinRequiredSignatures".
MinRequiredSignatures int64 `json:"MinRequiredSignatures" yaml:"MinRequiredSignatures" mapstructure:"MinRequiredSignatures"`
// Signers corresponds to the JSON schema field "Signers".
Signers []string `json:"Signers" yaml:"Signers" mapstructure:"Signers"`
}
func (*SignersMetadata) UnmarshalJSON ¶
func (j *SignersMetadata) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type SignersMetadataCap ¶
type SignersMetadataCap interface {
sdk.CapDefinition[SignersMetadata]
MinRequiredSignatures() sdk.CapDefinition[int64]
Signers() sdk.CapDefinition[[]string]
// contains filtered or unexported methods
}
func NewSignersMetadataFromFields ¶
func NewSignersMetadataFromFields( minRequiredSignatures sdk.CapDefinition[int64], signers sdk.CapDefinition[[]string]) SignersMetadataCap
func SignersMetadataCapFromStep ¶
func SignersMetadataCapFromStep(w *sdk.WorkflowSpecFactory, step sdk.Step[SignersMetadata]) SignersMetadataCap
SignersMetadataCapFromStep should only be called from generated code to assure type safety
type Trigger ¶
type Trigger struct {
// Config corresponds to the JSON schema field "config".
Config TriggerConfig `json:"config" yaml:"config" mapstructure:"config"`
// Outputs corresponds to the JSON schema field "outputs".
Outputs *Feed `json:"outputs,omitempty" yaml:"outputs,omitempty" mapstructure:"outputs,omitempty"`
}
Streams Trigger
func (*Trigger) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type TriggerConfig ¶
type TriggerConfig struct {
// The IDs of the data feeds that will have their reports included in the trigger
// event.
FeedIds []FeedId `json:"feedIds" yaml:"feedIds" mapstructure:"feedIds"`
// The interval in seconds after which a new trigger event is generated.
MaxFrequencyMs uint64 `json:"maxFrequencyMs" yaml:"maxFrequencyMs" mapstructure:"maxFrequencyMs"`
}
func (TriggerConfig) New ¶
func (cfg TriggerConfig) New(w *sdk.WorkflowSpecFactory) FeedCap
func (*TriggerConfig) UnmarshalJSON ¶
func (j *TriggerConfig) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
Click to show internal directories.
Click to hide internal directories.