Are you keen to try your hand at developing on the BSV blockchain? To get you set up with the best toolsets and libraries, we asked the Bitcoin SV Hackathon’s organiser, Raylene Wilson, to share a list of recommended resources.
Bitcoin Association’s recommended resources for use during the Bitcoin SV Hackathon
GoLang Library for creating Bitcoin transactions
Visit the go-to Bitcoin Transaction (BT) GoLang library to view Go documentation, current features, its 18-month roadmap, examples and tests, benchmarks, code standards and more.
TxForge - Modern Bitcoin transaction builder
TxForge is a modern Bitcoin transaction builder, built on top of BSV2 and capable of supporting any non-standard and custom script type that offers a simple and familiar declarative API for composing transactions.
Whilst TxForge can be used to build complex transactions, for simple and common use cases such as sending a P2PKH payment or data output, it includes sensible defaults that make this painless.
What makes TxForge different, as well as very powerful, are Casts - an abstraction over input and output scripts that provide a way for defining script templates as a single module. Examples include R-puzzles, Multisig and even tailor-made casts.
ElectrumSV Software Development Kit (SDK)
The ElectrumSV SDK project provides a consolidated set of resources to help developers, whether they are working on ElectrumSV directly or on an application based on ElectrumSV, to develop, run and test applications while offline (it is primarily aimed at facilitating rigorous CI/CD functional testing).
Electrum v0.0.23 node software
The ElectrumSV node project is intended to provide cross-platform and easily runnable builds of the node software for developers to develop, test and experiment with. While the ElectrumSV wallet uses these builds for its automated testing processes, the builds are not ElectrumSV-specific in any way. However, as ElectrumSV is a trusted project in the Bitcoin SV ecosystem, by curating these builds, the project provides them in a form developers can trust.
Simplified Payment Verification (SPV) allows a transaction recipient to prove that the sender has control of the source funds of the payment they are offering without downloading the full blockchain by utilising the properties of Merkle proofs.
Merchant APIs can choose to use SPV rather than waiting for a transaction to be confirmed many times before concluding the deal. Where the value of small transactions poses a relatively small risk to the merchant, it is more cost-effective for merchants to accept the SPV than to run their own Bitcoin node. Because the block header chain that underpins SPV is so small* and grows at a nominal rate (about 4MB per year), a business can use simple hardware to generate it at a low cost instead of running their own network node.
A wallet can store all necessary block headers in around 50MB – this covers the entire blockchain (as of January 2020, with 80 bytes per block and approximately 620,000 blocks in the chain). The total grows linearly at about 4MB per year (i.e., it increases by 80 bytes with each block mined, regardless of the size of that block). Contrast this with the hundreds of gigabytes required to store the entire chain if SPV were not used.
Merchant API (mAPI) is a Bitcoin SV interface that lets merchants connect directly with nodes or miners and makes it easy for nodes to offer tailored services to merchants (or users).
mAPI is crucial for the Bitcoin node software because it is the first step to compartmentalising the node by taking out the fee module. Instead of submitting transactions directly to the node, the mAPI fee module instead calculates the fee. Through this extension to the sendrawtransaction RPC call, a transaction can be sent without first checking with a node about the fee, enabling it to stand alone. This is the first step towards turning the Bitcoin node software into a microservices architecture as part of the Teranode project, which will allow Bitcoin nodes to run at tremendous scale.
The Bitcoin white paper
Bitcoin is designed from the system described in the original white paper, with economic incentives driving the development of the network and building hyper-dense connectivity at its centre.
Read (or re-read) the original Bitcoin white paper or sign up for the Bitcoin SV Academy’s Introduction to Bitcoin Theory course to take you through it one step at a time.
Introduction to Bitcoin Development course
If you’re intrigued to know more about Bitcoin’s potential for software development, you’re bound to find our Introduction to Bitcoin Development course helpful.
The course is focused on providing up-to-date information for application builders who want to use Bitcoin as a basis for their projects. The course is built around the available tools and techniques being used to build applications and other projects for Bitcoin with a minimal theoretical basis.