@Test public void getNetwork() { NetworkParameters params = LegacyAddress.getParametersFromAddress("17kzeh4N8g49GFvdDzSf8PjaPfyoD1MndL"); assertEquals(MAINNET.getId(), params.getId()); params = LegacyAddress.getParametersFromAddress("n4eA2nbYqErp7H6jebchxAN59DmNpksexv"); assertEquals(TESTNET.getId(), params.getId()); }
public static NetworkParameters getParametersFromAddress(String address) throws AddressFormatException { return LegacyAddress.fromBase58(null, address).getParameters(); }
LegacyAddress extends Address { public static NetworkParameters getParametersFromAddress(String address) throws AddressFormatException { return LegacyAddress.fromBase58(null, address).getParameters(); } }
LegacyAddress extends Address { public static NetworkParameters getParametersFromAddress(String address) throws AddressFormatException { return LegacyAddress.fromBase58(null, address).getParameters(); } private  LegacyAddress(NetworkParameters params, boolean p2sh, byte[] hash160); }
LegacyAddress extends Address { public static NetworkParameters getParametersFromAddress(String address) throws AddressFormatException { return LegacyAddress.fromBase58(null, address).getParameters(); } private  LegacyAddress(NetworkParameters params, boolean p2sh, byte[] hash160); static LegacyAddress fromPubKeyHash(NetworkParameters params, byte[] hash160); static LegacyAddress fromKey(NetworkParameters params, ECKey key); static LegacyAddress fromScriptHash(NetworkParameters params, byte[] hash160); static LegacyAddress fromBase58(@Nullable NetworkParameters params, String base58); int getVersion(); String toBase58(); @Override byte[] getHash(); @Override ScriptType getOutputScriptType(); static NetworkParameters getParametersFromAddress(String address); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override LegacyAddress clone(); @Override int compareTo(Address o); }
LegacyAddress extends Address { public static NetworkParameters getParametersFromAddress(String address) throws AddressFormatException { return LegacyAddress.fromBase58(null, address).getParameters(); } private  LegacyAddress(NetworkParameters params, boolean p2sh, byte[] hash160); static LegacyAddress fromPubKeyHash(NetworkParameters params, byte[] hash160); static LegacyAddress fromKey(NetworkParameters params, ECKey key); static LegacyAddress fromScriptHash(NetworkParameters params, byte[] hash160); static LegacyAddress fromBase58(@Nullable NetworkParameters params, String base58); int getVersion(); String toBase58(); @Override byte[] getHash(); @Override ScriptType getOutputScriptType(); static NetworkParameters getParametersFromAddress(String address); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override LegacyAddress clone(); @Override int compareTo(Address o); static final int LENGTH; final boolean p2sh; }