Comprehensive Comparison and ultimate stand off of the dhive vs hive-tx vs hive-js vs wax libraries/packages helps you interact with Hive blockchain. Our team find these type of comparisons and analysis valuable to see which library to use when building on Hive.

Overview
--------
| @hiveio/hive-js | @hiveio/dhive | hive-tx | @hiveio/wax |
|---|
Maintainer | @hiveio (community) | @hiveio (community) | @mahdiyari | @hiveio (core+community) |
Language | JavaScript (ES6+Babel) | TypeScript 3.8 | TypeScript 5.9 | TypeScript + C++/WASM |
Runtime deps | 27 | 11+ | 4 | 1 (events) |
Bundle size (gzip) | ~154 KB | ~210 KB | ~29 KB | ~3,341 KB |
Source lines | ~7,337 | ~5,956 | ~3,633 | ~8,796 + C++ |
Test lines | ~1,500+ | ~1,579 | ~870 | ~18,339 |
Node.js req | 4+ | 8+ | 20+ | 20.11+ |
Operations | 49 (+SMT) | 50 + 36 virtual | 50+ | 100+ |
Type definitions | None | Full TS | Full TS | Full TS + branded |
License | MIT | BSD-3-Clause-NML | — | — |
* * *
1\. Architecture Philosophy
---------------------------
**hive-js** — Fork of steem-js, the original Steem/Hive JS library. Callback-and-promise hybrid API using Bluebird's `promisifyAll`. Modular design with 7 top-level namespaces (`api`, `auth`, `broadcast`, `formatter`, `memo`, `config`, `utils`). Supports both HTTP and WebSocket transports (discontinued). The most "batteries-included" but also the heaviest and most legacy.
**dhive** — Clean rewrite of hive-js in TypeScript. OOP `Client` class with dedicated helper modules. Dropped WebSocket, callbacks, and Bluebird in favor of `async/await`. Leaner than hive-js but same conceptual model.
**hive-tx** — Minimalist, transaction-focused. No client class — configure globals and call standalone functions. Only 4 runtime deps. Modern ESM-first. Deliberately does less but does it with the smallest footprint.
**wax** — Three-layer: Protobuf → C++ WASM → TypeScript. The C++ core is the same code Hive nodes run. Heaviest bundle but strongest protocol guarantees. Pluggable signer architecture for wallet integrations.
* * *
2\. Dependencies & Supply Chain
-------------------------------
| hive-js | dhive | hive-tx | wax |
|---|
Crypto | ecurve, bigi, create-hash, browserify-aes, secure-random, ripemd160 | secp256k1 (native), ecurve, bigi, ripemd160 | @noble/curves, @noble/hashes, @noble/ciphers | C++ WASM (zero JS crypto) |
HTTP | cross-fetch, ws | cross-fetch, node-fetch | Native fetch | Native fetch |
Binary | bytebuffer | @ecency/bytebuffer | Custom ByteBuffer.ts | Protobuf + WASM |
Promises | bluebird | Native | Native | Native |
Utilities | lodash, debug, detect-node | verror, core-js, jsbi | None | events |
Base58 | bs58@4 | bs58@4 | bs58@6 | WASM built-in |
RPC auth | @steemit/rpc-auth | None | None | None |
Total deps | 27 | 11+ | 4 | 1 |
**Verdict:** `hive-js` has the largest attack surface — 27 deps including lodash, bluebird, and legacy Steem packages. `hive-tx` is the leanest (4 audited `@noble` libs). `wax` has zero JS crypto deps.
* * *
3\. Transport & Streaming
-------------------------
Feature | hive-js | dhive | hive-tx | wax |
|---|
HTTP/JSON-RPC | Yes | Yes | Yes | Yes |
WebSocket | Yes | No | No | No |
Block streaming | Yes (polling) | Yes (AsyncIterator) | No | No |
Op streaming | Yes (streamOperations) | Via block stream | No | No |
Tx streaming | Yes (streamTransactions) | Via block stream | No | No |
Stream modes | head / irreversible | head / irreversible | — | — |
Stream control | Release function | AsyncIterator break | — | — |
REST API | No | No | Yes (9 typed endpoints) | Yes (extensible) |
`hive-js` has the most granular streaming — you can stream block numbers, blocks, transactions, or individual operations separately. `dhive` provides a single `getBlockStream()` AsyncIterator that's more idiomatic modern JS. Neither `hive-tx` nor `wax` support streaming.
* * *
4\. Crypto Operations
---------------------
Capability | hive-js | dhive | hive-tx | wax |
|---|
Key from WIF | Yes | Yes | Yes | Via signers |
Key from seed | Yes | Yes | Yes | No |
Key from login | Yes | Yes (fromLogin) | Yes (fromLogin) | No |
Random key gen | Yes (secure-random) | No | Yes (randomKey) | No |
Brain key | Yes | No | No | No |
ECDSA signing | Yes | Yes | Yes | Yes (WASM) |
Signature recovery | Yes | Yes | Yes | Yes |
Memo encrypt/decrypt | Yes | Yes | Yes | Yes |
Password verification | Yes (isWif, wifIsValid) | No | No | No |
Key leak detection | No | No | No | Yes |
Multiple signer backends | No | No | No | Yes (5 packages) |
`hive-js` has the most key-related utilities (brain keys, password verification, role-based generation). `wax` is the most flexible for dApp integrations with pluggable signers.
* * *
5\. API Surface
---------------
API Surface | hive-js | dhive | hive-tx | wax |
|---|
Defined API methods | 95 | ~30 | Raw RPC | ~10 typed |
database_api
| Yes (many methods) | DatabaseAPI class
| Via callRPC | Typed defs |
condenser_api
| Yes (primary) | Partial | Via callRPC | No |
broadcast
| broadcast.* namespace
| BroadcastAPI class
| Transaction.broadcast()
| OnlineTransaction
|
Block streaming | streamBlock/Ops/Tx
| Blockchain helper
| No | No |
RC API | Yes | RCAPI class
| Via callRPC | Typed rc_api |
Hivemind | Yes | HivemindAPI class
| Via callRPC/REST | Via REST |
market_history_api
| Yes | No | Via callRPC | No |
Formatter utilities | Yes (reputation, vest→HIVE, account value) | No | No | Yes (WaxFormatter) |
Auth helpers | Yes (add/remove key/account auth) | No | No | Yes (AccountAuthorityUpdate) |
Complex op builders | No | No | No | Yes (BlogPost, Reply, etc.) |
Quorum verification | No | No | Yes | No |
Request interceptors | No | No | No | Yes |
`hive-js` has the broadest legacy API coverage (95 methods). `wax` has the richest operation builders. `hive-tx` is the only one with quorum verification.
* * *
6\. Serialization
-----------------
Feature | hive-js | dhive | hive-tx | wax |
|---|
Approach | Hand-written (3,200+ lines ops) | Hand-written (681 lines) | Hand-written (784 lines) | Protobuf + C++ WASM |
Buffer lib | bytebuffer (npm)
| @ecency/bytebuffer
| Custom (612 lines) | Protobuf |
Type system | Most verbose (1,187 lines) | Moderate | Moderate | Proto-generated |
HF26 support | No | No | No | Yes |
Legacy support | Yes (primary) | Yes (primary) | Yes (primary) | Yes (compat) |
Binary debugging | No | No | No | Yes (binaryViewMetadata) |
Protocol fidelity | Manual sync | Manual sync | Manual sync | Byte-for-byte match |
`wax` wins on serialization correctness — it's the same C++ code the chain runs. The other three all maintain hand-written serializers that could theoretically diverge from the protocol.
* * *
7\. Type Safety & Developer Experience
--------------------------------------
Feature | hive-js | dhive | hive-tx | wax |
|---|
Language | JavaScript | TypeScript 3.8 | TypeScript 5.9 | TypeScript 5.x |
Type definitions | None | Full | Full | Full + branded |
Strict mode | N/A | Partial | Full | Full |
ESM support | No (CJS only) | No (CJS only) | Yes (ESM+CJS+UMD) | Yes (ESM+CJS) |
Tree-shaking | No | No | Yes | Partial |
API style | Callbacks + Promises (Bluebird) | async/await
| async/await
| async/await
|
Operation typing | Runtime validation | Union types | Generic addOperation<O> | Protobuf-generated |
IDE autocomplete | Poor | Good | Excellent | Excellent |
`hive-js` is the weakest here — no TypeScript, no type definitions, callback-first API. `hive-tx` and `wax` offer the best modern DX.
* * *
8\. Build & Bundle Size
-----------------------
Feature | hive-js | dhive | hive-tx | wax |
|---|
Build tool | Babel + Webpack | Make + Browserify | TypeScript + Webpack | Make + Rollup + Emscripten |
Outputs | CJS lib/ + UMD dist/ | CJS lib/ + UMD dist/ | ESM + CJS + UMD | ESM + CJS + WASM |
Minified | 554 KB | ~925 KB | ~90 KB | ~3,341 KB |
Gzipped | 154 KB | 210 KB | ~29 KB | ~3,341 KB |
Source maps | Yes | Yes | Yes | Yes |
**Size ranking (smallest to largest gzipped):** `hive-tx` (29 KB) → `hive-js` (154 KB) → `dhive` (210 KB) → `wax` (3,341 KB)
* * *
9\. Error Handling
------------------
Feature | hive-js | dhive | hive-tx | wax |
|---|
Error class | RPCError
| VError (wrapped)
| RPCError
| Rich hierarchy (WaxError → subtypes) |
Error context | Code + message | Full chain (VError) | Code + message + data | Request/response + assertion hash |
Failover trigger | Error count threshold | Per-API health tracking | Retry + node rotation | Health checker module |
Broadcast safety | No special handling | Won't retry on timeout | Ignores duplicate tx | Authority verify pre-broadcast |
Key leak detection | No | No | No | Yes |
* * *
10\. Network Resilience
-----------------------
Feature | hive-js | dhive | hive-tx | wax |
|---|
Default timeout | Configurable | 60,000 ms | 10,000 ms | 2,000 ms |
Failover | Error-count threshold | Per-API health tracking | Round-robin retry | Health checker |
Retry library | retry (npm)
| Custom exponential backoff | Built-in | Built-in |
Quorum reads | No | No | Yes | No |
WebSocket fallback | Yes | No | No | No |
RPC auth signing | Yes (@steemit/rpc-auth) | No | No | No |
* * *
11\. Unique Features Per Library
--------------------------------
### hive-js only
* WebSocket transport
* 95 pre-defined API methods with docs
* `streamOperations()` / `streamTransactions()` granular streaming
* Brain key generation
* Password/WIF validation utilities
* Reputation formatter, vest-to-HIVE converter, account value estimator
* Multi-signature authority helpers (`addKeyAuth`, `removeAccountAuth`)
* RPC request signing (`@steemit/rpc-auth`)
* SMT operation support (Smart Media Tokens)
* Runs on Node.js 4+
### dhive only
* AsyncIterator block streaming (modern JS pattern)
* Per-API health tracking (bridge failures don't penalize `database_api`)
* VError context chains for debugging
* Testnet helper (`Client.testnet()`)
### hive-tx only
* `callWithQuorum()` — cross-check results across multiple nodes
* 9 typed REST APIs (hafah, reputation, NFT tracker, hafsql, etc.)
* Smallest bundle (29 KB gzip)
* Only 4 runtime dependencies
* ESM-first with tree-shaking
### wax only
* C++ WASM core (byte-for-byte protocol match)
* 5 pluggable signer packages (Beekeeper, MetaMask, Keychain, PeakVault, External)
* Complex operation builders (BlogPost, Reply, Community, RC delegation)
* Private key leak detection
* Pre-broadcast authority verification
* Binary view metadata for debugging
* HF26 protobuf serialization format
* Request/response interceptors
* 18K lines of tests + benchmarks
* * *
12\. When to Use Each
---------------------
### Use hive-js when:
* You need WebSocket transport or RPC request signing
* You want the broadest pre-defined API (95 methods, no manual RPC calls)
* You need fine-grained streaming (operations, transactions, blocks separately)
* You're maintaining a legacy codebase that already uses it
* You need formatter utilities (reputation, vesting, account value) without writing your own
* You need to support very old Node.js (4+)
* Don't use for new projects if you care about types, bundle size, or modern JS
### Use dhive when:
* You want a typed, async/await rewrite of hive-js concepts
* You need block streaming with AsyncIterator
* You need smart failover with per-API health tracking
* The project already depends on it (large existing ecosystem)
### Use hive-tx when:
* Bundle size is critical (29 KB — mobile, serverless, embedded)
* You want minimal supply chain risk (4 deps)
* You need quorum verification for security-critical reads
* You want modern JS (ESM, tree-shaking, TS 5.9)
* You need REST API support
* You're building a lightweight tool or script
### Use wax when:
* You need guaranteed protocol compatibility (same C++ as hive nodes)
* You're building a dApp with wallet integrations (MetaMask, Keychain, etc.)
* You need complex operation builders or authority verification
* Security is paramount (key leak detection, pre-broadcast verification)
* You want the most comprehensive test suite
* Bundle size doesn't matter
* * *
Summary Matrix
--------------
Dimension | Winner |
|---|
Smallest footprint | hive-tx (29 KB, 4 deps) |
Protocol fidelity | wax (C++ WASM) |
Block/op streaming | hive-js (most granular) |
Wallet integration | wax (5 signer packages) |
Modern JS/TS DX | hive-tx (ESM, TS 5.9) |
Broadest legacy API | hive-js (95 methods) |
Complex op builders | wax (BlogPost, Community, etc.) |
Test coverage | wax (18K lines) |
Security features | wax (key leak, authority verify) |
Network resilience | dhive (per-API health tracking) |
Quorum consensus | hive-tx (unique) |
Legacy compat | hive-js (Node 4+, callbacks) |
REST APIs | hive-tx (9 typed endpoints) |
Formatter utilities | hive-js (reputation, vesting, etc.) |
WebSocket support | hive-js (only one) |
Depending on what you are building, this comparison or overview gives you clear detailed differences. Keep on building!
Hive on!