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

Commit d23f10c

Browse files
author
Brord van Wierst
committed
Merge branch 'release-v1.0.0-beta8'
2 parents 777c670 + d164e09 commit d23f10c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+414
-187
lines changed

README.md

+68-3
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,23 @@ To download the IOTA Java client library and its dependencies, you can use one o
6969
7070
```gradle
7171
dependencies {
72-
compile 'com.github.iotaledger:iota-java:1.0.0-beta7'
72+
compile 'com.github.iotaledger:iota-java:1.0.0-beta8'
7373
}
7474
```
7575
7676
### Downloading the library with Maven
77+
#### Through Maven central
78+
1. Add the following repository to your root `pom.xml` file:
79+
```xml
80+
<dependency>
81+
<groupId>org.iota</groupId>
82+
<artifactId>jota</artifactId>
83+
<classifier>jar-with-dependencies</classifier>
84+
<version>1.0.0-beta8</version>
85+
</dependency>
86+
```
7787
88+
#### Through Jitpack
7889
1. Add the following repository to your root `pom.xml` file:
7990
```xml
8091
<repositories>
@@ -96,7 +107,7 @@ To download the IOTA Java client library and its dependencies, you can use one o
96107
```
97108
98109
3. Change the value of the `<version>` tag to either a release number or the first 10 characters of a Git commit hash:
99-
`<version>efdc784d8a9ef</version>` or `<version>1.0.0-beta7</version>`
110+
`<version>efdc784d8a9ef</version>` or `<version>1.0.0-beta8</version>`
100111
101112
**Note:** Find the latest version on the [Jitpack](https://jitpack.io/#iotaledger/iota-java) page.
102113
@@ -108,7 +119,8 @@ To download the IOTA Java client library and its dependencies, you can use one o
108119
* jota
109120
* jota-parent
110121
111-
2. Reference the jota directory in your project
122+
2. Import and reference the jota directory in your project
123+
For example in Eclipse: `right mouse on your project -> Properties -> Java Build Path -> Projects -> Add 'jota'`
112124
113125
3. In the jota directory, run the following command:
114126
@@ -181,7 +193,60 @@ Here are some of the most commonly used API functions:
181193
We have a list of test cases on the [`src/test/java` directory][tests] that you can use as a reference when developing apps with IOTA.
182194
A good starter is the [`IotaAPITest` case](https://github.com/iotaledger/iota-java/blob/master/jota/src/test/java/org/iota/jota/IotaAPITest.java).
183195

196+
### Creating and broadcasting transactions
197+
This example shows you how to create and send a transaction to an IRI node by calling the `prepareTransfers()` method and piping the prepared bundle to the `sendTrytes()` method.
198+
199+
```java
200+
String fromAddr = "G9OPCBSQZO9GUNOYLLJYY ... JCF9TCDSZAU9VSOCZPC";
201+
String toAddr = "TKGLOMEGTJWXIKDTF9CAV ... 9Q9RHCNDXTLGJYJPYM9";
202+
203+
// difficulty of the proof of work required to attach a transaction on the tangle
204+
int mwm = 14;
205+
206+
// how many milestones back to start the random walk from
207+
int depth = 3;
208+
209+
// create a transfer to the given recipient address
210+
// optionally define a message and tag
211+
List<Transfer> transfers = new LinkedList<>();
212+
transfers.add(new Transfer(toAddr, 80, "MESSAGE", "TAG"));
213+
214+
// create inputs for the transfer, this address contains 100 iota
215+
List<Input> inputs = new LinkedList<>();
216+
inputs.add(new Input(fromAddr, 100, 0, Constants.MAX_SECURITY_LEVEL));
217+
218+
// create an address for the remainder.
219+
// in this case we will have 20 iotas as the remainder, since we spend 1000 from our input
220+
// address and only send 80 to the recipient.
221+
String remainder = api.generateNewAddresses(
222+
new AddressRequest.Builder(seed, Constants.MAX_SECURITY_LEVEL).amount(1).checksum(true).build()
223+
).first();
224+
225+
// Prepare the transfer by creating a bundle with the given transfers and inputs.
226+
// The result are trytes ready for PoW.
227+
List<String> trytes = api.prepareTransfers(seed, 3, transfers, remainder , inputs, null, false);
228+
229+
// You can decrease your chance of sending to a spent address by checking the address before
230+
// broadcasting your bundle.
231+
WereAddressesSpentFromResponse spent = api.wereAddressesSpentFrom(transfers.get(0).getAddress());
232+
if (spent.getStates()[0]) {
233+
System.out.println("Recipient address is spent from, aborting transfer");
234+
return;
235+
}
236+
237+
// at this point the bundle trytes are signed.
238+
// now we need to:
239+
// 1. select two tips
240+
// 2. do proof-of-work
241+
// 3. broadcast the bundle
242+
// 4. store the bundle
243+
// sendTrytes() conveniently does the steps above for us.
244+
List<Transaction> bundle = api.sendTrytes(trytes.toArray(new String[0]), depth, mwm, null);
245+
System.out.println("broadcasted bundle with tail tx hash: " + bundle.get(0));
246+
```
247+
184248
## Change logs:
249+
- Changes in [**1.0.0-beta8**](https://github.com/iotaledger/iota-java/compare/1.0.0-beta7...1.0.0-beta8)
185250
- Changes in [**1.0.0-beta7**](https://github.com/iotaledger/iota-java/compare/1.0.0-beta6...1.0.0-beta7)
186251
- Changes in [**1.0.0-beta6**](https://github.com/iotaledger/iota-java/compare/1.0.0-beta5...1.0.0-beta6)
187252
- Changes in [**1.0.0-beta5**](https://github.com/iotaledger/iota-java/compare/1.0.0-beta4...1.0.0-beta5)

docs/iota-java/addRemainder.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# [addRemainder](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L1529)
2+
# [addRemainder](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L1527)
33
List<String> addRemainder(String seed , int security , List<[Input](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Input.java)> inputs , [Bundle](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Bundle.java) bundle , String tag , long totalValue , String remainderAddress , List<String> signatureFragments)
44

55
Uses input, and adds to the bundle, untill `totalValue` is reached. If there is a remainder left on the last input, a remainder transfer is added.
@@ -41,7 +41,7 @@ Uses input, and adds to the bundle, untill `totalValue` is reached. If there is
4141
IotaAPI iotaAPI = new IotaAPI.Builder().build();
4242

4343
try {
44-
List<String> response = iotaAPI.addRemainder("YOUR9SECRET9SEED9999999...", 3, new List<Input>(new Input[]{inputs, inputs}), bundle, "TAG9TIGHDELJXFHN9KLKZHVGBST", 284, "LTWUDWCICFHSWYOXMBWXEYQGBJNAKHCXIQGSTOQOTJR9DBOOVYGZ9NLHAK9FGCSXWKTBPBBMOVZMJBHKJ", new List<String>(new String[]{"PSDFHESDBFMKIEGSKIYHTIQEC ... BDVYKAQWWAGBZBPSFVKWBY9YB", "PSXXTETHXPZPIUQNMCORDIOOG ... QCFIIPMYGROYCQAMKSNIUDJPG"}));
44+
List<String> response = iotaAPI.addRemainder("YOUR9SECRET9SEED9999999...", 3, new List<Input>(new Input[]{inputs, inputs}), bundle, "TAG9QXJKVCMJTZKDLKBDJOFUNBG", 694, "YSSJTOKAUD9OVFEGQUPN9GRHEZAOUFGYUMJAVWTK9RVSTXGJMH9JPSLIWDPVXFXMIVIFCFF9DENNVILDV", new List<String>(new String[]{"IANOICEWWXZAPDVKYHHVFHBCP ... ZGCSQDTXDPRTRPHHTZOFCRPYA", "LYSKNTDRWDLVCFXDHVKSDDVPY ... SWCBVCPPELYHKWUGEFWMZUFER"}));
4545
} catch (ArgumentException e) {
4646
// Handle error
4747
e.printStackTrace();

docs/iota-java/bundlesFromAddresses.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Internal function to get the formatted bundles of a list of addresses.
2929
IotaAPI iotaAPI = new IotaAPI.Builder().build();
3030

3131
try {
32-
Bundle[] response = iotaAPI.bundlesFromAddresses(false, new String[]{"UTSPUMBBRHRCVMPKAWDRXIFUYHOYLJGTZ9DTRIQJFD9UFDYCNLFQBV9LTOMGASNPWVFMCAMKVKOCVNZKG", "WAZEFGAKXRACVFNEP9JXYPASTZVBYXF9UNHKUHRUDWDBETAJYD9OFWBOJON9FDQRRBTVXZMCMMTLZLRWH"});
32+
Bundle[] response = iotaAPI.bundlesFromAddresses(false, new String[]{"RMQYYPYZKJQOWHDJPXDFUB9NYFWDUNNUBHIQRYUZBYGHKMDDWFLURDCIUVYHGVNQJMFQSPCUNETZFPIPZ", "WALYAJHFLXYTGDTSRTEJZCDKIMAKJZSKEFVBVPUYYFSQDWUXP9TFGXOYSFVQTRZBDTRKYBYMKBJIDWNLZ"});
3333
} catch (ArgumentException e) {
3434
// Handle error
3535
e.printStackTrace();

docs/iota-java/checkWereAddressSpentFrom.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# [checkWereAddressSpentFrom](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L948)
2+
# [checkWereAddressSpentFrom](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L950)
33
boolean[] checkWereAddressSpentFrom(String[] addresses)
44

55
Check if a list of addresses was ever spent from, in the current epoch, or in previous epochs. Addresses must have a checksum.
@@ -27,7 +27,7 @@ Check if a list of addresses was ever spent from, in the current epoch, or in pr
2727
IotaAPI iotaAPI = new IotaAPI.Builder().build();
2828

2929
try {
30-
boolean[] response = iotaAPI.checkWereAddressSpentFrom(new String[]{"LFR9BZETOYCK99HAUF9QCKHNFKWRSGMUSWCBES99LBQNLA9FPZHZWOXALDUYBUUYSSCVECENJXIKVKFOT", "RUIZBLTGKNUQN9K9MFTODKMM9VXLKWAHVYATRFIC9COFBMXO9POVTRVBSZAEICJSFFAHWZLPMU9AEWKIE"});
30+
boolean[] response = iotaAPI.checkWereAddressSpentFrom(new String[]{"SEGOBHYIZQQSGZNAZKJGATEUEGVNFOQFOOWIEVKNWPEJ9VVMZBWJVYTDQMYZLOVGYYPFUVMXJABVAOMOI", "YCQ9OYOHBKCNTF9ELDWMXIZIMOZSWTCWRKKRHIL9SFKPFZIBTYOSGUQJZQJYSAEIFNVEKLBRAOSORCWUU"});
3131
} catch (ArgumentException e) {
3232
// Handle error
3333
e.printStackTrace();

docs/iota-java/findTransactionObjectsByAddresses.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# [findTransactionObjectsByAddresses](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L396)
2+
# [findTransactionObjectsByAddresses](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L398)
33
List<[Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Transaction.java)> findTransactionObjectsByAddresses(String[] addresses)
44

55
Wrapper function: Finds transactions, gets trytes and turns it into [Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Transaction.java) objects.
@@ -12,7 +12,6 @@ Wrapper function: Finds transactions, gets trytes and turns it into [Transaction
1212

1313
## Output
1414
List<[Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Transaction.java)>, which contains the following fields:
15-
1615
| Return type | Description |
1716
|--|--|
1817
| long attachmentTimestampLowerBound | |
@@ -42,16 +41,16 @@ List<[Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/
4241
## Related APIs (link to other product documentation)
4342
| API | Description |
4443
|:---------------|:--------|
45-
| [findTransactionsByAddresses(String...)](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L308) | Find the transactions by addresses with checksum |
46-
| [findTransactionsObjectsByHashes](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L370) | Wrapper function: get trytes and turns into [Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Transaction.java) objects. Gets the trytes and transaction object from a list of transaction hashes. |
44+
| [findTransactionsByAddresses(String...)](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L319) | Find the transactions by addresses with checksum |
45+
| [findTransactionsObjectsByHashes](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L372) | Wrapper function: get trytes and turns into [Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Transaction.java) objects. Gets the trytes and transaction object from a list of transaction hashes. |
4746

4847
## Example
4948

5049
```Java
5150
IotaAPI iotaAPI = new IotaAPI.Builder().build();
5251

5352
try {
54-
List<Transaction> response = iotaAPI.findTransactionObjectsByAddresses(new String[]{"GHIALCNSUKFIOHCNZOWRAVNRJTMEHWTRBNMMCLCZAXPDWXTUXPWCUOIRKWKX9YXYNS9JGPNCIURDYBNDY", "BYANZHOP9YKVFFWJZGBDTGFBNRTUQGEFXWMJNTOACZ9IRETPQX9EKMFNTVJFYRCKWCKFQAQXXD9JVSQBX"});
53+
List<Transaction> response = iotaAPI.findTransactionObjectsByAddresses(new String[]{"AJCSWDXXBPNZ9ZPDNPR99QQYLTBEDZYBOBHFHCYBJWJWUXQZTWMARLQOBIRUXKMFODVDVCXVZRICOK9OK", "EMA9ZMWSUTEVURWHCOSNTAASRPOKIVTNPSPAHXGILBMTHBYCILIJYNCWRPWFOYMVQRWPCGRYJUVAFSRFT"});
5554
} catch (ArgumentException e) {
5655
// Handle error
5756
e.printStackTrace();

docs/iota-java/findTransactionObjectsByApprovees.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# [findTransactionObjectsByApprovees](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L435)
2+
# [findTransactionObjectsByApprovees](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L437)
33
List<[Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Transaction.java)> findTransactionObjectsByApprovees(String[] approvees)
44

55
Wrapper function: Finds transactions, gets trytes and turns it into [Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Transaction.java) objects.
@@ -12,7 +12,6 @@ Wrapper function: Finds transactions, gets trytes and turns it into [Transaction
1212

1313
## Output
1414
List<[Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Transaction.java)>, which contains the following fields:
15-
1615
| Return type | Description |
1716
|--|--|
1817
| long attachmentTimestampLowerBound | |
@@ -42,15 +41,15 @@ List<[Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/
4241
## Related APIs (link to other product documentation)
4342
| API | Description |
4443
|:---------------|:--------|
45-
| [findTransactionsByApprovees](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L334) | Find the transactions by approvees |
44+
| [findTransactionsByApprovees](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L345) | Find the transactions by approvees |
4645

4746
## Example
4847

4948
```Java
5049
IotaAPI iotaAPI = new IotaAPI.Builder().build();
5150

5251
try {
53-
List<Transaction> response = iotaAPI.findTransactionObjectsByApprovees(new String[]{"WSOLQGWRUZEPMZUKRDVDADHVESYRLOWOEHCWONIIT9HSPBZLEGQNYIHVKLMIEZYTPADXJYBOVNNYCPCYJ", "MFZMSUNPKPLDMTWQSPIMULPIZGBENUCSHYORAVNQPTKGKIXLTPUVPJHNJQLRNZHNZXOFGUUMIHDZPWNWP"});
52+
List<Transaction> response = iotaAPI.findTransactionObjectsByApprovees(new String[]{"TMIPRULGWLBQOUSQCFCMMOXUZNWBDSSXIJAXUVFFYWDJIGIRLQHUXJJAORAYPBAUYNCEHMDLIJRLYFNPJ", "LUWGMJBHQZYWGUGAYYUYCQ9KYFMA9MDFW9OWIHAYMZNRYPJETBVXQAQQAJXDVLCQHG9BSTTVWHPJHKKKW"});
5453
} catch (ArgumentException e) {
5554
// Handle error
5655
e.printStackTrace();

docs/iota-java/findTransactionObjectsByTag.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# [findTransactionObjectsByTag](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L416)
2+
# [findTransactionObjectsByTag](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L418)
33
List<[Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Transaction.java)> findTransactionObjectsByTag(String[] tags)
44

55
Wrapper function: Finds transactions, gets trytes and turns it into [Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Transaction.java) objects.
@@ -12,7 +12,6 @@ Wrapper function: Finds transactions, gets trytes and turns it into [Transaction
1212

1313
## Output
1414
List<[Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Transaction.java)>, which contains the following fields:
15-
1615
| Return type | Description |
1716
|--|--|
1817
| long attachmentTimestampLowerBound | |
@@ -42,16 +41,16 @@ List<[Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/
4241
## Related APIs (link to other product documentation)
4342
| API | Description |
4443
|:---------------|:--------|
45-
| [findTransactionsByTags(String...)](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L361) | Find the transactions by tags |
46-
| [findTransactionsObjectsByHashes](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L370) | Wrapper function: get trytes and turns into [Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Transaction.java) objects. Gets the trytes and transaction object from a list of transaction hashes. |
44+
| [findTransactionsByTags(String...)](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L372) | Find the transactions by tags |
45+
| [findTransactionsObjectsByHashes](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L372) | Wrapper function: get trytes and turns into [Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Transaction.java) objects. Gets the trytes and transaction object from a list of transaction hashes. |
4746

4847
## Example
4948

5049
```Java
5150
IotaAPI iotaAPI = new IotaAPI.Builder().build();
5251

5352
try {
54-
List<Transaction> response = iotaAPI.findTransactionObjectsByTag(new String[]{"TAG9RODSMKAQRHOSDABVIGIMVYM", "TAG9XVOVWUZPEYGUUJFHEJRTDXL"});
53+
List<Transaction> response = iotaAPI.findTransactionObjectsByTag(new String[]{"TAG9RQWWNKCLKYYTNHKEZSFPDNJ", "TAG9LIZMXWNNLW9NXEEWAXDWYJE"});
5554
} catch (ArgumentException e) {
5655
// Handle error
5756
e.printStackTrace();

docs/iota-java/findTransactionsObjectsByHashes.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# [findTransactionsObjectsByHashes](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L370)
2+
# [findTransactionsObjectsByHashes](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L372)
33
List<[Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Transaction.java)> findTransactionsObjectsByHashes(String[] hashes)
44

55
Wrapper function: get trytes and turns into [Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Transaction.java) objects. Gets the trytes and transaction object from a list of transaction hashes.
@@ -12,7 +12,6 @@ Wrapper function: get trytes and turns into [Transaction](https://github.com/iot
1212

1313
## Output
1414
List<[Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Transaction.java)>, which contains the following fields:
15-
1615
| Return type | Description |
1716
|--|--|
1817
| long attachmentTimestampLowerBound | |
@@ -42,15 +41,15 @@ List<[Transaction](https://github.com/iotaledger/iota-java/blob/master/jota/src/
4241
## Related APIs (link to other product documentation)
4342
| API | Description |
4443
|:---------------|:--------|
45-
| [getTrytes(String...)](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L408) | Returns the raw transaction data (trytes) of a specific transaction. These trytes can then be easily converted into the actual transaction object. You can use [Transaction(String)](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Transaction.java#L145) for conversion to an object. |
44+
| [getTrytes(String...)](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L419) | Returns the raw transaction data (trytes) of a specific transaction. These trytes can then be easily converted into the actual transaction object. You can use [Transaction(String)](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Transaction.java#L145) for conversion to an object. |
4645

4746
## Example
4847

4948
```Java
5049
IotaAPI iotaAPI = new IotaAPI.Builder().build();
5150

5251
try {
53-
List<Transaction> response = iotaAPI.findTransactionsObjectsByHashes(new String[]{"JQXBUOXGAFOTMXJZXHFYSC9RBYJTWTFDNFTXID9Z9XRJOTHZOFKPZJLCWPBASCCAWGOFNUVKFWLNUPNHZ", "YZVXFBPDEUAUIXEQI99YXWUYCLNEN9ZJZUNVWRKFNRQATZPGTXVISRMOYYTYQLKJYQWKAJHDSDEWIMCWI"});
52+
List<Transaction> response = iotaAPI.findTransactionsObjectsByHashes(new String[]{"CFFLBAXADNSMSIN9OUBLYAIANNKRFFOOWKAIUJHFOSCNLKWJROMLCDVDMCLWJEUDKZIAFQA9JPATXWNKN", "WLVSUYHXSJCQPFJEXRMENFNWJHC9RHGEPDBWTROFELSCAUPMDXVPMKHNHVMSHPKBLEVWNHRDKMPMHRV9E"});
5453
} catch (ArgumentException e) {
5554
// Handle error
5655
e.printStackTrace();

docs/iota-java/generateNewAddresses.md

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Generates new addresses, meaning addresses which were not spend from, according
1212

1313
## Output
1414
[GetNewAddressResponse](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/dto/response/GetNewAddressResponse.java), which contains the following fields:
15-
1615
| Return type | Description |
1716
|--|--|
1817
| Long duration | Gets the duration. |

0 commit comments

Comments
 (0)