top of page

Counterparty Development Update #13: New Architecture Explained

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.

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:

  1. Realtime data streaming via

  2. An extended API for Counterwallet-specific actions like wallet preferences storage and retrieval

  3. 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-libcounterparty-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 GUIcounterparty-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.

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

  1. Fully functional wallet for BTC, XCP, and user-created tokens

  2. Peer-to-peer asset trading with algorithmic order matching (XCP, other assets)

  3. Custom asset creation

  4. Betting

  5. 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. In order to stay up to date with our progress subscribe to our newsletter at the bottom of this page and receive weekly updates via email.


bottom of page