Skip to content

Commit

Permalink
fixed packages
Browse files Browse the repository at this point in the history
  • Loading branch information
gosticks committed Jan 15, 2018
1 parent 9191ac1 commit 8220869
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 36 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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.



Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.flashwifi.flashwrapper;
package iotaFlashWrapper;

import com.flashwifi.flashwrapper.Model.*;
import iotaFlashWrapper.Model.*;


import java.util.ArrayList;
Expand Down Expand Up @@ -76,7 +76,7 @@ public static ArrayList<Bundle> appliedSignatures(ArrayList<Bundle> bundles, Arr
public static void applyTransfers(UserObject user, ArrayList<Bundle> 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(),
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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 });
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -14,7 +14,7 @@ public interface IotaFlashInterface {

public void updateLeafToRoot(MultisigAddress root);

// com.flashwifi.flashwrapper.Model.Transfer
// Transfer
public Object prepare(ArrayList<String> settlementAddresses, ArrayList<Integer> deposits, int index, ArrayList<Transfer> transfers);
public List<Object> compose(int balance, ArrayList<Integer> deposits, ArrayList<Transfer> outputs, MultisigAddress root, String remainderAddress, ArrayList<Bundle> history, ArrayList<Transfer> transfers, boolean close);

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.flashwifi.flashwrapper.Model;
package iotaFlashWrapper.Model;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.flashwifi.flashwrapper.Model;
package iotaFlashWrapper.Model;


public class Console {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.flashwifi.flashwrapper.Model;
package iotaFlashWrapper.Model;

public class CreateTransactionHelperObject {
private int generate = 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.flashwifi.flashwrapper.Model;
package iotaFlashWrapper.Model;

import java.util.HashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.flashwifi.flashwrapper.Model;
package iotaFlashWrapper.Model;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.flashwifi.flashwrapper.Model;
package iotaFlashWrapper.Model;

import com.eclipsesource.v8.V8;
import com.eclipsesource.v8.V8Object;
Expand Down
Original file line number Diff line number Diff line change
@@ -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
**/
Expand All @@ -15,7 +15,7 @@ public class Signature {
private List<String> 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<>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.flashwifi.flashwrapper.Model;
package iotaFlashWrapper.Model;

import java.util.HashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.flashwifi.flashwrapper.Model;
package iotaFlashWrapper.Model;

import com.google.gson.Gson;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.flashwifi.flashwrapper.Model;
package iotaFlashWrapper.Model;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 8220869

Please sign in to comment.