config

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(path string) error

Initialize creates a config with default settings if one does not exist.

Types

type Accounts

type Accounts struct {
	// Pinned is a list of all accounts.
	Pinned []common.Address `json:"pinned,omitempty"`
	// Default is the default account.
	Default common.Address `json:"default,omitempty"`
}

type Config

type Config struct {
	Accounts Accounts `json:"accounts"`
	Ethereum Ethereum `json:"ethereum"`
	HTTP     HTTP     `json:"http"`
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(path string) *Config

NewConfig returns a config with default settings.

func (*Config) DatabasePath

func (c *Config) DatabasePath() string

DatabasePath returns the database directory path.

func (*Config) InstallPath

func (c *Config) InstallPath() string

InstallPath returns the path to install binaries.

func (*Config) KeyStorePath

func (c *Config) KeyStorePath() string

KeyStorePath returns the keystore directory path.

func (*Config) Load

func (c *Config) Load() error

Load loads the config from the root path.

func (*Config) Save

func (c *Config) Save() error

Save writes the config to the root path.

func (*Config) StoragePath

func (c *Config) StoragePath() string

type Ethereum

type Ethereum struct {
	// BiconomyApiKey is the mexa public api key.
	BiconomyApiKey string `json:"biconomy_api_key"`
	// Contracts is a mapping of contract addresses.
	Contracts map[string]common.Address `json:"contracts"`
	// MetaTx enables meta transactions.
	MetaTx bool `json:"meta_tx"`
	// RPC is the ethereum rpc address.
	RPC string `json:"rpc"`
}

type HTTP

type HTTP struct {
	// ApiAddr is the api server address to use
	ApiAddr string `json:"api_address"`
	// WebAddr is the static web server address to use
	WebAddr string `json:"web_address"`
}

Jump to

Keyboard shortcuts

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