0.1.6 • Published 8 months ago

@ordinalsbot/bitcoin-fee-estimator v0.1.6

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

Bitcoin Fee Calculator

Node Version

A TypeScript library for accurately calculating Bitcoin transaction sizes, virtual bytes (vBytes), and fees for various script types including SegWit and Taproot.

Features

  • Calculate transaction sizes in both vBytes and raw bytes
  • Support for all standard script types:
    • Legacy (P2PKH, P2SH)
    • SegWit (P2WPKH, P2WSH)
    • Taproot (P2TR)
    • Nested SegWit (P2SH-P2WPKH, P2SH-P2WSH)
  • OP_RETURN data size calculation
  • Fee estimation based on sat/vByte
  • Inscription transaction fee calculation

Supported Script Types

TypeDescription
P2PKHLegacy Pay-to-Public-Key-Hash
P2SHPay-to-Script-Hash
P2WPKHNative SegWit
P2WSHSegWit Script
P2TRTaproot
P2SH-P2WPKHNested SegWit in P2SH
P2SH-P2WSHNested SegWit Script in P2SH

Development

  1. Clone the repository:

    git clone https://github.com/ordinalsbot/bitcoin-fee-estimator.git
    cd bitcoin-fee-estimator
  2. Optional - Using nvm:

    nvm install  # Uses version from .nvmrc
    nvm use      # Switches to correct Node version
  3. Install dependencies:

    npm install
  4. Run tests:

    npm test
  5. Build the project:

    npm run build
0.1.6

8 months ago

0.1.5

8 months ago

0.1.4

8 months ago

0.1.3

8 months ago

0.1.2

8 months ago

0.1.1

9 months ago

0.0.2

9 months ago

0.1.0

9 months ago