Skip to content

Commit 7c235fe

Browse files
author
Erik Lenoir
authored
Merge pull request hubert-marteau#14 from SimplyUb/0.4.0-SNAPSHOT
0.4.0 snapshot
2 parents e64209f + 3678fd8 commit 7c235fe

File tree

83 files changed

+238
-50
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+238
-50
lines changed

pom.xml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>MultiChainJavaAPI</groupId>
55
<artifactId>MultiChainJavaAPI</artifactId>
6-
<version>0.3.1-SNAPSHOT</version>
6+
<version>0.4.0-SNAPSHOT</version>
77

88
<properties>
99
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -12,8 +12,10 @@
1212
<xmlrpc-client.version>3.1.3</xmlrpc-client.version>
1313
<httpclient.version>4.3.6</httpclient.version>
1414
<gson.version>2.8.1</gson.version>
15+
<commons-codec.version>1.10</commons-codec.version>
16+
<commons-collections4.version>4.1</commons-collections4.version>
1517
</properties>
16-
18+
1719
<build>
1820
<sourceDirectory>src</sourceDirectory>
1921
<plugins>
@@ -43,5 +45,15 @@
4345
<artifactId>gson</artifactId>
4446
<version>${gson.version}</version>
4547
</dependency>
48+
<dependency>
49+
<groupId>commons-codec</groupId>
50+
<artifactId>commons-codec</artifactId>
51+
<version>${commons-codec.version}</version>
52+
</dependency>
53+
<dependency>
54+
<groupId>org.apache.commons</groupId>
55+
<artifactId>commons-collections4</artifactId>
56+
<version>${commons-collections4.version}</version>
57+
</dependency>
4658
</dependencies>
4759
</project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Copyright (C) 2017 Worldline, Inc.
3+
*
4+
* MultiChainJavaAPI code distributed under the GPLv3 license, see COPYING file.
5+
* https://github.com/SimplyUb/MultiChainJavaAPI/blob/master/LICENSE
6+
*
7+
*/
8+
package multichain.command;
9+
10+
import java.util.ArrayList;
11+
import java.util.List;
12+
13+
import multichain.command.builders.QueryBuilderBalance;
14+
import multichain.command.builders.QueryBuilderKey;
15+
import multichain.object.BalanceAsset;
16+
import multichain.object.formatters.BalanceFormatter;
17+
18+
/**
19+
* @author Ub - H. MARTEAU
20+
* @version 3.0
21+
*/
22+
public class KeyCommand extends QueryBuilderKey {
23+
public KeyCommand(String ip, String port, String login, String password) {
24+
initialize(ip, port, login, password);
25+
}
26+
27+
public Object getPrivkey(String privkey) throws MultichainException {
28+
return executeDumpPrivkey(privkey);
29+
}
30+
31+
public Object importPrivkey(String privkey) throws MultichainException {
32+
return executeImportPrivkey(privkey);
33+
}
34+
35+
}

src/multichain/command/MultiChainCommand.java renamed to src/main/java/multichain/command/MultiChainCommand.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public class MultiChainCommand {
2222
private RAWTransactionCommand rawTransactionCommand;
2323
private StreamCommand streamCommand;
2424
private WalletTransactionCommand walletTransactionCommand;
25+
private KeyCommand keyCommand;
2526

2627
/**
2728
*
@@ -38,6 +39,7 @@ public MultiChainCommand(String ip, String port, String login, String password)
3839
rawTransactionCommand = new RAWTransactionCommand(ip, port, login, password);
3940
streamCommand = new StreamCommand(ip, port, login, password);
4041
walletTransactionCommand = new WalletTransactionCommand(ip, port, login, password);
42+
keyCommand = new KeyCommand(ip, port, login, password);
4143
}
4244

4345
/**
@@ -190,4 +192,12 @@ public void setChainCommand(ChainCommand chainCommand) {
190192
this.chainCommand = chainCommand;
191193
}
192194

195+
public KeyCommand getKeyCommand() {
196+
return keyCommand;
197+
}
198+
199+
public void setKeyCommand(KeyCommand keyCommand) {
200+
this.keyCommand = keyCommand;
201+
}
202+
193203
}
File renamed without changes.

0 commit comments

Comments
 (0)