Skip to content

Repository files navigation

Eidoo ETH API lib

Eidoo ETH API service wrapper.

CircleCI

Eidoo ETH API is an Ethereum node gateway that can be used to read or submit changes of the Ethereum network state.

For release notes, please see the CHANGELOG.

Installation

If you want you can install it with npm:

npm install --save eidoo/ethapi-lib

or if you prefer using yarn:

yarn add eidoo/ethapi-lib

Then within your application, you can reference to the lib with the following:

const{ EidooEthApiLib }=require('@eidoo/ethapi-lib')constethApiConfig={host: 'eidoo-api-1.eidoo.io',port: 443,useTLS: true,}constethApiLibClient=newEidooEthApiLib(ethApiConfig)

Available APIs

Get nonce

const{ nonce }=awaitethApiLibClient.getAddressNonceAsync(EOA)

Get ethereum account transactions details

const{ transactions }=awaitethApiLibClient.getAccountTxsDetailsAsync(EOAorSCaddress)

Get gas estimation

const{ gas, gasPrices }=awaitethApiLibClient.getEstimateGasAsync(transactionObject)

Transaction call

consttransactionCall=awaitethApiLibClient.transactionCallAsync(transactionObject)

Send raw transaction

const{ hash }=awaitethApiLibClient.sendRawTransactionAsync(signedTransactionData)

Development

yarn install

Tests

Install the dependencies, then run yarn test:

yarn install
yarn test

You can run unit tests only using yarn test:unit.

About

A minimalistic wrapper for the ETH API service.

Resources

Stars

4 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages