CoinSpark is a free and open protocol built on bitcoin. You may use it for any purpose that you wish.
CoinSpark makes extensive use of
OP_RETURN outputs, which were added in Bitcoin Core 0.9 as the standard way for additional data to be added to bitcoin transactions. This Bitcoin 2.0 presentation contains more information on the thinking behind the protocol.
The current version of CoinSpark enhances bitcoin transactions in the following ways:
- Allowing messages and/or files to be attached to bitcoin or CoinSpark asset transactions, to provide some context for the transaction to the recipient. Messages can contain explanatory notes in text, PDF contracts, or even images or videos. The message is delivered via a delivery server (use ours or run your own). The address of that server and a hash of the message content are placed within the bitcoin transaction, for authentication and notarization. For more information, please read the introduction to CoinSpark messages.
- Allowing any asset to be issued and transacted over the bitcoin network in an open and decentralized way. CoinSpark assets can be considered as a member of the Colored Coins family, though in the case of CoinSpark, units of bitcoin are not actually colored directly. Instead, CoinSpark assets flow over a bitcoin transaction in parallel to, but independently of, units of the bitcoin currency. For more information, please read the introduction to CoinSpark assets.
- Embedding payment references inside a bitcoin transaction. Merchants can transparently provide these payment references to their customers inside CoinSpark addresses, to enable the source of a payment to be uniquely identified without the merchant needing to create a new pair of bitcoin keys for every potential transaction.
CoinSpark allows multiple features to be combined together in a single piece of
OP_RETURN metadata. For example it is possible to create a transaction that sends an asset and also has a message attached.
Libraries and Documentation
These libraries have been extensively cross-tested and are documented in the pages below:
- Convert bitcoin addresses to and from CoinSpark addresses.
- Read and write CoinSpark metadata embedded within the
OP_RETURNoutput of bitcoin transactions.
- Create and encode CoinSpark message metadata.
- Communicate with message delivery servers to create and retrieve messages.
- Create and encode CoinSpark asset genesis and asset transfer metadata.
- Locate and parse the information in the web pages which describe CoinSpark assets.
- Send queries to the tracking server for a particular asset.
- Create and encode payment reference metadata.
If you are a bitcoin wallet developer, we also provide detailed guidelines on how to add CoinSpark assets support to your wallet. This will transform your wallet into a generalized solution for holding and transacting a wide range of digital assets, alongside the bitcoin currency.
Open source code and APIs
For your convenience this site provides open source reference implementations for:
- A CoinSpark wallet with an integrated JSON-RPC API server, command-line interface and headless mode.
- An asset tracking server for asset issuers that don’t want to depend on our servers.
- A message delivery server for wallet providers that want to run their own.
This site also provides a simple asset creation form which allows you to create a new CoinSpark asset and send it to your wallet, and an API for asset creation that enables you to integrate the creation of new assets into your workflow.