Documentation ¶
Index ¶
- Constants
- Variables
- func GetFlagName(flag cli.Flag) string
- type Config
- type SPVWallet
- func (s *SPVWallet) Broadcast(tx *wire.MsgTx) error
- func (w *SPVWallet) ChainTip() (uint32, chainhash.Hash)
- func (w *SPVWallet) ChildKey(keyBytes []byte, chaincode []byte, isPrivateKey bool) (*hd.ExtendedKey, error)
- func (w *SPVWallet) Close()
- func (w *SPVWallet) CurrencyCode() string
- func (w *SPVWallet) IsDust(amount int64) bool
- func (w *SPVWallet) Params() *chaincfg.Params
- func (w *SPVWallet) ReSync()
- func (w *SPVWallet) ReSyncBlockchain(fromDate time.Time)
- func (w *SPVWallet) Start()
Constants ¶
View Source
const ( DEFAULT_LOG_LEVEL = 2 DEFAULT_MAXPROC_NUM = 4 )
View Source
const WALLET_VERSION = "0.1.0"
Variables ¶
View Source
var ( LogLevelFlag = cli.UintFlag{ Name: "loglevel", Usage: "Set the log level to `<level>` (0~6). 0:Trace 1:Debug 2:Info 3:Warn 4:Error 5:Fatal 6:MaxLevel", Value: DEFAULT_LOG_LEVEL, } ConfigFile = cli.StringFlag{ Name: "config", Usage: "the config file of alliance service.", Value: "./conf.json", } GoMaxProcs = cli.IntFlag{ Name: "gomaxprocs", Usage: "max number of cpu core that runtime can use.", Value: DEFAULT_MAXPROC_NUM, } )
Functions ¶
func GetFlagName ¶
GetFlagName deal with short flag, and return the flag name whether flag name have short name
Types ¶
type Config ¶
type Config struct { // Network parameters. Set mainnet, testnet, or regtest using this. Params *chaincfg.Params // The user-agent that shall be visible to peers UserAgent string // Location of the data directory RepoPath string // If you wish to connect to a single trusted peer set this. Otherwise leave nil. TrustedPeer net.Addr // A Tor proxy can be set here causing the wallet will use Tor Proxy proxy.Dialer IsVote bool }
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
type SPVWallet ¶
type SPVWallet struct { Blockchain *chain.Blockchain // contains filtered or unexported fields }
func NewSPVWallet ¶
func (*SPVWallet) CurrencyCode ¶
func (*SPVWallet) ReSyncBlockchain ¶
Click to show internal directories.
Click to hide internal directories.