Bitcoin Developer Network

Explore Website

  • Play
  • Submit a tutorial
  • Resources
  • Subscribe
  • White Paper
Search Open Sidebar


Introduction to Bitcoin Programming with BitcoinJS and Bitcoin Core

by
Welcome to the extensive guide to Bitcoin Javascript! In this guide we will explain how to create various types of Bitcoin transactions, using the BitcoinJS library.

Getting Started

We will use the Bitcoin Core command-line interface in Regtest mode for various common tasks, as well as some complimentary libraries like bx aka Libbitcoin Explorer.

Generating and Importing Wallets

In order to follow this Bitcoin programming tutorial with ease, it would be great to always use the same set of addresses, in NodeJS as well as in Bitcoin Core CLI. We currently

Legacy pay to public key hash

P2PKH is the standard and most common output type until now, used before the Segregated Witness soft fork, that Pays To PubKey Hash (P2PKH). A P2PKH contains instructions which allow anyone to spend

Native Segwit P2WPKH

Read more about P2WPKH in BIP141 P2WPKH is the native Segwit version of a Pay to Public Key hash. The scripts and script data are spread out as follows witness: <signature>

Embedding Data with OP_RETURN

To follow along this tutorial and enter the commands step-by-step Type node in a terminal after cd into ./code for a Javascript prompt Open the Bitcoin Core GUI console or use bitcoin-cli for

Bitcoin Script Puzzles

Bitcoin scripts can be puzzles of any sort and they don't actually have to depend on the knowledge of a secret key. Complex scripts are replaced by shorter fingerprints in the transaction output,

Page 1 of 2 Older Posts
Share Share on Twitter Share on Facebook Share on LinkedIn
Written by

Comments

Subscribe to Bitcoin Developer Network weekly newsletter

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Bitcoin Developer Network icon Bitcoin Developer Network
—
Share this

Explore Website

  • Play
  • Submit a tutorial
  • Resources
  • Subscribe
  • White Paper

About Bitcoin Developer Network

The Bitcoin Developer Network (BDN) is a community-driven project looking at educating the generation of Bitcoin developers. We invite developers, authors, editors, proofreaders, enthusiasts, subject matter experts and technical writers to get in touch so that we may reduce the barrier to entry in developing solutions at various layers of this technology.

Bitcoin Developer Network Newsletter

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Contact

Have any questions? Feel free to get in touch!

  • gr0kchain [at] protonmail.com
  • BitcoinDevNet
  • BitcoinDevNet
  • BitcoinDevNet
Close Sidebar

Latest Posts

  • Bitcoin script 101
    Bitcoin script 101
    July 01, 2020
  • Bitcoin wire protocol 101
    Bitcoin wire protocol 101
    January 27, 2020
  • Introduction to Bitcoin Programming with BitcoinJS and Bitcoin Core
    Introduction to Bitcoin Programming with BitcoinJS and Bitcoin Core
    December 19, 2019

Tags

analyticsbitcoinbitcoinjs-libblockchainclicommunitycryptographydatadnsenvironmentexploithash functionsjavascriptjulialeveldblibrarylightningliquidmempoolmerkle rootmerkle treesmusignasnetworkingnewsletternodepgpphpprotocolregtestrpcsandboxschnorrscriptsecp256k1securityseriesshellstandardsstatisticssynologytransactions

Bitcoin Developer Network on @instagram

Twitter Facebook GitHub RSS
Back to the top

Bitcoin Developer Network © 2023 | Privacy Policy

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution 4.0 International license.
Source Code

Search Bitcoin Developer Network

Posts found: 0
Close