Documentation ¶
Index ¶
- Constants
- Variables
- func EncryptKey(key *Key, auth string, scryptN, scryptP int) ([]byte, error)
- func KeyFileName(keyAddr common.Address) string
- func StoreKey(dir, auth string, scryptN, scryptP int) (common.Address, error)
- func WriteKeyStore(filepath string, keyjson []byte) error
- type AmbiguousAddrError
- type Key
- type 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) 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) NewAccount(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) SignTxWithAddress(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
Constants ¶
View Source
const ( StandardScryptN = 1 << 18 StandardScryptP = 1 LightScryptN = 1 << 12 LightScryptP = 6 )
Variables ¶
View Source
var ( ErrLocked = accounts.NewAuthNeededError("password or unlock") ErrNoMatch = errors.New("no key for given address or file") ErrDecrypt = errors.New("could not decrypt key with given passphrase") )
View Source
var KeyStoreScheme = "keystore"
View Source
var KeyStoreType = reflect.TypeOf(&KeyStore{})
Functions ¶
func KeyFileName ¶
func WriteKeyStore ¶
Types ¶
type AmbiguousAddrError ¶
func (*AmbiguousAddrError) Error ¶
func (err *AmbiguousAddrError) Error() string
type KeyStore ¶
type KeyStore struct {
// contains filtered or unexported fields
}
func NewKeyStore ¶
func NewPlaintextKeyStore ¶
func (*KeyStore) ImportECDSA ¶
func (*KeyStore) ImportPreSaleKey ¶
func (*KeyStore) NewAccount ¶
func (*KeyStore) SignHashWithPassphrase ¶
func (*KeyStore) SignTx ¶
func (ks *KeyStore) SignTx(a accounts.Account, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error)
func (*KeyStore) SignTxWithAddress ¶
func (ks *KeyStore) SignTxWithAddress(a accounts.Account, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error)
func (*KeyStore) SignTxWithPassphrase ¶
func (*KeyStore) Subscribe ¶
func (ks *KeyStore) Subscribe(sink chan<- accounts.WalletEvent) event.Subscription
func (*KeyStore) TimedUnlock ¶
Click to show internal directories.
Click to hide internal directories.