reqmsg

package
v0.0.0-...-4404711 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAggregateBytes

func GetAggregateBytes(
	dataset common.Address,
	key []byte,
	value common.Hash,
	timestamp uint64,
	status dt.QueryStatus,
) []byte

GetAggregateBytes calculate bytes used in sign and verify signature from provider aggregation

func GetRawDataBytes

func GetRawDataBytes(
	dataset common.Address,
	key []byte,
	option dt.AnswerOption,
	value common.Hash,
	timestamp uint64,
) []byte

GetRawDataBytes calculate bytes used in sign and verify signature from provider data

Types

type DataRequest

type DataRequest struct {
	Dataset common.Address `json:"dataset"`
	Key     string         `json:"key"`
}

func (*DataRequest) NormalizeKey

func (input *DataRequest) NormalizeKey()

type DataResponse

type DataResponse struct {
	Provider  common.Address `json:"provider"`
	Answer    dt.Answer      `json:"answer"`
	Timestamp uint64         `json:"timestamp"`
	Sig       eth.Signature  `json:"signature"`
}

type SignRequest

type SignRequest struct {
	DataRequest
	Datapoints           []DataResponse `json:"datapoints"`
	MinimumProviderCount int            `json:"minimumProviders"`
}

type SignResponse

type SignResponse struct {
	Provider  common.Address `json:"provider"`
	Value     common.Hash    `json:"value"`
	Timestamp uint64         `json:"timestamp"`
	Sig       eth.Signature  `json:"signature"`
	Status    dt.QueryStatus `json:"status"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL