Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "wallet", Short: "wallet with btc", Run: func(cmd *cobra.Command, args []string) { if err := Main(); err != nil { fmt.Println(err) os.Exit(1) } <-signal.InterruptHandlersDone }, }
View Source
var Options = &walletOptions{}
Functions ¶
func Wallet ¶
Wallet is a work-around main function that is required since deferred functions (such as log flushing) are not called with calls to os.Exit. Instead, main runs this function and checks for a non-nil error, at which point any defers have already run, and if the error is non-nil, the program can be exited with an error exit status.
Types ¶
type Config ¶
type Config struct { // General application behavior ConfigFile *cfgutil.ExplicitString `short:"C" long:"configfile" description:"Path to configuration file"` ShowVersion bool `short:"V" long:"version" description:"Display version information and exit"` Create bool `long:"create" description:"Create the wallet if it does not exist"` CreateTemp bool `` /* 142-byte string literal not displayed */ AppDataDir *cfgutil.ExplicitString `short:"A" long:"appdata" description:"Application data directory for wallet config, databases and logs"` TestNet3 bool `long:"testnet" description:"Use the test Bitcoin network (version 3) (default mainnet)"` SimNet bool `long:"simnet" description:"Use the simulation test network (default mainnet)"` SigNet bool `long:"signet" description:"Use the signet test network (default mainnet)"` SigNetChallenge string `` /* 188-byte string literal not displayed */ SigNetSeedNode []string `` /* 140-byte string literal not displayed */ NoInitialLoad bool `long:"noinitialload" description:"Defer wallet creation/opening on startup and enable loading wallets over RPC"` DebugLevel string `short:"d" long:"debuglevel" description:"Logging level {trace, debug, info, warn, error, critical}"` LogDir string `long:"logdir" description:"Directory to log output."` Profile string `long:"profile" description:"Enable HTTP profiling on given port -- NOTE port must be between 1024 and 65536"` DBTimeout time.Duration `long:"dbtimeout" description:"The timeout value to use when opening the wallet database."` // Wallet options WalletPass string `` /* 127-byte string literal not displayed */ // RPC client options RPCConnect string `` /* 171-byte string literal not displayed */ CAFile *cfgutil.ExplicitString `long:"cafile" description:"File containing root certificates to authenticate a TLS connections with btcd"` DisableClientTLS bool `` /* 138-byte string literal not displayed */ BtcdUsername string `long:"btcdusername" description:"Username for btcd authentication"` BtcdPassword string `long:"btcdpassword" default-mask:"-" description:"Password for btcd authentication"` Proxy string `long:"proxy" description:"Connect via SOCKS5 proxy (eg. 127.0.0.1:9050)"` ProxyUser string `long:"proxyuser" description:"Username for proxy server"` ProxyPass string `long:"proxypass" default-mask:"-" description:"Password for proxy server"` // SPV client options UseSPV bool `long:"usespv" description:"Enables the experimental use of SPV rather than RPC for chain synchronization"` AddPeers []string `short:"a" long:"addpeer" description:"Add a peer to connect with at startup"` ConnectPeers []string `long:"connect" description:"Connect only to the specified peers at startup"` MaxPeers int `long:"maxpeers" description:"Max number of inbound and outbound peers"` BanDuration time.Duration `long:"banduration" description:"How long to ban misbehaving peers. Valid time units are {s, m, h}. Minimum 1 second"` BanThreshold uint32 `long:"banthreshold" description:"Maximum allowed ban score before disconnecting and banning misbehaving peers."` // RPC server options // // The legacy server is still enabled by default (and eventually will be // replaced with the experimental server) so prepare for that change by // renaming the struct fields (but not the configuration options). // // Usernames can also be used for the consensus RPC client, so they // aren't considered legacy. RPCCert *cfgutil.ExplicitString `long:"rpccert" description:"File containing the certificate file"` RPCKey *cfgutil.ExplicitString `long:"rpckey" description:"File containing the certificate key"` OneTimeTLSKey bool `long:"onetimetlskey" description:"Generate a new TLS certpair at startup, but only write the certificate to disk"` DisableServerTLS bool `` /* 133-byte string literal not displayed */ LegacyRPCListeners []string `` /* 139-byte string literal not displayed */ LegacyRPCMaxClients int64 `long:"rpcmaxclients" description:"Max number of legacy RPC clients for standard connections"` LegacyRPCMaxWebsockets int64 `long:"rpcmaxwebsockets" description:"Max number of legacy RPC websocket connections"` Username string `short:"u" long:"username" description:"Username for legacy RPC and btcd authentication (if btcdusername is unset)"` Password string `` /* 131-byte string literal not displayed */ // EXPERIMENTAL RPC server options // // These options will change (and require changes to config files, etc.) // when the new gRPC server is enabled. ExperimentalRPCListeners []string `long:"experimentalrpclisten" description:"Listen for RPC connections on this interface/port"` // Deprecated options DataDir *cfgutil.ExplicitString `short:"b" long:"datadir" default-mask:"-" description:"DEPRECATED -- use appdata instead"` }
Click to show internal directories.
Click to hide internal directories.