2020* [ Authors] ( #authors )
2121* [ License] ( #license )
2222
23- ## Installation and Usage
24- The build system supports both maven and gradle, so to build the driver run:
25- ``` bash
26- ./gradlew install
23+ ## Installation
24+
25+ The build system supports both maven and gradle -
26+
27+ #####Maven users
28+ - In your ` pom.xml ` add java-driver as dependency
29+
30+ ```
31+ <dependency>
32+ <groupId>com.bigchaindb</groupId>
33+ <artifactId>bigchaindb-driver</artifactId>
34+ <version>1.0</version>
35+ </dependency>
36+ ```
37+ then
38+
39+ ```
40+ mvn clean install
41+ ```
42+ #####Gradle users
43+ - In your ` build.gradle ` add java-driver as compiling dependency
44+
2745```
28- or use maven
29- ``` bash
30- mvn clean install
46+ dependencies {
47+ compile 'com.bigchaindb.bigchaindb-driver:1.0'
48+ }
49+
3150```
51+ then
3252
33- ## Set up your configuration
53+ ```
54+ ./gradlew install
55+ ```
56+ ## Usage
57+ ### Set up your configuration
3458- If you don't have app-id and app-key, you can register one at [ https://testnet.bigchaindb.com/ ] ( https://testnet.bigchaindb.com/ )
3559
3660``` java
@@ -40,7 +64,7 @@ BigchainDbConfigBuilder
4064 .addToken(" app_key" , < your- app- key> ). setup();
4165```
4266
43- ## Example: Prepare keys, assets and metadata
67+ ### Example: Prepare keys, assets and metadata
4468``` java
4569// prepare your keys
4670net.i2p.crypto.eddsa. KeyPairGenerator edDsaKpg = new net.i2p.crypto.eddsa. KeyPairGenerator ();
@@ -58,7 +82,7 @@ MetaData metaData = new MetaData();
5882metaData. setMetaData(" what" , " My first BigchainDB transaction" );
5983```
6084
61- ## Example: Create a Transaction
85+ ### Example: Create a Transaction
6286``` java
6387// Set up your transaction
6488Transaction transaction = BigchainDbTransactionBuilder
@@ -69,7 +93,7 @@ Transaction transaction = BigchainDbTransactionBuilder
6993 .buildOnly((EdDSAPublicKey ) keyPair. getPublic());
7094```
7195
72- ## Example: Create and Sign Transaction
96+ ### Example: Create and Sign Transaction
7397``` java
7498// Set up your transaction
7599Transaction transaction = BigchainDbTransactionBuilder
@@ -81,7 +105,7 @@ Transaction transaction = BigchainDbTransactionBuilder
81105
82106```
83107
84- ## Example: Create, Sign and Send a Transaction
108+ ### Example: Create, Sign and Send a Transaction
85109``` java
86110// Set up your transaction
87111Transaction transaction = BigchainDbTransactionBuilder
@@ -94,7 +118,7 @@ Transaction transaction = BigchainDbTransactionBuilder
94118
95119```
96120
97- ## Example: Setup Config with Websocket Listener
121+ ### Example: Setup Config with Websocket Listener
98122``` java
99123public class MyCustomMonitor implements MessageHandler {
100124 @Override
0 commit comments