# @aioha/tx-digest

> Hive transaction serializer and digest

Latest version **2.1.1** (published 2026-07-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @aioha/tx-digest
pnpm add @aioha/tx-digest
yarn add @aioha/tx-digest
bun add @aioha/tx-digest
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2026-07-28 |
| First published | 2025-03-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 90.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | techcoderx |
| Maintainers | techcoderx |

## Links

- npm: https://www.npmjs.com/package/@aioha/tx-digest
- Repository: https://github.com/aioha-hive/tx-digest
- Homepage: https://github.com/aioha-hive/tx-digest#readme
- Issues: https://github.com/aioha-hive/tx-digest/issues
- npm.io page: https://npm.io/package/@aioha/tx-digest

## Recent versions

- 2.1.1 (latest) — 2026-07-28
- 2.1.0 — 2026-07-28
- 2.0.2 — 2026-01-19
- 2.0.1 — 2025-11-22
- 2.0.0 — 2025-09-28
- 1.0.2 — 2025-04-18
- 1.0.1 — 2025-04-18
- 1.0.0 — 2025-03-04

## README

# @aioha/tx-digest

Hive transaction serializer and digest. Useful for generating ID for a transaction. Serializers extracted from hive-tx and adapted for HF26 serialization. Intended for browser use as it uses `window.crypto` for sha256.

## Usage

```js
import { transactionDigest } from '@aioha/tx-digest'

// https://hafscan.techcoderx.com/tx/543058b4465cd93132b2843b751d5dcdd8efd341
const recurrent_transfer = {
  ref_block_num: 23679,
  ref_block_prefix: 291568045,
  expiration: '2025-11-20T07:59:08',
  operations: [
    {
      type: 'recurrent_transfer_operation',
      value: {
        to: 'techcoderx.vsc',
        from: 'techcoderx',
        memo: '',
        amount: {
          nai: '@@000000021',
          amount: '2',
          precision: 3
        },
        executions: 5,
        extensions: [
          {
            type: 'recurrent_transfer_pair_id',
            value: {
              pair_id: 1
            }
          }
        ],
        recurrence: 48
      }
    }
  ],
  signatures: [
    '1f3f2ddfc755936e0b998c78a1aec35a9663d1d9011cd4a83be84c6340f1b8689826fbd0e32c918afca38ab1e6ec44eac85a0e281c39bf1400f5e53c8b810a3bf5'
  ],
  extensions: []
}

const serialized = await transactionDigest(recurrent_transfer)
console.log(serialized.txId) // 85db372428a47aba8aeb154df8650a900c612fa5
```

---
_Source: https://npm.io/package/@aioha/tx-digest · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
