private int getVersion() { return neutered ? network.getPublicVersion() : network.getPrivateVersion(); }
public String p2shAddress() { final byte[] script = new byte[22]; script[1] = (byte) 20; hash160into(script, 2, hdKey.getKey()); return encodeAddress(hdKey.getNetwork().p2shVersion(), script); }
public String p2pkhAddress() { return encodeAddress(hdKey.getNetwork().p2pkhVersion(), hdKey.getKey()); }
@Override public Network findByPrivateVersion(final int privateVersion) { for (final Network network : networks) { if (network.getPrivateVersion() == privateVersion) return network; } throw new UnknownNetworkException(String.format("Can't find network that matches private version 0x%x", privateVersion)); }
@Override public Network findByPublicVersion(final int publicVersion) { for (final Network network : networks) { if (network.getPublicVersion() == publicVersion) return network; } throw new UnknownNetworkException(String.format("Can't find network that matches public version 0x%x", publicVersion)); } }
public String p2shAddress() { final byte[] script = new byte[22]; script[1] = (byte) 20; hash160into(script, 2, hdKey.getKey()); return encodeAddress(hdKey.getNetwork().p2shVersion(), script); }
public String p2pkhAddress() { return encodeAddress(hdKey.getNetwork().p2pkhVersion(), hdKey.getKey()); }
private int getVersion() { return neutered ? network.getPublicVersion() : network.getPrivateVersion(); }
public String p2shAddress() { final byte[] script = new byte[22]; script[1] = (byte) 20; hash160into(script, 2, hdKey.getKey()); return encodeAddress(hdKey.getNetwork().p2shVersion(), script); }
public String p2pkhAddress() { return encodeAddress(hdKey.getNetwork().p2pkhVersion(), hdKey.getKey()); }
private int getVersion() { return neutered ? network.getPublicVersion() : network.getPrivateVersion(); }