Documentation ¶
Index ¶
- Constants
- func ConstructMedianPokeMessage(wat string, val *bn.DecFloatPointNumber, age time.Time) []byte
- func ConstructScribeOpPokeMessage(wat string, pokeData PokeData, schnorrData SchnorrData, signersBlob []byte) []byte
- func ConstructScribePokeMessage(wat string, pokeData PokeData) []byte
- func IsRevert(err error) bool
- func SignersBlob(signers []types.Address, feeds []types.Address, indices []uint8) ([]byte, error)
- type Chainlog
- type ECDSADataStruct
- type Median
- func (m *Median) Address() types.Address
- func (m *Median) Age(ctx context.Context) (time.Time, error)
- func (m *Median) Bar(ctx context.Context) (int, error)
- func (m *Median) Poke(ctx context.Context, vals []MedianVal) (*types.Hash, *types.Transaction, error)
- func (m *Median) Val(ctx context.Context) (*bn.DecFixedPointNumber, error)
- func (m *Median) Wat(ctx context.Context) (string, error)
- type MedianVal
- type OpScribe
- func (s *OpScribe) OpChallengePeriod(ctx context.Context) (time.Duration, error)
- func (s *OpScribe) OpPoke(ctx context.Context, pokeData PokeData, schnorrData SchnorrData, ...) (*types.Hash, *types.Transaction, error)
- func (s *OpScribe) Read(ctx context.Context) (PokeData, error)
- func (s *OpScribe) ReadAt(ctx context.Context, readTime time.Time) (PokeData, error)
- func (s *OpScribe) ReadOpPokeData(ctx context.Context) (PokeData, error)
- func (s *OpScribe) ReadPokeData(ctx context.Context) (PokeData, error)
- type PokeData
- type PokeDataStruct
- type SchnorrData
- type SchnorrDataStruct
- type Scribe
- func (s *Scribe) Address() types.Address
- func (s *Scribe) Bar(ctx context.Context) (int, error)
- func (s *Scribe) Feeds(ctx context.Context) ([]types.Address, []uint8, error)
- func (s *Scribe) Poke(ctx context.Context, pokeData PokeData, schnorrData SchnorrData) (*types.Hash, *types.Transaction, error)
- func (s *Scribe) Read(ctx context.Context) (PokeData, error)
- func (s *Scribe) Wat(ctx context.Context) (string, error)
- type WatRegistry
Constants ¶
const MedianPricePrecision = 18
const ScribePricePrecision = 18
Variables ¶
This section is empty.
Functions ¶
func ConstructMedianPokeMessage ¶ added in v0.19.2
ConstructMedianPokeMessage returns the message expected to be signed via ECDSA for calling Median.poke method.
The message structure is defined as: H(val ‖ age ‖ wat)
Where: - val: a price value - age: a time when the price was observed - wat: an asset name
func ConstructScribeOpPokeMessage ¶ added in v0.19.2
func ConstructScribeOpPokeMessage(wat string, pokeData PokeData, schnorrData SchnorrData, signersBlob []byte) []byte
ConstructScribeOpPokeMessage returns the message expected to be signed via ECDSA for calling OpScribe.opPoke method.
The message structure is defined as: H(wat ‖ val ‖ age ‖ signature ‖ commitment ‖ signersBlob)
Where: - wat: an asset name - val: a price value - age: a time when the price was observed - signature: a Schnorr signature - commitment: a Schnorr commitment - signersBlob: a byte slice with signers indexes obtained from a contract
func ConstructScribePokeMessage ¶ added in v0.19.2
ConstructScribePokeMessage returns the message expected to be signed via ECDSA for calling Scribe.poke method.
The message is defined as: H(wat ‖ val ‖ age)
Where: - wat: an asset name - val: a price value - age: a time when the price was observed
Types ¶
type ECDSADataStruct ¶
ECDSADataStruct represents the ECDSAData struct in the IScribe interface.
type Median ¶
type Median struct {
// contains filtered or unexported fields
}
type OpScribe ¶
type OpScribe struct {
Scribe
}
func (*OpScribe) OpChallengePeriod ¶ added in v0.16.0
func (*OpScribe) ReadOpPokeData ¶ added in v0.16.0
type PokeDataStruct ¶
PokeDataStruct represents the PokeData struct in the IScribe interface.
type SchnorrData ¶
type SchnorrDataStruct ¶
type SchnorrDataStruct struct { Signature *big.Int `abi:"signature"` Commitment types.Address `abi:"commitment"` SignersBlob []byte `abi:"signersBlob"` }
SchnorrDataStruct represents the SchnorrData struct in the IScribe interface.
type Scribe ¶
type Scribe struct {
// contains filtered or unexported fields
}
type WatRegistry ¶
type WatRegistry struct {
// contains filtered or unexported fields
}
func NewWatRegistry ¶
func NewWatRegistry(client rpc.RPC, address types.Address) *WatRegistry
func (*WatRegistry) Address ¶
func (w *WatRegistry) Address() types.Address