types

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseConfig

type BaseConfig struct {
}

BaseConfig defines the base configuration for a Tendermint node

type Config

type Config struct {
	// Top level options use an anonymous struct
	BaseConfig `mapstructure:",squash"`

	// Options for services
	RPC       *RPCConfig       `mapstructure:"rpc" json:"rpc"`
	Consensus *ConsensusConfig `mapstructure:"consensus" json:"consensus"`
	TxIndex   *TxIndexConfig   `mapstructure:"tx_index" json:"tx_index"`
}

type ConsensusConfig

type ConsensusConfig struct {
	TimeoutCommit time.Duration `json:"timeout_commit" mapstructure:"timeout_commit"`
	// EmptyBlocks mode and possible interval between empty blocks
	CreateEmptyBlocks         bool          `json:"create_empty_blocks" mapstructure:"create_empty_blocks"`
	CreateEmptyBlocksInterval time.Duration `json:"create_empty_blocks_interval" mapstructure:"create_empty_blocks_interval"`
}

ConsensusConfig defines the configuration for the Tendermint consensus service, including timeouts and details about the WAL and the block structure.

type Description

type Description struct {
	Moniker         string `json:"moniker"`
	Identity        string `json:"identity"`
	Website         string `json:"website"`
	Details         string `json:"details"`
	SecurityContact string `json:"security_contact"`
}

type GenAccount

type GenAccount struct {
	Address     string `json:"address"`
	CoinGenesis int64  `json:"coin_genesis"`
}

type Key

type Key struct {
	Name     string `json:"name"`
	Password string `json:"password"`
	Mnemonic string `json:"mnemonic"`
}

type KeyStorage

type KeyStorage struct {
	Keys map[string]*Key `json:"keys"`
}

func (*KeyStorage) GetKey

func (ks *KeyStorage) GetKey(address string) (*Key, error)

type NetConfig

type NetConfig struct {
	Type         string           `json:"type"` // localnet,testnet
	GlobalConfig *Config          `json:"config"`
	GenAccounts  []*GenAccount    `json:"gen_accounts"`
	Validators   []*ValidatorInfo `json:"validators"`
}

type NodeConfig

type NodeConfig struct {
	DirName   string
	DaemonDir string
	CliDir    string
}

type RPCConfig

type RPCConfig struct {
	// TCP or UNIX socket address for the RPC server to listen on
	ListenAddress string `json:"laddr" mapstructure:"laddr"`

	// A list of origins a cross-domain request can be executed from.
	// If the special '*' value is present in the list, all origins will be allowed.
	// An origin may contain a wildcard (*) to replace 0 or more characters (i.e.: http://*.domain.com).
	// Only one wildcard can be used per origin.
	CORSAllowedOrigins []string `json:"cors_allowed_origins" mapstructure:"cors_allowed_origins"`
}

RPCConfig defines the configuration options for the Tendermint RPC server

type TxIndexConfig added in v0.1.4

type TxIndexConfig struct {
	// Comma-separated list of tags to index (by default the only tag is "tx.hash")
	//
	// You can also index transactions by height by adding "tx.height" tag here.
	//
	// It's recommended to index only a subset of tags due to possible memory
	// bloat. This is, of course, depends on the indexer's DB and the volume of
	// transactions.
	IndexTags string `json:"index_tags" mapstructure:"index_tags"`

	// When set to true, tells indexer to index all tags (predefined tags:
	// "tx.hash", "tx.height" and all tags from DeliverTx responses).
	//
	// Note this may be not desirable (see the comment above). IndexTags has a
	// precedence over IndexAllTags (i.e. when given both, IndexTags will be
	// indexed).
	IndexAllTags bool `json:"index_all_tags" mapstructure:"index_all_tags"`
}

TxIndexConfig defines the configuration for the transaction indexer, including tags to index.

type Validator

type Validator struct {
	NodeConfig  NodeConfig
	Index       int
	ChainID     string
	Moniker     string
	ID          string
	GenFile     string
	GenAccount  *authTypes.GenesisAccount
	Memo        string
	Cors        string
	ValPubKey   cryptotypes.PubKey
	IP          string
	Key         ValidatorKey
	Description Description
}

type ValidatorInfo

type ValidatorInfo struct {
	Name        string       `json:"name"`
	IP          string       `json:"ip"`
	Index       int          `json:"index"`
	Cors        string       `json:"cors"`
	Faucet      bool         `json:"faucet"`
	Key         ValidatorKey `json:"key"`
	Description Description  `json:"description"`
	Config      *Config      `json:"config"`
}

type ValidatorKey

type ValidatorKey struct {
	Address      string `json:"address"`
	CoinDelegate int64  `json:"coin_delegate"`
}

Jump to

Keyboard shortcuts

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