Documentation ¶
Index ¶
- Constants
- Variables
- type AddressFormat
- type Key
- type KeyStoreTest
- type Keystore
- type KeystoreEncrypted
- func (ks KeystoreEncrypted) DeleteKey(address common.Address, auth string) error
- func (ks KeystoreEncrypted) GetKey(address common.Address, auth string) (*Key, error)
- func (ks KeystoreEncrypted) ListKeyAddresses() ([]common.Address, error)
- func (ks KeystoreEncrypted) StoreKey(key *Key, auth string) error
- type KeystorePlain
Constants ¶
View Source
const ( // StandardScryptN is the N parameter of Scrypt encryption algorithm, using 256MB // memory and taking approximately 1s CPU time on a modern processor. StandardScryptN = 1 << 18 // StandardScryptP is the P parameter of Scrypt encryption algorithm, using 256MB // memory and taking approximately 1s CPU time on a modern processor. StandardScryptP = 1 // LightScryptN is the N parameter of Scrypt encryption algorithm, using 4MB // memory and taking approximately 100ms CPU time on a modern processor. LightScryptN = 1 << 12 // LightScryptP is the P parameter of Scrypt encryption algorithm, using 4MB // memory and taking approximately 100ms CPU time on a modern processor. LightScryptP = 6 )
Variables ¶
View Source
var (
ErrDecrypt = fmt.Errorf("could not decrypt key with given password")
)
Functions ¶
This section is empty.
Types ¶
type AddressFormat ¶
type AddressFormat int
type KeyStoreTest ¶
Test and utils for the key store tests in the Ethereum JSON tests; testdataKeyStoreTests/basic_tests.json
type Keystore ¶
type Keystore interface { // List the addresses of all the stored keys ListKeyAddresses() ([]common.Address, error) // Loads and decrypts the key from disk. GetKey(address common.Address, auth string) (*Key, error) // Writes and encrypts the key. StoreKey(k *Key, auth string) error // Deletes the key from the disk. DeleteKey(address common.Address, auth string) error }
type KeystoreEncrypted ¶
type KeystoreEncrypted struct {
// contains filtered or unexported fields
}
func NewKeystoreEncrypted ¶
func NewKeystoreEncrypted(keysDirRoot string, scryptN, scryptP int) (KeystoreEncrypted, error)
func (KeystoreEncrypted) DeleteKey ¶
func (ks KeystoreEncrypted) DeleteKey(address common.Address, auth string) error
func (KeystoreEncrypted) ListKeyAddresses ¶
func (ks KeystoreEncrypted) ListKeyAddresses() ([]common.Address, error)
type KeystorePlain ¶
type KeystorePlain struct {
// contains filtered or unexported fields
}
func NewKeystorePlain ¶
func NewKeystorePlain(keysDirRoot string) (KeystorePlain, error)
func (KeystorePlain) DeleteKey ¶
func (ks KeystorePlain) DeleteKey(address common.Address, auth string) error
func (KeystorePlain) ListKeyAddresses ¶
func (ks KeystorePlain) ListKeyAddresses() ([]common.Address, error)
Click to show internal directories.
Click to hide internal directories.