
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
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
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.
# Require nodejs +20
npm install hive-tx --save
import { Transaction, PrivateKey, callRPC } from 'hive-tx'
The library has two build outputs:
Your application will automatically pick the right build for your environment through package exports.
For browser usage, load the ESM build directly:
<script type="module">
import { Transaction, PrivateKey } from 'https://cdn.jsdelivr.net/npm/hive-tx@7/dist/index.mjs'
// use Transaction / PrivateKey here
</script>
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)
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)
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])
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')
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
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 errorsTransaction.broadcast(timeout?, retry?) => Transaction.broadcast(checkStatus?)new Transaction(transaction) => new Transaction({transaction, expiration})Transaction.signedTransaction removed - Use Transaction.transactionconfig.node (string) => config.nodes (array)config.healthcheckInterval removedMigration 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
callWithQuorum() - JSONRPC call that cross-checks the result with multiple nodescallREST() with full typing for new REST APIsdist: ESM (index.mjs) and CJS (index.cjs)MIT
FAQs
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
We found that hive-tx demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.