Renaming package

This commit is contained in:
Nelson R. Perez 2016-12-10 21:43:01 -05:00
parent b39d73f4d2
commit 92d086900d
58 changed files with 247 additions and 276 deletions

View file

@ -1,3 +1,3 @@
rootProject.name = 'fullerene' rootProject.name = 'graphenej'
include 'application' include 'application'

View file

@ -1,10 +1,10 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.google.common.primitives.Bytes; import com.google.common.primitives.Bytes;
import com.google.gson.JsonArray; import com.google.gson.JsonArray;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.luminiasoft.bitshares.interfaces.GrapheneSerializable; import de.bitsharesmunich.graphenej.interfaces.GrapheneSerializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.google.common.primitives.Bytes; import com.google.common.primitives.Bytes;
import com.google.common.primitives.UnsignedLong; import com.google.common.primitives.UnsignedLong;

View file

@ -1,6 +1,6 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.luminiasoft.bitshares.errors.MalformedTransactionException; import de.bitsharesmunich.graphenej.errors.MalformedTransactionException;
import org.bitcoinj.core.ECKey; import org.bitcoinj.core.ECKey;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -1,14 +1,12 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.google.common.primitives.Bytes; import com.google.common.primitives.Bytes;
import com.luminiasoft.bitshares.errors.MalformedAddressException; import de.bitsharesmunich.graphenej.errors.MalformedAddressException;
import org.bitcoinj.core.Base58; import org.bitcoinj.core.Base58;
import org.bitcoinj.core.ECKey; import org.bitcoinj.core.ECKey;
import org.spongycastle.crypto.digests.RIPEMD160Digest; import org.spongycastle.crypto.digests.RIPEMD160Digest;
import org.spongycastle.math.ec.ECPoint;
import java.util.Arrays; import java.util.Arrays;
import java.util.IllegalFormatException;
/** /**
* Class used to encapsulate address-related operations. * Class used to encapsulate address-related operations.

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
/** /**
* Created by nelson on 11/9/16. * Created by nelson on 11/9/16.

View file

@ -1,16 +1,16 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.google.common.primitives.UnsignedLong; import com.google.common.primitives.UnsignedLong;
import com.google.gson.*; import com.google.gson.*;
import com.luminiasoft.bitshares.interfaces.ByteSerializable; import de.bitsharesmunich.graphenej.interfaces.ByteSerializable;
import com.luminiasoft.bitshares.interfaces.JsonSerializable; import de.bitsharesmunich.graphenej.interfaces.JsonSerializable;
import java.lang.reflect.Type; import java.lang.reflect.Type;
/** /**
* Created by nelson on 11/7/16. * Created by nelson on 11/7/16.
*/ */
public class AssetAmount implements ByteSerializable, JsonSerializable{ public class AssetAmount implements ByteSerializable, JsonSerializable {
/** /**
* Constants used in the JSON serialization procedure. * Constants used in the JSON serialization procedure.
*/ */

View file

@ -1,11 +1,11 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.google.common.primitives.Bytes; import com.google.common.primitives.Bytes;
import com.google.gson.JsonArray; import com.google.gson.JsonArray;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.luminiasoft.bitshares.errors.MalformedAddressException; import de.bitsharesmunich.graphenej.errors.MalformedAddressException;
import com.luminiasoft.bitshares.interfaces.GrapheneSerializable; import de.bitsharesmunich.graphenej.interfaces.GrapheneSerializable;
import java.util.*; import java.util.*;

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import java.util.Arrays; import java.util.Arrays;
import org.bitcoinj.core.Base58; import org.bitcoinj.core.Base58;

View file

@ -1,12 +1,12 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.luminiasoft.bitshares.interfaces.ByteSerializable; import de.bitsharesmunich.graphenej.interfaces.ByteSerializable;
import com.luminiasoft.bitshares.interfaces.JsonSerializable; import de.bitsharesmunich.graphenej.interfaces.JsonSerializable;
/** /**
* Created by nelson on 11/5/16. * Created by nelson on 11/5/16.
*/ */
public abstract class BaseOperation implements ByteSerializable, JsonSerializable{ public abstract class BaseOperation implements ByteSerializable, JsonSerializable {
protected OperationType type; protected OperationType type;

View file

@ -1,10 +1,6 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.luminiasoft.bitshares.interfaces.ByteSerializable; import de.bitsharesmunich.graphenej.interfaces.ByteSerializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;
/** /**
* This class encapsulates all block-related information needed in order to build a valid transaction. * This class encapsulates all block-related information needed in order to build a valid transaction.

View file

@ -1,8 +1,7 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.luminiasoft.bitshares.crypto.AndroidRandomSource; import de.bitsharesmunich.graphenej.crypto.AndroidRandomSource;
import com.luminiasoft.bitshares.crypto.SecureRandomStrengthener; import de.bitsharesmunich.graphenej.crypto.SecureRandomStrengthener;
import org.bitcoinj.core.Base58;
import org.bitcoinj.core.DumpedPrivateKey; import org.bitcoinj.core.DumpedPrivateKey;
import org.bitcoinj.core.ECKey; import org.bitcoinj.core.ECKey;
import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.core.NetworkParameters;
@ -11,7 +10,6 @@ import java.io.UnsupportedEncodingException;
import java.security.MessageDigest; import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom; import java.security.SecureRandom;
import java.security.spec.ECPoint;
import java.util.ArrayList; import java.util.ArrayList;
/** /**

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
/** /**
* Created by nelson on 11/8/16. * Created by nelson on 11/8/16.

View file

@ -1,9 +1,9 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.google.gson.JsonArray; import com.google.gson.JsonArray;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import com.luminiasoft.bitshares.interfaces.ByteSerializable; import de.bitsharesmunich.graphenej.interfaces.ByteSerializable;
import com.luminiasoft.bitshares.interfaces.JsonSerializable; import de.bitsharesmunich.graphenej.interfaces.JsonSerializable;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -1,24 +1,16 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.google.gson.JsonArray; import com.google.gson.JsonArray;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.google.gson.JsonParser; import com.google.gson.JsonParser;
import com.luminiasoft.bitshares.crypto.AndroidRandomSource; import de.bitsharesmunich.graphenej.crypto.SecureRandomStrengthener;
import com.luminiasoft.bitshares.crypto.SecureRandomStrengthener;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.math.BigInteger; import java.math.BigInteger;
import java.security.MessageDigest; import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom; import java.security.SecureRandom;
import java.util.Arrays;
import org.bitcoinj.core.ECKey; import org.bitcoinj.core.ECKey;
import org.spongycastle.crypto.DataLengthException;
import org.spongycastle.crypto.InvalidCipherTextException;
import org.spongycastle.crypto.engines.AESFastEngine;
import org.spongycastle.crypto.modes.CBCBlockCipher;
import org.spongycastle.crypto.paddings.PaddedBufferedBlockCipher;
import org.spongycastle.crypto.params.KeyParameter;
import org.spongycastle.crypto.params.ParametersWithIV;
/** /**
* Class to manage the Bin Files * Class to manage the Bin Files

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;

View file

@ -1,8 +1,8 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import com.luminiasoft.bitshares.interfaces.JsonSerializable; import de.bitsharesmunich.graphenej.interfaces.JsonSerializable;
import org.bitcoinj.core.Base58; import org.bitcoinj.core.Base58;
/** /**

View file

@ -1,31 +1,18 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import org.bitcoinj.core.ECKey;
import java.io.IOException;
public class Main { public class Main {
// Brain key from Nelson's app referencing the bilthon-83 account // Brain key from Nelson's app referencing the bilthon-83 account
public static final String BILTHON_83_BRAIN_KEY = "PUMPER ISOTOME SERE STAINER CLINGER MOONLIT CHAETA UPBRIM AEDILIC BERTHER NIT SHAP SAID SHADING JUNCOUS CHOUGH"; public static final String BILTHON_83_BRAIN_KEY = System.getenv("BILTHON_83_BRAIN_KEY");
public static final String BILTHON_5_BRAIN_KEY = "UNMATE AURIGAL NAVET WAVICLE REWOVE ABBOTCY COWHERB OUTKICK STOPPER JUSSORY BEAMLET WIRY"; public static final String BILTHON_5_BRAIN_KEY = System.getenv("BILTHON_5_BRAIN_KEY");
public static final String BILTHON_7_BRAIN_KEY = "VENIN QUOTHA OBESELY TORIC OSMATIC SPOKEN DIACOPE CUBICA TABULA REDDING APONIA TARTAR"; public static final String BILTHON_7_BRAIN_KEY = System.getenv("BILTHON_7_BRAIN_KEY");
//public static final String BILTHON_83_BRAIN_KEY = "TWIXT SERMO TRILLI AUDIO PARDED PLUMET BIWA REHUNG MAUDLE VALVULA OUTBURN FEWNESS ALIENER UNTRACE PRICH TROKER";
//public static final String BILTHON_83_BRAIN_KEY = "SIVER TIKKER FOGO HOMINAL PRAYER LUTEIN SMALLY ACARID MEROPIA TRANCE BOGONG IDDAT HICKORY SOUTANE MOOD DOWSER";
public static final String BIP39_KEY = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"; public static final String BIP39_KEY = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about";
// WIF from Nelson's app referencing the bilthon-83 account
// public static final String WIF = "5J96pne45qWM1WpektoeazN6k9Mt93jQ7LyueRxFfEMTiy6yxjM";
// Brain key from an empty account created by the cli_wallet
// public static final String BILTHON_83_BRAIN_KEY = "TWIXT SERMO TRILLI AUDIO PARDED PLUMET BIWA REHUNG MAUDLE VALVULA OUTBURN FEWNESS ALIENER UNTRACE PRICH TROKER";
// WIF from an empty account created by the cli_wallet
public static final String WIF = "5KMzB2GqGhnh7ufhgddmz1eKPHS72uTLeL9hHjSvPb1UywWknF5"; public static final String WIF = "5KMzB2GqGhnh7ufhgddmz1eKPHS72uTLeL9hHjSvPb1UywWknF5";
public static final String EXTERNAL_SIGNATURE = "1f36c41acb774fcbc9c231b5895ec9701d6872729098d8ea56d78dda72a6b54252694db85d7591de5751b7aea06871da15d63a1028758421607ffc143e53ef3306";
// Static block information used for transaction serialization tests // Static block information used for transaction serialization tests
public static int REF_BLOCK_NUM = 56204; public static int REF_BLOCK_NUM = 56204;
public static int REF_BLOCK_PREFIX = 1614747814; public static int REF_BLOCK_PREFIX = 1614747814;
@ -33,6 +20,7 @@ public class Main {
public static void main(String[] args) { public static void main(String[] args) {
Test test = new Test(); Test test = new Test();
// test.testTransactionSerialization(); // test.testTransactionSerialization();
// ECKey.ECDSASignature signature = test.testSigning(); // ECKey.ECDSASignature signature = test.testSigning();
@ -57,7 +45,7 @@ public class Main {
// test.testGetAccountByName(); // test.testGetAccountByName();
// test.testGetRequiredFees(); // test.testGetRequiredFees();
// test.testRandomNumberGeneration(); // test.testRandomNumberGeneration();
//test.testBrainKeyOperations(false); // test.testBrainKeyOperations(false);
// test.testBip39Opertion(); // test.testBip39Opertion();
// test.testAccountNamebyAddress(); // test.testAccountNamebyAddress();
// test.testAccountNameById(); // test.testAccountNameById();
@ -68,7 +56,7 @@ public class Main {
// test.testAccountUpdateOperationBroadcast(); // test.testAccountUpdateOperationBroadcast();
// test.testCreateBinFile(); // test.testCreateBinFile();
// test.testImportBinFile(); // test.testImportBinFile();
//test.testLookupAccounts(); // test.testLookupAccounts();
test.testDecodeMemo(); // test.testDecodeMemo();
} }
} }

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
/** /**
* Created by nelson on 11/6/16. * Created by nelson on 11/6/16.

View file

@ -1,7 +1,7 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import com.luminiasoft.bitshares.interfaces.GrapheneSerializable; import de.bitsharesmunich.graphenej.interfaces.GrapheneSerializable;
/** /**
* Used whenever we have an optional field. * Used whenever we have an optional field.

View file

@ -1,6 +1,6 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.luminiasoft.bitshares.interfaces.ByteSerializable; import de.bitsharesmunich.graphenej.interfaces.ByteSerializable;
import org.bitcoinj.core.ECKey; import org.bitcoinj.core.ECKey;
/** /**

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
/** /**
* Created by nelson on 11/16/16. * Created by nelson on 11/16/16.

View file

@ -1,20 +1,23 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.luminiasoft.bitshares.objects.Memo; import de.bitsharesmunich.graphenej.models.ApiCall;
import de.bitsharesmunich.graphenej.models.BaseResponse;
import de.bitsharesmunich.graphenej.objects.Memo;
import com.google.common.primitives.UnsignedLong; import com.google.common.primitives.UnsignedLong;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray; import com.google.gson.JsonArray;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import com.luminiasoft.bitshares.errors.MalformedAddressException; import de.bitsharesmunich.graphenej.errors.MalformedAddressException;
import com.luminiasoft.bitshares.errors.MalformedTransactionException; import de.bitsharesmunich.graphenej.errors.MalformedTransactionException;
import com.luminiasoft.bitshares.interfaces.WitnessResponseListener; import de.bitsharesmunich.graphenej.interfaces.WitnessResponseListener;
import com.luminiasoft.bitshares.models.*; import de.bitsharesmunich.graphenej.objects.MemoBuilder;
import com.luminiasoft.bitshares.objects.MemoBuilder; import de.bitsharesmunich.graphenej.test.NaiveSSLContext;
import com.luminiasoft.bitshares.test.NaiveSSLContext;
import com.luminiasoft.bitshares.ws.*;
import com.neovisionaries.ws.client.*; import com.neovisionaries.ws.client.*;
import de.bitsharesmunich.graphenej.models.AccountProperties;
import de.bitsharesmunich.graphenej.models.WitnessResponse;
import de.bitsharesmunich.graphenej.api.*;
import org.bitcoinj.core.*; import org.bitcoinj.core.*;
import org.spongycastle.crypto.digests.RIPEMD160Digest; import org.spongycastle.crypto.digests.RIPEMD160Digest;
@ -31,10 +34,10 @@ import java.util.logging.Logger;
*/ */
public class Test { public class Test {
public static final String WITNESS_URL = "ws://api.devling.xyz:8088"; public static final String WITNESS_URL = "api://api.devling.xyz:8088";
public static final String OPENLEDGER_WITNESS_URL = "wss://bitshares.openledger.info/ws"; public static final String OPENLEDGER_WITNESS_URL = "wss://bitshares.openledger.info/api";
public static final String BLOCK_PAY_DE = "wss://de.blockpay.ch:8089"; public static final String BLOCK_PAY_DE = "wss://de.blockpay.ch:8089";
// public static final String WITNESS_URL = "wss://fr.blockpay.ch:8089"; public static final String BLOCK_PAY_FR = "wss://fr.blockpay.ch:8089";
private Transaction transaction; private Transaction transaction;

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.google.common.primitives.Bytes; import com.google.common.primitives.Bytes;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
@ -7,9 +7,8 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer; import com.google.gson.JsonSerializer;
import com.luminiasoft.bitshares.errors.MalformedTransactionException; import de.bitsharesmunich.graphenej.interfaces.ByteSerializable;
import com.luminiasoft.bitshares.interfaces.ByteSerializable; import de.bitsharesmunich.graphenej.interfaces.JsonSerializable;
import com.luminiasoft.bitshares.interfaces.JsonSerializable;
import org.bitcoinj.core.DumpedPrivateKey; import org.bitcoinj.core.DumpedPrivateKey;
import org.bitcoinj.core.ECKey; import org.bitcoinj.core.ECKey;

View file

@ -1,6 +1,6 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.luminiasoft.bitshares.errors.MalformedTransactionException; import de.bitsharesmunich.graphenej.errors.MalformedTransactionException;
import org.bitcoinj.core.ECKey; import org.bitcoinj.core.ECKey;

View file

@ -1,11 +1,10 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.luminiasoft.bitshares.objects.Memo; import de.bitsharesmunich.graphenej.objects.Memo;
import com.google.common.primitives.Bytes; import com.google.common.primitives.Bytes;
import com.google.gson.*; import com.google.gson.*;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import org.bitcoinj.core.ECKey;
/** /**
* Class used to encapsulate the TransferOperation operation related functionalities. * Class used to encapsulate the TransferOperation operation related functionalities.

View file

@ -1,7 +1,7 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.luminiasoft.bitshares.objects.Memo; import de.bitsharesmunich.graphenej.objects.Memo;
import com.luminiasoft.bitshares.errors.MalformedTransactionException; import de.bitsharesmunich.graphenej.errors.MalformedTransactionException;
import org.bitcoinj.core.ECKey; import org.bitcoinj.core.ECKey;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -1,8 +1,8 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.google.gson.*; import com.google.gson.*;
import com.luminiasoft.bitshares.interfaces.ByteSerializable; import de.bitsharesmunich.graphenej.interfaces.ByteSerializable;
import com.luminiasoft.bitshares.interfaces.JsonSerializable; import de.bitsharesmunich.graphenej.interfaces.JsonSerializable;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.DataOutput; import java.io.DataOutput;

View file

@ -1,7 +1,6 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import org.tukaani.xz.FinishableOutputStream; import org.tukaani.xz.FinishableOutputStream;
import com.google.common.primitives.Bytes;
import org.tukaani.xz.LZMA2Options; import org.tukaani.xz.LZMA2Options;
import org.tukaani.xz.LZMAInputStream; import org.tukaani.xz.LZMAInputStream;
import org.tukaani.xz.LZMAOutputStream; import org.tukaani.xz.LZMAOutputStream;

View file

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import java.io.DataInput; import java.io.DataInput;

View file

@ -1,6 +1,6 @@
package com.luminiasoft.bitshares; package de.bitsharesmunich.graphenej;
import com.luminiasoft.bitshares.interfaces.ByteSerializable; import de.bitsharesmunich.graphenej.interfaces.ByteSerializable;
/** /**
* Created by nelson on 12/5/16. * Created by nelson on 12/5/16.

View file

@ -1,13 +1,13 @@
package com.luminiasoft.bitshares.ws; package de.bitsharesmunich.graphenej.api;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import com.luminiasoft.bitshares.RPC; import de.bitsharesmunich.graphenej.RPC;
import com.luminiasoft.bitshares.interfaces.WitnessResponseListener; import de.bitsharesmunich.graphenej.interfaces.WitnessResponseListener;
import com.luminiasoft.bitshares.models.AccountProperties; import de.bitsharesmunich.graphenej.models.AccountProperties;
import com.luminiasoft.bitshares.models.ApiCall; import de.bitsharesmunich.graphenej.models.ApiCall;
import com.luminiasoft.bitshares.models.BaseResponse; import de.bitsharesmunich.graphenej.models.BaseResponse;
import com.luminiasoft.bitshares.models.WitnessResponse; import de.bitsharesmunich.graphenej.models.WitnessResponse;
import com.neovisionaries.ws.client.WebSocket; import com.neovisionaries.ws.client.WebSocket;
import com.neovisionaries.ws.client.WebSocketAdapter; import com.neovisionaries.ws.client.WebSocketAdapter;
import com.neovisionaries.ws.client.WebSocketException; import com.neovisionaries.ws.client.WebSocketException;

View file

@ -1,20 +1,21 @@
package com.luminiasoft.bitshares.ws; package de.bitsharesmunich.graphenej.api;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import com.google.gson.JsonParser; import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import com.luminiasoft.bitshares.RPC; import de.bitsharesmunich.graphenej.RPC;
import com.luminiasoft.bitshares.interfaces.JsonSerializable; import de.bitsharesmunich.graphenej.interfaces.JsonSerializable;
import com.luminiasoft.bitshares.interfaces.WitnessResponseListener; import de.bitsharesmunich.graphenej.interfaces.WitnessResponseListener;
import com.luminiasoft.bitshares.models.AccountProperties; import de.bitsharesmunich.graphenej.models.AccountProperties;
import com.luminiasoft.bitshares.models.ApiCall; import de.bitsharesmunich.graphenej.models.BaseResponse;
import com.luminiasoft.bitshares.models.BaseResponse;
import com.luminiasoft.bitshares.models.WitnessResponse;
import com.neovisionaries.ws.client.WebSocket; import com.neovisionaries.ws.client.WebSocket;
import com.neovisionaries.ws.client.WebSocketAdapter; import com.neovisionaries.ws.client.WebSocketAdapter;
import com.neovisionaries.ws.client.WebSocketException; import com.neovisionaries.ws.client.WebSocketException;
import com.neovisionaries.ws.client.WebSocketFrame; import com.neovisionaries.ws.client.WebSocketFrame;
import de.bitsharesmunich.graphenej.models.ApiCall;
import de.bitsharesmunich.graphenej.models.WitnessResponse;
import java.io.Serializable; import java.io.Serializable;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -1,17 +1,16 @@
package com.luminiasoft.bitshares.ws; package de.bitsharesmunich.graphenej.api;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import com.google.gson.JsonParser; import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import com.luminiasoft.bitshares.Address; import de.bitsharesmunich.graphenej.Address;
import com.luminiasoft.bitshares.RPC; import de.bitsharesmunich.graphenej.RPC;
import com.luminiasoft.bitshares.interfaces.JsonSerializable; import de.bitsharesmunich.graphenej.interfaces.JsonSerializable;
import com.luminiasoft.bitshares.interfaces.WitnessResponseListener; import de.bitsharesmunich.graphenej.interfaces.WitnessResponseListener;
import com.luminiasoft.bitshares.models.AccountProperties; import de.bitsharesmunich.graphenej.models.ApiCall;
import com.luminiasoft.bitshares.models.ApiCall; import de.bitsharesmunich.graphenej.models.BaseResponse;
import com.luminiasoft.bitshares.models.BaseResponse; import de.bitsharesmunich.graphenej.models.WitnessResponse;
import com.luminiasoft.bitshares.models.WitnessResponse;
import com.neovisionaries.ws.client.WebSocket; import com.neovisionaries.ws.client.WebSocket;
import com.neovisionaries.ws.client.WebSocketAdapter; import com.neovisionaries.ws.client.WebSocketAdapter;
import com.neovisionaries.ws.client.WebSocketException; import com.neovisionaries.ws.client.WebSocketException;

View file

@ -1,17 +1,17 @@
package com.luminiasoft.bitshares.ws; package de.bitsharesmunich.graphenej.api;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import com.luminiasoft.bitshares.AssetAmount; import de.bitsharesmunich.graphenej.AssetAmount;
import com.luminiasoft.bitshares.RPC; import de.bitsharesmunich.graphenej.RPC;
import com.luminiasoft.bitshares.TransferOperation; import de.bitsharesmunich.graphenej.TransferOperation;
import com.luminiasoft.bitshares.UserAccount; import de.bitsharesmunich.graphenej.UserAccount;
import com.luminiasoft.bitshares.interfaces.WitnessResponseListener; import de.bitsharesmunich.graphenej.interfaces.WitnessResponseListener;
import com.luminiasoft.bitshares.models.ApiCall; import de.bitsharesmunich.graphenej.models.ApiCall;
import com.luminiasoft.bitshares.models.BaseResponse; import de.bitsharesmunich.graphenej.models.BaseResponse;
import com.luminiasoft.bitshares.models.HistoricalTransfer; import de.bitsharesmunich.graphenej.models.HistoricalTransfer;
import com.luminiasoft.bitshares.models.WitnessResponse; import de.bitsharesmunich.graphenej.models.WitnessResponse;
import com.neovisionaries.ws.client.WebSocket; import com.neovisionaries.ws.client.WebSocket;
import com.neovisionaries.ws.client.WebSocketAdapter; import com.neovisionaries.ws.client.WebSocketAdapter;
import com.neovisionaries.ws.client.WebSocketException; import com.neovisionaries.ws.client.WebSocketException;

View file

@ -1,20 +1,20 @@
package com.luminiasoft.bitshares.ws; package de.bitsharesmunich.graphenej.api;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import com.luminiasoft.bitshares.Asset; import de.bitsharesmunich.graphenej.AssetAmount;
import com.luminiasoft.bitshares.AssetAmount; import de.bitsharesmunich.graphenej.RPC;
import com.luminiasoft.bitshares.BaseOperation; import de.bitsharesmunich.graphenej.interfaces.WitnessResponseListener;
import com.luminiasoft.bitshares.RPC; import de.bitsharesmunich.graphenej.models.ApiCall;
import com.luminiasoft.bitshares.interfaces.WitnessResponseListener; import de.bitsharesmunich.graphenej.models.BaseResponse;
import com.luminiasoft.bitshares.models.ApiCall; import de.bitsharesmunich.graphenej.models.WitnessResponse;
import com.luminiasoft.bitshares.models.BaseResponse;
import com.luminiasoft.bitshares.models.WitnessResponse;
import com.neovisionaries.ws.client.WebSocket; import com.neovisionaries.ws.client.WebSocket;
import com.neovisionaries.ws.client.WebSocketAdapter; import com.neovisionaries.ws.client.WebSocketAdapter;
import com.neovisionaries.ws.client.WebSocketException; import com.neovisionaries.ws.client.WebSocketException;
import com.neovisionaries.ws.client.WebSocketFrame; import com.neovisionaries.ws.client.WebSocketFrame;
import de.bitsharesmunich.graphenej.Asset;
import de.bitsharesmunich.graphenej.BaseOperation;
import java.io.Serializable; import java.io.Serializable;
import java.lang.reflect.Type; import java.lang.reflect.Type;

View file

@ -1,13 +1,13 @@
package com.luminiasoft.bitshares.ws; package de.bitsharesmunich.graphenej.api;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import com.luminiasoft.bitshares.RPC; import de.bitsharesmunich.graphenej.RPC;
import com.luminiasoft.bitshares.UserAccount; import de.bitsharesmunich.graphenej.UserAccount;
import com.luminiasoft.bitshares.interfaces.WitnessResponseListener; import de.bitsharesmunich.graphenej.interfaces.WitnessResponseListener;
import com.luminiasoft.bitshares.models.ApiCall; import de.bitsharesmunich.graphenej.models.ApiCall;
import com.luminiasoft.bitshares.models.BaseResponse; import de.bitsharesmunich.graphenej.models.BaseResponse;
import com.luminiasoft.bitshares.models.WitnessResponse; import de.bitsharesmunich.graphenej.models.WitnessResponse;
import com.neovisionaries.ws.client.WebSocket; import com.neovisionaries.ws.client.WebSocket;
import com.neovisionaries.ws.client.WebSocketAdapter; import com.neovisionaries.ws.client.WebSocketAdapter;
import com.neovisionaries.ws.client.WebSocketException; import com.neovisionaries.ws.client.WebSocketException;

View file

@ -1,23 +1,22 @@
package com.luminiasoft.bitshares.ws; package de.bitsharesmunich.graphenej.api;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import com.luminiasoft.bitshares.*;
import com.luminiasoft.bitshares.interfaces.WitnessResponseListener;
import com.luminiasoft.bitshares.models.ApiCall;
import com.luminiasoft.bitshares.models.BaseResponse;
import com.luminiasoft.bitshares.models.DynamicGlobalProperties;
import com.luminiasoft.bitshares.models.WitnessResponse;
import com.neovisionaries.ws.client.WebSocket;
import com.neovisionaries.ws.client.WebSocketAdapter;
import com.neovisionaries.ws.client.WebSocketException;
import com.neovisionaries.ws.client.WebSocketFrame;
import java.io.Serializable; import java.io.Serializable;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import de.bitsharesmunich.graphenej.*;
import de.bitsharesmunich.graphenej.interfaces.WitnessResponseListener;
import de.bitsharesmunich.graphenej.models.ApiCall;
import de.bitsharesmunich.graphenej.models.BaseResponse;
import de.bitsharesmunich.graphenej.models.DynamicGlobalProperties;
import de.bitsharesmunich.graphenej.models.WitnessResponse;
import com.neovisionaries.ws.client.WebSocket;
import com.neovisionaries.ws.client.WebSocketAdapter;
import com.neovisionaries.ws.client.WebSocketException;
import com.neovisionaries.ws.client.WebSocketFrame;
/** /**
* Class that will handle the transaction publication procedure. * Class that will handle the transaction publication procedure.

View file

@ -32,7 +32,7 @@
* fitness for a particular purpose and non-infringement. * fitness for a particular purpose and non-infringement.
*/ */
package com.luminiasoft.bitshares.crypto; package de.bitsharesmunich.graphenej.crypto;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.File; import java.io.File;

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares.crypto; package de.bitsharesmunich.graphenej.crypto;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;

View file

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.luminiasoft.bitshares.crypto; package de.bitsharesmunich.graphenej.crypto;
public interface RandomSource { public interface RandomSource {
/** /**

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares.crypto; package de.bitsharesmunich.graphenej.crypto;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.security.DigestException; import java.security.DigestException;

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares.errors; package de.bitsharesmunich.graphenej.errors;
/** /**
* Created by nelson on 12/1/16. * Created by nelson on 12/1/16.

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares.errors; package de.bitsharesmunich.graphenej.errors;
/** /**
* Created by nelson on 11/14/16. * Created by nelson on 11/14/16.

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares.interfaces; package de.bitsharesmunich.graphenej.interfaces;
/** /**
* Interface implemented by all entities for which makes sense to have a byte-array representation. * Interface implemented by all entities for which makes sense to have a byte-array representation.

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares.interfaces; package de.bitsharesmunich.graphenej.interfaces;
/** /**
* Interface used to group both ByteSerializable and JsonSerializable interfaces. * Interface used to group both ByteSerializable and JsonSerializable interfaces.

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares.interfaces; package de.bitsharesmunich.graphenej.interfaces;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;

View file

@ -1,7 +1,7 @@
package com.luminiasoft.bitshares.interfaces; package de.bitsharesmunich.graphenej.interfaces;
import com.luminiasoft.bitshares.models.BaseResponse; import de.bitsharesmunich.graphenej.models.BaseResponse;
import com.luminiasoft.bitshares.models.WitnessResponse; import de.bitsharesmunich.graphenej.models.WitnessResponse;
/** /**
* Class used to represent any listener to network requests. * Class used to represent any listener to network requests.

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares.models; package de.bitsharesmunich.graphenej.models;
/** /**
* Created by nelson on 11/15/16. * Created by nelson on 11/15/16.

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares.models; package de.bitsharesmunich.graphenej.models;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray; import com.google.gson.JsonArray;
@ -6,7 +6,7 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer; import com.google.gson.JsonSerializer;
import com.luminiasoft.bitshares.interfaces.JsonSerializable; import de.bitsharesmunich.graphenej.interfaces.JsonSerializable;
import java.io.Serializable; import java.io.Serializable;
import java.lang.reflect.Type; import java.lang.reflect.Type;

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares.models; package de.bitsharesmunich.graphenej.models;
/** /**
* Created by nelson on 11/12/16. * Created by nelson on 11/12/16.

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares.models; package de.bitsharesmunich.graphenej.models;
/** /**
* Class used to deserialize the 'result' field returned by the full node after making a call * Class used to deserialize the 'result' field returned by the full node after making a call

View file

@ -1,6 +1,6 @@
package com.luminiasoft.bitshares.models; package de.bitsharesmunich.graphenej.models;
import com.luminiasoft.bitshares.TransferOperation; import de.bitsharesmunich.graphenej.TransferOperation;
/** /**
* This class offers support to deserialization of transfer operations received by the API * This class offers support to deserialization of transfer operations received by the API

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares.models; package de.bitsharesmunich.graphenej.models;
/** /**
* Generic witness response * Generic witness response

View file

@ -1,13 +1,13 @@
package com.luminiasoft.bitshares.objects; package de.bitsharesmunich.graphenej.objects;
import com.google.common.primitives.Bytes; import com.google.common.primitives.Bytes;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.luminiasoft.bitshares.PublicKey; import de.bitsharesmunich.graphenej.PublicKey;
import com.luminiasoft.bitshares.Util; import de.bitsharesmunich.graphenej.Util;
import com.luminiasoft.bitshares.crypto.SecureRandomStrengthener; import de.bitsharesmunich.graphenej.crypto.SecureRandomStrengthener;
import com.luminiasoft.bitshares.interfaces.ByteSerializable; import de.bitsharesmunich.graphenej.interfaces.ByteSerializable;
import com.luminiasoft.bitshares.interfaces.JsonSerializable; import de.bitsharesmunich.graphenej.interfaces.JsonSerializable;
import java.math.BigInteger; import java.math.BigInteger;
import java.security.MessageDigest; import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;

View file

@ -1,74 +1,74 @@
package com.luminiasoft.bitshares.objects; package de.bitsharesmunich.graphenej.objects;
import com.luminiasoft.bitshares.PublicKey; import de.bitsharesmunich.graphenej.PublicKey;
/** /**
* Class to build a Memo Object * Class to build a Memo Object
* @author henry 10/12/2016 * @author henry 10/12/2016
*/ */
public class MemoBuilder { public class MemoBuilder {
private PublicKey fromKey; private PublicKey fromKey;
private PublicKey toKey; private PublicKey toKey;
private String message; private String message;
private long nonce = 0; private long nonce = 0;
/** /**
* Empty Constructor * Empty Constructor
*/ */
public MemoBuilder() { public MemoBuilder() {
} }
/** /**
* Set the key of the Source, needs to have a private Key access * Set the key of the Source, needs to have a private Key access
* @param fromKey The Public Key of the sender * @param fromKey The Public Key of the sender
* @return The MemoBuilder * @return The MemoBuilder
*/ */
public MemoBuilder setFromKey(PublicKey fromKey) { public MemoBuilder setFromKey(PublicKey fromKey) {
this.fromKey = fromKey; this.fromKey = fromKey;
return this; return this;
} }
/** /**
* Set the key of the destination, only need the public key. * Set the key of the destination, only need the public key.
* @param toKey The Public Key of the receiver * @param toKey The Public Key of the receiver
* @return The MemoBuilder * @return The MemoBuilder
*/ */
public MemoBuilder setToKey(PublicKey toKey) { public MemoBuilder setToKey(PublicKey toKey) {
this.toKey = toKey; this.toKey = toKey;
return this; return this;
} }
/** /**
* Set the message to be send * Set the message to be send
* @param message The message as a String * @param message The message as a String
* @return The MemoBuilder * @return The MemoBuilder
*/ */
public MemoBuilder setMessage(String message) { public MemoBuilder setMessage(String message) {
this.message = message; this.message = message;
return this; return this;
} }
/** /**
* (Optional) Sets a custom nonce * (Optional) Sets a custom nonce
* @param nonce The custom nonce * @param nonce The custom nonce
* @return The MemoBuilder * @return The MemoBuilder
*/ */
public MemoBuilder setNone(Long nonce) { public MemoBuilder setNone(Long nonce) {
this.nonce = nonce; this.nonce = nonce;
return this; return this;
} }
/** /**
* Biulds the memo object * Biulds the memo object
* @return The Memo object * @return The Memo object
*/ */
public Memo build() { public Memo build() {
//Todo unencode key //Todo unencode key
if (nonce == 0) { if (nonce == 0) {
return Memo.encodeMessage(fromKey, toKey, message.getBytes()); return Memo.encodeMessage(fromKey, toKey, message.getBytes());
} }
return Memo.encodeMessage(fromKey, toKey, message.getBytes(), nonce); return Memo.encodeMessage(fromKey, toKey, message.getBytes(), nonce);
} }
} }

View file

@ -1,4 +1,4 @@
package com.luminiasoft.bitshares.test; package de.bitsharesmunich.graphenej.test;
/* /*
* Copyright (C) 2015 Neo Visionaries Inc. * Copyright (C) 2015 Neo Visionaries Inc.