nfwd

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2021 License: ISC Imports: 2 Imported by: 0

README

ably-bitcoin-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:

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

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"
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TransactionCreate

type TransactionCreate struct {
	TxHex string
}

TransactionCreate contains the properties required to create a transaction.

type TransactionService

type TransactionService interface {
	// Create will store a transaction in the db.
	Create(ctx context.Context, req TransactionCreate) error
}

TransactionService enforces validation of arguments and business rules.

type TransactionWriter

type TransactionWriter interface {
	// Create will add a transaction to the data store.
	Create(ctx context.Context, req *bt.Tx) error
}

TransactionWriter will add transactions to a data store.

Directories

Path Synopsis
cmd
zmq
data
transports
zmq

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL