bitcoin-js

Creates and signs Bitcoin transactions and addresses in JavaScript/TypeScript.

4|1|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/hairyf/blockchain-skills --skill bitcoin-js
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bitcoin-js
Source: https://github.com/hairyf/blockchain-skills/tree/main/skills/bitcoin-js
Command: npx skills add https://github.com/hairyf/blockchain-skills --skill bitcoin-js

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ecpair, bip32, tiny-secp256k1, and includes references (resource) components.

What problem does it solve?

This Skill simplifies the process of building, signing, and managing Bitcoin transactions and addresses directly within JavaScript or TypeScript applications.

Core Features & Use Cases

  • Transaction Creation & Signing: Build and sign complex Bitcoin transactions, including SegWit and Taproot.
  • Address Management: Generate and decode various Bitcoin address types (P2PKH, P2SH, P2WPKH, P2TR).
  • Use Case: Integrate this Skill into a web wallet to allow users to securely create and sign transactions for sending Bitcoin, managing their keys, and interacting with the network.

Quick Start

Use the bitcoin-js skill to generate a new P2PKH address for the testnet.

Frequently Asked Questions about bitcoin-js

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create and sign a Bitcoin transaction in JavaScript?

This JavaScript Bitcoin library enables transaction creation and signing by providing APIs to construct inputs, outputs, and apply cryptographic signatures. It simplifies building complex workflows like SegWit and Taproot transactions directly in JavaScript applications.

Can I generate different types of Bitcoin addresses like P2WPKH and P2TR using JavaScript?

You can generate and decode various Bitcoin address types including P2PKH, P2SH, P2WPKH, and P2TR using JavaScript. The library provides specific payment type modules to handle address generation and script management for these formats.

What is a PSBT and how do I manage multi-signature Bitcoin workflows in TypeScript?

PSBT (Partially Signed Bitcoin Transaction) is a BIP174 standard format that allows multiple parties to collaboratively sign a transaction. This library provides TypeScript tools to create, update, and finalize multi-signature PSBT workflows.

Do I need external packages for key management and cryptography to build a Bitcoin web wallet?

Yes, building a functional Bitcoin web wallet requires external packages. This library relies on dependencies like `ecpair` and `bip32` for key management, and `tiny-secp256k1` for underlying elliptic curve cryptographic operations.

How do I create a P2PKH testnet address using a JavaScript Bitcoin library?

To create a P2PKH testnet address in JavaScript, import the library and use its payment type functions configured for the testnet network parameters. This allows developers to generate test addresses for safe development and network interaction.