WalletToolsLTC implements IWalletTools { @Override public Classification classify(String input, String cryptoCurrencyHint) { return classify(input); }  @Override String generateSeedMnemonicSeparatedBySpaces(); MasterPrivateKeyLTC getMasterPrivateKey(String seedMnemonicSeparatedBySpaces, String password, String cryptoCurrency, int standard); @Override MasterPrivateKeyLTC getMasterPrivateKey(String prv, String cryptoCurrency, int standard); @Override String getWalletAddress(IMasterPrivateKey master, String cryptoCurrency, int accountIndex, int chainIndex, int index); @Override String getWalletAddressFromAccountPUB(String accountPUB, String cryptoCurrency, int chainIndex, int index); @Override String getWalletPrivateKey(IMasterPrivateKey master, String cryptoCurrency, int accountIndex, int chainIndex, int index); @Override String getAccountPUB(IMasterPrivateKey master, String cryptoCurrency, int accountIndex); @Override String getWalletAddressFromPrivateKey(String privateKey, String cryptoCurrency); boolean isAddressValid(String address, String cryptoCurrency); @Override ISignature sign(String privateKey, byte[] hashToSign, String cryptoCurrency); @Override Classification classify(String input, String cryptoCurrencyHint); @Override Classification classify(String input); @Override Set<String> supportedCryptoCurrencies(); String generateWalletPrivateKeyWithPrefix(String prefix, String cryptoCurrency); static final int XPUB; static final int XPRV; static final int YPUB; static final int YPRV; }
@Test public void classify() { Assert.assertEquals("LTC", walletToolsLTC.classify("ltc1q3cv28h4f33dj7msgm85va0epdw6298rxsparl7", "LTC").getCryptoCurrency()); Assert.assertEquals("LTC", walletToolsLTC.classify("litecoin:ltc1q3cv28h4f33dj7msgm85va0epdw6298rxsparl7", "LTC").getCryptoCurrency()); Assert.assertEquals("LTC", walletToolsLTC.classify("litecoin:LTC1Q3CV28H4F33DJ7MSGM85VA0EPDW6298RXSPARL7", "LTC").getCryptoCurrency()); Assert.assertEquals("LTC", walletToolsLTC.classify("MV5sqqgY5qG3rxBciUQgz9dSYSKiyxN2n3", "LTC").getCryptoCurrency()); Assert.assertEquals("LTC", walletToolsLTC.classify("litecoin:MV5sqqgY5qG3rxBciUQgz9dSYSKiyxN2n3", "LTC").getCryptoCurrency()); Assert.assertEquals("LTC", walletToolsLTC.classify("LZpVz2zJ9Mq4tUx2UeSiFHRqKfN54BL6yr", "LTC").getCryptoCurrency()); Assert.assertEquals("LTC", walletToolsLTC.classify("litecoin:LZpVz2zJ9Mq4tUx2UeSiFHRqKfN54BL6yr", "LTC").getCryptoCurrency()); Assert.assertNull(walletToolsLTC.classify("litecoin:ltc1Q3CV28H4F33DJ7MSGM85VA0EPDW6298RXSPARL7", "LTC").getCryptoCurrency()); Assert.assertNull(walletToolsLTC.classify("ltc1QQQQQQQQQ3cv28h4f33dj7msgm85va0epdw6298rxsparl7", "LTC").getCryptoCurrency()); Assert.assertNull(walletToolsLTC.classify("MV5sqqgY5qG3rxBciUXXXXXdSYSKiyxN2n3", "LTC").getCryptoCurrency()); }