Practical overview
When it fits
Use it when a JavaScript application needs an asynchronous interface to Ethereum RPC methods and you can configure access to an Ethereum node.
Who it is for
- JavaScript developers integrating Ethereum RPC calls into an application.
- Developers building features for balance lookup, transaction submission or other documented Ethereum RPC methods.
Documented uses
- Retrieve an Ethereum address balance from a node.
- Submit a transaction through a configured provider.
- Query Ethereum node data such as blocks, transactions, accounts and gas estimates.
Requirements & limits
The repository identifies the project as open source under the MIT license and documents installation through npm.
- The application must supply a provider connected to an Ethereum node; the library is not itself a node or hosted endpoint.
- Calls are asynchronous and require callbacks or promises.
- Numeric inputs accept BigNumber, BN, string, hexadecimal or JavaScript number forms; decimal and negative values cause errors, and returned numeric values are BN.js objects.
- The README documents support for Ethereum RPC methods and names geth, Parity and TestRPC as example node implementations.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Connect a JavaScript application and request an Ethereum balance
Install Ethjs Query, configure the documented HTTP provider, and make an asynchronous balance query.
Before you start
- A JavaScript project using npm
- An Ethereum node reachable through an HTTP provider URL
- The packages shown in the example: ethjs-query and ethjs-provider-http
Steps
Install ethjs-query with npm install --save ethjs-query.
Create an HTTP provider using the URL of the Ethereum node.
Pass the provider to a new Eth instance from ethjs-query.
Call getBalance with an Ethereum address and handle the result with a callback or promise.
Expected outcome
The application receives the requested balance as a BN.js object through the asynchronous call.
Guide limitations
- The guide covers a balance query only; the library requires a reachable Ethereum RPC node.
- All methods are asynchronous and require a callback or promise.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- ethjs/ethjs-query · Official homepage title · retained in its source language

