SundeepK/btc-unspent-transaction-outputs-api

Simple rest service which call the blockchain api to fetch unspent transaction outputs

★ 0Forks 0JavaGitHub ↗Compare

README

Unspent transaction outputs api

This api allows consumers to fetcher unspent transaction outputs for a particular address given in Base58. An example get request is below:

  http://localhost:8080/address/1N52wHoVR79PMDishab2XmRHsbekCdGquK

Which will return the following json:

{
"outputs": [
  {
    "tx_hash": "eb3796ccde7f0421f443f6d1d520d89679611842741a73e096ee1f6cc58bf880",
    "value": 2000,
    "output_idx": 0
  }
]
}

Dependencies

The project requires, Java 8, Ruby 2.3.1 and Bundler.

Building

To build the project run:

    ./gradlew build

This will execute the Java unit tests and also run the cucumber acceptance tests. To just build a jar file and run the unit tests only run:

    $ ./gradlew build -x acceptanceTest

Running api

To run the api execute the run script in the root of the project:

    $ ./run.sh

It is also possible to run the api directly through gradle:

    $ ./gradlew bootRun -Dspring.profiles.active=prod

Contributors

SundeepK

Issues