Versions in this module Expand all Collapse all v2 v2.0.4 Apr 20, 2020 Changes in this version + const CurveType + const MasterKey + const Symbol + var BitcoinAlphabet = NewAlphabet("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz") + var ErrorInvalidBase58String = errors.New("invalid base58 string") + var FlickrAlphabet = NewAlphabet("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ") + var IPFSAlphabet = NewAlphabet("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz") + var RippleAlphabet = NewAlphabet("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz") + var SaltLen = 8 + func Decode(input string, alphabet *Alphabet) ([]byte, error) + func Decrypt(password, encryptedKey string) (string, error) + func Encode(input []byte, alphabet *Alphabet) string + func Encrypt(password, key string) (string, error) + type Alphabet struct + func NewAlphabet(alphabet string) *Alphabet + func (alphabet Alphabet) String() string + type Client struct + BaseURL string + Client *req.Req + Debug bool + Header req.Header + func NewClient(url string, debug bool) *Client + func (c *Client) CallForgeOps(chain_id string, head_hash string, body interface{}) string + func (c *Client) CallGetCounter(pkh string) []byte + func (c *Client) CallGetHeader() []byte + func (c *Client) CallGetManagerKey(pkh string) []byte + func (c *Client) CallGetbalance(addr string) []byte + func (c *Client) CallInjectOps(body string) []byte + func (c *Client) CallPreapplyOps(body interface{}) []byte + type Key struct + Address string + PrivateKey []byte + PublicKey string + type WalletConfig struct + CurveType uint32 + CycleSeconds time.Duration + DefaultConfig string + GasLimit decimal.Decimal + IsTestNet bool + MasterKey string + MinFee decimal.Decimal + NodeInstallPath string + ServerAPI string + StorageLimit decimal.Decimal + SumAddress string + Symbol string + Threshold decimal.Decimal + WalletDataPath string + func NewConfig(symbol string, masterKey string) *WalletConfig + func (wc *WalletConfig) InitConfig() + func (wc *WalletConfig) PrintConfig() error + type WalletManager struct + Config *WalletConfig + Storage *hdkeystore.HDKeystore + WalletClient *Client + WalletsInSum map[string]*openwallet.Wallet + func NewWalletManager() *WalletManager + func (w *WalletManager) RestoreWalletFlow() error + func (wm *WalletManager) AddWalletInSummary(wid string, wallet *openwallet.Wallet) + func (wm *WalletManager) BackupWalletFlow() error + func (wm *WalletManager) CreateAddressFlow() error + func (wm *WalletManager) CreateBatchAddress(walletId, password string, count uint64) (string, []*openwallet.Address, error) + func (wm *WalletManager) CreateNewPrivateKey(key *hdkeystore.HDKey, start, index uint64) (*openwallet.Address, error) + func (wm *WalletManager) CreateNewWallet(name, password string) (*openwallet.Wallet, string, error) + func (wm *WalletManager) CreateWalletFlow() error + func (wm *WalletManager) GetWalletByID(walletID string) (*openwallet.Wallet, error) + func (wm *WalletManager) GetWalletList() error + func (wm *WalletManager) GetWallets() ([]*openwallet.Wallet, error) + func (wm *WalletManager) InitConfigFlow() error + func (wm *WalletManager) LoadConfig() error + func (wm *WalletManager) RestoreWallet(keyFile, dbFile, password string) error + func (wm *WalletManager) ShowConfig() error + func (wm *WalletManager) SummaryFollow() error + func (wm *WalletManager) SummaryWallets() + func (wm *WalletManager) Transfer(keys Key, dst string, fee, gas_limit, storage_limit, amount string) (string, string) + func (wm *WalletManager) TransferFlow() error