Versions in this module Expand all Collapse all v1 v1.0.1 Apr 8, 2019 Changes in this version + const LightScryptN + const LightScryptP + const StandardScryptN + const StandardScryptP + var B = "0x04e524ec8293017832c2d1e29de5d4b857d15087646b88846fb92f749551e19fa1da92bcb54407cf6aac98670dc2bbb4b4043641a421d74a2d7e5535cd6d539f75" + var ErrABaddressFieldNotExist = errors.New(...) + var ErrABaddressInvalid = errors.New("invalid ABaddress address") + var ErrDecrypt = errors.New("could not decrypt key with given passphrase") + var ErrLocked = accounts.NewAuthNeededError("password or unlock") + var ErrNoMatch = errors.New("no key for given address or file") + var KeyStoreScheme = "keystore" + var KeyStoreType = reflect.TypeOf(&KeyStore{}) + func ABaddrFromUncompressedRawBytes(raw []byte) (*common.ABaddress, error) + func ABkeyFileName(keyAddr common.ABaddress) string + func ComputeABKeys(AX, AY, BX, BY string, PrivateKey *ecdsa.PrivateKey, s *ecdsa.PrivateKey) ([]string, error) + func ECDSAPKCompression(p *ecdsa.PublicKey) []byte + func EncryptKey(key *Key, auth string, scryptN, scryptP int) ([]byte, error) + func GenerateABaddressFromPK(A *ecdsa.PublicKey, B *ecdsa.PublicKey) *common.ABaddress + func GenerateBaseABaddress(A *ecdsa.PublicKey) *common.ABaddress + func GeneratePKPairFromABaddress(w []byte) (*ecdsa.PublicKey, *ecdsa.PublicKey, error) + func StoreKey(dir, auth string, scryptN, scryptP int) (common.Address, error) + type AmbiguousAddrError struct + Addr common.Address + Matches []accounts.Account + func (err *AmbiguousAddrError) Error() string + type Key struct + ABaddress common.ABaddress + Address common.Address + Id uuid.UUID + PrivateKey *ecdsa.PrivateKey + PrivateKey2 *ecdsa.PrivateKey + func DecryptKey(keyjson []byte, auth string) (*Key, error) + func GenerateKeyWithWAddress(keyjson []byte) (*Key, error) + func NewKeyForDirectICAP(rand io.Reader) *Key + func (k *Key) MarshalJSON() (j []byte, err error) + func (k *Key) UnmarshalJSON(j []byte) (err error) + type KeyStore struct + func NewKeyStore(keydir string, scryptN, scryptP int) *KeyStore + func NewPlaintextKeyStore(keydir string) *KeyStore + func (ks *KeyStore) Accounts() []accounts.Account + func (ks *KeyStore) Delete(a accounts.Account, passphrase string) error + func (ks *KeyStore) Export(a accounts.Account, passphrase, newPassphrase string) (keyJSON []byte, err error) + func (ks *KeyStore) Find(a accounts.Account) (accounts.Account, error) + func (ks *KeyStore) GetABaddr(a accounts.Account) (string, error) + func (ks *KeyStore) GetAprivBaddress(a accounts.Account) (common.ABaddress, *ecdsa.PrivateKey, error) + func (ks *KeyStore) GetPrivateKey(a accounts.Account) (*ecdsa.PrivateKey, error) + func (ks *KeyStore) GetPublicKey(a accounts.Account) (string, error) + func (ks *KeyStore) HasAddress(addr common.Address) bool + func (ks *KeyStore) Import(keyJSON []byte, passphrase, newPassphrase string) (accounts.Account, error) + func (ks *KeyStore) ImportECDSA(priv *ecdsa.PrivateKey, passphrase string) (accounts.Account, error) + func (ks *KeyStore) ImportPreSaleKey(keyJSON []byte, passphrase string) (accounts.Account, error) + func (ks *KeyStore) Lock(addr common.Address) error + func (ks *KeyStore) NewABaccount(A accounts.Account, passphrase string) (accounts.Account, common.ABaddress, error) + func (ks *KeyStore) NewAccount(passphrase string) (accounts.Account, error) + func (ks *KeyStore) NewSubAccount(mainacc accounts.Account, passphrase string) (accounts.Account, error) + func (ks *KeyStore) SignHash(a accounts.Account, hash []byte) ([]byte, error) + func (ks *KeyStore) SignHashWithPassphrase(a accounts.Account, passphrase string, hash []byte) (signature []byte, err error) + func (ks *KeyStore) SignTx(a accounts.Account, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error) + func (ks *KeyStore) SignTxWithPassphrase(a accounts.Account, passphrase string, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error) + func (ks *KeyStore) Subscribe(sink chan<- accounts.WalletEvent) event.Subscription + func (ks *KeyStore) TimedUnlock(a accounts.Account, passphrase string, timeout time.Duration) error + func (ks *KeyStore) Unlock(a accounts.Account, passphrase string) error + func (ks *KeyStore) Update(a accounts.Account, passphrase, newPassphrase string) error + func (ks *KeyStore) Wallets() []accounts.Wallet