@classmethod
def get_scriptPubKey_type(cls) ->str:
    """return scriptPubKey type for a given concrete class.
        For example, when called on P2SHCoinAddress, will return 'scripthash'.

        calling this method on generic address class is an error."""
    spk_type = getattr(cls, '_scriptpubkey_type', None)
    if not spk_type:
        raise TypeError('scriptPubKey type is not available for {}'.format(
            cls.__name__))
    return cls._scriptpubkey_type
