func newConfigParser(conf *ocxConfig, options flags.Options) *flags.Parser {
	parser := flags.NewParser(conf, options)
	return parser
}
newConfigParser returns a new command line flags parser.
package main
import (
	"crypto/rand"
	"fmt"
	"os"
	"path/filepath"
	"github.com/mit-dci/lit/btcutil/hdkeychain"
	"github.com/mit-dci/lit/coinparam"
	"golang.org/x/crypto/sha3"
	"github.com/mit-dci/lit/crypto/koblitz"
	"github.com/mit-dci/lit/portxo"
	"github.com/mit-dci/opencx/benchclient"
	"github.com/mit-dci/lit/lnutil"
	flags "github.com/jessevdk/go-flags"
	"github.com/mit-dci/opencx/logging"
)
type ocxClient struct {
	KeyPath     string
	KeyPassword string
	RPCClient   *benchclient.BenchClient
	unlocked    bool
}
type ocxConfig struct {
	ConfigFile string
	LogFilename string `long:"logFilename" short:"l" description:"Filename for output log file"`
	OcxHomeDir  string `long:"dir" short:"d" description:"Location of the root directory relative to home directory"`
	Rpchost string `long:"rpchost" short:"h" description:"Hostname of OpenCX Server you'd like to connect to"`
	Rpcport uint16 `long:"rpcport" short:"p" description:"Port of the OpenCX Server you'd like to connect to"`
	KeyFileName string `long:"keyfilename" short:"k" description:"Filename for private key within root opencx directory used to send transactions"`
	KeyPassword string `long:"keypass" description:"Password for encrypted private key file"`
	LogLevel []bool `short:"v" description:"Set verbosity level to verbose (-v), very verbose (-vv) or very very verbose (-vvv)"`
	AuthenticatedRPC bool `long:"authrpc" description:"Whether or not to use authenticated RPC"`
}
var (
	defaultConfigFilename   = "ocx.conf"
	defaultLogFilename      = "ocxlog.txt"
	defaultOcxHomeDirName   = os.Getenv("HOME") + "/.opencx/ocx/"
	defaultKeyFileName      = defaultOcxHomeDirName + "privkey.hex"
	defaultLogLevel         = 0
	defaultHomeDir          = os.Getenv("HOME")
	defaultRpcport          = uint16(12345)
	defaultRpchost          = "hubris.media.mit.edu"
	defaultAuthenticatedRPC = true
)