Version: 0.14.1

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:

NameType
jsonRpcUrlstring
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:

NameType
datastring
contractAddressstring
gasLimitstring

Returns: Promise‹string›


deployContract

deployContract(data: string, amount: BigNumber, gasLimit: string): Promise‹string›

Defined in src/wallet/ethereum.ts:62

Parameters:

NameType
datastring
amountBigNumber
gasLimitstring

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:

NameType
contractAddressstring
decimals?undefined | number

Returns: Promise‹BigNumber›


getTransaction

getTransaction(transactionId: string): Promise‹TransactionResponse›

Defined in src/wallet/ethereum.ts:95

Parameters:

NameType
transactionIdstring

Returns: Promise‹TransactionResponse›


getTransactionReceipt

getTransactionReceipt(transactionId: string): Promise‹TransactionReceipt›

Defined in src/wallet/ethereum.ts:89

Parameters:

NameType
transactionIdstring

Returns: Promise‹TransactionReceipt›