config

package
v0.0.0-...-3543da7 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptPassword

func DecryptPassword(encrypted string, password string) (string, error)

DecryptPassword decrypts the encrypted wallet password using AES-256 decryption

func EncryptPassword

func EncryptPassword(password string) (string, error)

EncryptPassword encrypts the wallet password using AES-256 encryption with a random salt

func SaveConfig

func SaveConfig(config Config) error

SaveConfig saves the configuration to the file

func SetConfigFilePath

func SetConfigFilePath(path string)

SetConfigFilePath sets the path to the config file

Types

type ChainConfig

type ChainConfig struct {
	Name           string `json:"name"`
	Executable     string `json:"executable"`
	WalletName     string `json:"wallet_name"`
	WalletPassword string `json:"wallet_password"`
	GasPrices      string `json:"gas_prices"`
	ChainID        string `json:"chain_id"`
	RPCNode        string `json:"rpc_node"`
}

type Config

type Config struct {
	PasswordSalt string        `json:"password_salt"`
	Chains       []ChainConfig `json:"chains"`
}

func LoadConfig

func LoadConfig() (Config, error)

LoadConfig loads the configuration from the file

Jump to

Keyboard shortcuts

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