Java Code Examples for org.bitcoinj.core.LegacyAddress#getHash()

The following examples show how to use org.bitcoinj.core.LegacyAddress#getHash() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Address.java    From balzac with Apache License 2.0 4 votes vote down vote up
public static Address fromBase58(String wif) {
    LegacyAddress addr = LegacyAddress.fromBase58(null, wif);
    return new AddressImpl(addr.getHash(), NetworkType.from(addr.getParameters()));
}
 
Example 2
Source File: Address.java    From balzac with Apache License 2.0 4 votes vote down vote up
public static Address fromPubkey(byte[] pubkey, NetworkType params) {
    LegacyAddress addr = LegacyAddress.fromKey(params.toNetworkParameters(), ECKey.fromPublicOnly(pubkey));
    return new AddressImpl(addr.getHash(), params);
}
 
Example 3
Source File: Address.java    From balzac with Apache License 2.0 4 votes vote down vote up
public static Address fresh(NetworkType params) {
    LegacyAddress addr = LegacyAddress.fromKey(params.toNetworkParameters(), new ECKey());
    return new AddressImpl(addr.getHash(), params);
}