@Test public void getNetwork() throws Exception { NetworkParameters params = Address.getParametersFromAddress(CoinDefinition.UNITTEST_ADDRESS); assertEquals(MainNetParams.get().getId(), params.getId()); if(CoinDefinition.supportsTestNet) { params = Address.getParametersFromAddress("ydzm4Uvr2GkLxTwQnwiyijYUukk1eweBo4"); assertEquals(TestNet3Params.get().getId(), params.getId()); } }
public static NetworkParameters getParametersFromAddress(String address) throws AddressFormatException { try { return Address.fromBase58(null, address).getParameters(); } catch (WrongNetworkException e) { throw new RuntimeException(e); } }
Address extends VersionedChecksummedBytes { public static NetworkParameters getParametersFromAddress(String address) throws AddressFormatException { try { return Address.fromBase58(null, address).getParameters(); } catch (WrongNetworkException e) { throw new RuntimeException(e); } } }
Address extends VersionedChecksummedBytes { public static NetworkParameters getParametersFromAddress(String address) throws AddressFormatException { try { return Address.fromBase58(null, address).getParameters(); } catch (WrongNetworkException e) { throw new RuntimeException(e); } } Address(NetworkParameters params, int version, byte[] hash160);  Address(NetworkParameters params, byte[] hash160); @Deprecated  Address(@Nullable NetworkParameters params, String address); }
Address extends VersionedChecksummedBytes { public static NetworkParameters getParametersFromAddress(String address) throws AddressFormatException { try { return Address.fromBase58(null, address).getParameters(); } catch (WrongNetworkException e) { throw new RuntimeException(e); } } Address(NetworkParameters params, int version, byte[] hash160);  Address(NetworkParameters params, byte[] hash160); @Deprecated  Address(@Nullable NetworkParameters params, String address); static Address fromP2SHHash(NetworkParameters params, byte[] hash160); static Address fromP2SHScript(NetworkParameters params, Script scriptPubKey); static Address fromBase58(@Nullable NetworkParameters params, String base58); byte[] getHash160(); boolean isP2SHAddress(); NetworkParameters getParameters(); static NetworkParameters getParametersFromAddress(String address); @Override Address clone(); }
Address extends VersionedChecksummedBytes { public static NetworkParameters getParametersFromAddress(String address) throws AddressFormatException { try { return Address.fromBase58(null, address).getParameters(); } catch (WrongNetworkException e) { throw new RuntimeException(e); } } Address(NetworkParameters params, int version, byte[] hash160);  Address(NetworkParameters params, byte[] hash160); @Deprecated  Address(@Nullable NetworkParameters params, String address); static Address fromP2SHHash(NetworkParameters params, byte[] hash160); static Address fromP2SHScript(NetworkParameters params, Script scriptPubKey); static Address fromBase58(@Nullable NetworkParameters params, String base58); byte[] getHash160(); boolean isP2SHAddress(); NetworkParameters getParameters(); static NetworkParameters getParametersFromAddress(String address); @Override Address clone(); static final int LENGTH; }