Skip to content

nch-bowstave/nchain-ably

ably-blockchain-indexer

Release Build Status Report Go

This is a service that can be used as a new data source for Ably, a real time messaging platform.

This is built using GoLang and will listen to a node and forward all transactions to Ably.

As well as transactions, Bitcoin SV also defines several data protocols that can be sued by applications to standardise encoding etc. We handle the following data protocols:

  • twetch
  • bitcom
  • bitcom-b
  • bitcom-d
  • run
  • metanet

After running it for a few minutes, we were rate limited by Ably :D

Quick Start

You will need a bitcoin sv node to get started, contact us for info on setting one up.

Using docker is the quickest way to get started.

The only settings you need to be concerned with are listed in the docker-compose file:

  - ABLY_KEY=yourkey
  - NODE_HOST=localhost
  - NODE_USER=youruser
  - NODE_PASSWORD=yoursecret

You will need to build a local image before running:

make build-image

Then once built, do:

make run-compose

Go run

You can also run with go run:

 ABLY_KEY=<YOUR KEY> NODE_HOST=<YOUR NODE> NODE_USER=<YOUR USER> NODE_PASSWORD=<YOUR PASSWORD> go run cmd/http-server/main.go

Channels

We currently send data to several channels:

  • txraw - raw transaction data as they come in

The below channels contain only data from outputs from transactions that match these protocols:

  • Twetch
  • bitcom
  • bitcom-b
  • bitcom-d
  • Run
  • metanet

The data format is:

{
    "txId":"transactionID",
    "script":"protocol script hex"
    "protocol":"bitcom/run/etc"
}

About

nChain submission for the hackathon

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors