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 src/wallet/ethereum.ts:21
Parameters:
Name | Type |
---|---|
jsonRpcUrl | string |
key? | SigningKey | HDNode | Arrayish |
Returns: EthereumWallet
Methods
callContract
▸ callContract(data
: string, contractAddress
: string, gasLimit
: string): Promise‹string›
Defined in src/wallet/ethereum.ts:76
Parameters:
Name | Type |
---|---|
data | string |
contractAddress | string |
gasLimit | string |
Returns: Promise‹string›
deployContract
▸ deployContract(data
: string, amount
: BigNumber, gasLimit
: string): Promise‹string›
Defined in src/wallet/ethereum.ts:62
Parameters:
Name | Type |
---|---|
data | string |
amount | BigNumber |
gasLimit | string |
Returns: Promise‹string›
getAccount
▸ getAccount(): string
Defined in src/wallet/ethereum.ts:30
Returns: string
getBalance
▸ getBalance(): Promise‹BigNumberEthers›
Defined in src/wallet/ethereum.ts:34
Returns: Promise‹BigNumberEthers›
getErc20Balance
▸ getErc20Balance(contractAddress
: string, decimals?
: undefined | number): Promise‹BigNumber›
Defined in src/wallet/ethereum.ts:38
Parameters:
Name | Type |
---|---|
contractAddress | string |
decimals? | undefined | number |
Returns: Promise‹BigNumber›
getTransaction
▸ getTransaction(transactionId
: string): Promise‹TransactionResponse›
Defined in src/wallet/ethereum.ts:95
Parameters:
Name | Type |
---|---|
transactionId | string |
Returns: Promise‹TransactionResponse›
getTransactionReceipt
▸ getTransactionReceipt(transactionId
: string): Promise‹TransactionReceipt›
Defined in src/wallet/ethereum.ts:89
Parameters:
Name | Type |
---|---|
transactionId | string |
Returns: Promise‹TransactionReceipt›