base

package
v28.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ValidationSovereign is when the chain has his own validator set.
	// Note that an empty string is also considered as a sovereign validation,
	// because this is the default value.
	ValidationSovereign = "sovereign"
	// ValidationConsumer is when the chain is validated by a provider chain.
	// Such chain is called a consumer chain.
	ValidationConsumer = "consumer"
)

Variables

View Source
var (
	// DefaultGRPCAddress is the default GRPC address.
	DefaultGRPCAddress = "0.0.0.0:9090"

	// DefaultGRPCWebAddress is the default GRPC-Web address.
	DefaultGRPCWebAddress = "0.0.0.0:9091"

	// DefaultAPIAddress is the default API address.
	DefaultAPIAddress = "0.0.0.0:1317"

	// DefaultRPCAddress is the default RPC address.
	DefaultRPCAddress = "0.0.0.0:26657"

	// DefaultP2PAddress is the default P2P address.
	DefaultP2PAddress = "0.0.0.0:26656"

	// DefaultPProfAddress is the default Prof address.
	DefaultPProfAddress = "0.0.0.0:6060"
)

Functions

This section is empty.

Types

type Account

type Account struct {
	Name     string   `yaml:"name"`
	Coins    []string `yaml:"coins,omitempty"`
	Mnemonic string   `yaml:"mnemonic,omitempty"`
	Address  string   `yaml:"address,omitempty"`
	CoinType string   `yaml:"cointype,omitempty"`
}

Account holds the options related to setting up Cosmos wallets.

type Build

type Build struct {
	Main    string   `yaml:"main,omitempty"`
	Binary  string   `yaml:"binary,omitempty"`
	LDFlags []string `yaml:"ldflags,omitempty"`
	Proto   Proto    `yaml:"proto"`
}

Build holds build configs.

type Client

type Client struct {
	// TSClient configures code generation for Typescript Client.
	Typescript Typescript `yaml:"typescript,omitempty"`

	// Vuex configures code generation for Vuex stores.
	//
	// Deprecated: Will be removed eventually.
	Vuex Vuex `yaml:"vuex,omitempty"`

	// Composables configures code generation for Vue 3 composables.
	Composables Composables `yaml:"composables,omitempty"`

	// Hooks configures code generation for React hooks.
	Hooks Hooks `yaml:"hooks,omitempty"`

	// OpenAPI configures OpenAPI spec generation for API.
	OpenAPI OpenAPI `yaml:"openapi,omitempty"`
}

Client configures code generation for clients.

type Composables

type Composables struct {
	// Path configures out location for generated vue-query hooks.
	Path string `yaml:"path"`
}

Composables configures code generation for vue-query hooks.

type Config

type Config struct {
	Validation Validation      `yaml:"validation,omitempty"`
	Version    version.Version `yaml:"version"`
	Build      Build           `yaml:"build,omitempty"`
	Accounts   []Account       `yaml:"accounts"`
	Faucet     Faucet          `yaml:"faucet,omitempty"`
	Client     Client          `yaml:"client,omitempty"`
	Genesis    xyaml.Map       `yaml:"genesis,omitempty"`
	Minimal    bool            `yaml:"minimal,omitempty"`
}

Config defines a struct with the fields that are common to all config versions.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns a base config with default values.

func (Config) GetVersion

func (c Config) GetVersion() version.Version

GetVersion returns the config version.

func (Config) IsChainMinimal added in v28.2.0

func (c Config) IsChainMinimal() bool

IsChainMinimal returns true if the chain is minimally scaffolded.

func (Config) IsConsumerChain added in v28.3.0

func (c Config) IsConsumerChain() bool

func (Config) IsSovereignChain added in v28.3.0

func (c Config) IsSovereignChain() bool

func (*Config) SetDefaults

func (c *Config) SetDefaults() error

SetDefaults assigns default values to empty config fields.

type Faucet

type Faucet struct {
	// Name is faucet account's name.
	Name *string `yaml:"name"`

	// Coins holds type of coin denoms and amounts to distribute.
	Coins []string `yaml:"coins"`

	// CoinsMax holds of chain denoms and their max amounts that can be transferred to single user.
	CoinsMax []string `yaml:"coins_max,omitempty"`

	// LimitRefreshTime sets the timeframe at the end of which the limit will be refreshed
	RateLimitWindow string `yaml:"rate_limit_window,omitempty"`

	// Host is the host of the faucet server
	Host string `yaml:"host,omitempty"`

	// Port number for faucet server to listen at.
	Port uint `yaml:"port,omitempty"`
}

Faucet configuration.

type Hooks

type Hooks struct {
	// Path configures out location for generated vue-query hooks.
	Path string `yaml:"path"`
}

Hooks configures code generation for react-query hooks.

type Host

type Host struct {
	RPC     string `yaml:"rpc"`
	P2P     string `yaml:"p2p"`
	Prof    string `yaml:"prof"`
	GRPC    string `yaml:"grpc"`
	GRPCWeb string `yaml:"grpc-web"`
	API     string `yaml:"api"`
}

Host keeps configuration related to started servers.

type Init

type Init struct {
	// App overwrites appd's config/app.toml configs.
	App xyaml.Map `yaml:"app"`

	// Client overwrites appd's config/client.toml configs.
	Client xyaml.Map `yaml:"client"`

	// Config overwrites appd's config/config.toml configs.
	Config xyaml.Map `yaml:"config"`

	// Home overwrites default home directory used for the app
	Home string `yaml:"home"`
}

Init overwrites sdk configurations with given values.

type OpenAPI

type OpenAPI struct {
	Path string `yaml:"path"`
}

OpenAPI configures OpenAPI spec generation for API.

type Proto

type Proto struct {
	// Path is the relative path of where app's proto files are located at.
	Path string `yaml:"path"`

	// ThirdPartyPath is the relative path of where the third party proto files are
	// located that used by the app.
	ThirdPartyPaths []string `yaml:"third_party_paths"`
}

Proto holds proto build configs.

type Typescript

type Typescript struct {
	// Path configures out location for generated Typescript Client code.
	Path string `yaml:"path"`
}

TSClient configures code generation for Typescript Client.

type Validation added in v28.3.0

type Validation string

Validation describes the kind of validation the chain has.

type Vuex deprecated

type Vuex struct {
	// Path configures out location for generated Vuex stores code.
	Path string `yaml:"path"`
}

Vuex configures code generation for Vuex stores.

Deprecated: Will be removed eventually.

Jump to

Keyboard shortcuts

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