npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

hive-tx

v7.0.1

Published

Lightweight and complete TypeScript SDK for Hive blockchain operations. Create, sign, and broadcast transactions with full type safety, cryptographic utilities, and serialization support. Features multi-signature transactions, memo encryption, automatic r

Readme

hive-tx

npm version npm downloads License: MIT TypeScript Node.js

The most lightweight library for Hive blockchain while being a complete library. Regularly maintained to support the latest features of the blockchain. For Web and NodeJS.

Library size: ~29KB minified+gzipped (including all the dependencies)

Comprehensive Documentation

Installation

# Require nodejs +20
npm install hive-tx --save

Usage

import { Transaction, PrivateKey, callRPC } from 'hive-tx'

The library has two build outputs:

  • ES Module (esm)
  • CommonJS (cjs)

Your application will automatically pick the right build for your environment but you can also import either of them directly from hive-tx/esm and hive-tx/cjs.

There is also a browser build which you can use like this:

<script src="https://cdn.jsdelivr.net/npm/hive-tx@7/dist/browser/hive-tx.min.js"></script>
<!-- hiveTx will be available globally -->

Quick Usage Examples

New Transaction API (v7+)

import { Transaction, PrivateKey } from 'hive-tx'

// Create and broadcast a vote
const tx = new Transaction()
await tx.addOperation('vote', {
  voter: 'your-username',
  author: 'post-author',
  permlink: 'post-permlink',
  weight: 10000 // 100%
})

const key = PrivateKey.from('your-private-key')
tx.sign(key)
const result = await tx.broadcast()
console.log('Vote successful!', result.result.tx_id)

Transfer HIVE

import { Transaction, PrivateKey } from 'hive-tx'

const tx = new Transaction()
await tx.addOperation('transfer', {
  from: 'sender',
  to: 'receiver',
  amount: '1.000 HIVE',
  memo: 'Thanks for your help!'
})

const key = PrivateKey.from('your-active-key')
tx.sign(key)
const result = await tx.broadcast()
console.log('Transfer successful!', result.result.tx_id)

API Calls

import { callRPC, callREST, callWithQuorum } from 'hive-tx'

// Get account information
const accounts = await callRPC('condenser_api.get_accounts', [['username']])
console.log('Account:', result[0])

// Get blockchain properties
const props = await callRPC('condenser_api.get_dynamic_global_properties')
console.log('Head block:', props.head_block_number)

const balance = await callREST('balance', '/accounts/{account-name}/balances', {
  'account-name': 'alice'
})
console.log(balance)

// Cross-check the result of the call with 2 nodes
const accounts = await callWithQuorum('condenser_api.get_accounts', [['username']], 2)
console.log('Account:', result[0])

Key Management

import { PrivateKey } from 'hive-tx'

// Create keys in multiple ways
const key1 = PrivateKey.from('5JdeC9P7Pbd1uGdFVEsJ41EkEnADbbHGq6p1BwFxm6txNBsQnsw')
const key2 = PrivateKey.randomKey()
const key3 = PrivateKey.fromLogin('username', 'password', 'posting')
const key4 = PrivateKey.fromSeed('my-secret-seed')

Configuration

import { config } from 'hive-tx'

// Configure API nodes with failover
// Default nodes that are already set:
config.nodes = [
  'https://api.hive.blog',
  'https://api.deathwing.me',
  'https://api.openhive.network',
  'https://rpc.mahdiyari.info',
  'https://techcoderx.com',
  'https://hiveapi.actifit.io',
  'https://api.c0ff33a.uk'
]

// Custom timeout and retry settings
config.timeout = 10_000 // 10 seconds
config.retry = 8 // 8 retry attempts before throwing an error

Breaking Changes in v7

v7 is a complete TypeScript rewrite with significant API improvements. See CHANGELOG.md for full details.

Key Breaking Changes:

  • tx.create() => await tx.addOperation(opName, opBody)
  • call() => callRPC() - Returns result directly, throws RPCError on errors
  • Transaction.broadcast(timeout?, retry?) => Transaction.broadcast(checkStatus?)
  • All timeout/expiration values now in milliseconds (was seconds)
  • new Transaction(transaction) => new Transaction({transaction, expiration})
  • Transaction.signedTransaction removed - Use Transaction.transaction
  • config.node (string) => config.nodes (array)
  • config.healthcheckInterval removed

Migration Examples:

// v6: Creating transactions
const tx = new Transaction()
await tx.create([['vote', { voter: 'alice', author: 'bob', permlink: 'post', weight: 10000 }]])

// v7: Creating transactions
const tx = new Transaction()
await tx.addOperation('vote', { voter: 'alice', author: 'bob', permlink: 'post', weight: 10000 })
// v6: API calls
const result = await call('condenser_api.get_accounts', [['alice']])
const accounts = result.result

// v7: API calls
const accounts = await callRPC('condenser_api.get_accounts', [['alice']])
// v6: Configuration
config.node = 'https://api.hive.blog'
config.timeout = 10 // seconds

// v7: Configuration
config.nodes = ['https://api.hive.blog', 'https://api.deathwing.me']
config.timeout = 10_000 // milliseconds

What's new in v7

  • Codebase reworked in TypeScript
  • All methods now have good JSDoc documentation
  • Added types for all operations
  • Added callWithQuorum() - JSONRPC call that cross-checks the result with multiple nodes
  • Added callREST() with full typing for new REST APIs
  • Added tests including operation tests to keep them up to date with hived
  • Added docs/EXAMPLES.md and docs/QUICKSTART.md
  • Output 3 builds: ESM, CJS, UMD minified .js for browser

License

MIT

Support