SecretWallet class
Represents a wallet file. Wallets are used to securely store credentials like a private key belonging to an Ethereum address. The private key in a wallet is encrypted with a secret password that needs to be known in order to obtain the private key.
Constructors
- SecretWallet.decode(String encoded, String password)
-
using a separate thread for encode or decode secret wallet.
factory
- SecretWallet.encode(String credentials, String password, {int scryptN = 8192, int p = 1})
-
Creates a new wallet wrapping the specified
credentials
by encrypting the private key with thepassword
You can configure the parameter N of the scrypt algorithm if you need to. The default value forscryptN
is 8192. Be aware that this N must be a power of two.factory
Properties
- credentials → String
-
The credentials stored in this wallet file
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uuid → String
-
Gets the random uuid assigned to this wallet file
no setter
Methods
-
encrypt(
{SecretWalletEncoding encoding = SecretWalletEncoding.json}) → String - Encrypts the private key using the secret specified earlier and returns a json representation of its data as a v3-wallet file.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited