Documentation ¶
Overview ¶
Package def defines all default values used in Mute.
Index ¶
Constants ¶
const ( // MainnetDefaultDomain defines the default domain for Mute (mainnet). MainnetDefaultDomain = "mute.one" // MainnetPubkeyStr is the hex-encoded public key of the configuration server // (mainnet). MainnetPubkeyStr = "13cff7a4f0f2ec57097bb3b99bddf458cc33458e7937787444820e72a62aee1f" // MainnetConfigURL defines the URL of the of the configuration server // (mainnet). MainnetConfigURL = "cfg.mute.one" // TestnetDefaultDomain defines the default domain for Mute (testnet). TestnetDefaultDomain = "mute.berlin" // TestnetPubkeyStr is the hex-encoded public key of the configuration server // (testnet). TestnetPubkeyStr = "f6b5289bbe4bfc678b1f670b3b2a4bc837f052108092ca926d09f7afca9f485f" // TestnetConfigURL defines the URL of the of the configuration server // (testnet). TestnetConfigURL = "127.0.0.1:3080" // KDFIterationsDB defines the default number of KDF iterations for the // message and key database. KDFIterationsDB = 64000 // MinDelay defines the default minimum delay setting for messages to mix. MinDelay = int32(120) // MaxDelay defines the default maximum delay setting for messages to mix. MaxDelay = int32(300) // MinMinDelay defines the minimum minimum delay setting for messages to // mix. MinMinDelay = 60 // MinMaxDelay defines the minimum maximum delay setting for messages to // mix. MinMaxDelay = 61 // FetchconfMinDuration defines the minimum duration between automatic // configuration fetches. FetchconfMinDuration = 24 * time.Hour // 24h // FetchconfMaxDuration defines the maximum duration between automatic // configuration fetches. FetchconfMaxDuration = 7 * 24 * time.Hour // 7d // UpdateDuration defines the maximum duration before an enforced update. UpdateDuration = 14 * 24 * time.Hour // 14d // WalletGetTokenMaxDuration defines the maximum duration before the // acquisition of a token from the wallet is aborted. WalletGetTokenMaxDuration = 5 * time.Minute // 5m )
Variables ¶
var AccdOwner *[ed25519.PublicKeySize]byte
AccdOwner is the wallet owner public key of the Mute account daemon.
var AccdUsage string
AccdUsage is the wallet usage for the Mute account daemon.
var CACert []byte
CACert is the default certificate authority used for Mute.
var ConfigMap map[string]string
ConfigMap is the configuration map.
Functions ¶
func ConfigParams ¶
func ConfigParams() (netDomain, pubkeyStr, configURL string)
ConfigParams returns the configuration parameters netDomain, pubkeyStr, and configURL depending on the environment variable MUTETESTNET. If MUTETESTNET is set to "1" or "true", the configuration parameters for the testnet are returned. Otherwise the parameters for the main net are returned.
TODO: The testnet is currently is unused. Keep this in anyway for later use.
func InitMute ¶
func InitMute(config *configclient.Config) error
InitMute initializes Mute with the configuration from config.
func InitMuteFromFile ¶
InitMuteFromFile initializes Mute with the config file from homedir/config/.
Types ¶
This section is empty.