Documentation
¶
Index ¶
Constants ¶
const FeedIDBytesLen = 32
Variables ¶
var ErrInvalidFeedID = errors.New("invalid feed ID")
Functions ¶
This section is empty.
Types ¶
type FeedID ¶
type FeedID string
hex-encoded 32-byte value, prefixed with "0x", all lowercase
func FeedIDFromBytes ¶
func FeedIDFromBytes(b [FeedIDBytesLen]byte) FeedID
func (FeedID) Bytes ¶
func (id FeedID) Bytes() [FeedIDBytesLen]byte
Bytes() converts the FeedID string into a [32]byte value. Note: this function panics if the underlying string isn't of the right length. For production (i.e.) non-test uses, please create the FeedID via the NewFeedID constructor, which will validate the string.
type FeedReport ¶
type FeedReport struct {
FeedID string
FullReport []byte
ReportContext []byte
Signatures [][]byte
// Fields below are derived from FullReport
// NOTE: BenchmarkPrice is a byte representation of big.Int. We can't use big.Int
// directly due to Value serialization problems using mapstructure.
BenchmarkPrice []byte
ObservationTimestamp int64
}
func UnwrapStreamsTriggerEventToFeedReportList ¶ added in v0.2.2
func UnwrapStreamsTriggerEventToFeedReportList(wrapped values.Value) ([]FeedReport, error)
Helpers for unwrapping a StreamsTriggerPayload into a []FeedReport - more efficient than using mapstructure/reflection
type LLOStreamDecimal ¶ added in v0.5.0
type LLOStreamDecimal struct {
StreamID uint32
Decimal []byte // binary representation of [llo.Decimal]: https://github.com/smartcontractkit/chainlink-data-streams/blob/d33e95631485bbcfdc22d209875035e3c73199d0/llo/stream_value.go#L147
}
type LLOStreamsTriggerEvent ¶ added in v0.5.0
type LLOStreamsTriggerEvent struct {
Payload []*LLOStreamDecimal
ObservationTimestampNanoseconds uint64
}
LLOStreamsTriggerEvent is the underlying type passed to the LLOAggregator.Aggregate function via the untyped observation, which originates on the asset don via the LLO OCR3 plugin.
type ReportCodec ¶
type ReportCodec interface {
// unwrap StreamsTriggerEvent and convert to a list of FeedReport
Unwrap(wrapped values.Value) ([]FeedReport, error)
// wrap a list of FeedReport to a wrapped StreamsTriggerEvent Value
Wrap(reports []FeedReport) (values.Value, error)
// validate signatures on a single FeedReport
Validate(feedReport FeedReport, allowedSigners [][]byte, minRequiredSignatures int) error
}
type StreamsTriggerEvent ¶ added in v0.2.2
type StreamsTriggerEvent struct {
Payload []FeedReport
Metadata Metadata
Timestamp int64
}
StreamsTriggerEvent is the underlying type passed to the dataFeedsAggregator.Aggregate function via the untyped observation, which originates in the asset don.