11---
22title : Ecency SDK
3- description : Framework-agnostic data layer for Hive apps with first-class React Query support.
3+ description : Full-featured Hive blockchain SDK with built-in transaction signing, RPC failover, and React Query support.
44---
55
66# Ecency SDK
77
8- The Ecency SDK (` @ecency/sdk ` ) is a framework-agnostic data layer for Hive applications with
9- first-class ** React Query** support. It provides ** 165+ query option builders** , ** 76+ mutation
10- hooks** , and a shared configuration layer - all with ** zero runtime dependencies** .
8+ The Ecency SDK (` @ecency/sdk ` ) is a full-featured Hive blockchain SDK with ** built-in transaction
9+ signing** , ** multi-node RPC with health tracking** , and first-class ** React Query** support. It
10+ provides ** 165+ query option builders** , ** 76+ mutation hooks** , and a complete blockchain
11+ transaction engine — everything needed to build Hive applications in a single package.
1112
1213Published on [ npm] ( https://www.npmjs.com/package/@ecency/sdk ) under the MIT license.
1314
1415## At a glance
1516
1617| Feature | Details |
1718| ---| ---|
19+ | Transaction engine | Built-in signing, serialization, and broadcasting for all 50 Hive operation types |
20+ | RPC layer | Multi-node failover with per-node health tracking, rate-limit detection, and quorum calls |
21+ | Cryptography | ECDSA secp256k1 key management, memo encryption/decryption (AES-CBC) |
1822| Query builders | 165+ composable query option builders |
1923| Mutation hooks | 76+ hooks for all blockchain write operations |
2024| Cache keys | Centralized ` QueryKeys ` - single source of truth |
21- | Auth methods | Private key, Keychain, HiveSigner, HiveAuth |
25+ | Auth methods | Private key, Keychain, HiveSigner, HiveAuth, MetaMask Snap |
2226| Platform support | Web, React Native, Node.js (SSR) |
23- | Runtime deps | ** Zero** - only peer dependencies |
24- | Bundle size | ~ 182 KB |
27+ | Bundle size | ~ 228 KB (57 KB gzipped) |
2528| Build targets | Browser ESM + Node ESM/CJS (dual builds via tsup) |
2629
2730## What's inside
2831
32+ - ** Built-in transaction engine** — create, sign, and broadcast Hive transactions with full
33+ serialization support for all 50 operation types, multi-signature transactions, and memo
34+ encryption (built on an improved version of [ hive-tx] ( https://github.com/mahdiyari/hive-tx )
35+ by Mahdi Yari)
36+ - ** Multi-node RPC with health tracking** — automatic failover across Hive API nodes with
37+ per-node failure tracking, rate-limit detection (429/503), stale-head awareness, and
38+ quorum-based consensus calls for security-sensitive reads
2939- ** Query and mutation option builders** powered by [ @tanstack/react-query ] ( https://tanstack.com/query )
3040- ** 24 domain modules** : accounts, posts, communities, wallet, market, notifications, search,
3141 analytics, proposals, witnesses, operations, resource-credits, hive-engine, spk, points,
3242 promotions, games, ai, integrations, auth, bridge, core, private-api
3343- ** Central configuration** via ` ConfigManager ` (RPC nodes, QueryClient, DMCA filtering, image host)
3444- ** Platform adapter pattern** for cross-platform auth and broadcasting
3545- ** Smart auth fallback** - automatically tries alternative signing methods on failure
36- - ** RPC node failover** - multi-node configuration with automatic failover
3746- ** Blockchain error parsing** - user-friendly error messages with typed error categories
3847
3948## Why React Query?
@@ -254,10 +263,10 @@ yarn add @ecency/sdk
254263pnpm add @ecency/sdk
255264```
256265
257- ** Peer dependencies ** (required):
266+ ** Peer dependency ** (required):
258267
259268``` sh
260- npm install @hiveio/dhive hivesigner
269+ npm install hivesigner
261270```
262271
263272** Optional peer dependencies** (for React hooks):
@@ -266,8 +275,9 @@ npm install @hiveio/dhive hivesigner
266275npm install react @tanstack/react-query
267276```
268277
269- React and React Query are optional - the SDK's query option builders and utility functions
270- work without them in server-side or non-React contexts.
278+ React and React Query are optional — the SDK's query option builders, transaction engine,
279+ and utility functions work without them in server-side or non-React contexts. Transaction
280+ signing and RPC calls are built in with no additional dependencies.
271281
272282## Quick start
273283
@@ -511,6 +521,8 @@ try {
511521The SDK is organized into 24 domain modules:
512522
513523``` text
524+ src/hive-tx/ Built-in transaction engine (signing, serialization, RPC, cryptography)
525+
514526src/modules/
515527 accounts/ Account data, follow/mute, profile updates, bookmarks, favorites
516528 ai/ AI image generation pricing and mutations
0 commit comments