Counterparty Development Update

January 30, 2015

As we’ve reported previously, for the past few weeks our development efforts were mostly focused on improving our existing codebase though refactoring, dependency management and code re-organization. This week was no different. We made huge progress with all our products and are completing final testing before the new v9.49.4 release.

Instead of listing our usual changes and fixes, we thought we’d take this opportunity to share with you our new architecture and explain each individual component.

Detailed documentation for every new component can be found on our Documentation site and will be expanded after the official release.

Component Relationships and Dependencies

In the figure below you can see how all Counterparty platform components interact with each other.

Counteparty Architecture

The counterblock daemon provides a high-level API used by Counterwallet. counterparty-lib is the reference implementation of the Counterparty Protocol used by counterparty-cli (the Command Line Interface of counterparty-lib) and counterparty-gui (the PyQT5 GUI for counterparty-lib).

Following is a description of each individual component.

counterblock

The counterblock daemon provides a higher-level API that layers on top of counterparty-server‘s API, and includes extended information, such as market and price data, trade operations, asset history, and more. It is used extensively by Counterwallet itself, and is appropriate for use by applications that require additional API-based functionality beyond the scope of what counterparty-server provides.

counterblock also provides a proxy-based interface to all counterparty-server API methods, via the proxy_to_counterpartyd API call. Such services include:

  • Realtime data streaming via socket.io
  • An extended API for Counterwallet-specific actions like wallet preferences storage and retrieval
  • API includes functionality for retrieving processed time-series data suitable for display and manipulation (useful for distributed exchange price data, and more)

Counterparty CLI and counterparty-lib

counterparty-cli is a command line interface for counterparty-lib. counterparty-cli and counterparty-lib comprise the Counterparty reference client itself. It’s responsibilities include parsing out Counterparty transactions from the Bitcoin blockchain. It has a basic command line interface, and a relatively low-level API for getting information on specific transactions, or general state info.

Counterparty GUI

counterparty-gui is a PyQT5 GUI for counterparty-lib. The GUI is under active development and is expected to be released in production in the upcoming weeks.

Counterwallet

Counterwallet is the open-source web wallet for Bitcoin (BTC) and Counterparty (XCP). It is being actively developed and currently implements most Counterparty features:

  • Fully functional wallet for BTC, XCP, and user-created tokens
  • Peer-to-peer asset trading with algorithmic order matching (XCP, other assets)
  • Custom asset creation
  • Betting
  • Broadcasting data on the Bitcoin Blockchain

This architecture is part of our upcoming version v.9.49.4, expected to be released in the next few days. Detailed information about the release will be published in our next Development update post, while the upgrade and installation documentation will become available on our Docs section.

That covers our development updates for this week. If you have any questions regarding recent or upcoming changes you can contact us via our support channel, forum or github.