Photo by Florian Olivo on Unsplash

Bitcoin Script Language

Bitcoin scripting language called Script is a stack-based (stack: first in, last out) execution language. It is designed to simplifying the security model of Bitcoin, so the Script has not any loop or jump op-code, and the language is not turing-complete. But this limited language provides a lot of capabilities to Bitcoin to write programs. You can find detailed information about Bitcoin script language in this link .

Pay to script hash (P2SH) transactions were standardized in BIP16. That update allows transactions to be sent to a redeem hash (addresses starting with 3 in main-net and 2 in test-net) rather…

This tutorial explains how to create a raw Bitcoin transaction with Go, using btcsuite library, and then push it to the testnet, or main net.

Following concepts will be covered by the tutorial:

  • UTXO
  • Public, Private key pair
  • Transaction Structure
  • Create Transaction
  • Sign Transaction
  • Push to network
  • Fee and some other concepts


Unspent Output Transaction (UTXO) is referred to an output of a transaction that is not spent yet. The balance of and account is the sum of the amounts of its UTXOs. For example, you can search “3D2oetdNuZUqQHPJmcMDDHYoqkyNVsFk9r” in blockcypher and then click on “Advanced Details”, “unpent outputs” to…

Mahdi Darabi

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store