Git Product home page Git Product logo

bitcoin2mongodb-node's Introduction

bitcoin2mongodb-node

bitcoin2mongodb for NodeJS

Mode:

  • full;
  • [ ].

Launching

cd docker
docker-compose up -d

in local host

First console window

./scripts/bitcoind.sh

Second console window

./bin/bitcoin2mongodb

Third console window

./scripts/bitcoin-cli.sh getblockchaininfo
#{
#  "chain": "regtest",
#  "blocks": 0,
#  "headers": 0,
#  ...
#}

BTC_ADDRESS_1=$(./scripts/bitcoin-cli.sh getnewaddress "addres_1" "legacy")
echo BTC_ADDRESS_1=$BTC_ADDRESS_1
#BTC_ADDRESS_1=mzepYrzuDJmciy7SFLSzER2krt9wRMeAi5

BTC_ADDRESS_2=$(./scripts/bitcoin-cli.sh getnewaddress "addres_2" "legacy")
echo BTC_ADDRESS_2=$BTC_ADDRESS_2
#BTC_ADDRESS_2=mpXPdXuwTQvfzd8DFUbeKiUrkASobNSfPy

./scripts/bitcoin-cli.sh generatetoaddress 101 $BTC_ADDRESS_1 100
#[
#  "077b33746ea628d2e5f9a3f997580fd5c27668b4e97172f6532784d76e6f8450",
#  "6a74a8afb6f1850bed77acd8a49790702a3889138882c91bddd0593799985807",
#  ...
#]

./scripts/bitcoin-cli.sh sendtoaddress $BTC_ADDRESS_2 10.12345678
#67d22a3643805dbfdcddace6e0cc576367e92288223ac562e975bc201df9f729

./scripts/bitcoin-cli.sh generatetoaddress 1 $BTC_ADDRESS_1 100
#[
#  "43860d7e1353f6ea0b5d44d7eae9c6570e0d5986fa4592f84c3bdbcf86923006"
#]

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.