https://github.com/kulpreet/btcr-service
HTTP service for querying bitcoin tx info to help develop BTCR tools
https://github.com/kulpreet/btcr-service
Last synced: 9 months ago
JSON representation
HTTP service for querying bitcoin tx info to help develop BTCR tools
- Host: GitHub
- URL: https://github.com/kulpreet/btcr-service
- Owner: kulpreet
- Created: 2018-07-19T12:31:42.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-23T10:03:47.000Z (almost 8 years ago)
- Last Synced: 2025-04-06T08:51:11.392Z (about 1 year ago)
- Language: Go
- Size: 33.2 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple HTTP Service to query txrefs
## Install
`go get github.com/kulpreet/btcr-service`
## Start Service
```
cd $GOPATH/github.com/kulpreet/btcr-service
go build
./btcr-service
```
## Resolve a BTCR DID
This is still a WIP, see /tip for now
`https://localhost:8080/txref//resolve`
## Following a tip
`https://localhost:8080/txref//tip`
The above will list all transactions matching the address in the vout
from the txref. We assume there is only one address in the vout for
now, as we are only focussed on P2PKH for the current MVP.
By default this endpoint only shows spending transactions from the
list of transactions originating at txref.
The same endpoint can also show all the transactions that were
considered for following the tip by passing a spendsOnly query string
parameter, spendsOnly, as false. For example:
`https://localhost:8080/txref//tip?spendsOnly=false`
## Decoding a Txref
`https://localhost:8080/txref//decode`
## Get Txid from Txref
`https://localhost:8080/txref//txid`
## Get decoded Tx from Txid
`https://localhost:8080/tx/`
## Txid to UTXOs for the address in Txid
`https://localhost:8080/addr//spends`