HermezWallet class

@class Manage Babyjubjub keys Perform standard wallet actions

Constructors

HermezWallet(Uint8List privateKey, String hermezEthereumAddress)
Initialize Babyjubjub wallet from private key @param {Uint8List} privateKey - 32 bytes buffer @param {String} hermezEthereumAddress - Hexadecimal string containing the public Ethereum Address

Properties

hashCode int
The hash code for this object.
no setterinherited
hermezEthereumAddress ↔ dynamic
getter/setter pair
privateKey ↔ dynamic
getter/setter pair
publicKey ↔ dynamic
getter/setter pair
publicKeyBase64 String?
getter/setter pair
publicKeyCompressed String?
getter/setter pair
publicKeyCompressedHex String?
getter/setter pair
publicKeyHex ↔ dynamic
getter/setter pair
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
signCreateAccountAuthorization(String privateKey) Future<String>
Generates the signature necessary for /create-account-authorization endpoint @param {String} privateKey - private key used to create the wallet @returns {String} The generated signature
signTransaction(Map<String, dynamic> transaction, Map<String, dynamic> encodedTransaction) Map<String, dynamic>
To sign transaction with babyjubjub keys @param {object} transaction - Transaction object @param {Object} encodedTransaction - Transaction encoded object @returns {object} The signed transaction object
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

createWalletFromBjjPvtKey(Uint8List privateKey) → dynamic
Creates a HermezWallet from Babyjubjub private key This creates a wallet for an internal account An internal account has a Babyjubjub key and Ethereum account 0xFFFF...FFFF Random wallet is created if no private key is provided @param {Uint8List} privateKey - 32 bytes buffer @returns {Object} Contains the hermezWallet as a HermezWallet instance and the hermezEthereumAddress
createWalletFromPrivateKey(String privateKey) → dynamic
Creates a HermezWallet from one of the Ethereum wallets in the provider @param {String} privateKey - Signer data used to build a Signer to create the wallet @returns {Object} Contains the hermezWallet as a HermezWallet instance and the hermezEthereumAddress