code: public static LegacyAddress fromKey(NetworkParameters params, ECKey key) {
          return fromPubKeyHash(params, key.getPubKeyHash());
      }
docs: Construct a {@link LegacyAddress} that represents the public part of the given {@link ECKey}. Note that an address is
  derived from a hash of the public key and is not the public key itself.
  
  @param params
  network this address is valid for
  @param key
  only the public part is used
  @return constructed address