cmd

package
v0.0.0-...-c57a2f4 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: AGPL-3.0 Imports: 93 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PasswordConfirmationError = "Provided passwords is not equal"
	DirectoryError            = "The provided directory does not exists"
	InvalidPhraseError        = "The provided seed phrase is not valid"
)
View Source
const (
	AskEnterName = "Enter the name of your wallet : "

	AskEnterPhrase = "Enter the private phrase of your wallet : "

	AskEnterPassword = "Please enter you password : "

	AskEnterPasswordConfirmation = "Please confirm you password : "

	AskEnterCoinType = "Please enter type of coin : "

	AskEnterWalletDataDirectory = "Please data directory [%v][Press ENTER to set default value] :  "
)
View Source
const (
	AccountFoundResult = "Name  [%v] :  ID  [%v]"
)
View Source
const IpnsValidatorTag = "ipns"
View Source
const (
	MessageAccountCreated = "Created account with name [%v] : ID [%v]"
)

Variables

View Source
var DHTOption ipfscore.RoutingOption = constructDHTRouting
View Source
var (
	ErrNoGateways = errors.New("No gateway addresses configured")
)

Functions

func InitializeRepo

func InitializeRepo(dataDir, password, mnemonic string, testnet bool, creationDate time.Time, coinType wi.CoinType) (*db.SQLiteDatastore, error)

func PrintError

func PrintError(e string)

func RestoreDirectory

func RestoreDirectory(repoPath, directory string, nd *ipfscore.IpfsNode, id *cid.Cid, wg *sync.WaitGroup)

func RestoreFile

func RestoreFile(repoPath, peerID, filename string, n *core.IpfsNode, wg *sync.WaitGroup)

Types

type Convert

type Convert struct {
	Password string `short:"p" long:"password" description:"the encryption password if the database is encrypted"`
	DataDir  string `short:"d" long:"datadir" description:"specify the data directory to be used"`
	Testnet  bool   `short:"t" long:"testnet" description:"use the test network"`
}

func (*Convert) Execute

func (x *Convert) Execute(args []string) error

type CreateAccount

type CreateAccount struct {
	hdwallet.AccountManager
}

func (*CreateAccount) Execute

func (account *CreateAccount) Execute(args []string) error

Creating a new account in specified wallet

type CreateWallet

type CreateWallet struct {
	evenWallet.HDWallet
}

func (CreateWallet) Execute

func (wallet CreateWallet) Execute(args []string) (err error)

type DecryptDatabase

type DecryptDatabase struct {
	DataDir string `short:"d" long:"datadir" description:"specify the data directory to be used"`
}

func (*DecryptDatabase) Execute

func (x *DecryptDatabase) Execute(args []string) error

type DummyListener

type DummyListener struct {
	// contains filtered or unexported fields
}

func (*DummyListener) Accept

func (d *DummyListener) Accept() (net.Conn, error)

func (*DummyListener) Addr

func (d *DummyListener) Addr() net.Addr

func (*DummyListener) Close

func (d *DummyListener) Close() error

type DummyWriter

type DummyWriter struct{}

func (*DummyWriter) Write

func (d *DummyWriter) Write(p []byte) (n int, err error)

type EncryptDatabase

type EncryptDatabase struct {
	DataDir string `short:"d" long:"datadir" description:"specify the data directory to be used"`
}

func (*EncryptDatabase) Execute

func (x *EncryptDatabase) Execute(args []string) error

type GenerateCertificates

type GenerateCertificates struct {
	DataDir  string        `short:"d" long:"datadir" description:"specify the data directory to be used"`
	Testnet  bool          `short:"t" long:"testnet" description:"config file is for testnet node"`
	Host     string        `short:"h" long:"host" description:"comma-separated hostnames and IPs to generate a certificate for"`
	ValidFor time.Duration `long:"duration" description:"duration that certificate is valid for"`
}

func (*GenerateCertificates) Execute

func (x *GenerateCertificates) Execute(args []string) error

type Init

type Init struct {
	Password           string `short:"p" long:"password" description:"the encryption password if the database is to be encrypted"`
	DataDir            string `short:"d" long:"datadir" description:"specify the data directory to be used"`
	Mnemonic           string `short:"m" long:"mnemonic" description:"specify a mnemonic seed to use to derive the keychain"`
	Testnet            bool   `short:"t" long:"testnet" description:"use the test network"`
	Force              bool   `short:"f" long:"force" description:"force overwrite existing repo (dangerous!)"`
	WalletCreationDate string `` /* 148-byte string literal not displayed */
}

func (*Init) Execute

func (x *Init) Execute(args []string) error

type ListAccounts

type ListAccounts struct {
	hdwallet.WalletAuth
}

func (*ListAccounts) Execute

func (la *ListAccounts) Execute(args []string) error

Getting all accounts of wallet

type NewAddress

type NewAddress struct {
	hdwallet.AddressManager
}

func (*NewAddress) Execute

func (generator *NewAddress) Execute(args []string) error

Generating a new address in specified account

type Restore

type Restore struct {
	Password           string `short:"p" long:"password" description:"the encryption password if the database is encrypted"`
	DataDir            string `short:"d" long:"datadir" description:"specify the data directory to be used"`
	Testnet            bool   `short:"t" long:"testnet" description:"use the test network"`
	TorPassword        string `long:"torpassword" description:"Set the tor control password. This will override the tor password in the config."`
	Tor                bool   `` /* 143-byte string literal not displayed */
	Mnemonic           string `short:"m" long:"mnemonic" description:"specify a mnemonic seed to use to derive the keychain"`
	WalletCreationDate string `` /* 148-byte string literal not displayed */
}

func (*Restore) Execute

func (x *Restore) Execute(args []string) error

type SetAPICreds

type SetAPICreds struct {
	DataDir string `short:"d" long:"datadir" description:"specify the data directory to be used"`
	Testnet bool   `short:"t" long:"testnet" description:"config file is for testnet node"`
}

func (*SetAPICreds) Execute

func (x *SetAPICreds) Execute(args []string) error

type Start

type Start struct {
	Password             string   `short:"p" long:"password" description:"the encryption password if the database is encrypted"`
	Testnet              bool     `short:"t" long:"testnet" description:"use the test network"`
	Regtest              bool     `short:"r" long:"regtest" description:"run in regression test mode"`
	LogLevel             string   `short:"l" long:"loglevel" description:"set the logging level [debug, info, notice, warning, error, critical]" default:"debug"`
	NoLogFiles           bool     `short:"f" long:"nologfiles" description:"save logs on disk"`
	AllowIP              []string `short:"a" long:"allowip" description:"only allow API connections from these IPs"`
	STUN                 bool     `short:"s" long:"stun" description:"use stun on µTP IPv4"`
	DataDir              string   `short:"d" long:"datadir" description:"specify the data directory to be used"`
	AuthCookie           string   `short:"c" long:"authcookie" description:"turn on API authentication and use this specific cookie"`
	UserAgent            string   `short:"u" long:"useragent" description:"add a custom user-agent field"`
	Verbose              bool     `short:"v" long:"verbose" description:"print openbazaar logs to stdout"`
	TorPassword          string   `long:"torpassword" description:"Set the tor control password. This will override the tor password in the config."`
	Tor                  bool     `` /* 143-byte string literal not displayed */
	DualStack            bool     `` /* 199-byte string literal not displayed */
	DisableWallet        bool     `long:"disablewallet" description:"disable the wallet functionality of the node"`
	DisableExchangeRates bool     `long:"disableexchangerates" description:"disable the exchange rate service to prevent api queries"`
	Storage              string   `long:"storage" description:"set the outgoing message storage option [self-hosted, dropbox] default=self-hosted"`
	BitcoinCash          bool     `long:"bitcoincash" description:"use a Bitcoin Cash wallet in a dedicated data directory"`
	ZCash                string   `` /* 140-byte string literal not displayed */
	ListenRpc            bool     `long:"listenrpc" description:"Listening for  RPC server "`
	ListenHTTP           bool     `long:"listenhttp" description:"Listening for  HTTP server "`
	RpcPort              string   `long:"rpcport" description:"Listening for  RPC <port> "`
	HttpPort             string   `long:"httpport" description:"Listening for  HTTP <port> "`
}

func (*Start) Execute

func (x *Start) Execute(args []string) error

type Status

type Status struct {
	DataDir string `short:"d" long:"datadir" description:"specify the data directory to be used"`
	Testnet bool   `short:"t" long:"testnet" description:"use the test network"`
}

func (*Status) Execute

func (x *Status) Execute(args []string) error

Jump to

Keyboard shortcuts

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