Introducing some updates required in order to make this library public via maven central
This commit is contained in:
parent
c6e4b9ea5b
commit
425cb663b1
13 changed files with 55 additions and 1609 deletions
15
.gitignore
vendored
15
.gitignore
vendored
|
@ -7,6 +7,9 @@
|
|||
# Gradle
|
||||
# ------
|
||||
.gradle
|
||||
gradle
|
||||
gradlew
|
||||
gradlew.bat
|
||||
/build
|
||||
/buildSrc/build
|
||||
/subprojects/*/build
|
||||
|
@ -79,8 +82,6 @@ atlassian-ide-plugin.xml
|
|||
# ----
|
||||
/*.log
|
||||
|
||||
src/main/java/com/luminiasoft/bitshares/mycelium/*
|
||||
|
||||
# Ignore bin backups
|
||||
*.bin
|
||||
|
||||
|
@ -92,3 +93,13 @@ pom.xml.releaseBackup
|
|||
pom.xml.versionsBackup
|
||||
pom.xml.next
|
||||
release.properties
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
# Build dir
|
||||
graphenej/build
|
||||
|
||||
local.properties
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -1,3 +0,0 @@
|
|||
dependencies {
|
||||
compile project(':graphenej')
|
||||
}
|
Binary file not shown.
|
@ -1,2 +0,0 @@
|
|||
Manifest-Version: 1.0
|
||||
|
|
@ -1,99 +0,0 @@
|
|||
package de.bitsharesmunich.graphenej;
|
||||
|
||||
public class Main {
|
||||
|
||||
// Brain key from Nelson's app referencing the bilthon-83 account
|
||||
public static final String BILTHON_83_BRAIN_KEY = System.getenv("BILTHON_83_BRAIN_KEY");
|
||||
|
||||
public static final String BILTHON_83_ORIGINAL_BRAIN_KEY = System.getenv("BILTHON_83_ORIGINAL_BRAIN_KEY");
|
||||
|
||||
public static final String BILTHON_1_BRAIN_KEY = System.getenv("BILTHON_1_BRAIN_KEY");
|
||||
|
||||
public static final String BILTHON_5_BRAIN_KEY = System.getenv("BILTHON_5_BRAIN_KEY");
|
||||
|
||||
public static final String BILTHON_7_BRAIN_KEY = System.getenv("BILTHON_7_BRAIN_KEY");
|
||||
|
||||
public static final String BIP39_KEY = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about";
|
||||
|
||||
public static final String WIF = "5KMzB2GqGhnh7ufhgddmz1eKPHS72uTLeL9hHjSvPb1UywWknF5";
|
||||
|
||||
public static final String BILTHON_83_PASSWORD = System.getenv("BILTHON_83_PASSWORD");
|
||||
|
||||
public static final String BILTHON_25_PASSWORD = System.getenv("BILTHON_25_PASSWORD");
|
||||
|
||||
public static final String BILTHON_11_BRAIN_KEY = System.getenv("BILTHON_11_BRAINKEY");
|
||||
|
||||
public static final String BILTHON_15_BRAIN_KEY = System.getenv("BILTHON_15_BRAINKEY");
|
||||
|
||||
public static final String BILTHON_16_BRAIN_KEY = System.getenv("BILTHON_16_BRAINKEY");
|
||||
|
||||
public static final String BILTHON_36_BRAIN_KEY = System.getenv("BILTHON_36_BRAINKEY");
|
||||
|
||||
public static final String GENERIC_PASSWORD = System.getenv("GENERIC_PASSWORD");
|
||||
|
||||
public static final String DISCLOSABLE_PASSWORD = System.getenv("DISCLOSABLE_PASSWORD");
|
||||
|
||||
// Static block information used for transaction serialization tests
|
||||
public static int REF_BLOCK_NUM = 56204;
|
||||
public static int REF_BLOCK_PREFIX = 1614747814;
|
||||
public static int RELATIVE_EXPIRATION = 1478385607;
|
||||
|
||||
public static void main(String[] args) {
|
||||
Test test = new Test();
|
||||
|
||||
// test.testTransactionSerialization();
|
||||
// ECKey.ECDSASignature signature = test.testSigning();
|
||||
|
||||
// try {
|
||||
// test.testWebSocketTransfer();
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// test.testCustomSerializer();
|
||||
// test.testUserAccountSerialization();
|
||||
// test.testTransactionSerialization();
|
||||
// test.testLoginSerialization();
|
||||
// test.testNetworkBroadcastSerialization();
|
||||
// test.testNetworkBroadcastDeserialization();
|
||||
// test.testGetDynamicParams();
|
||||
// test.testGetRequiredFeesSerialization();
|
||||
// test.testRequiredFeesResponse();
|
||||
// test.testTransactionBroadcastSequence();
|
||||
// test.testAccountLookupDeserialization();
|
||||
// test.testPrivateKeyManipulations();
|
||||
// test.testPublicKeyManipulations();
|
||||
// test.testGetAccountByName();
|
||||
// test.testGetRequiredFees();
|
||||
// test.testRandomNumberGeneration();
|
||||
// test.testBrainKeyOperations(false);
|
||||
// test.testBip39Opertion();
|
||||
// test.testAccountNamebyAddress();
|
||||
// test.testAccountNameById();
|
||||
// test.testRelativeAccountHistory();
|
||||
// test.testingInvoiceGeneration();
|
||||
// test.testCompression();
|
||||
// test.testAccountUpdateSerialization();
|
||||
// test.testAccountUpdateOperationBroadcast();
|
||||
// test.testCreateBinFile();
|
||||
// test.testImportBinFile();
|
||||
// test.testExportBinFile();
|
||||
// test.testLzmaCompression();
|
||||
// test.testLzmaDecompression();
|
||||
// test.testSimpleDecompression();
|
||||
// test.testLookupAccounts();
|
||||
// test.testLookupAccounts();
|
||||
// test.testDecodeMemo();
|
||||
// test.testGetRelativeAccountHistory();
|
||||
// test.testLookupAssetSymbols();
|
||||
// test.testListAssets();
|
||||
// test.testGetObjects();
|
||||
// test.testGetBlockHeader();
|
||||
test.testGetLimitOrders();
|
||||
// test.testGetTradeHistory();
|
||||
// test.testAssetSerialization();
|
||||
// test.testGetMarketHistory();
|
||||
// test.testGetAccountBalances();
|
||||
// test.testGetAssetHoldersCount();
|
||||
// test.testSubscription(null);
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -3,8 +3,15 @@ allprojects {
|
|||
}
|
||||
|
||||
subprojects {
|
||||
apply plugin: "java"
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.3.0'
|
||||
}
|
||||
}
|
|
@ -30,4 +30,4 @@ POM_LICENCE_NAME=MIT License
|
|||
POM_LICENCE_URL=https://github.com/kenCode-de/graphenej/blob/master/LICENSE
|
||||
POM_LICENCE_DIST=repo
|
||||
POM_DEVELOPER_ID=bilthon
|
||||
POM_DEVELOPER_NAME=GitHub FullName
|
||||
POM_DEVELOPER_NAME=bilthon
|
|
@ -1,9 +1,10 @@
|
|||
group 'de.bitsharesmunich'
|
||||
version '0.1-SNAPSHOT'
|
||||
version '0.4.0-SNAPSHOT'
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
apply from: 'maven-push.gradle'
|
||||
|
||||
|
||||
dependencies {
|
||||
testCompile group: 'junit', name: 'junit', version: '4.12'
|
||||
compile 'com.neovisionaries:nv-websocket-client:1.30'
|
||||
|
@ -11,3 +12,24 @@ dependencies {
|
|||
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.0'
|
||||
compile group: "org.tukaani", name: "xz", version: "1.6"
|
||||
}
|
||||
|
||||
|
||||
android {
|
||||
compileSdkVersion 24
|
||||
buildToolsVersion "25.0.0"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 17
|
||||
targetSdkVersion 24
|
||||
versionCode 1
|
||||
versionName "0.4.0"
|
||||
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
9
graphenej/src/main/AndroidManifest.xml
Normal file
9
graphenej/src/main/AndroidManifest.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="de.bitsharesmunich.graphenej"
|
||||
android:versionCode="1"
|
||||
android:versionName="0.4.0" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="1" />
|
||||
<application/>
|
||||
</manifest>
|
|
@ -1,67 +0,0 @@
|
|||
package de.bitsharesmunich.graphenej;
|
||||
|
||||
import de.bitsharesmunich.graphenej.errors.MalformedTransactionException;
|
||||
import de.bitsharesmunich.graphenej.operations.AccountUpdateOperation;
|
||||
import org.bitcoinj.core.ECKey;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Class used to build a transaction containing an account update operation.
|
||||
*/
|
||||
public class AccountUpdateTransactionBuilder extends TransactionBuilder {
|
||||
private List<BaseOperation> operations;
|
||||
private AssetAmount fee;
|
||||
private UserAccount account;
|
||||
private Authority owner;
|
||||
private Authority active;
|
||||
private AccountOptions new_options;
|
||||
|
||||
public AccountUpdateTransactionBuilder(ECKey privKey) {
|
||||
super(privKey);
|
||||
}
|
||||
|
||||
|
||||
public AccountUpdateTransactionBuilder setAccont(UserAccount account){
|
||||
this.account = account;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AccountUpdateTransactionBuilder setOwner(Authority owner){
|
||||
this.owner = owner;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AccountUpdateTransactionBuilder setActive(Authority active){
|
||||
this.active = active;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AccountUpdateTransactionBuilder setOptions(AccountOptions options){
|
||||
this.new_options = options;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AccountUpdateTransactionBuilder setFee(AssetAmount fee){
|
||||
this.fee = fee;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Transaction build() throws MalformedTransactionException {
|
||||
if(account == null){
|
||||
throw new MalformedTransactionException("Missing required account information");
|
||||
}else{
|
||||
operations = new ArrayList<>();
|
||||
AccountUpdateOperation operation;
|
||||
if(fee == null){
|
||||
operation = new AccountUpdateOperation(account, owner, active, new_options);
|
||||
}else{
|
||||
operation = new AccountUpdateOperation(account, owner, active, new_options, fee);
|
||||
}
|
||||
operations.add(operation);
|
||||
}
|
||||
return new Transaction(privateKey, blockData, operations);
|
||||
}
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
rootProject.name = "Graphenej"
|
||||
|
||||
include ":graphenej", ":app"
|
||||
include ":graphenej"
|
||||
|
|
Loading…
Reference in a new issue