Counterparty Development 101

Counterparty is NOT a blockchain.

What is Counterparty?

Counterparty is a protocol and network of nodes that reads and writes data to the Bitcoin blockchain using bitcoin txs and a standardized message format. Off-chain, Counterparty nodes validate this embedded data and compute the current state of the network, with each new block.

Embedded Consensus

Counterparty nodes maintain identical ledgers without using a P2P network specific to Counterparty because they are running the same Counterparty software to enforce protocol rules and piggy-backing on Bitcoin’s Proof-of-Work for tx ordering and propogation. This is known as embedded consensus.

Federated Nodes

A Federated Counterparty Node is a Bitcoin Full Node that uses AddrIndex and runs counterparty-lib software. Counterparty is coded primarily in Python using a SQLite database. Counterparty tracks balances using bitcoin addresses as “accounts” and credits and debits account balances when executing valid protocol messages.

Node Interfaces

Counterparty Node Operators have two interface options: CLI and API. The CLI and JSON-RPC API are both well documented. And it’s not necessary to know Python to interface with either of these options.

Smart Contracts

You can think of each Counterparty message as a standardized input to a hard-coded smart contract which differentiates Counterparty from other platforms, like Ethereum, where users write their own smart contract code. Rather than users rolling their own code and using different approaches for common actions, Counterparty standardizes common actions as features.


Counterparty can be upgraded to include new smart contracts, if they gain enough consensus and are deemed to be an improvement through the CIP process. This usually requires a hard-forking upgrade where every node must upgrade to the new software version to maintain the same network state.

Getting Started

The easiest way to get started is to read the API documentation and play around with the Public Development API hosted by (link below). The counterparty-lib code is also extremely readable with each smart contract having a standard format: database schema, validation, parsing, etc.


Here are two videos from two of the Founders of Counterparty that give both a conceptual and a technical overview of the project.



Reference Implementation:


CIP Process:
Bug Bounties:


Setup a Federated Node:
Counterparty CLI:
Counterparty API:
Counterblock API:


Platform Architecture:
Public Federated Node API:
Counterparty Explorer (Mainnet):
Counterparty Explorer (Testnet):


Counterparty Talk Forum:


How to Start:
Insufficient BTC:

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