def p2sh(self, s):
        """
        Parse a pay-to-script-hash address.
        Return a :class:`Contract` or None.
        """
        data = self.parse_b58_hashed(s)
        if (None in (data, self._pay_to_script_prefix) or
                not data.startswith(self._pay_to_script_prefix)):
            return None
        size = len(self._pay_to_script_prefix)
        script = self._network.contract.for_p2sh(data[size:])
        script_info = self._network.contract.info_for_script(script)
        return Contract(script_info, self._network)
def p2sh ( self , s ) : data = self . parse_b58_hashed ( s ) if ( None in ( data , self . _pay_to_script_prefix ) or not data . startswith ( self . _pay_to_script_prefix ) ) : return None size = len ( self . _pay_to_script_prefix ) script = self . _network . contract . for_p2sh ( data [ size : ] ) script_info = self . _network . contract . info_for_script ( script ) return Contract ( script_info , self . _network )
Parse a pay-to-script-hash address.
        Return a :class:`Contract` or None.