EthereumApiAdmin class

This class implements the Ethereuum Admin API

Inheritance

Constructors

EthereumApiAdmin(Ethereum client)
Construction

Properties

hashCode int
The hash code for this object.
no setterinherited
id int
Message Id
no setterinherited
lastError EthereumError
Last error
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
personalEcRecover(EthereumData? message, EthereumData? signature) Future<EthereumAddress?>
Returns the address associated with the private key that was used to calculate the signature in personal_sign.
personalImportRawKey(String? keydata, String? passphrase) Future<EthereumData?>
Imports the given unencrypted private key (byte string) into the key store, encrypting it with the passphrase.
personalListAccounts() Future<List<EthereumAddress>?>
Returns all the Ethereum account addresses of all keys in the key store.
personalLockAccount(EthereumAddress? address) Future<bool>
Removes the private key with given address from memory. The account can no longer be used to send transactions.
personalNewAccount(String? passphrase) Future<EthereumData?>
Generates a new private key and stores it in the key store directory. The key file is encrypted with the given passphrase. Returns the address of the new account.
personalSendTransaction(EthereumAddress? address, String? passphrase, {EthereumAddress? to, EthereumAddress? data, int? gas, int? gasPrice, int? value, int? nonce, int? condition, bool conditionIsTimestamp = false}) Future<EthereumData?>
Validate the given passphrase and submit transaction. The transaction is the same argument as for eth.sendTransaction and contains the from address.
personalSign(EthereumData? message, EthereumAddress? address, [String password = '']) Future<EthereumData?>
The sign method calculates an Ethereum specific signature with: sign(keccack256('\x19Ethereum Signed Message:\n' + len(message) + message))). By adding a prefix to the message makes the calculated signature recognisable as an Ethereum specific signature. This prevents misuse where a malicious DApp can sign arbitrary data (e.g. transaction) and use the signature to impersonate the victim. See personalEcRecover to verify the signature.
personalUnlockAccount(EthereumAddress? address, String? passphrase, [int duration = 300]) Future<bool>
Decrypts the key with the given address from the key store. The unencrypted key will be held in memory until the unlock duration expires. The unlock duration defaults to 300 seconds. An explicit duration of zero seconds unlocks the key until geth exits. The account can be used with eth_sign and eth_sendTransaction while it is unlocked.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited