bitpush v0.1.0
Bitpush
A simple Bitcoin transaction broadcast microservice
Bitpush is compatible with Bitpay insight endpoints for broadcasting transactions, but with a twist:
- It's powered by Datapay
- You can send either a signed or an unsigned transaction.
- Most Important If you send an unsigned transaction, the microservice has the option to sign with its OWN private key and broadcast.
Two Modes of Bitpush
There are two modes of usage:
- Signed: This is just a typical transaction broadcast service. You post a signed transaction string, and the service broadcasts it for you.
- Unsigned: This is a unique approach to transaction braodcast. The user does NOT pay for the transaction. Instead the user sends an unsigned raw transaction to the service, and the service signs with its OWN key and broadcasts it. This can be used for various subsidized Bitcoin services.
Setup
Step 1. Download
git clone https://github.com/unwriter/bitpush.git
Step 2. Start
npm start
Step 3. Setup .env
Open .env
file in the root folder and store your private keys (as many as you want);
PRIVATE_KEY1=...
PRIVATE_KEY2=...
PRIVATE_KEY3=...
PRIVATE_KEY4=...
Bitpush will shuffle through each key to send transactions out whenever it gets a request.
Step 4. More configuration
You can additionally set the .env
file keys to configure the Bitcoin RPC settings:
- rpc_user: Bitcoin JSON-RPC username (default: 'root')
- rpc_pass: Bitcoin JSON-RPC password (default: 'bitcoin')
- host: Bitcoin JSON-RPC host IP (default: your ip)
Usage
The microservice only has a single endpoint (for now).
POST /tx/send
You can pass a JSON object to this endpoint. The supported attributes are:
- rawtx: raw transaction string
- signed:
true
if signed,false
(or exclude) if unsigned.
If unsigned, this assumes that the microservice itself will sign the transaction and broadcast for the user, thereby making the transaction FREE for the end-user.
You can try sending your transaction to the endpoint like this:
curl -X POST https://bitpush.bitdb.network/tx/send -H "Content-Type: application/json" -d '{"signed": true, "rawtx": "[SIGNED_TRANSACTION_STRNG]"}'
Free Public Nodes
Feel free to add yours here if you run a node.
Signed Mode
Unsigned Mode
TBD
5 years ago