Skip to content

Commit ec36cba

Browse files
committed
updates
1 parent c0216bf commit ec36cba

File tree

14 files changed

+258
-112
lines changed

14 files changed

+258
-112
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ project build.gradle
2424
```groovy
2525
2626
ext {
27-
minterBlockchainSDK = "0.12.2"
27+
minterBlockchainSDK = "0.13.0"
2828
}
2929
3030
dependencies {

RELEASE.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Release notes
22

3+
## 0.13.0
4+
- Changes for signing transaction logic
5+
- Fixed some api result models
6+
- Updated tests
7+
- Max supply now defaults to 10^15
8+
39
## 0.12.2
410
- Added Deeplink builder with Url-Safe base64 encoder
511
- Updated tests
@@ -25,7 +31,7 @@
2531
- Added method to sign tx with a signature created outside `Transaction#signExternal`
2632

2733
## 0.10.0
28-
- Added check decoding from **Mc[data]**
34+
- Added check decoding from **Mc...**
2935
- More check tests
3036
- Fixed check signing
3137

build.gradle

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ buildscript {
3131
mavenLocal()
3232
}
3333
dependencies {
34-
classpath 'com.android.tools.build:gradle:3.6.1'
34+
classpath 'com.android.tools.build:gradle:4.0.0'
3535
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
3636
}
3737
}
@@ -53,19 +53,18 @@ allprojects {
5353
apply plugin: 'com.android.library'
5454
apply plugin: 'maven'
5555
apply plugin: 'maven-publish'
56-
apply plugin: 'jacoco'
5756
apply plugin: 'com.jfrog.bintray'
5857

5958

6059
group = 'network.minter.android'
61-
version = '0.12.2'
60+
version = '0.13.0'
6261

6362
ext {
6463
minterMinSdk = 16
6564
minterMaxSdk = 29
6665
minterBuildTools = "29.0.2"
6766
minterLibSupport = "28.0.0"
68-
minterCoreVers = "0.7.0"
67+
minterCoreVers = "0.7.1"
6968

7069

7170
buildArtifactName = project.name
@@ -153,10 +152,12 @@ android {
153152
buildTypes {
154153
release {
155154
minifyEnabled true
155+
testCoverageEnabled = false
156156
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
157157
}
158158
debug {
159159
minifyEnabled true
160+
testCoverageEnabled = false
160161
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
161162
}
162163
}
@@ -172,7 +173,7 @@ android {
172173
}
173174
netTest {
174175
dimension "env"
175-
buildConfigField "String", "BASE_NODE_URL", '"https://minter-node-1.testnet.minter.network:8841"'
176+
buildConfigField "String", "BASE_NODE_URL", '"https://minter-node-1.testnet.minter.network"'
176177
buildConfigField "network.minter.blockchain.models.operational.BlockchainID", "BLOCKCHAIN_ID", "network.minter.blockchain.models.operational.BlockchainID.TestNet"
177178
}
178179
}
@@ -187,10 +188,10 @@ dependencies {
187188
compileOnly 'com.google.code.findbugs:jsr305:3.0.2'
188189

189190
// network
190-
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
191-
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
192-
implementation 'com.squareup.retrofit2:retrofit:2.6.0'
193-
implementation 'com.squareup.retrofit2:converter-gson:2.6.0'
191+
implementation 'com.squareup.okhttp3:okhttp:4.5.0'
192+
implementation 'com.squareup.okhttp3:logging-interceptor:4.5.0'
193+
implementation 'com.squareup.retrofit2:retrofit:2.8.1'
194+
implementation 'com.squareup.retrofit2:converter-gson:2.8.1'
194195

195196
implementation 'org.parceler:parceler-api:1.1.12'
196197
annotationProcessor 'org.parceler:parceler:1.1.12'
@@ -200,15 +201,13 @@ dependencies {
200201
implementation 'com.google.guava:guava:26.0-android'
201202

202203
// testing
203-
testImplementation 'junit:junit:4.12'
204+
testImplementation 'junit:junit:4.13'
204205
androidTestImplementation 'androidx.annotation:annotation:1.1.0'
205206
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
206207
androidTestImplementation 'androidx.test:rules:1.2.0'
207-
androidTestImplementation 'com.squareup.retrofit2:converter-gson:2.6.0'
208+
androidTestImplementation 'com.squareup.retrofit2:converter-gson:2.8.1'
208209
androidTestImplementation 'com.google.code.gson:gson:2.8.6'
209210
}
210211

211-
// Coverage
212-
apply from: 'scripts/jacoco.gradle'
213212
// Publishing
214213
apply from: 'scripts/maven_publish.gradle'

gradle.properties

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) by MinterTeam. 2019
2+
# Copyright (C) by MinterTeam. 2020
33
# @link <a href="https://github.com/MinterTeam">Org Github</a>
44
# @link <a href="https://github.com/edwardstock">Maintainer Github</a>
55
#
@@ -24,4 +24,12 @@
2424
# THE SOFTWARE.
2525
#
2626
android.enableJetifier=true
27-
android.useAndroidX=true
27+
android.useAndroidX=true
28+
bintray_user=edwardstock
29+
bintray_license_name=MIT
30+
bintray_license_url=https://github.com/MinterTeam/minter-android-blockchain/blob/master/LICENSE.txt
31+
bintray_repo=android
32+
bintray_user_repo=android
33+
bintray_user_org=minterteam
34+
bintray_gh_repo=MinterTeam/minter-android-blockchain
35+
bintray_website=https://github.com/MinterTeam/minter-android-blockchain

gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
# THE SOFTWARE.
2525
#
2626

27-
#Fri Mar 13 16:01:27 MSK 2020
27+
#Wed Feb 26 14:06:05 MSK 2020
2828
distributionBase=GRADLE_USER_HOME
2929
distributionPath=wrapper/dists
3030
zipStoreBase=GRADLE_USER_HOME
3131
zipStorePath=wrapper/dists
32-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
32+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

src/main/java/network/minter/blockchain/models/HistoryTransaction.java

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
import network.minter.blockchain.models.operational.Transaction;
4040
import network.minter.core.crypto.BytesData;
4141
import network.minter.core.crypto.MinterAddress;
42-
import network.minter.core.crypto.MinterCheck;
4342
import network.minter.core.crypto.MinterPublicKey;
4443

4544
/**
@@ -75,7 +74,7 @@ public enum Type {
7574
@SerializedName("4")
7675
BuyCoin(TxConvertCoinResult.class),
7776
@SerializedName("5")
78-
CreateCoin(TxCreateResult.class),
77+
CreateCoin(TxCreateCoinResult.class),
7978
@SerializedName("6")
8079
DeclareCandidacy(TxDeclareCandidacyResult.class),
8180
@SerializedName("7")
@@ -141,15 +140,17 @@ public BigDecimal getAmount() {
141140
* Data model for creating coin transaction
142141
*/
143142
@Parcel
144-
public static class TxCreateResult extends TxBaseResult {
143+
public static class TxCreateCoinResult extends TxBaseResult {
145144
public String name;
146145
public String symbol;
147146
@SerializedName("initial_amount")
148147
public BigInteger initialAmount;
149148
@SerializedName("initial_reserve")
150149
public BigInteger initialReserve;
151150
@SerializedName("constant_reserve_ratio")
152-
public BigDecimal constantReserveRatio;
151+
public BigDecimal crr;
152+
@SerializedName("max_supply")
153+
public BigInteger maxSupply;
153154

154155
public String getName() {
155156
return name;
@@ -171,8 +172,8 @@ public BigDecimal getInitialReserve() {
171172
return Transaction.humanizeValue(initialReserve);
172173
}
173174

174-
public BigDecimal getConstantReserveRatio() {
175-
return constantReserveRatio;
175+
public BigDecimal getCrr() {
176+
return crr;
176177
}
177178
}
178179

@@ -322,18 +323,29 @@ public String getCoin() {
322323
@Parcel
323324
public static class TxRedeemCheckResult extends TxBaseResult {
324325
@SerializedName("raw_check")
325-
public MinterCheck rawCheck;
326-
public BytesData proof;
326+
public String rawCheck;
327+
public String proof;
327328

328-
public BytesData getProof() {
329+
/**
330+
* Base64 encoded proof data
331+
* @return
332+
*/
333+
public String getProof() {
329334
return proof;
330335
}
331336

332-
public MinterCheck getRawCheck() {
337+
/**
338+
* Base64 encoded check data
339+
* @return
340+
*/
341+
public String getRawCheck() {
333342
return rawCheck;
334343
}
335344
}
336345

346+
/**
347+
* To get created multisig address, use {@link HistoryTransaction.tags['tx.created_multisig']}
348+
*/
337349
@Parcel
338350
public static class TxCreateMultisigResult extends TxBaseResult {
339351
public BigInteger threshold;
@@ -349,13 +361,6 @@ public static class TxMultisendResult extends TxBaseResult {
349361

350362
@Parcel
351363
public static class TxEditCandidateResult extends TxBaseResult {
352-
@SerializedName("list")
353-
public List<CandidateEditResult> items;
354-
}
355-
356-
//@TODO standard! write to Lashin to fix this
357-
@Parcel
358-
public static class CandidateEditResult {
359364
@SerializedName("reward_address")
360365
public MinterAddress rewardAddress;
361366
@SerializedName("owner_address")

src/main/java/network/minter/blockchain/models/operational/BlockchainID.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) by MinterTeam. 2019
2+
* Copyright (C) by MinterTeam. 2020
33
* @link <a href="https://github.com/MinterTeam">Org Github</a>
44
* @link <a href="https://github.com/edwardstock">Maintainer Github</a>
55
*
@@ -36,7 +36,7 @@ public enum BlockchainID {
3636
MainNet((byte) 0x01),
3737
TestNet((byte) 0x02);
3838

39-
private BigInteger mId;
39+
private final BigInteger mId;
4040

4141
BlockchainID(byte id) {
4242
mId = new BigInteger(String.valueOf(id));

src/main/java/network/minter/blockchain/models/operational/ITransaction.java

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/main/java/network/minter/blockchain/models/operational/SignatureSingleData.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ public SignatureSingleData(BytesData signatureRSV) {
7171
mV = new BytesData(signatureRSV.takeRange(64, 65));
7272
}
7373

74+
public SignatureSingleData(NativeSecp256k1.RecoverableSignature signature) {
75+
setSign(signature);
76+
}
77+
7478
public SignatureSingleData(char[] r, char[] s, char[] v) {
7579
checkArgument(r.length == 32, "R length must be 32");
7680
checkArgument(s.length == 32, "S length must be 32");

0 commit comments

Comments
 (0)