Giter Site home page Giter Site logo

bitcoin-transaction-logger's Introduction

README:

The point of this repo is to create the ability to log successful bitcoin transactions on the bitcoin network directly to a datastore of your choice as opposed to logging to the bitcoin blockchain. As the code progresses you will be able to just create a logger in modular fashion to log to your own datastore.

Datastores I'm planning to log to:

  • DynamoDB
  • MySQL
  • Elasticsearch

This code makes use of the wonderful full bitcoin node written in Go: btcd, you can read more about that here. https://github.com/btcsuite/btcd

I got some help with starting finding a point to start this code on the IRC channel on freenode from @davec:

...
12:31 <@davec> The first thing you'd want to do is register for https://github.com/btcsuite/btcd/blob/master/docs/json_rpc_api.md#notifynewtransactions?
12:32 <@davec> if you're using the btcrpcclient, the function is https://godoc.org/github.com/btcsuite/btcrpcclient#Client.NotifyNewTransactions
12:33 <@davec> then you'll want to setup the handler for the https://github.com/btcsuite/btcd/blob/master/docs/json_rpc_api.md#txaccepted (or the verbose variant depending on
               what you want)
12:34 <@davec> with the btcrpcclient that is the "OnTxAccepted" field of the https://godoc.org/github.com/btcsuite/btcrpcclient#NotificationHandlers
12:34 <@davec> at that point you'll be gettin real time notifications of all txns as they show up on the network
12:34 <@davec> you can do whatever you like with the data then
...

To run export following environment variables and run:

$ export RPC_USER="someusername"

$ export RPC_PASS="someveryrandompassword"

$ go run main.go


bitcoin-transaction-logger's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.