Super simple and flexible Bitcoin transaction broadcast microservice

Bitpipe is a transaction broadcast Microservice powered by DataPay, a declarative Bitcoin transaction builder and broadcaster library for Bitcoin SV.

It sets up a web server that accepts a Datapay Payload that looks like this:

{
  "data": ["0x6d02", "hello from datapay"],
}

or,

{
  "data": ["0x6d02", "hello from datapay"],
  "pay": {
    "to": [{
      "address": "1A2JN4JAUoKCQ5kA4pHhu4qCqma8jZSU81",
      "value": 1000
    }]
  }
}

or,

{
  "data": ["0x6d02", "hello from datapay"],
  "pay": {
    "key": "5JZ4RXH4MoXpaUQMcJHo8DxhZtkf5U5VnYd9zZH8BRKZuAbxZEw",
    "rpc": "https://bchsvexplorer.com",
    "fee": 400,
    "to": [{
      "address": "1A2JN4JAUoKCQ5kA4pHhu4qCqma8jZSU81",
      "value": 1000
    }]
  }
}

As you can see, the request payload is self-descriptive of how the transaction should be composed.

On top of that, you can even override the payload on the server to create a transforming pipe.

Thanks to this declarative approoach, the service is extremely flexible. You can pass around transactions as JSON payload, not only between a client an a server, but also among multiple nodes.

For example, here's a scenario:

  1. Client composes an unsigned transaction as a datapay object
  2. POSTs the datapay object to Bitpipe A as JSON
  3. Bitpipe A modifies some data from the datapay object and passes it to Bitpipe B
  4. Bitpipe B modifies some data from the datapay object, signs the result with its OWN private key, and broadcasts it to Bitcoin.

This paradigm opens door to all kinds of interoperable Bitcoin microservices, which not only includes servers but also various clients such as Mobile devices, Raspberry Pis, etc.

This is similar to how the Unix pipeline system works.

unixpipe