WalletToolsBTC implements IWalletTools { @Override public Classification classify(String input, String cryptoCurrencyHint) { return classify(input); }  @Override String generateSeedMnemonicSeparatedBySpaces(); MasterPrivateKeyBTC getMasterPrivateKey(String seedMnemonicSeparatedBySpaces, String password, String cryptoCurrency, int standard); @Override MasterPrivateKeyBTC 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; static final int ZPUB; static final int ZPRV; }
@Test public void classify() { Assert.assertEquals("BTC", walletToolsBTC.classify("3CuvPRVeG3jWhm1dLSACKDN9PMPuY6FVXT", "BTC").getCryptoCurrency()); Assert.assertEquals("BTC", walletToolsBTC.classify("112pN943KyuQY26epMwFFvcj85EVVc2fnJ", "BTC").getCryptoCurrency()); Assert.assertEquals("BTC", walletToolsBTC.classify("bc1qlgp42vadfqkdjr0wdwvfnpqlvs5cg3xnl5zukw", "BTC").getCryptoCurrency()); Assert.assertEquals("BTC", walletToolsBTC.classify("BC1QLGP42VADFQKDJR0WDWVFNPQLVS5CG3XNL5ZUKW", "BTC").getCryptoCurrency()); Assert.assertEquals("BTC", walletToolsBTC.classify("bitcoin:3CuvPRVeG3jWhm1dLSACKDN9PMPuY6FVXT", "BTC").getCryptoCurrency()); Assert.assertEquals("BTC", walletToolsBTC.classify("bitcoin:112pN943KyuQY26epMwFFvcj85EVVc2fnJ", "BTC").getCryptoCurrency()); Assert.assertEquals("BTC", walletToolsBTC.classify("bitcoin:bc1qlgp42vadfqkdjr0wdwvfnpqlvs5cg3xnl5zukw", "BTC").getCryptoCurrency()); Assert.assertEquals("BTC", walletToolsBTC.classify("bitcoin:BC1QLGP42VADFQKDJR0WDWVFNPQLVS5CG3XNL5ZUKW", "BTC").getCryptoCurrency()); Assert.assertNull(walletToolsBTC.classify("bitcoin:bc1QLGP42VADFQKDJR0WDWVFNPQLVS5CG3XNL5ZUKW", "BTC").getCryptoCurrency()); }