Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnknownOracleSource = errors.New("unknown oracle source")
ErrUnknownOracleSource is used when the input data is originated from an unknown, unsupported or unspecified oracle source.
Functions ¶
This section is empty.
Types ¶
type Adaptor ¶
Adaptor represents a adaptor that consumes and normalises data from a specific type of source.
type Adaptors ¶
type Adaptors struct { // Adaptors holds all the supported Adaptors sorted by source. Adaptors map[commandspb.OracleDataSubmission_OracleSource]Adaptor }
Adaptors normalises the input data into an common.Data according to its source.
func (*Adaptors) Normalise ¶
func (a *Adaptors) Normalise(txPubKey crypto.PublicKey, data commandspb.OracleDataSubmission) (*common.Data, error)
Normalise normalises the input data into an common.Data based on its source.
type JSONAdaptor ¶
type JSONAdaptor struct{}
JSONAdaptor is a Adaptor for simple data broadcasting. Link: https://compound.finance/docs/prices
type OpenOracleAdaptor ¶
type OpenOracleAdaptor struct{}
OpenOracleAdaptor is a specific oracle Adaptor for Open Oracle / Open Price Feed standard. Link: https://compound.finance/docs/prices
func NewOpenOracleAdaptor ¶
func NewOpenOracleAdaptor() *OpenOracleAdaptor
NewOpenOracleAdaptor creates a new OpenOracleAdaptor.