hive-tx v7
GitHub npm

Install

Install hive-tx

Add hive-tx to a Node.js project, or load the ESM file in a browser.

Node.js

Node.js 20 or later is required.

npm install hive-tx

pnpm and yarn work too.

Import

ESM:

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

CommonJS:

const { Transaction, PrivateKey, callRPC } = require('hive-tx')

Browser

Load the ESM build from a CDN:

<script type="module">
  import { Transaction, PrivateKey } from
    'https://cdn.jsdelivr.net/npm/hive-tx@7/dist/index.mjs'
</script>

Package contents

FileUse
dist/index.mjsESM for Node.js, browsers, workers, and serverless runtimes
dist/index.cjsCommonJS for Node.js and CommonJS bundlers
dist/index.d.mtsTypeScript types for ESM
dist/index.d.ctsTypeScript types for CommonJS

The exports field in package.json picks the right file for your setup.