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

Commit

Permalink
beta9 release prep
Browse files Browse the repository at this point in the history
  • Loading branch information
Brord van Wierst committed Jul 13, 2020
1 parent b703ef3 commit 236d308
Show file tree
Hide file tree
Showing 61 changed files with 280 additions and 165 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ To install the IOTA Java client library and its dependencies, you can use one of
<groupId>org.iota</groupId>
<artifactId>jota</artifactId>
<classifier>jar-with-dependencies</classifier>
<version>1.0.0-beta8</version>
<version>1.0.0-beta9</version>
</dependency>
```

Expand All @@ -120,7 +120,7 @@ To install the IOTA Java client library and its dependencies, you can use one of
```

3. Change the value of the `<version>` tag to either a release number or the first 10 characters of a Git commit hash:
`<version>efdc784d8a9ef</version>` or `<version>1.0.0-beta8</version>`
`<version>b703ef3c05f05</version>` or `<version>1.0.0-beta9</version>`

**Note:** Find the latest version on the [Jitpack](https://jitpack.io/#iotaledger/iota-java) page.

Expand Down Expand Up @@ -262,6 +262,7 @@ class SendData {

## Change logs

- Changes in [**1.0.0-beta9**](https://github.com/iotaledger/iota-java/compare/1.0.0-beta8...1.0.0-beta9)
- Changes in [**1.0.0-beta8**](https://github.com/iotaledger/iota-java/compare/1.0.0-beta7...1.0.0-beta8)
- Changes in [**1.0.0-beta7**](https://github.com/iotaledger/iota-java/compare/1.0.0-beta6...1.0.0-beta7)
- Changes in [**1.0.0-beta6**](https://github.com/iotaledger/iota-java/compare/1.0.0-beta5...1.0.0-beta6)
Expand Down
4 changes: 2 additions & 2 deletions docs/iota-java/addNeighbors.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

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

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**
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**
> **Important note:** This API is currently in Beta and is subject to change. Use of these APIs in production applications is not supported.
## Input
Expand Down
8 changes: 4 additions & 4 deletions docs/iota-java/addRemainder.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# [addRemainder](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L1528)
# [addRemainder](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPI.java#L1545)
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)

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.
Expand All @@ -14,7 +14,7 @@ Uses input, and adds to the bundle, untill `totalValue` is reached. If there is
| 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. |
| tag | String | Required | The tag to add to each bundle entry (input and remainder) |
| totalValue | long | Required | The total value of the desired transaction |
| 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. |
| 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. |
| signatureFragments | List<String> | Required | The signature fragments (message), used for signing.Should be 2187 characters long, can be padded with 9s. |

## Output
Expand All @@ -33,15 +33,15 @@ Uses input, and adds to the bundle, untill `totalValue` is reached. If there is
| API | Description |
|:---------------|:--------|
| [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. |
| [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. |
| [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. |

## Example

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

try {
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"}));
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"}));
} catch (ArgumentException e) {
// Handle error
e.printStackTrace();
Expand Down
14 changes: 7 additions & 7 deletions docs/iota-java/attachToTangle.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

# [attachToTangle](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L608)
# [attachToTangle](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L673)
[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)

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.
The returned value is a different set of tryte values which you can input into `broadcastTransactions` and `storeTransactions`.
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.
The returned value is a different set of tryte values which you can input into `broadcastTransactions` and `storeTransactions`.
The last 243 trytes of the return value consist of the following: * `trunkTransaction`
* `branchTransaction`
* `nonce`
Expand All @@ -13,9 +13,9 @@
## Input
| Parameter | Type | Required or Optional | Description |
|:---------------|:--------|:--------| :--------|
| 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). |
| 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. |
| 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. |
| 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). |
| 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. |
| 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. |
| trytes | String[] | Required | The list of trytes to prepare for network attachment, by doing proof of work. |

## Output
Expand All @@ -38,7 +38,7 @@
IotaAPI iotaAPI = new IotaAPI.Builder().build();

try {
GetAttachToTangleResponse response = iotaAPI.attachToTangle("RRSXEVDVMVKOGEQKUFWBMC9RWMCOKUAWALZTGM9LPMLJI9YWMMDUDTHEEYCCCVWTNSKMACASYYFVUDQL9", "YDQTZVCQTCBAJKTWRAGNFDTFHCWLIUYETWXTDIOPUDES9KHDCJLX9TPFEXOXZZUG9HXHWBETOIMHNBMFZ", 18, new String[]{"HUKVHVIHNEWTXKEQRALHL9CFJ ... AMO9XCEIYQBQIQPBKXENXTFGJ", "IW9LITHXLNDMUVPKNFOABAFOW ... QQUYIRBVKXEKFNXKQYLKNBNDD"});
GetAttachToTangleResponse response = iotaAPI.attachToTangle("FBTFLOILYWNA9PVDUWNE9SPX9EIK9JBQXDTQPRXOFQJQKZGBPWXQDZFICMHLIGGVNNANYRRORILNOUCCA", "LFSZUJXV9PUAPIPUKEZJKAARL9KASNDNIDF9ATELJBSZAKYEHKQEYQZGTOPFUJPOUVSZTMLWNFWFJVAKA", 18, new String[]{"SQUYGCCRJLCDUTLMZFURXXMIA ... HWRKYPLXANKUYOPBYTSMSZBNF", "NHWX9JCU9YHADD9R9YQCPUXCV ... UVFBPMPFRIU9KYFVCXCLNNJKV"});
} catch (ArgumentException e) {
// Handle error
e.printStackTrace();
Expand Down
14 changes: 7 additions & 7 deletions docs/iota-java/attachToTangleLocalPow.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

# [attachToTangleLocalPow](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L668)
# [attachToTangleLocalPow](https://github.com/iotaledger/iota-java/blob/master/jota/src/main/java/org/iota/jota/IotaAPICore.java#L733)
[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)

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.
The returned value is a different set of tryte values which you can input into `broadcastTransactions` and `storeTransactions`.
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.
The returned value is a different set of tryte values which you can input into `broadcastTransactions` and `storeTransactions`.
The last 243 trytes of the return value consist of the following: * `trunkTransaction`
* `branchTransaction`
* `nonce`
Expand All @@ -13,9 +13,9 @@
## Input
| Parameter | Type | Required or Optional | Description |
|:---------------|:--------|:--------| :--------|
| 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). |
| 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. |
| 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. |
| 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). |
| 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. |
| 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. |
| 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 |
| trytes | String[] | Required | The list of trytes to prepare for network attachment, by doing proof of work. |

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

try {
GetAttachToTangleResponse response = iotaAPI.attachToTangleLocalPow("DQSUOEQAV9OQXZCXIZEEXPUJFGMOENTTHWAWXJGWIHDAYFPQCCYE9EBBAAMQSPXHDKYEBDJWJUPSVXEVH", "SDIRWOWZUGGBOJXSGXZ9KYDRSFAFOVSDNZFRP9K9OJPRSYHDJYMKTBVDLEARMMGJROQCQWKC9JACWBJXH", 18, pow, new String[]{"GYEXOBZRRWAWYQMHADRMXBKYZ ... CAZZYKPSHWMMOUMFKTUVQNLMP", "PROJPEXWYESTHIUVTPREDFCQU ... TUOVFCABJPVCXRBFLLWOGYJQX"});
GetAttachToTangleResponse response = iotaAPI.attachToTangleLocalPow("ZEUHPRRVDJWXDNNDZDOVCTRDX9CNWLEOOOL9YGWBDG9GDCKNJRVDNBSGUOEDFYSJXGK9XGLXYJNSPAAVD", "CDAYNRXIZHI9YH9KVYQITIYYPBHUJKWUYHGHKSHZMNRAPEWDIXJLVNAWJ9YYSUTWGOKYM9GLJOI9HSJQR", 18, pow, new String[]{"BKTWAJMAFRUAEBYSKKTVZMTTK ... VQNYXIYDMKYYXSYX9YEXPBEWP", "DYXAFPFWSKMSNVKMPQGPLTULJ ... I9YVTLPITIHWBNAMG9PXVFWGU"});
} catch (ArgumentException e) {
// Handle error
e.printStackTrace();
Expand Down
4 changes: 2 additions & 2 deletions docs/iota-java/broadcastTransactions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

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

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.
Expand Down Expand Up @@ -27,7 +27,7 @@ Broadcast a list of transactions to all neighbors. The trytes to be used for thi
IotaAPI iotaAPI = new IotaAPI.Builder().build();

try {
BroadcastTransactionsResponse response = iotaAPI.broadcastTransactions(new String[]{"DXELUOEVEGVLFNTMTJUYWCLEU ... ZOXAMDGJRTAMORTGGSXR9YGDK", "TJCDHGEIDGSUINOJKTFGDELIT ... KCSPTGGBKJONJUEBOHASNYOTE"});
BroadcastTransactionsResponse response = iotaAPI.broadcastTransactions(new String[]{"CTTGZPZYWGTIFCOATTKASZDPX ... YNIXKJTKMXTEAKVSPXGGWMAVS", "VOGANNMOYEFITLNCMSAYZKNMC ... PQFPPCAHKHQ9YGWSWG9BZCVIB"});
} catch (ArgumentException e) {
// Handle error
e.printStackTrace();
Expand Down
4 changes: 2 additions & 2 deletions docs/iota-java/bundlesFromAddresses.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

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

Internal function to get the formatted bundles of a list of addresses.
Expand Down Expand Up @@ -29,7 +29,7 @@ Internal function to get the formatted bundles of a list of addresses.
IotaAPI iotaAPI = new IotaAPI.Builder().build();

try {
Bundle[] response = iotaAPI.bundlesFromAddresses(true, new String[]{"QFMOVHMDGKAWVCNAVJOBAVMJQZRQSJITNEOHHORMTNKA9QTZVMLHKWZMTQXDSCOVZXQESHCGJ9ALATFLE", "RDSXBLCZYXCSBFVJKE9BIUKQZUOLMKXTW9TLHHZEAGFKFYZPDTA9IJHHPLQLEDXQHSXYAPXCMJATLZNZN"});
Bundle[] response = iotaAPI.bundlesFromAddresses(false, new String[]{"GJMJYQOFBZEAAYSNZTNWSHHKPYPDWKBXFVIGXGXCRMLRBG9VOYMRYG9CZADARYUFYTQOTTHTKVDGGUCAP", "TJOESBMUBBLAPDRXTJOZVZEJHTEMLRILLPXKJH9LXOXJP9ILYZPQJOFQKZTREGXBTQEDXEXWBJLRCMUSJ"});
} catch (ArgumentException e) {
// Handle error
e.printStackTrace();
Expand Down
Loading

0 comments on commit 236d308

Please sign in to comment.