config

package
v0.0.0-...-171f271 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	PolicyID                  string  `json:"policy_id"`
	AssetID                   string  `json:"asset_id"`
	AssetName                 string  `json:"asset_name"`
	AssetUnit                 string  `json:"asset_unit"`
	PriceLovelace             uint64  `json:"lovelace_quantity"`
	AssetQuantity             float64 `json:"asset_quantity"`
	AssetQuantityWithDecimals uint64  `json:"-"`
	AssetDecimals             uint64  `json:"asset_decimals"`
	Fee                       uint64  `json:"fee"`
	Deposit                   uint64  `json:"deposit"`
	ProcessingFee             uint64  `json:"processing_fee"`

	Buffer        uint64 `json:"buffer"`
	RewardAddress string `json:"reward_address"`
}

type Config

type Config struct {
	ServerPort string `json:"server_port"`

	CardanoWalletURL string `json:"cardano_wallet_url"`

	TLS TLSConfig `json:"tls"`

	Wallets map[string]WalletConfig `json:"wallets"`
}

func LoadConfig

func LoadConfig() (loadedConfig *Config, err error)

type InternalConfig

type InternalConfig struct {
	Wallets map[string]InternalWalletConfig `json:"wallets"`
}

type InternalWalletConfig

type InternalWalletConfig struct {
	WalletID         string `json:"wallet_id"`
	WalletPassphrase string `json:"wallet_passphrase"`
}

type TLSConfig

type TLSConfig struct {
	CertPath string   `json:"cert_path"`
	IPs      []string `json:"ips"`
}

type WalletConfig

type WalletConfig struct {
	Mnemonic string  `json:"mnemonic_sentence"`
	Assets   []Asset `json:"assets"`

	ID         string `json:"-"`
	Passphrase string `json:"-"`
}

Jump to

Keyboard shortcuts

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