@xchainjs/xchain-ethereum
TypeScript icon, indicating that this package has built-in type declarations

0.32.0 • Public • Published

@xchainjs/xchain-ethereum

Modules

  • client - Custom client for communicating with Ethereum by using ethers

Installation

yarn add @xchainjs/xchain-ethereum

Following peer dependencies have to be installed into your project. These are not included in @xchainjs/xchain-ethereum.

yarn add @xchainjs/xchain-client @xchainjs/xchain-crypto @xchainjs/xchain-util axios ethers

Documentation

How xchain-ethereum works
How to use xchain-ethereum

Service Providers

This package uses the following service providers:

Function Service Notes
ETH balances Etherscan https://etherscan.io/apis#accounts (module=account, action=balance)
Token balances Etherscan https://etherscan.io/apis#tokens (module=account, action=tokenbalance)
ETH transaction history Etherscan https://etherscan.io/apis#accounts (module=account, action=txlistinternal)
Token transaction history Etherscan https://etherscan.io/apis#accounts (module=account, action=tokentx)
Transaction fees Etherscan https://etherscan.io/apis#gastracker (module=gastracker, action=gasoracle)
Transaction broadcast Etherscan https://sebs.github.io/etherscan-api/#eth_sendrawtransaction
Explorer Etherscan https://etherscan.io/

Etherscan API rate limits: https://info.etherscan.com/api-return-errors/

  • This package uses etherjs library, by default it uses several providers. (https://docs.ethers.io/v5/api-keys/)

Enviroment variables

ETHERSCAN_API_KEY={YOUR_ETHERSCAN_API_KEY}

Default config can access.

process.env.ETHERSCAN_API_KEY

Package Sidebar

Install

npm i @xchainjs/xchain-ethereum

Weekly Downloads

252

Version

0.32.0

License

MIT

Unpacked Size

13.3 MB

Total Files

11

Last publish

Collaborators

  • thorianite
  • polaris_9r
  • thorchain_org
  • _stu
  • veado
  • thatstrangeguy
  • junkai121
  • sarawut11
  • thorswap
  • hodrthemediocre