When sending payments, popular services PayPal and SWIFT allow users to attach private messages that add an explanation about the payment. Before now, bitcoin services haven't supported this feature. However, CoinSpark just launched a tool that works that accomplishes this for bitcoin transactions. They open sourced this tool so that developers can implement the feature in their own applications.

These messages, inserted as metadata on the blockchain, give context for the transaction. Users can explain that a transaction is payment for a loan, for instance, or payment for a bet. The message can come in a variety of forms, whether an explanatory note, an invoice, or a video. Only the sender and receivers can view the message.

This is how the message looks before sent:

This is how it looks on the receiving end:

CoinSpark is a colored coin protocol that allows users to move assets around the blockchain much like Counterparty. In a practical sense, CoinSpark is more decentralized than Counterparty though. The Counterparty protocol is itself decentralized, but it requires a full node to run. “The guiding principle of CoinSpark is that users can use a lightweight wallet on their computer,” said Gideon Greenspan, CEO of CoinSpark in a Skype call.

Users can add messages to asset transactions, as well as traditional bitcoin transactions.

“I think it goes a little bit beyond that though,” said Gideon Greenspan. When a bitcoin transaction is sent from one party to another party, a hash of the message is embedded in the blockchain. Both the sender and the recipient can verify the message. It remains on the blockchain forever and no one can tamper with it.

“They can prove the message exists very easily without having to go to a notary, or without having to go to any kind of a central intermediary,” he said.

The future is somewhat like another messaging service we're all familiar with. “You could look at it a little bit like email, but with notarization,” Greenspan said. Users can even choose to use the feature to notarize important emails.

Right now, users can send these notarized messages with the SparkBit wallet, a free and open source fork of the MultiBit wallet, which works with CoinSpark protocol. The company has open sourced the fully documented software libraries in six languages, (C/C++, Java, Javascript, PHP, Python, Ruby) so other developers can implement the messaging feature.

CoinSpark uses federated servers to deliver the messages. The hash of the message, as well as the server address, is stored in the OP_RETURN field.

The 40 byte OP_RETURN fields, often used to include metadata, has been the subject of fierce debate. Critics say that services that are embedding extra content into transactions are getting a free ride. Supporters claim that bitcoin is a permissionless playground—innovators don't need to call up the bitcoin core developers for approval. “It goes back to the question: Is bitcoin a currency or is it a platform for other applications?” Gideon explained.

But for the forseeable future, services like CoinSpark are taking advantage of the 40 bytes of OP_RETURN space. And this new messaging feature is another example of that.

While messaging is exclusive to SparkBit right now, Greenspan says that CoinSpark is in talks with “major wallets” who are interested implementing it sometime down the road.

Did you enjoy this article? You may also be interested in reading these ones: