stack

Home > @infiniteobjects/eth-service > EthereumService

EthereumService class

Ethereum Service Provider

Signature:

export declare class EthereumService 

Remarks

It requires the following environment variables: - INFURA_API_KEY It respects the following environment variables: - IO_USE_TESTNET=false

Constructors

Constructor Modifiers Description
(constructor)()   Constructs a new instance of the EthereumService class

Properties

Property Modifiers Type Description
etherScanProvider   EtherscanProvider  
network readonly Network  
networkName readonly (typeof EthereumNetworks)[keyof typeof EthereumNetworks]  
provider   InfuraProvider Infura Provider (this is what should be use on services that connect to ETH)

Methods

Method Modifiers Description
getENS(wallet)   Returns the ENS of the provided wallet
getEtherPrice()   Gets the current Ethereum price
getProfileFromWallet(wallet)   Creates a Profile from an address.
getTransactionStatus(txId)   Returns true if a transaction has settled
getWalletIcon(_wallet)   Returns an icon for the wallet address
normalizeWallet(wallet)   Asserts the input is a valid eth wallet and normalizes it.
weiToETh(wei)   Transforms Wei to Ethereum