config

package
v0.0.0-...-15eb78e Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSQLiteWalletNotAbsolute = fmt.Errorf("sqlite wallets path must be absolute path")

ErrSQLiteWalletNotAbsolute is returned when the passed sqlite wallet directory is relative

Functions

This section is empty.

Types

type DriverConfig

type DriverConfig struct {
	SQLiteWalletDriverConfig SQLiteWalletDriverConfig `json:"sqlite"`
	LedgerWalletDriverConfig LedgerWalletDriverConfig `json:"ledger"`
}

DriverConfig contains config info specific to each wallet driver

type KMDConfig

type KMDConfig struct {
	DataDir             string       `json:"-"`
	DriverConfig        DriverConfig `json:"drivers"`
	SessionLifetimeSecs uint64       `json:"session_lifetime_secs"`
	Address             string       `json:"address"`
	AllowedOrigins      []string     `json:"allowed_origins"`
}

KMDConfig contains global configuration information for kmd

func LoadKMDConfig

func LoadKMDConfig(dataDir string) (cfg KMDConfig, err error)

LoadKMDConfig tries to read the the kmd configuration from disk, merging the default kmd configuration with what it finds

func (KMDConfig) Validate

func (k KMDConfig) Validate() error

Validate ensures that the current configuration is valid, returning an error if it's not

type LedgerWalletDriverConfig

type LedgerWalletDriverConfig struct {
	Disable bool `json:"disable"`
}

LedgerWalletDriverConfig is configuration specific to the LedgerWalletDriver

type SQLiteWalletDriverConfig

type SQLiteWalletDriverConfig struct {
	WalletsDir   string       `json:"wallets_dir"`
	UnsafeScrypt bool         `json:"allow_unsafe_scrypt"`
	ScryptParams ScryptParams `json:"scrypt"`
}

SQLiteWalletDriverConfig is configuration specific to the SQLiteWalletDriver

type ScryptParams

type ScryptParams struct {
	ScryptN int `json:"scrypt_n"`
	ScryptR int `json:"scrypt_r"`
	ScryptP int `json:"scrypt_p"`
}

ScryptParams stores the parameters used for key derivation. This allows upgrading security parameters over time

Jump to

Keyboard shortcuts

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