EthWallet class
eth 钱包:
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sdkWeb3 ↔ Web3Client
-
fuse wallet:
web3 dart:
getter/setter pair
Methods
-
ethCall(
{dynamic fromAddress, required String toAddress, required String data, BlockNum? atBlock}) → Future< String> - 调用合约:
-
genHDWallet(
) → Future< HDWallet> - 生成 HD 钱包:
-
genMnemonic(
) → String - 助记词:
-
genPublicAddress(
String privateKey) → Future< EthereumAddress> - 获取钱包地址:
-
getBalance(
{required String address, String? contractAddress, int? decimals = 18}) → Future< double> - 查询余额: 兼容 主链+token
-
getCredentials(
String privateKey) → Future< Credentials> - 签名身份:
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
privateKeyFromMnemonic(
String mnemonic) → String - 私钥:
-
swapToken(
{required String privateKey, required String fromAddress, required String toAddress, required String data, BigInt? value, int? maxGas}) → Future< String> - 此版本有效:
-
toEther(
{required BigInt fromWei, int decimals = 18}) → double - 单位转换: wei -> ether
-
toString(
) → String -
A string representation of this object.
inherited
-
toWei(
{required double fromEther, int decimals = 18}) → BigInt - 单位转换:
-
transfer(
{required String privateKey, required String toAddress, required num amount, String? contractAddress}) → Future< String> - 转账: 合并 ETH + ETH Tokens TODO: 本地存储+更新 nonce
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited