common

package
v0.0.0-...-81ad42b Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PostProcessQueryResponse

func PostProcessQueryResponse(w http.ResponseWriter, cliCtx context.CLIContext, bz []byte)

func QuerySearchLatestRequest

func QuerySearchLatestRequest(
	route string, cliCtx context.CLIContext, oid, calldata, askCount, minCount string,
) ([]byte, int64, error)

func VerifyRequest

func VerifyRequest(
	route string, cliCtx context.CLIContext, chainID string, requestID types.RequestID,
	externalID types.ExternalID, validator sdk.ValAddress, reporterPubkey crypto.PubKey, signature []byte,
) ([]byte, int64, error)

Types

type VerificationMessage

type VerificationMessage struct {
	ChainID    string           `json:"chain_id"`
	Validator  sdk.ValAddress   `json:"validator"`
	RequestID  types.RequestID  `json:"request_id"`
	ExternalID types.ExternalID `json:"external_id"`
}

TODO: Refactor this code with yoda

func NewVerificationMessage

func NewVerificationMessage(
	chainID string, validator sdk.ValAddress, requestID types.RequestID, externalID types.ExternalID,
) VerificationMessage

func (VerificationMessage) GetSignBytes

func (msg VerificationMessage) GetSignBytes() []byte

type VerificationResult

type VerificationResult struct {
	ChainID      string             `json:"chain_id"`
	Validator    sdk.ValAddress     `json:"validator"`
	RequestID    types.RequestID    `json:"request_id,string"`
	ExternalID   types.ExternalID   `json:"external_id,string"`
	DataSourceID types.DataSourceID `json:"data_source_id,string"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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