@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("n4eA2nbYqErp7H6jebchxAN59DmNpksexv"); assertEquals(TestNet3Params.get().getId(), params.getId()); } }
@Nullable public static NetworkParameters getParametersFromAddress(String address) throws AddressFormatException { try { return new Address(null, address).getParameters(); } catch (WrongNetworkException e) { throw new RuntimeException(e); } }
Address extends VersionedChecksummedBytes { @Nullable public static NetworkParameters getParametersFromAddress(String address) throws AddressFormatException { try { return new Address(null, address).getParameters(); } catch (WrongNetworkException e) { throw new RuntimeException(e); } } }
Address extends VersionedChecksummedBytes { @Nullable public static NetworkParameters getParametersFromAddress(String address) throws AddressFormatException { try { return new Address(null, address).getParameters(); } catch (WrongNetworkException e) { throw new RuntimeException(e); } } Address(NetworkParameters params, int version, byte[] hash160);  Address(NetworkParameters params, byte[] hash160);  Address(@Nullable NetworkParameters params, String address); }
Address extends VersionedChecksummedBytes { @Nullable public static NetworkParameters getParametersFromAddress(String address) throws AddressFormatException { try { return new Address(null, address).getParameters(); } catch (WrongNetworkException e) { throw new RuntimeException(e); } } Address(NetworkParameters params, int version, byte[] hash160);  Address(NetworkParameters params, byte[] hash160);  Address(@Nullable NetworkParameters params, String address); static Address fromP2SHHash(NetworkParameters params, byte[] hash160); static Address fromP2SHScript(NetworkParameters params, Script scriptPubKey); byte[] getHash160(); boolean isP2SHAddress(); @Nullable NetworkParameters getParameters(); @Nullable static NetworkParameters getParametersFromAddress(String address); }
Address extends VersionedChecksummedBytes { @Nullable public static NetworkParameters getParametersFromAddress(String address) throws AddressFormatException { try { return new Address(null, address).getParameters(); } catch (WrongNetworkException e) { throw new RuntimeException(e); } } Address(NetworkParameters params, int version, byte[] hash160);  Address(NetworkParameters params, byte[] hash160);  Address(@Nullable NetworkParameters params, String address); static Address fromP2SHHash(NetworkParameters params, byte[] hash160); static Address fromP2SHScript(NetworkParameters params, Script scriptPubKey); byte[] getHash160(); boolean isP2SHAddress(); @Nullable NetworkParameters getParameters(); @Nullable static NetworkParameters getParametersFromAddress(String address); static final int LENGTH; }