-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved packages around again and introduced bitrafael-client-dummy
- Loading branch information
kkyovsky
committed
May 29, 2020
1 parent
8175354
commit de5d9df
Showing
31 changed files
with
260 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
plugins { | ||
id 'java' | ||
id 'maven-publish' | ||
id 'com.generalbytes.gradle.main' | ||
} | ||
|
||
dependencies { | ||
compile project(':bitrafael-server-api') | ||
compile project(':bitrafael-client-api') | ||
} | ||
|
||
dependencyVerifications { | ||
checksums batmDependencyChecksumsConfig | ||
printUnusedAssertions false | ||
} | ||
|
||
publishing { | ||
if (hasGbUploadArtifactory) { | ||
repositories { | ||
maven { | ||
credentials { | ||
username gbArtifactoryUser | ||
password gbArtifactoryPassword | ||
} | ||
url gbArtifactoryUploadUrl | ||
} | ||
} | ||
} | ||
|
||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
} | ||
} | ||
} |
105 changes: 105 additions & 0 deletions
105
bitrafael-client-dummy/src/main/java/com/generalbytes/bitrafael/client/Client.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
package com.generalbytes.bitrafael.client; | ||
|
||
import com.generalbytes.bitrafael.client.api.IClient; | ||
import com.generalbytes.bitrafael.server.api.dto.*; | ||
|
||
import java.math.BigDecimal; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public class Client implements IClient { | ||
@Override | ||
public long getCurrentBlockchainHeight() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public BigDecimal getAddressBalance(String address) { | ||
return BigDecimal.ONE; | ||
} | ||
|
||
@Override | ||
public BigDecimal getAddressBalanceConfirmed(String address) { | ||
return BigDecimal.ONE; | ||
} | ||
|
||
@Override | ||
public AccountBalance getAccountBalance(String xpub) { | ||
return new AccountBalance(xpub,"nextAddr",0,"nextAddrChange",0,100000000,100000000); | ||
} | ||
|
||
@Override | ||
public TxInfo getAddressLastTransactionInfo(String address) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public AddressInfo getAddressInfo(String address, int limit) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Map<String, TxInfo> getAddressesLastTransactionInfos(List<String> addresses) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Map<String, AddressInfo> getAddressesInfo(List<String> addresses, int limit) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Map<String, Integer> getAddressesAudits(List<String> addresses) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public long getTransactionHeight(String txHash) { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public long getTransactionConfirmations(String txHash) { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public String send(String fromPrivateKey, BigDecimal amount, String toAddress) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String send(String fromPrivateKey, BigDecimal amount, String toAddress, BigDecimal fee) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String send(String[] fromPrivateKeys, BigDecimal[] fromAmounts, String[] toAddresses, BigDecimal[] toAmounts, BigDecimal fee) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public BigDecimal convertAmount(BigDecimal fromAmount, String fromCurrency, String toCurrency) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public List<AmountsPair> convertAmounts(List<AmountsPair> amountsPairs) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public TxFeesInfo getRecommendedTransactionFeesPerByte() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public TxFees getTransactionFees(List<String> txHashes) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public RiskLevel getTransactionRiskLevel(String txHash) { | ||
return null; | ||
} | ||
} |
81 changes: 81 additions & 0 deletions
81
...afael-client-dummy/src/main/java/com/generalbytes/bitrafael/tools/wallet/WalletTools.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
package com.generalbytes.bitrafael.tools.wallet; | ||
|
||
import com.generalbytes.bitrafael.client.api.IClient; | ||
import com.generalbytes.bitrafael.tools.api.wallet.Classification; | ||
import com.generalbytes.bitrafael.tools.api.wallet.IMasterPrivateKey; | ||
import com.generalbytes.bitrafael.tools.api.wallet.ISignature; | ||
import com.generalbytes.bitrafael.tools.api.wallet.IWalletTools; | ||
|
||
import java.util.Set; | ||
|
||
public class WalletTools implements IWalletTools { | ||
@Override | ||
public String generateSeedMnemonicSeparatedBySpaces() { | ||
return "a h o j"; | ||
} | ||
|
||
@Override | ||
public IMasterPrivateKey getMasterPrivateKey(String seedMnemonicSeparatedBySpaces, String password, String cryptoCurrency, int standard) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public IMasterPrivateKey getMasterPrivateKey(String prv, String cryptoCurrency, int standard) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String getAccountPUB(IMasterPrivateKey master, String cryptoCurrency, int accountIndex) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String getWalletAddress(IMasterPrivateKey master, String cryptoCurrency, int accountIndex, int chainIndex, int index) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String getWalletPrivateKey(IMasterPrivateKey master, String cryptoCurrency, int accountIndex, int chainIndex, int index) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String getWalletAddressFromAccountPUB(String accountPUB, String cryptoCurrency, int chainIndex, int index) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String generateWalletPrivateKeyWithPrefix(String prefix, String cryptoCurrency) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String getWalletAddressFromPrivateKey(String privateKey, String cryptoCurrency) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public ISignature sign(String privateKey, byte[] hashToSign, String cryptoCurrency) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public boolean isAddressValid(String address, String cryptoCurrency) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public Set<String> supportedCryptoCurrencies() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Classification classify(String input) { | ||
return new Classification(Classification.TYPE_ADDRESS, IClient.BTC,"1111111111111111111114oLvT2"); | ||
} | ||
|
||
@Override | ||
public Classification classify(String input, String cryptoCurrencyHint) { | ||
return classify(input); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.