function fromBase58Check(address) {
  const payload = bs58check.decode(address);
  // TODO: 4.0.0, move to "toOutputScript"
  if (payload.length < 21) throw new TypeError(address + ' is too short');
  if (payload.length > 21) throw new TypeError(address + ' is too long');
  const version = tools.readUInt8(payload, 0);
  const hash = payload.slice(1);
  return { version, hash };
}
Decodes a base58check encoded Bitcoin address and returns the version and hash.

@param address - The base58check encoded Bitcoin address to decode.
@returns An object containing the version and hash of the decoded address.
@throws {TypeError} If the address is too short or too long.