DagCoin REST Client

REST Client implementation for DagCoin extension written for BATM code

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

org.dagcoin
ArtifactId

ArtifactId

dagcoin-rest-client
Last Version

Last Version

0.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

DagCoin REST Client
REST Client implementation for DagCoin extension written for BATM code
Project URL

Project URL

https://dagcoin.org/
Source Code Management

Source Code Management

https://github.com/visioncrafters/dagcoin-rest-client.git

Download dagcoin-rest-client

How to add to project

<!-- https://jarcasting.com/artifacts/org.dagcoin/dagcoin-rest-client/ -->
<dependency>
    <groupId>org.dagcoin</groupId>
    <artifactId>dagcoin-rest-client</artifactId>
    <version>0.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.dagcoin/dagcoin-rest-client/
implementation 'org.dagcoin:dagcoin-rest-client:0.0.3'
// https://jarcasting.com/artifacts/org.dagcoin/dagcoin-rest-client/
implementation ("org.dagcoin:dagcoin-rest-client:0.0.3")
'org.dagcoin:dagcoin-rest-client:jar:0.0.3'
<dependency org="org.dagcoin" name="dagcoin-rest-client" rev="0.0.3">
  <artifact name="dagcoin-rest-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.dagcoin', module='dagcoin-rest-client', version='0.0.3')
)
libraryDependencies += "org.dagcoin" % "dagcoin-rest-client" % "0.0.3"
[org.dagcoin/dagcoin-rest-client "0.0.3"]

Dependencies

compile (4)

Group / Artifact Type Version
org.glassfish.jersey.core : jersey-client jar 2.29
org.glassfish.jersey.media : jersey-media-json-jackson jar 2.29
org.glassfish.jersey.inject : jersey-hk2 jar 2.29
org.slf4j : slf4j-api jar 2.0.0-alpha0

provided (1)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.18.8

runtime (1)

Group / Artifact Type Version
ch.qos.logback : logback-classic jar 1.3.0-alpha4

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

ATM server

This is the REST Client for consuming the APIs, to be used in the ATM server.

Setup

Install Java and maven. Clone the repository, go to the project folder and run -

mvn clean install

This is create the target folder, and the jar file dagcoin-rest-client-0.0.1.jar inside this. This jar can now be placed in any Java project to access the REST Client. This will also run the test cases for all the available functionalities. The test cases are written to test the actual services. So if the services are down, test cases will fail.

Run

java -jar target/dagcoin-rest-client-0.0.1.jar

Configuration

The configuration, such as encryption key, URL, can be changed in the file -

src/main/resources/config.properties 

Usage

It exposes the following methods, that can be accessed by creating DagCoinApiClientService's object:

  1. getExchangeRate
  2. validateWalletAddress
  3. getBalance
  4. makeTransaction

Security

HMAC API security has been implemented for all the REST APIs.

AES-128-CBC algorithm has been implemented for encrypting the request/response of the REST APIs that -

  1. Check wallet balance
  2. Make wallet transaction

Versions

Version
0.0.3
0.0.2