From 822086962a475b37fd2bd85731135a6944bdca9c Mon Sep 17 00:00:00 2001 From: gosticks Date: Mon, 15 Jan 2018 17:54:50 +0100 Subject: [PATCH] fixed packages --- README.md | 4 ++-- .../flashwrapper => iotaFlashWrapper}/Helpers.java | 6 +++--- .../IotaFlashBridge.java | 7 +++---- .../IotaFlashInterface.java | 12 ++++++------ .../flashwrapper => iotaFlashWrapper}/Main.java | 14 +++++++------- .../Model/Bundle.java | 2 +- .../Model/Console.java | 2 +- .../Model/CreateTransactionHelperObject.java | 2 +- .../Model/Digest.java | 2 +- .../Model/FlashObject.java | 2 +- .../Model/MultisigAddress.java | 2 +- .../Model/Signature.java | 6 +++--- .../Model/Transaction.java | 2 +- .../Model/Transfer.java | 2 +- .../Model/UserObject.java | 2 +- .../V8Converter.java | 4 ++-- 16 files changed, 35 insertions(+), 36 deletions(-) rename src/main/java/{com/flashwifi/flashwrapper => iotaFlashWrapper}/Helpers.java (95%) rename src/main/java/{com/flashwifi/flashwrapper => iotaFlashWrapper}/IotaFlashBridge.java (98%) rename src/main/java/{com/flashwifi/flashwrapper => iotaFlashWrapper}/IotaFlashInterface.java (84%) rename src/main/java/{com/flashwifi/flashwrapper => iotaFlashWrapper}/Main.java (95%) rename src/main/java/{com/flashwifi/flashwrapper => iotaFlashWrapper}/Model/Bundle.java (96%) rename src/main/java/{com/flashwifi/flashwrapper => iotaFlashWrapper}/Model/Console.java (84%) rename src/main/java/{com/flashwifi/flashwrapper => iotaFlashWrapper}/Model/CreateTransactionHelperObject.java (90%) rename src/main/java/{com/flashwifi/flashwrapper => iotaFlashWrapper}/Model/Digest.java (95%) rename src/main/java/{com/flashwifi/flashwrapper => iotaFlashWrapper}/Model/FlashObject.java (98%) rename src/main/java/{com/flashwifi/flashwrapper => iotaFlashWrapper}/Model/MultisigAddress.java (98%) rename src/main/java/{com/flashwifi/flashwrapper => iotaFlashWrapper}/Model/Signature.java (89%) rename src/main/java/{com/flashwifi/flashwrapper => iotaFlashWrapper}/Model/Transaction.java (99%) rename src/main/java/{com/flashwifi/flashwrapper => iotaFlashWrapper}/Model/Transfer.java (98%) rename src/main/java/{com/flashwifi/flashwrapper => iotaFlashWrapper}/Model/UserObject.java (98%) rename src/main/java/{com/flashwifi/flashwrapper => iotaFlashWrapper}/V8Converter.java (99%) diff --git a/README.md b/README.md index 7cacdfa..7aa64f8 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you have any ideas please submit a request (I am totally not a Java guy so... - [x] updateLeafToRoot - [x] getDigest -#### com.flashwifi.flashwrapper.Model.Transfer +#### Transfer - [x] prepare - [x] compose - [x] close (needs testing) @@ -28,7 +28,7 @@ If you have any ideas please submit a request (I am totally not a Java guy so... 1. Clone repo 2. Update maven ressources 3. That's it. -4. You can run a test transaction by running the main func in the com.flashwifi.flashwrapper.Main Class. +4. You can run a test transaction by running the main func in the Main Class. diff --git a/src/main/java/com/flashwifi/flashwrapper/Helpers.java b/src/main/java/iotaFlashWrapper/Helpers.java similarity index 95% rename from src/main/java/com/flashwifi/flashwrapper/Helpers.java rename to src/main/java/iotaFlashWrapper/Helpers.java index 25dfab5..df54381 100644 --- a/src/main/java/com/flashwifi/flashwrapper/Helpers.java +++ b/src/main/java/iotaFlashWrapper/Helpers.java @@ -1,6 +1,6 @@ -package com.flashwifi.flashwrapper; +package iotaFlashWrapper; -import com.flashwifi.flashwrapper.Model.*; +import iotaFlashWrapper.Model.*; import java.util.ArrayList; @@ -76,7 +76,7 @@ public static ArrayList appliedSignatures(ArrayList bundles, Arr public static void applyTransfers(UserObject user, ArrayList bundles) { FlashObject flash = IotaFlashBridge.applyTransfersToUser(user, bundles); user.setFlash(flash); - // com.flashwifi.flashwrapper.IotaFlashBridge.applyTransfers( + // IotaFlashBridge.applyTransfers( // user.getFlash().getRoot(), // user.getFlash().getDeposits(), // user.getFlash().getOutputs(), diff --git a/src/main/java/com/flashwifi/flashwrapper/IotaFlashBridge.java b/src/main/java/iotaFlashWrapper/IotaFlashBridge.java similarity index 98% rename from src/main/java/com/flashwifi/flashwrapper/IotaFlashBridge.java rename to src/main/java/iotaFlashWrapper/IotaFlashBridge.java index df757bf..267bc8d 100644 --- a/src/main/java/com/flashwifi/flashwrapper/IotaFlashBridge.java +++ b/src/main/java/iotaFlashWrapper/IotaFlashBridge.java @@ -1,8 +1,7 @@ -package com.flashwifi.flashwrapper; - -import com.flashwifi.flashwrapper.Model.*; +package iotaFlashWrapper; import com.eclipsesource.v8.*; import com.eclipsesource.v8.utils.V8ObjectUtils; +import iotaFlashWrapper.Model.*; import java.io.IOException; @@ -32,7 +31,7 @@ public static void boot() throws IOException { transfer = (V8Object) engine.executeScript("iotaFlash.transfer"); helper = (V8Object) engine.executeScript("Helper"); - com.flashwifi.flashwrapper.Model.Console console = new com.flashwifi.flashwrapper.Model.Console(); + Console console = new Console(); V8Object v8Console = new V8Object(engine); engine.add("console", v8Console); v8Console.registerJavaMethod(console, "log", "log", new Class[] { String.class }); diff --git a/src/main/java/com/flashwifi/flashwrapper/IotaFlashInterface.java b/src/main/java/iotaFlashWrapper/IotaFlashInterface.java similarity index 84% rename from src/main/java/com/flashwifi/flashwrapper/IotaFlashInterface.java rename to src/main/java/iotaFlashWrapper/IotaFlashInterface.java index 778dda4..11b22e3 100644 --- a/src/main/java/com/flashwifi/flashwrapper/IotaFlashInterface.java +++ b/src/main/java/iotaFlashWrapper/IotaFlashInterface.java @@ -1,9 +1,9 @@ -package com.flashwifi.flashwrapper; +package iotaFlashWrapper; -import com.flashwifi.flashwrapper.Model.Bundle; -import com.flashwifi.flashwrapper.Model.Digest; -import com.flashwifi.flashwrapper.Model.MultisigAddress; -import com.flashwifi.flashwrapper.Model.Transfer; +import iotaFlashWrapper.Model.Bundle; +import iotaFlashWrapper.Model.Digest; +import iotaFlashWrapper.Model.MultisigAddress; +import iotaFlashWrapper.Model.Transfer; import java.util.ArrayList; import java.util.List; @@ -14,7 +14,7 @@ public interface IotaFlashInterface { public void updateLeafToRoot(MultisigAddress root); - // com.flashwifi.flashwrapper.Model.Transfer + // Transfer public Object prepare(ArrayList settlementAddresses, ArrayList deposits, int index, ArrayList transfers); public List compose(int balance, ArrayList deposits, ArrayList outputs, MultisigAddress root, String remainderAddress, ArrayList history, ArrayList transfers, boolean close); diff --git a/src/main/java/com/flashwifi/flashwrapper/Main.java b/src/main/java/iotaFlashWrapper/Main.java similarity index 95% rename from src/main/java/com/flashwifi/flashwrapper/Main.java rename to src/main/java/iotaFlashWrapper/Main.java index 287fe95..3c94c0c 100644 --- a/src/main/java/com/flashwifi/flashwrapper/Main.java +++ b/src/main/java/iotaFlashWrapper/Main.java @@ -1,6 +1,6 @@ -package com.flashwifi.flashwrapper; +package iotaFlashWrapper; -import com.flashwifi.flashwrapper.Model.*; +import iotaFlashWrapper.Model.*; import java.io.IOException; import java.util.ArrayList; @@ -134,7 +134,7 @@ public static void main(String[] argv) throws Exception { /* // Supplying the CORRECT varibles to create a closing bundle - bundles = com.flashwifi.flashwrapper.Helpers.createTransaction( + bundles = Helpers.createTransaction( oneFlash, oneFlash.getFlash().getSettlementAddresses(), true @@ -144,10 +144,10 @@ public static void main(String[] argv) throws Exception { /// SIGN BUNDLES // Get signatures for the bundles - oneSignatures = com.flashwifi.flashwrapper.Helpers.signTransaction(oneFlash, bundles) + oneSignatures = Helpers.signTransaction(oneFlash, bundles) // Generate USER TWO'S Singatures - twoSignatures = com.flashwifi.flashwrapper.Helpers.signTransaction(twoFlash, bundles) + twoSignatures = Helpers.signTransaction(twoFlash, bundles) // Sign bundle with your USER ONE'S signatures signedBundles = transfer.appliedSignatures(bundles, oneSignatures) @@ -159,12 +159,12 @@ public static void main(String[] argv) throws Exception { /// APPLY SIGNED BUNDLES // Apply transfers to User ONE - oneFlash = com.flashwifi.flashwrapper.Helpers.applyTransfers(oneFlash, signedBundles) + oneFlash = Helpers.applyTransfers(oneFlash, signedBundles) // Save latest channel bundles oneFlash.bundles = signedBundles // Apply transfers to User TWO - twoFlash = com.flashwifi.flashwrapper.Helpers.applyTransfers(twoFlash, signedBundles) + twoFlash = Helpers.applyTransfers(twoFlash, signedBundles) // Save latest channel bundles twoFlash.bundles = signedBundles diff --git a/src/main/java/com/flashwifi/flashwrapper/Model/Bundle.java b/src/main/java/iotaFlashWrapper/Model/Bundle.java similarity index 96% rename from src/main/java/com/flashwifi/flashwrapper/Model/Bundle.java rename to src/main/java/iotaFlashWrapper/Model/Bundle.java index a39c299..7c56fe9 100644 --- a/src/main/java/com/flashwifi/flashwrapper/Model/Bundle.java +++ b/src/main/java/iotaFlashWrapper/Model/Bundle.java @@ -1,4 +1,4 @@ -package com.flashwifi.flashwrapper.Model; +package iotaFlashWrapper.Model; import java.util.ArrayList; import java.util.HashMap; diff --git a/src/main/java/com/flashwifi/flashwrapper/Model/Console.java b/src/main/java/iotaFlashWrapper/Model/Console.java similarity index 84% rename from src/main/java/com/flashwifi/flashwrapper/Model/Console.java rename to src/main/java/iotaFlashWrapper/Model/Console.java index fcd8afc..95f2ba4 100644 --- a/src/main/java/com/flashwifi/flashwrapper/Model/Console.java +++ b/src/main/java/iotaFlashWrapper/Model/Console.java @@ -1,4 +1,4 @@ -package com.flashwifi.flashwrapper.Model; +package iotaFlashWrapper.Model; public class Console { diff --git a/src/main/java/com/flashwifi/flashwrapper/Model/CreateTransactionHelperObject.java b/src/main/java/iotaFlashWrapper/Model/CreateTransactionHelperObject.java similarity index 90% rename from src/main/java/com/flashwifi/flashwrapper/Model/CreateTransactionHelperObject.java rename to src/main/java/iotaFlashWrapper/Model/CreateTransactionHelperObject.java index a2f60ce..fb46f65 100644 --- a/src/main/java/com/flashwifi/flashwrapper/Model/CreateTransactionHelperObject.java +++ b/src/main/java/iotaFlashWrapper/Model/CreateTransactionHelperObject.java @@ -1,4 +1,4 @@ -package com.flashwifi.flashwrapper.Model; +package iotaFlashWrapper.Model; public class CreateTransactionHelperObject { private int generate = 0; diff --git a/src/main/java/com/flashwifi/flashwrapper/Model/Digest.java b/src/main/java/iotaFlashWrapper/Model/Digest.java similarity index 95% rename from src/main/java/com/flashwifi/flashwrapper/Model/Digest.java rename to src/main/java/iotaFlashWrapper/Model/Digest.java index 0f40973..aaa7d96 100644 --- a/src/main/java/com/flashwifi/flashwrapper/Model/Digest.java +++ b/src/main/java/iotaFlashWrapper/Model/Digest.java @@ -1,4 +1,4 @@ -package com.flashwifi.flashwrapper.Model; +package iotaFlashWrapper.Model; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/com/flashwifi/flashwrapper/Model/FlashObject.java b/src/main/java/iotaFlashWrapper/Model/FlashObject.java similarity index 98% rename from src/main/java/com/flashwifi/flashwrapper/Model/FlashObject.java rename to src/main/java/iotaFlashWrapper/Model/FlashObject.java index b43a377..d68b810 100644 --- a/src/main/java/com/flashwifi/flashwrapper/Model/FlashObject.java +++ b/src/main/java/iotaFlashWrapper/Model/FlashObject.java @@ -1,4 +1,4 @@ -package com.flashwifi.flashwrapper.Model; +package iotaFlashWrapper.Model; import java.util.ArrayList; import java.util.HashMap; diff --git a/src/main/java/com/flashwifi/flashwrapper/Model/MultisigAddress.java b/src/main/java/iotaFlashWrapper/Model/MultisigAddress.java similarity index 98% rename from src/main/java/com/flashwifi/flashwrapper/Model/MultisigAddress.java rename to src/main/java/iotaFlashWrapper/Model/MultisigAddress.java index 4196b1c..50e7209 100644 --- a/src/main/java/com/flashwifi/flashwrapper/Model/MultisigAddress.java +++ b/src/main/java/iotaFlashWrapper/Model/MultisigAddress.java @@ -1,4 +1,4 @@ -package com.flashwifi.flashwrapper.Model; +package iotaFlashWrapper.Model; import com.eclipsesource.v8.V8; import com.eclipsesource.v8.V8Object; diff --git a/src/main/java/com/flashwifi/flashwrapper/Model/Signature.java b/src/main/java/iotaFlashWrapper/Model/Signature.java similarity index 89% rename from src/main/java/com/flashwifi/flashwrapper/Model/Signature.java rename to src/main/java/iotaFlashWrapper/Model/Signature.java index 2abdac8..74bb651 100644 --- a/src/main/java/com/flashwifi/flashwrapper/Model/Signature.java +++ b/src/main/java/iotaFlashWrapper/Model/Signature.java @@ -1,10 +1,10 @@ -package com.flashwifi.flashwrapper.Model; +package iotaFlashWrapper.Model; import java.util.ArrayList; import java.util.List; /** - * This class represents an com.flashwifi.flashwrapper.Model.Signature. + * This class represents an Signature. * * @author Adrian **/ @@ -15,7 +15,7 @@ public class Signature { private List signatureFragments; /** - * Initializes a new instance of the com.flashwifi.flashwrapper.Model.Signature class. + * Initializes a new instance of the Signature class. */ public Signature() { this.signatureFragments = new ArrayList<>(); diff --git a/src/main/java/com/flashwifi/flashwrapper/Model/Transaction.java b/src/main/java/iotaFlashWrapper/Model/Transaction.java similarity index 99% rename from src/main/java/com/flashwifi/flashwrapper/Model/Transaction.java rename to src/main/java/iotaFlashWrapper/Model/Transaction.java index 2965bad..3b6a076 100644 --- a/src/main/java/com/flashwifi/flashwrapper/Model/Transaction.java +++ b/src/main/java/iotaFlashWrapper/Model/Transaction.java @@ -1,4 +1,4 @@ -package com.flashwifi.flashwrapper.Model; +package iotaFlashWrapper.Model; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/com/flashwifi/flashwrapper/Model/Transfer.java b/src/main/java/iotaFlashWrapper/Model/Transfer.java similarity index 98% rename from src/main/java/com/flashwifi/flashwrapper/Model/Transfer.java rename to src/main/java/iotaFlashWrapper/Model/Transfer.java index c08331a..f86f2ca 100644 --- a/src/main/java/com/flashwifi/flashwrapper/Model/Transfer.java +++ b/src/main/java/iotaFlashWrapper/Model/Transfer.java @@ -1,4 +1,4 @@ -package com.flashwifi.flashwrapper.Model; +package iotaFlashWrapper.Model; import com.google.gson.Gson; diff --git a/src/main/java/com/flashwifi/flashwrapper/Model/UserObject.java b/src/main/java/iotaFlashWrapper/Model/UserObject.java similarity index 98% rename from src/main/java/com/flashwifi/flashwrapper/Model/UserObject.java rename to src/main/java/iotaFlashWrapper/Model/UserObject.java index 5856af0..9cae4c6 100644 --- a/src/main/java/com/flashwifi/flashwrapper/Model/UserObject.java +++ b/src/main/java/iotaFlashWrapper/Model/UserObject.java @@ -1,4 +1,4 @@ -package com.flashwifi.flashwrapper.Model; +package iotaFlashWrapper.Model; import java.util.ArrayList; import java.util.HashMap; diff --git a/src/main/java/com/flashwifi/flashwrapper/V8Converter.java b/src/main/java/iotaFlashWrapper/V8Converter.java similarity index 99% rename from src/main/java/com/flashwifi/flashwrapper/V8Converter.java rename to src/main/java/iotaFlashWrapper/V8Converter.java index f81a466..da0137b 100644 --- a/src/main/java/com/flashwifi/flashwrapper/V8Converter.java +++ b/src/main/java/iotaFlashWrapper/V8Converter.java @@ -1,10 +1,10 @@ -package com.flashwifi.flashwrapper; +package iotaFlashWrapper; -import com.flashwifi.flashwrapper.Model.*; import com.eclipsesource.v8.V8; import com.eclipsesource.v8.V8Array; import com.eclipsesource.v8.V8Object; import com.eclipsesource.v8.utils.V8ObjectUtils; +import iotaFlashWrapper.Model.*; import java.util.ArrayList; import java.util.HashMap;