Bitcoin development may sound intimidating, but luckily the developers who partied before you have already laid the necessary groundwork.
Seamless integration of Bitcoin Cash into your desktop, web, or mobile application is just a library away.
This document will provide a short summary for each of CoinParty2020’s recommended tools and resources for the hackathon. These resources were chosen for their low start up costs, reasonable learning curves, and overall quality.
More tools can be found at https://developer.bitcoin.com/, https://bch.info/en/developers, https://developers.cash/, and elsewhere!
Electrum API: https://bitcoincash.network/electrum
Bitcash is a Python Bitcoin Cash library with an emphasis on performance and usability. It uses multiple Blockchain APIs for redundancy, supports multiple private key formats, and allows you to construct P2PKH (“Pay-to-public-key-hash”) transactions. There is a complete user guide on the github repository, covering keys, transactions, networking, and other advanced features.
Python-bitcoincash is a python library with a “low level”, “ground up” approach. It provides an easy interface for manipulating Bitcoin Cash data structures and interacting with the protocol. It also includes an RPC interface that is designed to work with a Bitcoin Unlimited full node or an Electrum server.
BCHD provides a collection of resources and tools, all written in Go (golang).
One of these is a full node implementation that fully indexes the BCH blockchain and exposes it via a gRPC API. There are publicly accessible instances of BCHD, covering both “testnet” (a parallel Bitcoin Cash network where the coins are worthless) and “mainnet” (the main Bitcoin Cash network where you’re dealing with real money).
There’s also a script debuggerv (see “Bitcoin Cash Script” below), a network crawler and DNS seeder, a set Bitcoin Cash-specific utilities, a generic wallet, the “neutrino” wallet (which uses a privacy-preserving protocol when communicating with nodes), and more.
Bitcoincashj is a java library that takes care of the basics (like transaction generation and input/output script generation) and also provides cutting edge features like Schnorr signatures, BIP47, and multi-signature wallets. There are example applications, but there is not up-to-date documentation for this library. (So it may require some digging through code to learn how it works.)
Bitcoin Cash Script
Using the scripting functions available on the BCH network, you can decide under what conditions a coin can be spent. These features are generally referred to as “smart contracts”, and there are currently two languages used to write Bitcoin Cash smart contracts:
CashScript treats “contracts” similarly to “classes” in object-oriented programming. But instead of changing states, one satisfies the requirements of the contract and spends coins stored in the contract. (This transaction can be required to send the coin to another contract!)
Spedn is a purely-functional, statically typed, and explicitly typed smart contract language with syntax resembling C# or Rust.
Meep is a Bitcoin Cash script debugger. (“Bitcoin Cash Script” is what’s used to create smart contracts.)
Bitcoin Unlimited Public Infrastructure
BU hosts “block explorers” (where you can browse the contents of the entire blockchain), for both Mainnet, which is the “real” Bitcoin Cash network, and Testnet, where the coins are worthless, which makes it useful for… testing!
Mainnet explorer: https://explorer.bitcoinunlimited.info/
Testnet explorer: https://texplorer.bitcoinunlimited.info/
Mainnet electrum server: electrs.bitcoinunlimited.info s50002
The Bitcoin Cash protocol is in the process of being thoroughly documented. It’s not finished yet, but it is already an excellent resource for learning how certain parts of the Bitcoin Cash network function, at a low level. (You may or may not need these kinds of details for your project.)