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

Commit c1a5d15

Browse files
author
Brord van Wierst
authored
Merge pull request #226 from kwek20/release-v1.0.0-beta9
Beta9
2 parents b703ef3 + 236d308 commit c1a5d15

Some content is hidden

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

61 files changed

+280
-165
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ To install the IOTA Java client library and its dependencies, you can use one of
9393
<groupId>org.iota</groupId>
9494
<artifactId>jota</artifactId>
9595
<classifier>jar-with-dependencies</classifier>
96-
<version>1.0.0-beta8</version>
96+
<version>1.0.0-beta9</version>
9797
</dependency>
9898
```
9999
@@ -120,7 +120,7 @@ To install the IOTA Java client library and its dependencies, you can use one of
120120
```
121121
122122
3. Change the value of the `<version>` tag to either a release number or the first 10 characters of a Git commit hash:
123-
`<version>efdc784d8a9ef</version>` or `<version>1.0.0-beta8</version>`
123+
`<version>b703ef3c05f05</version>` or `<version>1.0.0-beta9</version>`
124124
125125
**Note:** Find the latest version on the [Jitpack](https://jitpack.io/#iotaledger/iota-java) page.
126126
@@ -262,6 +262,7 @@ class SendData {
262262

263263
## Change logs
264264

265+
- Changes in [**1.0.0-beta9**](https://github.com/iotaledger/iota-java/compare/1.0.0-beta8...1.0.0-beta9)
265266
- Changes in [**1.0.0-beta8**](https://github.com/iotaledger/iota-java/compare/1.0.0-beta7...1.0.0-beta8)
266267
- Changes in [**1.0.0-beta7**](https://github.com/iotaledger/iota-java/compare/1.0.0-beta6...1.0.0-beta7)
267268
- Changes in [**1.0.0-beta6**](https://github.com/iotaledger/iota-java/compare/1.0.0-beta5...1.0.0-beta6)

docs/iota-java/addNeighbors.md

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

2-
# [addNeighbors](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L195)
2+
# [addNeighbors](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L192)
33
[AddNeighborsResponse](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/dto/response/AddNeighborsResponse.java) addNeighbors(String[] uris)
44

5-
Temporarily add a list of neighbors to your node. The added neighbors will not be available after restart. Add the neighbors to your config file or supply them in the `-n` command line option if you want to add them permanently. The URI (Unique Resource Identification) for adding neighbors is: **tcp://IPADDRESS:PORT**
5+
Temporarily add a list of neighbors to your node. The added neighbors will not be available after restart. Add the neighbors to your config file or supply them in the `-n` command line option if you want to add them permanently. The URI (Unique Resource Identification) for adding neighbors is: **tcp://IPADDRESS:PORT**
66
> **Important note:** This API is currently in Beta and is subject to change. Use of these APIs in production applications is not supported.
77
88
## Input

docs/iota-java/addRemainder.md

+4-4
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#L1528)
2+
# [addRemainder](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L1545)
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.
@@ -14,7 +14,7 @@ Uses input, and adds to the bundle, untill `totalValue` is reached. If there is
1414
| bundle | [Bundle](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Bundle.java) | Required | The [Bundle](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Bundle.java) to be populated. |
1515
| tag | String | Required | The tag to add to each bundle entry (input and remainder) |
1616
| totalValue | long | Required | The total value of the desired transaction |
17-
| remainderAddress | String | Required | The address used for sending the remainder value (of the last input). If this is `null`, [generateNewAddresses(AddressRequest)](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L86) is used. |
17+
| remainderAddress | String | Required | The address used for sending the remainder value (of the last input). If this is `null`, [generateNewAddresses(AddressRequest)](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L59) is used. |
1818
| signatureFragments | List<String> | Required | The signature fragments (message), used for signing.Should be 2187 characters long, can be padded with 9s. |
1919

2020
## Output
@@ -33,15 +33,15 @@ Uses input, and adds to the bundle, untill `totalValue` is reached. If there is
3333
| API | Description |
3434
|:---------------|:--------|
3535
| [signInputsAndReturn(String, List, Bundle, List, org.iota.jota.pow.ICurl)](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/utils/IotaAPIUtils.java#L79) | Finalizes and signs the bundle transactions. Bundle and inputs are assumed correct. |
36-
| [generateNewAddresses(AddressRequest)](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L86) | Generates new addresses, meaning addresses which were not spend from, according to the connected node. Stops when [getAmount()](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/builder/AddressRequest.java#L104) of unspent addresses are found, starting from [getIndex()](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/builder/AddressRequest.java#L96) If [getAmount()](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/builder/AddressRequest.java#L104) is set to 0, we will generate until the first unspent address is found, and stop. |
36+
| [generateNewAddresses(AddressRequest)](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L59) | Generates new addresses, meaning addresses which were not spend from, according to the connected node. Stops when [getAmount()](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/builder/AddressRequest.java#L104) of unspent addresses are found, starting from [getIndex()](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/builder/AddressRequest.java#L96) If [getAmount()](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/builder/AddressRequest.java#L104) is set to 0, we will generate until the first unspent address is found, and stop. |
3737

3838
## Example
3939

4040
```Java
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, "TAG9ABDOZDTYHY9ALNTRW9WCINN", 515, "M9LNVCAWCXEYRAZQKONSQSWTCVZCMKEDDBUBEBRKLCETDNNNSYF9L9QEVSATNONEBRBQBN9EOUPOGGUTP", new List<String>(new String[]{"KULNMSVMUAJJISRYBTEMGETHR ... LXLRMKDLRTFHPKYINRXIUUVMU", "EKOFHDI9IRIAC9OHQWVSTXMRG ... SCFMG9SFYDDFMISXTRDBIODLX"}));
44+
List<String> response = iotaAPI.addRemainder("YOUR9SECRET9SEED9999999...", 3, new List<Input>(new Input[]{inputs, inputs}), bundle, "TAG9ESM9JKKMYWIQLXTSKNG9ICY", 912, "UOCNUEYDUZKITYUO9XNLIVJ9ZUHYDUFRPLNNTAMYVACZBRGDQQ9NFRTOYMLPRNCSTIMWRXRFQRTLMNAFF", new List<String>(new String[]{"KDYPIHXJPIIP9INGNCNLSRLYN ... IEMLKFQKANHJKCH9IEUWFAVIF", "UYTWBLJZPBRVCYMQYOLDSZVUB ... EJYWAEODCBCVXCDZY9WATFWZQ"}));
4545
} catch (ArgumentException e) {
4646
// Handle error
4747
e.printStackTrace();

docs/iota-java/attachToTangle.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

2-
# [attachToTangle](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L608)
2+
# [attachToTangle](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L673)
33
[GetAttachToTangleResponse](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/dto/response/GetAttachToTangleResponse.java) attachToTangle(String trunkTransaction , String branchTransaction , Integer minWeightMagnitude , String[] trytes)
44

5-
Prepares the specified transactions (trytes) for attachment to the Tangle by doing Proof of Work. You need to supply `branchTransaction` as well as `trunkTransaction`. These are the tips which you're going to validate and reference with this transaction. These are obtainable by the `getTransactionsToApprove` API call.
6-
The returned value is a different set of tryte values which you can input into `broadcastTransactions` and `storeTransactions`.
5+
Prepares the specified transactions (trytes) for attachment to the Tangle by doing Proof of Work. You need to supply `branchTransaction` as well as `trunkTransaction`. These are the tips which you're going to validate and reference with this transaction. These are obtainable by the `getTransactionsToApprove` API call.
6+
The returned value is a different set of tryte values which you can input into `broadcastTransactions` and `storeTransactions`.
77
The last 243 trytes of the return value consist of the following: * `trunkTransaction`
88
* `branchTransaction`
99
* `nonce`
@@ -13,9 +13,9 @@
1313
## Input
1414
| Parameter | Type | Required or Optional | Description |
1515
|:---------------|:--------|:--------| :--------|
16-
| trunkTransaction | String | Required | A reference to an external transaction (tip) used as trunk. The transaction with index 0 will have this tip in its trunk. All other transactions reference the previous transaction in the bundle (Their index-1). |
17-
| branchTransaction | String | Required | A reference to an external transaction (tip) used as branch. Each Transaction in the bundle will have this tip as their branch, except the last. The last one will have the branch in its trunk. |
18-
| minWeightMagnitude | Integer | Required | The amount of work we should do to confirm this transaction.Each 0-trit on the end of the transaction represents 1 magnitude.A 9-tryte represents 3 magnitudes, since a 9 is represented by 3 0-trits. Transactions with a different minWeightMagnitude are compatible. |
16+
| trunkTransaction | String | Required | A reference to an external transaction (tip) used as trunk. The transaction with index 0 will have this tip in its trunk. All other transactions reference the previous transaction in the bundle (Their index-1). |
17+
| branchTransaction | String | Required | A reference to an external transaction (tip) used as branch. Each Transaction in the bundle will have this tip as their branch, except the last. The last one will have the branch in its trunk. |
18+
| minWeightMagnitude | Integer | Required | The amount of work we should do to confirm this transaction. Each 0-trit on the end of the transaction represents 1 magnitude. A 9-tryte represents 3 magnitudes, since a 9 is represented by 3 0-trits. Transactions with a different minWeightMagnitude are compatible. |
1919
| trytes | String[] | Required | The list of trytes to prepare for network attachment, by doing proof of work. |
2020

2121
## Output
@@ -38,7 +38,7 @@
3838
IotaAPI iotaAPI = new IotaAPI.Builder().build();
3939

4040
try {
41-
GetAttachToTangleResponse response = iotaAPI.attachToTangle("RRSXEVDVMVKOGEQKUFWBMC9RWMCOKUAWALZTGM9LPMLJI9YWMMDUDTHEEYCCCVWTNSKMACASYYFVUDQL9", "YDQTZVCQTCBAJKTWRAGNFDTFHCWLIUYETWXTDIOPUDES9KHDCJLX9TPFEXOXZZUG9HXHWBETOIMHNBMFZ", 18, new String[]{"HUKVHVIHNEWTXKEQRALHL9CFJ ... AMO9XCEIYQBQIQPBKXENXTFGJ", "IW9LITHXLNDMUVPKNFOABAFOW ... QQUYIRBVKXEKFNXKQYLKNBNDD"});
41+
GetAttachToTangleResponse response = iotaAPI.attachToTangle("FBTFLOILYWNA9PVDUWNE9SPX9EIK9JBQXDTQPRXOFQJQKZGBPWXQDZFICMHLIGGVNNANYRRORILNOUCCA", "LFSZUJXV9PUAPIPUKEZJKAARL9KASNDNIDF9ATELJBSZAKYEHKQEYQZGTOPFUJPOUVSZTMLWNFWFJVAKA", 18, new String[]{"SQUYGCCRJLCDUTLMZFURXXMIA ... HWRKYPLXANKUYOPBYTSMSZBNF", "NHWX9JCU9YHADD9R9YQCPUXCV ... UVFBPMPFRIU9KYFVCXCLNNJKV"});
4242
} catch (ArgumentException e) {
4343
// Handle error
4444
e.printStackTrace();

docs/iota-java/attachToTangleLocalPow.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

2-
# [attachToTangleLocalPow](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L668)
2+
# [attachToTangleLocalPow](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L733)
33
[GetAttachToTangleResponse](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/dto/response/GetAttachToTangleResponse.java) attachToTangleLocalPow(String trunkTransaction , String branchTransaction , Integer minWeightMagnitude , [IotaPoW](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaPoW.java) pow , String[] trytes)
44

5-
Prepares the specified transactions (trytes) for attachment to the Tangle by doing Proof of Work. You need to supply `branchTransaction` as well as `trunkTransaction`. These are the tips which you're going to validate and reference with this transaction. These are obtainable by the `getTransactionsToApprove` API call.
6-
The returned value is a different set of tryte values which you can input into `broadcastTransactions` and `storeTransactions`.
5+
Prepares the specified transactions (trytes) for attachment to the Tangle by doing Proof of Work. You need to supply `branchTransaction` as well as `trunkTransaction`. These are the tips which you're going to validate and reference with this transaction. These are obtainable by the `getTransactionsToApprove` API call.
6+
The returned value is a different set of tryte values which you can input into `broadcastTransactions` and `storeTransactions`.
77
The last 243 trytes of the return value consist of the following: * `trunkTransaction`
88
* `branchTransaction`
99
* `nonce`
@@ -13,9 +13,9 @@
1313
## Input
1414
| Parameter | Type | Required or Optional | Description |
1515
|:---------------|:--------|:--------| :--------|
16-
| trunkTransaction | String | Required | A reference to an external transaction (tip) used as trunk. The transaction with index 0 will have this tip in its trunk. All other transactions reference the previous transaction in the bundle (Their index-1). |
17-
| branchTransaction | String | Required | A reference to an external transaction (tip) used as branch. Each Transaction in the bundle will have this tip as their branch, except the last. The last one will have the branch in its trunk. |
18-
| minWeightMagnitude | Integer | Required | The amount of work we should do to confirm this transaction.Each 0-trit on the end of the transaction represents 1 magnitude.A 9-tryte represents 3 magnitudes, since a 9 is represented by 3 0-trits. Transactions with a different minWeightMagnitude are compatible. |
16+
| trunkTransaction | String | Required | A reference to an external transaction (tip) used as trunk. The transaction with index 0 will have this tip in its trunk. All other transactions reference the previous transaction in the bundle (Their index-1). |
17+
| branchTransaction | String | Required | A reference to an external transaction (tip) used as branch. Each Transaction in the bundle will have this tip as their branch, except the last. The last one will have the branch in its trunk. |
18+
| minWeightMagnitude | Integer | Required | The amount of work we should do to confirm this transaction. Each 0-trit on the end of the transaction represents 1 magnitude. A 9-tryte represents 3 magnitudes, since a 9 is represented by 3 0-trits. Transactions with a different minWeightMagnitude are compatible. |
1919
| pow | [IotaPoW](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaPoW.java) | Required | Method of proof of work |
2020
| trytes | String[] | Required | The list of trytes to prepare for network attachment, by doing proof of work. |
2121

@@ -39,7 +39,7 @@
3939
IotaAPI iotaAPI = new IotaAPI.Builder().build();
4040

4141
try {
42-
GetAttachToTangleResponse response = iotaAPI.attachToTangleLocalPow("DQSUOEQAV9OQXZCXIZEEXPUJFGMOENTTHWAWXJGWIHDAYFPQCCYE9EBBAAMQSPXHDKYEBDJWJUPSVXEVH", "SDIRWOWZUGGBOJXSGXZ9KYDRSFAFOVSDNZFRP9K9OJPRSYHDJYMKTBVDLEARMMGJROQCQWKC9JACWBJXH", 18, pow, new String[]{"GYEXOBZRRWAWYQMHADRMXBKYZ ... CAZZYKPSHWMMOUMFKTUVQNLMP", "PROJPEXWYESTHIUVTPREDFCQU ... TUOVFCABJPVCXRBFLLWOGYJQX"});
42+
GetAttachToTangleResponse response = iotaAPI.attachToTangleLocalPow("ZEUHPRRVDJWXDNNDZDOVCTRDX9CNWLEOOOL9YGWBDG9GDCKNJRVDNBSGUOEDFYSJXGK9XGLXYJNSPAAVD", "CDAYNRXIZHI9YH9KVYQITIYYPBHUJKWUYHGHKSHZMNRAPEWDIXJLVNAWJ9YYSUTWGOKYM9GLJOI9HSJQR", 18, pow, new String[]{"BKTWAJMAFRUAEBYSKKTVZMTTK ... VQNYXIYDMKYYXSYX9YEXPBEWP", "DYXAFPFWSKMSNVKMPQGPLTULJ ... I9YVTLPITIHWBNAMG9PXVFWGU"});
4343
} catch (ArgumentException e) {
4444
// Handle error
4545
e.printStackTrace();

docs/iota-java/broadcastTransactions.md

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

2-
# [broadcastTransactions](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L735)
2+
# [broadcastTransactions](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L800)
33
[BroadcastTransactionsResponse](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/dto/response/BroadcastTransactionsResponse.java) broadcastTransactions(String[] trytes)
44

55
Broadcast a list of transactions to all neighbors. The trytes to be used for this call should be valid, attached transaction trytes. These trytes are returned by `attachToTangle`, or by doing proof of work somewhere else.
@@ -27,7 +27,7 @@ Broadcast a list of transactions to all neighbors. The trytes to be used for thi
2727
IotaAPI iotaAPI = new IotaAPI.Builder().build();
2828

2929
try {
30-
BroadcastTransactionsResponse response = iotaAPI.broadcastTransactions(new String[]{"DXELUOEVEGVLFNTMTJUYWCLEU ... ZOXAMDGJRTAMORTGGSXR9YGDK", "TJCDHGEIDGSUINOJKTFGDELIT ... KCSPTGGBKJONJUEBOHASNYOTE"});
30+
BroadcastTransactionsResponse response = iotaAPI.broadcastTransactions(new String[]{"CTTGZPZYWGTIFCOATTKASZDPX ... YNIXKJTKMXTEAKVSPXGGWMAVS", "VOGANNMOYEFITLNCMSAYZKNMC ... PQFPPCAHKHQ9YGWSWG9BZCVIB"});
3131
} catch (ArgumentException e) {
3232
// Handle error
3333
e.printStackTrace();

docs/iota-java/bundlesFromAddresses.md

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

2-
# [bundlesFromAddresses](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L225)
2+
# [bundlesFromAddresses](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L198)
33
[Bundle[]](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/model/Bundle.java) bundlesFromAddresses(Boolean inclusionStates , String[] addresses)
44

55
Internal function to get the formatted bundles of a list of addresses.
@@ -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(true, new String[]{"QFMOVHMDGKAWVCNAVJOBAVMJQZRQSJITNEOHHORMTNKA9QTZVMLHKWZMTQXDSCOVZXQESHCGJ9ALATFLE", "RDSXBLCZYXCSBFVJKE9BIUKQZUOLMKXTW9TLHHZEAGFKFYZPDTA9IJHHPLQLEDXQHSXYAPXCMJATLZNZN"});
32+
Bundle[] response = iotaAPI.bundlesFromAddresses(false, new String[]{"GJMJYQOFBZEAAYSNZTNWSHHKPYPDWKBXFVIGXGXCRMLRBG9VOYMRYG9CZADARYUFYTQOTTHTKVDGGUCAP", "TJOESBMUBBLAPDRXTJOZVZEJHTEMLRILLPXKJH9LXOXJP9ILYZPQJOFQKZTREGXBTQEDXEXWBJLRCMUSJ"});
3333
} catch (ArgumentException e) {
3434
// Handle error
3535
e.printStackTrace();

0 commit comments

Comments
 (0)