gravity

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	InternalServerErrCode = 500
	NotFoundCode          = 404
)

Variables

View Source
var (
	ErrValueNotFound  = errors.New("value not found")
	ErrInternalServer = errors.New("internal server error")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	Host       string
	HttpClient *rpchttp.HTTP
}

func New

func New(host string) (*Client, error)

func (*Client) BftOraclesByNebula

func (client *Client) BftOraclesByNebula(chainType account.ChainType, nebulaId account.NebulaId) (storage.OraclesMap, error)

func (*Client) CommitHash

func (client *Client) CommitHash(chainType account.ChainType, nebulaId account.NebulaId, height int64, pulseId int64, oraclePubKey account.OraclesPubKey) ([]byte, error)

func (*Client) Consuls

func (client *Client) Consuls() ([]storage.Consul, error)

func (*Client) ConsulsCandidate

func (client *Client) ConsulsCandidate() ([]storage.Consul, error)

func (*Client) LastRoundApproved

func (client *Client) LastRoundApproved() (uint64, error)

func (*Client) NebulaInfo

func (client *Client) NebulaInfo(id account.NebulaId, chainType account.ChainType) (*storage.NebulaInfo, error)

func (*Client) NebulaOraclesIndex

func (client *Client) NebulaOraclesIndex(chainId account.ChainType, nebulaId account.NebulaId) (uint64, error)

func (*Client) Nebulae

func (client *Client) Nebulae() (storage.NebulaMap, error)

func (*Client) OraclesByNebula

func (client *Client) OraclesByNebula(nebulaId account.NebulaId, chainType account.ChainType) (storage.OraclesMap, error)

func (*Client) OraclesByValidator

func (client *Client) OraclesByValidator(pubKey account.ConsulPubKey) (storage.OraclesByTypeMap, error)

func (*Client) Result

func (client *Client) Result(chainType account.ChainType, nebulaId account.NebulaId, height int64, oraclePubKey account.OraclesPubKey) ([]byte, error)

func (*Client) Results

func (client *Client) Results(height uint64, chainType account.ChainType, nebulaId account.NebulaId) ([]string, error)

func (*Client) Reveal

func (client *Client) Reveal(chainType account.ChainType, oraclePubKey account.OraclesPubKey, nebulaId account.NebulaId, height int64, pulseId int64, commitHash []byte) ([]byte, error)

func (*Client) Reveals

func (client *Client) Reveals(chainType account.ChainType, nebulaId account.NebulaId, height int64, pulseId int64) ([]string, error)

func (*Client) RoundHeight

func (client *Client) RoundHeight(chainType account.ChainType, ledgerHeight uint64) (uint64, error)

func (*Client) SendTx

func (client *Client) SendTx(transaction *transactions.Transaction) error

func (*Client) SignNewConsulsByConsul

func (client *Client) SignNewConsulsByConsul(pubKey account.ConsulPubKey, chainId account.ChainType, roundId int64) ([]byte, error)

func (*Client) SignNewOraclesByConsul

func (client *Client) SignNewOraclesByConsul(pubKey account.ConsulPubKey, chainId account.ChainType, nebulaId account.NebulaId, roundId int64) ([]byte, error)

Jump to

Keyboard shortcuts

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