Bitfeed

BITCOIN TRANSACTION SYNDICATION FEED
Community Demo

1. INTRODUCTION

Bitfeed is an open data syndication format for sharing data between applications that produce or store Bitcoin transactions.

Bitfeed is like RSS, but for Bitcoin transactions. While RSS is used to publish and subscribe to web content, Bitfeed is used to publish and subscribe to Bitcoin transactions produced or stored by applications.


2. DEMO

A social network may implement Bitfeed for each user. Here's an example:

  1. Profile page: https://powping.com/@unwriter
  2. Profile Bitfeed: https://powping.com/@unwriter/bitfeed

Each transaction encapsulates a post, and you can fetch the raw transaction by combining the path attribute and the tx[n].id attributes. For example: https://powping.com/rawtx/8f8eb17e8980b9ac1c1cb738fc2a5f3d44181fc972deeef3b7cd22970ad678a1.

Note that this is just one use case, and Bitfeed can be used to publish ANY set of Bitcoin transactions, including:.


3. DESIGN GOAL

The main goal for Bitfeed is to enable interoperable web applications that can communicate with one another with Bitcoin transactions in a peer-to-peer manner through a publish-subscribe pattern. As a result, app developers don't need to privately coordinate with other apps to integrate their APIs but simply make their data available for mashup, spurring open innovation, grounded in Bitcoin.

The version 1 spec is deliberately minimal for flexibility and potential extensibility. Looking for feedback and contributions are welcome. Join the community here.


4. SPECIFICATION

a. Feed

A Bitfeed returns a JSON response with 3 attributes:

{
  "version": 1,
  "path": <the root path for all raw transactions>,
  "tx": [
    { "id": <transaction id>, "timestamp": <unix timestamp> },
    { "id": <transaction id>, "timestamp": <unix timestamp> },
    { "id": <transaction id>, "timestamp": <unix timestamp> },
    . . .
  ]
}

The path and the tx[n].id attributes can be concatenated to determine each transaction's full URL.

b. Transaction

  1. ENCODING: The raw transaction must be stored in a HEX format.
  2. VALIDITY: The transactions must be valid Bitcoin transactions. However, we do not care what's contained inside a transaction. A Bitcoin transaction can be anything from a regular payment transaction to a data carrier transaction to a smart contract transaction and more.

5. EXAMPLE

Here's an example Bitfeed.

{
  "version": 1,
  "path": "https://powpress.org/rawtx",
  "tx": [
    {
      "id": "aa518e4e68ae32ed15f3f94f03aa653110d2f834860e32e81bf9914d67a722e5",
      "timestamp": 1598896746303
    },
    {
      "id": "8e57e582cacbb3ce83ff697b78a6b0105aa55ededb89b064a6ccdfdc6943a69d",
      "timestamp": 1598896746303
    },
    {
      "id": "7331b81a1bbeea5b503f84c51f7e47880e901923060a4c5ded85ee4ea9caf2ef",
      "timestamp": 1598802963969
    }
  ]
}

To derive the actual location for the raw transaction, we can combine the path with the id of a transaction.

For example, to find the raw transaction hex for the transaction id aa518e4e68ae32ed15f3f94f03aa653110d2f834860e32e81bf9914d67a722e5 we can combine:

which gives us https://powpress.org/rawtx/aa518e4e68ae32ed15f3f94f03aa653110d2f834860e32e81bf9914d67a722e5


6. USAGE

Bitfeed can be used for any application that produces or stores Bitcoin transactions.

A. Public feed

Can be used like public RSS (Example: https://powping.com/@unwriter/bitfeed

B. Private feed

You can require authentication to access a private Bitfeed (Example: A private Powpress Bitfeed).

C. Public encrypted feed

Better yet, you can expose everything publicly, but each transaction can contain encrypted data. This way you don't need to implement centralized auth scheme yet protect privacy.