EthereumWallet
Simple Ethereum wallet based on ethers.js.
Hierarchy
- EthereumWallet
Index
Constructors
Methods
Constructors
constructor
+ new EthereumWallet(jsonRpcUrl
: string, key?
: SigningKey | HDNode | Arrayish): EthereumWallet
Defined in ethereum_wallet.ts:17
Parameters:
Name | Type |
---|---|
jsonRpcUrl | string |
key? | SigningKey | HDNode | Arrayish |
Returns: EthereumWallet
Methods
callContract
▸ callContract(data
: string, contractAddress
: string, gasLimit
: string): Promise‹string›
Defined in ethereum_wallet.ts:72
Parameters:
Name | Type |
---|---|
data | string |
contractAddress | string |
gasLimit | string |
Returns: Promise‹string›
deployContract
▸ deployContract(data
: string, amount
: BigNumber, gasLimit
: string): Promise‹string›
Defined in ethereum_wallet.ts:58
Parameters:
Name | Type |
---|---|
data | string |
amount | BigNumber |
gasLimit | string |
Returns: Promise‹string›
getAccount
▸ getAccount(): string
Defined in ethereum_wallet.ts:26
Returns: string
getBalance
▸ getBalance(): Promise‹BigNumberEthers›
Defined in ethereum_wallet.ts:30
Returns: Promise‹BigNumberEthers›
getErc20Balance
▸ getErc20Balance(contractAddress
: string, decimals?
: undefined | number): Promise‹BigNumber›
Defined in ethereum_wallet.ts:34
Parameters:
Name | Type |
---|---|
contractAddress | string |
decimals? | undefined | number |
Returns: Promise‹BigNumber›