Documentation ¶
Index ¶
- Constants
- Variables
- func DataPointMessageLogFields(d DataPoint) log.Fields
- type DataPoint
- func (d *DataPoint) GobDecode(b []byte) error
- func (d *DataPoint) GobEncode() ([]byte, error)
- func (d DataPoint) MarshalJSON() ([]byte, error)
- func (d *DataPoint) Marshall() ([]byte, error)
- func (d DataPoint) MarshallBinary() ([]byte, error)
- func (d *DataPoint) Unmarshall(b []byte) error
- func (d *DataPoint) UnmarshallBinary(data []byte) error
- type Greet
- type MessageMap
- type MuSigCommitment
- type MuSigInitialize
- type MuSigMessage
- type MuSigMeta
- type MuSigMetaFeedTick
- type MuSigMetaTickV1
- type MuSigPartialSignature
- type MuSigSignature
- type MuSigTerminate
- type Price
Constants ¶
const ( MuSigStartV1MessageName = "musig_initialize/v1.1" MuSigTerminateV1MessageName = "musig_terminate/v1.1" MuSigCommitmentV1MessageName = "musig_commitment/v1.1" MuSigPartialSignatureV1MessageName = "musig_partial_signature/v1.1" MuSigSignatureV1MessageName = "musig_signature/v1.1" )
const DataPointV1MessageName = "data_point/v1"
const GreetV1MessageName = "greet/v1"
const (
MuSigTickV1DataType = "tick/v1"
)
const PriceV0MessageName = "price/v0"
Deprecated: use DataPointV1MessageName instead.
const PriceV1MessageName = "price/v1"
Deprecated: use DataPointV1MessageName instead.
Variables ¶
var ( ErrPriceMessageTooLarge = errors.New("price message too large") ErrUnknownPriceMessageVersion = errors.New("unknown message version") ErrInvalidPriceMessage = errors.New("invalid price message") ErrMessageTooLarge = errors.New("message too large") )
var AllMessagesMap = MessageMap{ PriceV0MessageName: (*Price)(nil), PriceV1MessageName: (*Price)(nil), DataPointV1MessageName: (*DataPoint)(nil), GreetV1MessageName: (*Greet)(nil), MuSigStartV1MessageName: (*MuSigInitialize)(nil), MuSigTerminateV1MessageName: (*MuSigTerminate)(nil), MuSigCommitmentV1MessageName: (*MuSigCommitment)(nil), MuSigPartialSignatureV1MessageName: (*MuSigPartialSignature)(nil), MuSigSignatureV1MessageName: (*MuSigSignature)(nil), }
Functions ¶
func DataPointMessageLogFields ¶ added in v0.13.5
Types ¶
type DataPoint ¶ added in v0.11.0
type DataPoint struct { transport.AppInfo // Model is the name of the data model. Model string // Value is a binary representation of the data point. Point datapoint.Point // Signature is the feed signature of the data point. ECDSASignature types.Signature }
func (DataPoint) MarshalJSON ¶ added in v0.15.3
func (DataPoint) MarshallBinary ¶ added in v0.11.0
MarshallBinary implements the transport.Message interface.
func (*DataPoint) Unmarshall ¶ added in v0.11.4
func (*DataPoint) UnmarshallBinary ¶ added in v0.11.0
UnmarshallBinary implements the transport.Message interface.
type Greet ¶ added in v0.11.5
type Greet struct { transport.AppInfo Signature types.Signature PublicKeyX *big.Int PublicKeyY *big.Int WebURL string }
func (Greet) MarshalJSON ¶ added in v0.15.3
func (Greet) MarshallBinary ¶ added in v0.11.5
MarshallBinary implements the transport.Message interface.
func (*Greet) UnmarshallBinary ¶ added in v0.11.5
UnmarshallBinary implements the transport.Message interface.
type MessageMap ¶ added in v0.15.2
func (MessageMap) Keys ¶ added in v0.15.2
func (mm MessageMap) Keys() []string
Keys returns a sorted list of keys.
func (MessageMap) SelectByTopic ¶ added in v0.15.2
func (mm MessageMap) SelectByTopic(topics ...string) (MessageMap, error)
SelectByTopic returns a new MessageMap with messages selected by topic. Empty topic list will yield an empty map.
type MuSigCommitment ¶ added in v0.11.0
type MuSigCommitment struct { transport.AppInfo // Unique SessionID of the MuSig session. SessionID types.Hash CommitmentKeyX *big.Int CommitmentKeyY *big.Int PublicKeyX *big.Int PublicKeyY *big.Int }
func (MuSigCommitment) MarshalJSON ¶ added in v0.15.3
func (m MuSigCommitment) MarshalJSON() ([]byte, error)
func (MuSigCommitment) MarshallBinary ¶ added in v0.11.0
func (m MuSigCommitment) MarshallBinary() ([]byte, error)
MarshallBinary implements the transport.Message interface.
func (*MuSigCommitment) UnmarshallBinary ¶ added in v0.11.0
func (m *MuSigCommitment) UnmarshallBinary(bytes []byte) error
UnmarshallBinary implements the transport.Message interface.
type MuSigInitialize ¶ added in v0.11.0
type MuSigInitialize struct { transport.AppInfo *MuSigMessage // SessionID is the unique ID of the MuSig session. SessionID types.Hash // CreatedAt is the time when the session was started. StartedAt time.Time }
func (MuSigInitialize) MarshalJSON ¶ added in v0.15.3
func (m MuSigInitialize) MarshalJSON() ([]byte, error)
func (MuSigInitialize) MarshallBinary ¶ added in v0.11.0
func (m MuSigInitialize) MarshallBinary() ([]byte, error)
MarshallBinary implements the transport.Message interface.
func (*MuSigInitialize) UnmarshallBinary ¶ added in v0.11.0
func (m *MuSigInitialize) UnmarshallBinary(bytes []byte) (err error)
UnmarshallBinary implements the transport.Message interface.
type MuSigMessage ¶ added in v0.13.10
type MuSigMeta ¶ added in v0.13.10
type MuSigMeta struct { // Meta must be one of the following types: // * MuSigMetaTickV1 Meta muSigMeta }
func (*MuSigMeta) TickV1 ¶ added in v0.13.10
func (m *MuSigMeta) TickV1() *MuSigMetaTickV1
type MuSigMetaFeedTick ¶ added in v0.13.10
type MuSigMetaFeedTick struct { Val *bn.DecFixedPointNumber // Price. Age time.Time // Price timestamp. VRS types.Signature // Signature. }
func (MuSigMetaFeedTick) MarshalJSON ¶ added in v0.15.3
func (m MuSigMetaFeedTick) MarshalJSON() ([]byte, error)
type MuSigMetaTickV1 ¶ added in v0.13.10
type MuSigMetaTickV1 struct { Wat string // Asset name. Val *bn.DecFixedPointNumber // Median price. Age time.Time // Oldest tick timestamp. ECDSAData *types.Signature // Optional ECDSA signature data required for the optimistic poke. FeedTicks []MuSigMetaFeedTick // All ticks used to calculate the median price. }
func (MuSigMetaTickV1) MarshalJSON ¶ added in v0.15.3
func (m MuSigMetaTickV1) MarshalJSON() ([]byte, error)
type MuSigPartialSignature ¶ added in v0.11.0
type MuSigPartialSignature struct { transport.AppInfo // Unique SessionID of the MuSig session. SessionID types.Hash // Partial signature of the MuSig session. PartialSignature *big.Int }
func (MuSigPartialSignature) MarshalJSON ¶ added in v0.15.3
func (m MuSigPartialSignature) MarshalJSON() ([]byte, error)
func (MuSigPartialSignature) MarshallBinary ¶ added in v0.11.0
func (m MuSigPartialSignature) MarshallBinary() ([]byte, error)
MarshallBinary implements the transport.Message interface.
func (*MuSigPartialSignature) UnmarshallBinary ¶ added in v0.11.0
func (m *MuSigPartialSignature) UnmarshallBinary(bytes []byte) error
UnmarshallBinary implements the transport.Message interface.
type MuSigSignature ¶ added in v0.11.0
type MuSigSignature struct { transport.AppInfo *MuSigMessage // Unique SessionID of the MuSig session. SessionID types.Hash `json:"sessionID"` // ComputedAt is the time at which the signature was computed. ComputedAt time.Time `json:"computedAt"` // Commitment of the MuSig session. Commitment types.Address `json:"commitment"` // SchnorrSignature is a MuSig Schnorr signature calculated from the partial // signatures of all participants. SchnorrSignature *big.Int `json:"schnorrSignature"` }
func (MuSigSignature) MarshalJSON ¶ added in v0.15.3
func (m MuSigSignature) MarshalJSON() ([]byte, error)
func (MuSigSignature) MarshallBinary ¶ added in v0.11.0
func (m MuSigSignature) MarshallBinary() ([]byte, error)
MarshallBinary implements the transport.Message interface.
func (*MuSigSignature) UnmarshallBinary ¶ added in v0.11.0
func (m *MuSigSignature) UnmarshallBinary(bytes []byte) error
UnmarshallBinary implements the transport.Message interface.
type MuSigTerminate ¶ added in v0.11.0
type MuSigTerminate struct { transport.AppInfo // Unique SessionID of the MuSig session. SessionID types.Hash // Reason for terminating the MuSig session. Reason string }
func (MuSigTerminate) MarshalJSON ¶ added in v0.15.3
func (m MuSigTerminate) MarshalJSON() ([]byte, error)
func (MuSigTerminate) MarshallBinary ¶ added in v0.11.0
func (m MuSigTerminate) MarshallBinary() ([]byte, error)
MarshallBinary implements the transport.Message interface.
func (*MuSigTerminate) UnmarshallBinary ¶ added in v0.11.0
func (m *MuSigTerminate) UnmarshallBinary(bytes []byte) error
UnmarshallBinary implements the transport.Message interface.
type Price ¶
type Price struct { Price *median.Price `json:"price"` Trace json.RawMessage `json:"trace"` Version string `json:"version,omitempty"` // TODO: this should move to some meta field e.g. `feedVersion` // contains filtered or unexported fields }
Price is a message that contains a price and a trace of the price. Deprecated: move to datapoint/v1 message.
func (*Price) MarshallBinary ¶
MarshallBinary implements the transport.Message interface.
func (*Price) Unmarshall ¶
func (*Price) UnmarshallBinary ¶
UnmarshallBinary implements the transport.Message interface.