Documentation ¶
Index ¶
- Constants
- Variables
- func DataPointMessageLogFields(d DataPoint) log.Fields
- type DataPoint
- type Greet
- type MuSigCommitment
- type MuSigInitialize
- type MuSigMessage
- type MuSigMeta
- type MuSigMetaFeedTick
- type MuSigMetaOptimistic
- type MuSigMetaTickV1
- type MuSigPartialSignature
- type MuSigSignature
- type MuSigTerminate
- type Price
Constants ¶
const ( MuSigStartV1MessageName = "musig_initialize/v1" MuSigTerminateV1MessageName = "musig_terminate/v1" MuSigCommitmentV1MessageName = "musig_commitment/v1" MuSigPartialSignatureV1MessageName = "musig_partial_signature/v1" MuSigSignatureV1MessageName = "musig_signature/v1" )
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 ¶
Functions ¶
func DataPointMessageLogFields ¶ added in v0.13.5
Types ¶
type DataPoint ¶ added in v0.11.0
type DataPoint struct { // Model is the name of the data model. Model string `json:"model"` // Value is a binary representation of the data point. Point datapoint.Point `json:"point"` // Signature is the feed signature of the data point. ECDSASignature types.Signature `json:"ecdsa_signature"` }
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 { Signature types.Signature `json:"signature"` PublicKeyX *big.Int `json:"public_key_x"` PublicKeyY *big.Int `json:"public_key_y"` }
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 MuSigCommitment ¶ added in v0.11.0
type MuSigCommitment struct { // Unique SessionID of the MuSig session. SessionID types.Hash `json:"session_id"` CommitmentKeyX *big.Int `json:"commitment_key_x"` CommitmentKeyY *big.Int `json:"commitment_key_y"` PublicKeyX *big.Int `json:"public_key_x"` PublicKeyY *big.Int `json:"public_key_y"` }
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 { *MuSigMessage // SessionID is the unique ID of the MuSig session. SessionID types.Hash `json:"session_id"` // CreatedAt is the time when the session was started. StartedAt time.Time `json:"started_at"` }
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 MuSigMessage struct { // Type of the message. MsgType string `json:"msg_type"` // Message body that will be signed. MsgBody types.Hash `json:"msg_body"` // Meta is a message-specific metadata. MsgMeta MuSigMeta `json:"msg_meta"` // Signers is a list of signers that will participate in the MuSig session. Signers []types.Address `json:"signers"` }
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 MuSigMetaOptimistic ¶ added in v0.13.10
type MuSigMetaTickV1 ¶ added in v0.13.10
type MuSigMetaTickV1 struct { Wat string `json:"wat"` // Asset name. Val *bn.DecFixedPointNumber `json:"val"` // Median price. Age time.Time `json:"age"` // Oldest tick timestamp. Optimistic []MuSigMetaOptimistic `json:"optimistic"` // Optimistic signatures. FeedTicks []MuSigMetaFeedTick `json:"ticks"` // All ticks used to calculate the median price. }
type MuSigPartialSignature ¶ added in v0.11.0
type MuSigPartialSignature struct { // Unique SessionID of the MuSig session. SessionID types.Hash `json:"session_id"` // Partial signature of the MuSig session. PartialSignature *big.Int `json:"partial_signature"` }
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 { *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) 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 { // Unique SessionID of the MuSig session. SessionID types.Hash `json:"session_id"` // Reason for terminating the MuSig session. Reason string `json:"reason"` }
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.