Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrivateAccountAPI ¶
type PrivateAccountAPI struct {
// contains filtered or unexported fields
}
PrivateAccountAPI is the personal_ prefixed set of APIs in the Web3 JSON-RPC spec.
func NewAPI ¶
func NewAPI(ethAPI *eth.PublicEthereumAPI, ks *keystore.KeyStore) *PrivateAccountAPI
NewAPI creates an instance of the public Personal Eth API.
func (*PrivateAccountAPI) ImportRawKey ¶
ImportRawKey armors and encrypts a given raw hex encoded ECDSA key and stores it into the key directory. The name of the key will have the format "personal_<length-keys>", where <length-keys> is the total number of keys stored on the keyring. NOTE: The key will be both armored and encrypted using the same passphrase.
func (*PrivateAccountAPI) LockAccount ¶
func (api *PrivateAccountAPI) LockAccount(address common.Address) bool
LockAccount will lock the account associated with the given address when it's unlocked. It removes the key corresponding to the given address from the API's local keys.
func (*PrivateAccountAPI) UnlockAccount ¶
func (api *PrivateAccountAPI) UnlockAccount(addr common.Address, password string, duration *uint64) (bool, error)
UnlockAccount will unlock the account associated with the given address with the given password for duration seconds. If duration is nil it will use a default of 300 seconds. It returns an indication if the account was unlocked. It exports the private key corresponding to the given address from the keyring and stores it in the API's local keys.