Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit bbaa4d8

Browse files
committed
Multisig implementation finished
1 parent 5e95613 commit bbaa4d8

24 files changed

+243
-223
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ The JOTA library is a simple Java wrapper around [[IOTA]](http://www.iotatoken.c
77

88
It allows to connect easily using java directly to a local or a remote [[IOTA node]](https://iota.readme.io/docs/syncing-to-the-network).
99

10-
* **Latest release:** 0.9.0 RC1
11-
* **Compatibility:** fully compatible with IOTA IRI v1.2.4
10+
* **Latest release:** 0.9.1
11+
* **Compatibility:** fully compatible with IOTA IRI v1.2.6
1212
* **API coverage:** 14 of 14 commands fully implemented
1313
* **License:** Apache License 2.0
1414
* **Readme updated:** 2016-01-19 21:05:02 (UTC)
@@ -54,7 +54,7 @@ In order to communicate with *IOTA node*, JOTA needs to be aware of your node's
5454
iota.node.host=127.0.0.1
5555
iota.node.port=14265
5656

57-
Jota is still *not* in the central maven repository. It will be available when it will cover 100% iota's rest interface.
57+
Jota is still *not* in the central maven repository.
5858

5959
##Warning
6060
- This is pre-release software!

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>org.iota</groupId>
66
<artifactId>jota</artifactId>
7-
<version>0.9.0-RC1</version>
7+
<version>0.9.1</version>
88
<name>JOTA</name>
99
<description>JOTA library is a simple Java wrapper around IOTA Node's JSON-REST HTTP interface.</description>
1010

src/main/java/jota/IotaAPI.java

+85-98
Large diffs are not rendered by default.

src/main/java/jota/IotaAPICommands.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* IOTA's node command list
5-
*
5+
* <p>
66
* 'params' is not currently used.
77
*/
88
public enum IotaAPICommands {
@@ -42,7 +42,6 @@ public String command() {
4242
}
4343

4444
/**
45-
*
4645
* @return
4746
*/
4847
public int params() {

src/main/java/jota/IotaAPICore.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
/**
2323
* This class provides access to the Iota core API
24+
*
2425
* @author Adrian
2526
*/
2627
public class IotaAPICore {
@@ -65,7 +66,6 @@ protected static <T> Response<T> wrapCheckedException(final Call<T> call) {
6566
}
6667

6768
/**
68-
*
6969
* @param env
7070
* @param def
7171
* @return
@@ -188,7 +188,7 @@ public InterruptAttachingToTangleResponse interruptAttachingToTangle() {
188188
}
189189

190190
public GetAttachToTangleResponse attachToTangle(String trunkTransaction, String branchTransaction, Integer minWeightMagnitude, String... trytes) throws InvalidTrytesException {
191-
if(!InputValidator.isArrayOfTrytes(trytes)){
191+
if (!InputValidator.isArrayOfTrytes(trytes)) {
192192
throw new InvalidTrytesException();
193193
}
194194

@@ -268,7 +268,6 @@ private void checkEnviromentVariables() {
268268
}
269269

270270
/**
271-
*
272271
* @param host
273272
* @return
274273
*/
@@ -278,7 +277,6 @@ public T host(String host) {
278277
}
279278

280279
/**
281-
*
282280
* @param port
283281
* @return
284282
*/
@@ -288,7 +286,6 @@ public T port(String port) {
288286
}
289287

290288
/**
291-
*
292289
* @param protocol
293290
* @return
294291
*/

src/main/java/jota/IotaAPIService.java

+14-14
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public interface IotaAPIService {
1919

2020
/**
2121
* Returns information about your node.
22-
*
22+
* <p>
2323
* curl http://localhost:14265 -X POST -H 'Content-Type: application/json'
2424
* -d '{"command": "getNodeInfo"}'
2525
*
@@ -31,7 +31,7 @@ public interface IotaAPIService {
3131

3232
/**
3333
* Get the list of latest tips (unconfirmed transactions).
34-
*
34+
* <p>
3535
* curl http://localhost:14265 -X POST -H 'Content-Type: application/json'
3636
* -d '{"command": "getNeighbors"}'
3737
*/
@@ -41,7 +41,7 @@ public interface IotaAPIService {
4141

4242
/**
4343
* Add a list of neighbors to your node.
44-
*
44+
* <p>
4545
* curl http://localhost:14265 -X POST -H 'Content-Type: application/json'
4646
* -d '{"command": "addNeighbors", "uris": ["udp://8.8.8.8:14265", "udp://8.8.8.5:14265"]}'
4747
*/
@@ -51,7 +51,7 @@ public interface IotaAPIService {
5151

5252
/**
5353
* Removes a list of neighbors to your node.
54-
*
54+
* <p>
5555
* curl http://localhost:14265 -X POST -H 'Content-Type: application/json'
5656
* -d '{"command": "removeNeighbors", "uris": ["udp://8.8.8.8:14265", "udp://8.8.8.5:14265"]}'
5757
*/
@@ -61,7 +61,7 @@ public interface IotaAPIService {
6161

6262
/**
6363
* Get the list of latest tips (unconfirmed transactions).
64-
*
64+
* <p>
6565
* curl http://localhost:14265 -X POST -H 'Content-Type: application/json'
6666
* -d '{"command": "getTips"}'
6767
*/
@@ -71,7 +71,7 @@ public interface IotaAPIService {
7171

7272
/**
7373
* Find the transactions which match the specified input and return
74-
*
74+
* <p>
7575
* curl http://localhost:14265 \ -X POST \ -H 'Content-Type: application/json' \
7676
* -d '{"command": "findTransactions", "addresses": ["RVORZ9SIIP9RCYMREUIXXVPQIPHVCNPQ9HZWYKFWYWZRE9JQKG9REPKIASHUUECPSQO9JT9XNMVKWYGVAZETAIRPTM"]}'
7777
*/
@@ -82,7 +82,7 @@ public interface IotaAPIService {
8282

8383
/**
8484
* Get the inclusion states of a set of transactions. This is for determining if a transaction was accepted and confirmed by the network or not. You can search for multiple tips (and thus, milestones) to get past inclusion states of transactions.
85-
*
85+
* <p>
8686
* curl http://localhost:14265 -X POST -H 'Content-Type: application/json'
8787
* -d '{"command": "getInclusionStates", "transactions"Q9HZWYKFWYWZRE9JQKG9REPKIASHUUECPSQO9JT9XNMVKWYGVAZETAIRPTM"], "tips" : []}'
8888
*/
@@ -92,7 +92,7 @@ public interface IotaAPIService {
9292

9393
/**
9494
* Returns the raw trytes data of a transaction.
95-
*
95+
* <p>
9696
* curl http://localhost:14265 -X POST -H 'Content-Type: application/json'
9797
* -d '{"command": "getTrytes", "hashes": ["OAATQS9VQLSXCLDJVJJVYUGONXAXOFMJOZNSYWRZSWECMXAQQURHQBJNLD9IOFEPGZEPEMPXCIVRX9999"]}'
9898
*/
@@ -102,7 +102,7 @@ public interface IotaAPIService {
102102

103103
/**
104104
* Tip selection which returns trunkTransaction and branchTransaction. The input value is the latest coordinator milestone, as provided through the getNodeInfo API call.
105-
*
105+
* <p>
106106
* curl http://localhost:14265 -X POST -H 'Content-Type: application/json'
107107
* -d '{"command": "getTransactionsToApprove", "depth": 27}'
108108
*/
@@ -112,7 +112,7 @@ public interface IotaAPIService {
112112

113113
/**
114114
* It returns the confirmed balance which a list of addresses have at the latest confirmed milestone.
115-
*
115+
* <p>
116116
* curl http://localhost:14265 -X POST -H 'Content-Type: application/json'
117117
* -d '{"command": "getBalances", "addresses": ["HBBYKAKTILIPVUKFOTSLHGENPTXYBNKXZFQFR9VQFWNBMTQNRVOUKPVPRNBSZVVILMAFBKOTBLGLWLOHQ"], "threshold": 100}'
118118
*/
@@ -122,7 +122,7 @@ public interface IotaAPIService {
122122

123123
/**
124124
* Attaches the specified transactions (trytes) to the Tangle by doing Proof of Work.
125-
*
125+
* <p>
126126
* curl http://localhost:14265 -X POST -H 'Content-Type: application/json'
127127
* -d '{"command": "attachToTangle", "trunkTransaction": "JVMTDGDPDFYHMZPMWEKKANBQSLSDTIIHAYQUMZOKHXXXGJHJDQPOMDOMNRDKYCZRUFZROZDADTHZC9999", "branchTransaction": "P9KFSJVGSPLXAEBJSHWFZLGP9GGJTIO9YITDEHATDTGAFLPLBZ9FOFWWTKMAZXZHFGQHUOXLXUALY9999", "minWeightMagnitude": 18, "trytes": ["TRYTVALUEHERE"]}'
128128
*/
@@ -132,7 +132,7 @@ public interface IotaAPIService {
132132

133133
/**
134134
* Interrupts and completely aborts the attachToTangle process.
135-
*
135+
* <p>
136136
* curl http://localhost:14265 -X POST -H 'Content-Type: application/json'
137137
* -d '{"command": "interruptAttachingToTangle" }
138138
*/
@@ -142,7 +142,7 @@ public interface IotaAPIService {
142142

143143
/**
144144
* Broadcast a list of transactions to all neighbors. The input trytes for this call are provided by attachToTangle.
145-
*
145+
* <p>
146146
* curl http://localhost:14265 -X POST -H 'Content-Type: application/json'
147147
* -d '{"command": "broadcastTransactions", "trytes": ["BYSWEAUTWXHXZ9YBZISEK9LUHWGMHXCGEVNZHRLUWQFCUSDXZHOFHWHL9MQPVJXXZLIXPXPXF9KYEREFSKCPKYIIKPZVLHUTDFQKKVVBBN9ATTLPCNPJDWDEVIYYLGPZGCWXOBDXMLJC9VO9QXTTBLAXTTBFUAROYEGQIVB9MJWJKXJMCUPTWAUGFZBTZCSJVRBGMYXTVBDDS9MYUJCPZ9YDWWQNIPUAIJXXSNLKUBSCOIJPCLEFPOXFJREXQCUVUMKSDOVQGGHRNILCO9GNCLWFM9APMNMWYASHXQAYBEXF9QRIHIBHYEJOYHRQJAOKAQ9AJJFQ9WEIWIJOTZATIBOXQLBMIJU9PCGBLVDDVFP9CFFSXTDUXMEGOOFXWRTLFGV9XXMYWEMGQEEEDBTIJ9OJOXFAPFQXCDAXOUDMLVYRMRLUDBETOLRJQAEDDLNVIRQJUBZBO9CCFDHIX9MSQCWYAXJVWHCUPTRSXJDESISQPRKZAFKFRULCGVRSBLVFOPEYLEE99JD9SEBALQINPDAZHFAB9RNBH9AZWIJOTLBZVIEJIAYGMC9AZGNFWGRSWAXTYSXVROVNKCOQQIWGPNQZKHUNODGYADPYLZZZUQRTJRTODOUKAOITNOMWNGHJBBA99QUMBHRENGBHTH9KHUAOXBVIVDVYYZMSEYSJWIOGGXZVRGN999EEGQMCOYVJQRIRROMPCQBLDYIGQO9AMORPYFSSUGACOJXGAQSPDY9YWRRPESNXXBDQ9OZOXVIOMLGTSWAMKMTDRSPGJKGBXQIVNRJRFRYEZ9VJDLHIKPSKMYC9YEGHFDS9SGVDHRIXBEMLFIINOHVPXIFAZCJKBHVMQZEVWCOSNWQRDYWVAIBLSCBGESJUIBWZECPUCAYAWMTQKRMCHONIPKJYYTEGZCJYCT9ABRWTJLRQXKMWY9GWZMHYZNWPXULNZAPVQLPMYQZCYNEPOCGOHB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VCPWYVYVARKR9RKGOUHHNKNVGGPDDLGKPQNOYHNKAVVKCXWXOQPZNSLATUJT9AUWRMPPSWHSTTYDFAQDXOCYTZHOYYGAIM9CELMZ9AZPWB9MJXGHOKDNNSZVUDAGXTJJSSZCPZVPZBYNNTUQABSXQWZCHDQSLGK9UOHCFKBIBNETK999999999999999999999999999999999999999999999999999999999999999999999999999999999NOXDXXKUDWLOFJLIPQIBRBMGDYCPGDNLQOLQS99EQYKBIU9VHCJVIPFUYCQDNY9APGEVYLCENJIOBLWNB999999999XKBRHUD99C99999999NKZKEKWLDKMJCI9N9XQOLWEPAYWSH9999999999999999999999999KDDTGZLIPBNZKMLTOLOXQVNGLASESDQVPTXALEKRMIOHQLUHD9ELQDBQETS9QFGTYOYWLNTSKKMVJAUXSIROUICDOXKSYZTDPEDKOQENTJOWJONDEWROCEJIEWFWLUAACVSJFTMCHHXJBJRKAAPUDXXVXFWP9X9999IROUICDOXKSYZTDPEDKOQENTJOWJONDEWROCEJIEWFWLUAACVSJFTMCHHXJBJRKAAPUDXXVXFWP9X9999"]}
148148
*/
@@ -152,7 +152,7 @@ public interface IotaAPIService {
152152

153153
/**
154154
* Store transactions into the local storage. The trytes to be used for this call are returned by attachToTangle.
155-
*
155+
* <p>
156156
* curl http://localhost:14265 -X POST -H 'Content-Type: application/json'
157157
* -d '{"command": "storeTransactions", "trytes": ["BYSWEAUTWXHXZ9YBZISEK9LUHWGMHXCGEVNZHRLUWQFCUSDXZHOFHWHL9MQPVJXXZLIXPXPXF9KYEREFSKCPKYIIKPZVLHUTDFQKKVVBBN9ATTLPCNPJDWDEVIYYLGPZGCWXOBDXMLJC9VO9QXTTBLAXTTBFUAROYEGQIVB9MJWJKXJMCUPTWAUGFZBTZCSJVRBGMYXTVBDDS9MYUJCPZ9YDWWQNIPUAIJXXSNLKUBSCOIJPCLEFPOXFJREXQCUVUMKSDOVQGGHRNILCO9GNCLWFM9APMNMWYASHXQAYBEXF9QRIHIBHYEJOYHRQJAOKAQ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TSKKMVJAUXSIROUICDOXKSYZTDPEDKOQENTJOWJONDEWROCEJIEWFWLUAACVSJFTMCHHXJBJRKAAPUDXXVXFWP9X9999IROUICDOXKSYZTDPEDKOQENTJOWJONDEWROCEJIEWFWLUAACVSJFTMCHHXJBJRKAAPUDXXVXFWP9X9999"]}'
158158
*/

src/main/java/jota/dto/response/GetBalancesResponse.java

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public String getMilestone() {
2929

3030
/**
3131
* Gets the balances.
32+
*
3233
* @return The balances.
3334
*/
3435
public String[] getBalances() {

src/main/java/jota/error/InvalidTrytesException.java

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
/**
44
* This exception occurs when invalid trytes is provided.
5+
*
56
* @author Adrian
67
*/
78
public class InvalidTrytesException extends BaseException {

src/main/java/jota/error/NoNodeInfoException.java

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
/**
44
* This exception occurs when its not possible to get node info.
5+
*
56
* @author Adrian
67
*/
78
public class NoNodeInfoException extends BaseException {

src/main/java/jota/model/Bundle.java

+5-6
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ public void setLength(int length) {
6767
* Adds a bundle entry.
6868
*
6969
* @param signatureMessageLength Length of the signature message.
70-
* @param address The address.
71-
* @param value The value.
72-
* @param tag The tag.
73-
* @param timestamp The timestamp.
70+
* @param address The address.
71+
* @param value The value.
72+
* @param tag The tag.
73+
* @param timestamp The timestamp.
7474
*/
7575
public void addEntry(int signatureMessageLength, String address, long value, String tag, long timestamp) {
7676
if (getTransactions() == null) {
@@ -79,7 +79,7 @@ public void addEntry(int signatureMessageLength, String address, long value, Str
7979

8080
for (int i = 0; i < signatureMessageLength; i++) {
8181
Transaction trx = new Transaction(address, i == 0 ? value : 0, tag, timestamp);
82-
getTransactions().add(trx);
82+
transactions.add(trx);
8383
}
8484
}
8585

@@ -197,7 +197,6 @@ public int[] normalizedBundle(String bundleHash) {
197197
*
198198
* @param o An object to compare with this object.
199199
* @return A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the <paramref name="other" /> parameter.Zero This object is equal to <paramref name="other" />. Greater than zero This object is greater than <paramref name="other" />.
200-
201200
*/
202201
@Override
203202
public int compareTo(Bundle o) {

src/main/java/jota/model/Inputs.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/**
88
* This class represents an Inputs.
99
*
10-
* @author Adrian
10+
* @author Adrian
1111
**/
1212
public class Inputs {
1313

src/main/java/jota/model/Signature.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public List<String> getSignatureFragments() {
5050
/**
5151
* Set the signatureFragments.
5252
*
53-
* @param signatureFragments The signatureFragments.
53+
* @param signatureFragments The signatureFragments.
5454
*/
5555
public void setSignatureFragments(List<String> signatureFragments) {
5656
this.signatureFragments = signatureFragments;

src/main/java/jota/model/Transaction.java

+1
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ public long getCurrentIndex() {
222222

223223
/**
224224
* Set the current index.
225+
*
225226
* @param currentIndex The current index.
226227
*/
227228
public void setCurrentIndex(long currentIndex) {

src/main/java/jota/pow/ICurl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public interface ICurl {
2828
/**
2929
* Squeezes the specified trits.
3030
*
31-
* @param trits The trits.
31+
* @param trits The trits.
3232
* @param offset The offset to start from.
3333
* @param length The length.
3434
* @return The squeezed trits.

src/main/java/jota/pow/JCurl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* (c) 2016 Come-from-Beyond
5-
*
5+
* <p>
66
* JCurl belongs to the sponge function family.
77
*/
88
public class JCurl implements ICurl {

src/main/java/jota/utils/Checksum.java

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ public static String addChecksum(String address) throws InvalidAddressException
3434
public static String removeChecksum(String address) throws InvalidAddressException {
3535
if (isAddressWithChecksum(address)) {
3636
return removeChecksumFromAddress(address);
37+
} else if (isAddressWithoutChecksum(address)) {
38+
return address;
3739
}
3840
throw new InvalidAddressException();
3941
}

src/main/java/jota/utils/Converter.java

+8-7
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ public class Converter {
4949
/**
5050
* Converts the specified trits array to bytes.
5151
*
52-
* @param trits The trits.
52+
* @param trits The trits.
5353
* @param offset The offset to start from.
54-
* @param size The size.
54+
* @param size The size.
5555
* @return The bytes.
5656
*/
5757
public static byte[] bytes(final int[] trits, final int offset, final int size) {
@@ -122,6 +122,7 @@ public static int[] trits(final String trytes, int length) {
122122

123123
/**
124124
* Converts the specified trinary encoded string into a trits array of the specified length.
125+
*
125126
* @param trytes The trytes.
126127
* @param length The length.
127128
* @return A trits array.
@@ -200,7 +201,7 @@ public static int[] trits(final String trytes) {
200201
/**
201202
* Copies the trits from the input string into the destination array
202203
*
203-
* @param input The input String.
204+
* @param input The input String.
204205
* @param destination The destination array.
205206
* @return The destination.
206207
*/
@@ -217,9 +218,9 @@ public static int[] copyTrits(final String input, final int[] destination) {
217218
/**
218219
* Converts trites to trytes.
219220
*
220-
* @param trits Teh trits to be converted.
221+
* @param trits Teh trits to be converted.
221222
* @param offset The offset to start from.
222-
* @param size The size.
223+
* @param size The size.
223224
* @return The trytes.
224225
**/
225226
public static String trytes(final int[] trits, final int offset, final int size) {
@@ -244,7 +245,7 @@ public static String trytes(final int[] trits) {
244245
/**
245246
* Converts the specified trits array to trytes in integer representation.
246247
*
247-
* @param trits The trits.
248+
* @param trits The trits.
248249
* @param offset The offset to start from.
249250
* @return The value.
250251
*/
@@ -286,7 +287,7 @@ public static long longValue(final int[] trits) {
286287
* Increments the specified trits.
287288
*
288289
* @param trits The trits.
289-
* @param size The size.
290+
* @param size The size.
290291
*/
291292
public static void increment(final int[] trits, final int size) {
292293

0 commit comments

Comments
 (0)