config

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: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMoniker = "robot"
)

Variables

This section is empty.

Functions

func ParseConfig

func ParseConfig(filename string, config interface{}) error

Types

type AdaptorsConfig

type AdaptorsConfig struct {
	NodeUrl                string
	ChainId                string
	GravityContractAddress string
}

type Genesis

type Genesis struct {
	ConsulsCount              int
	GenesisTime               time.Time
	ChainID                   string
	Block                     types.BlockParams
	Evidence                  types.EvidenceParams
	InitScore                 map[string]uint64
	OraclesAddressByValidator map[string]map[string]string
}

type Key

type Key struct {
	Address string
	PubKey  string
	PrivKey string
}

type Keys

type Keys struct {
	Validator    Key
	TargetChains map[string]Key
}

func GeneratePrivKeys

func GeneratePrivKeys() (*Keys, error)

type LedgerConfig

type LedgerConfig struct {
	Moniker    string
	IsFastSync bool
	Mempool    *cfg.MempoolConfig
	RPC        *cfg.RPCConfig
	P2P        *cfg.P2PConfig

	Details  *ValidatorDetails
	PublicIP string

	Adapters map[string]AdaptorsConfig
}

func DefaultLedgerConfig

func DefaultLedgerConfig() LedgerConfig

type OracleConfig

type OracleConfig struct {
	TargetChainNodeUrl string
	ChainId            string
	GravityNodeUrl     string
	ChainType          string
	ExtractorUrl       string
}

type ValidatorDetails

type ValidatorDetails struct {
	Name, Description, JoinedAt string
	// Misc
	AvatarURL, Website string
}

func (*ValidatorDetails) Bytes

func (validatorDetails *ValidatorDetails) Bytes() ([]byte, error)

func (*ValidatorDetails) DefaultNew

func (validatorDetails *ValidatorDetails) DefaultNew() *ValidatorDetails

Jump to

Keyboard shortcuts

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