Versions in this module Expand all Collapse all v0 v0.6.1 Jan 21, 2020 Changes in this version + const METHOD + const SCHEME + const VER + func CreateID(nonce []byte) (string, error) + func GenerateID() (string, error) + func VerifyID(id string) bool + type Account struct + Address common.Address + PrivateKey keypair.PrivateKey + PublicKey keypair.PublicKey + SigScheme s.SignatureScheme + func NewAccount(encrypt string) *Account + func (this *Account) PrivKey() keypair.PrivateKey + func (this *Account) PubKey() keypair.PublicKey + func (this *Account) Scheme() s.SignatureScheme + type AccountData struct + IsDefault bool + Label string + Lock bool + PubKey string + SigSch string + func (this *AccountData) GetKeyPair() *keypair.ProtectedKey + func (this *AccountData) SetKeyPair(keyinfo *keypair.ProtectedKey) + func (this *AccountData) SetLabel(label string) + type AccountMetadata struct + Address string + Curve string + EncAlg string + Hash string + IsDefault bool + Key []byte + KeyType string + Label string + PubKey string + Salt []byte + SigSch string + type Client interface + ChangePassword func(address string, oldPasswd, newPasswd []byte) error + ChangeSigScheme func(address string, sigScheme s.SignatureScheme) error + DeleteAccount func(address string, passwd []byte) (*Account, error) + GetAccountByAddress func(address string, passwd []byte) (*Account, error) + GetAccountByIndex func(index int, passwd []byte) (*Account, error) + GetAccountByLabel func(label string, passwd []byte) (*Account, error) + GetAccountMetadataByAddress func(address string) *AccountMetadata + GetAccountMetadataByIndex func(index int) *AccountMetadata + GetAccountMetadataByLabel func(label string) *AccountMetadata + GetAccountNum func() int + GetDefaultAccount func(passwd []byte) (*Account, error) + GetDefaultAccountMetadata func() *AccountMetadata + GetUnlockAccount func(address string) *Account + GetWalletData func() *WalletData + ImportAccount func(accMeta *AccountMetadata) error + LockAccount func(address string) + NewAccount func(label string, typeCode keypair.KeyType, curveCode byte, ...) (*Account, error) + SetDefaultAccount func(address string) error + SetLabel func(address, label string) error + UnLockAccount func(address string, expiredAt int, passwd []byte) error + func Open(path string) (Client, error) + type ClientImpl struct + func NewClientImpl(path string) (*ClientImpl, error) + func (this *ClientImpl) ChangePassword(address string, oldPasswd, newPasswd []byte) error + func (this *ClientImpl) ChangeSigScheme(address string, sigScheme s.SignatureScheme) error + func (this *ClientImpl) DeleteAccount(address string, passwd []byte) (*Account, error) + func (this *ClientImpl) GetAccountByAddress(address string, passwd []byte) (*Account, error) + func (this *ClientImpl) GetAccountByIndex(index int, passwd []byte) (*Account, error) + func (this *ClientImpl) GetAccountByLabel(label string, passwd []byte) (*Account, error) + func (this *ClientImpl) GetAccountMetadataByAddress(address string) *AccountMetadata + func (this *ClientImpl) GetAccountMetadataByIndex(index int) *AccountMetadata + func (this *ClientImpl) GetAccountMetadataByLabel(label string) *AccountMetadata + func (this *ClientImpl) GetAccountNum() int + func (this *ClientImpl) GetDefaultAccount(passwd []byte) (*Account, error) + func (this *ClientImpl) GetDefaultAccountMetadata() *AccountMetadata + func (this *ClientImpl) GetUnlockAccount(address string) *Account + func (this *ClientImpl) GetWalletData() *WalletData + func (this *ClientImpl) ImportAccount(accMeta *AccountMetadata) error + func (this *ClientImpl) LockAccount(address string) + func (this *ClientImpl) NewAccount(label string, typeCode keypair.KeyType, curveCode byte, ...) (*Account, error) + func (this *ClientImpl) SetDefaultAccount(address string) error + func (this *ClientImpl) SetLabel(address, label string) error + func (this *ClientImpl) UnLockAccount(address string, expiredAt int, passwd []byte) error + type ClientStore interface + BuildDatabase func(path string) + LoadAccount func() map[common.Address]*Account + LoadStoredData func(name string) []byte + SaveStoredData func(name string, value []byte) + type Controller struct + ID string + Public string + type Identity struct + Control []Controller + Extra interface{} + ID string + Label string + Lock bool + func NewIdentity(label string, keyType keypair.KeyType, param interface{}, password []byte) (*Identity, error) + type WalletData struct + Accounts []*AccountData + Extra string + Identities []Identity + Name string + Scrypt *keypair.ScryptParam + Version string + func NewWalletData() *WalletData + func (this *WalletData) AddAccount(acc *AccountData) + func (this *WalletData) AddIdentity(id *Identity) + func (this *WalletData) Clone() *WalletData + func (this *WalletData) DelAccount(address string) + func (this *WalletData) GetAccountByAddress(address string) (*AccountData, int) + func (this *WalletData) GetAccountByIndex(index int) *AccountData + func (this *WalletData) Load(path string) error + func (this *WalletData) Save(path string) error + func (this *WalletData) ToDefaultSecurity(passwords [][]byte) error + func (this *WalletData) ToLowSecurity(passwords [][]byte) error