pybit/py3/block.py
def outputAddr(self) -> str:
        """
        Split script, detect output type, get address
        """
        # Get the encoded address from the output script
        script = self.parsed_pkScript
        pk = script[script.index("PUSH_BYTES")+2]

        # Decode the address
        if len(pk) == 65:
            addr = self.get_P2PKH()
        elif len(pk) == 130:
            addr = self.get_PK2Addr()
        else:
            addr = "Unknown address"

        return addr

        Split script, detect output type, get address
        
Split script, detect output type, get address
Split script detect output type get address
def outputAddr(self) -> str:
        script = self.parsed_pkScript
        pk = script[script.index("PUSH_BYTES")+2]
        if len(pk) == 65:
            addr = self.get_P2PKH()
        elif len(pk) == 130:
            addr = self.get_PK2Addr()
        else:
            addr = "Unknown address"
        return addr
def outputAddr ( self ) -> str : script = self . parsed_pkScript pk = script [ script . index ( "PUSH_BYTES" ) + 2 ] if len ( pk ) == 65 : addr = self . get_P2PKH ( ) elif len ( pk ) == 130 : addr = self . get_PK2Addr ( ) else : addr = "Unknown address" return addr
Split script, detect output type, get address
Split script detect output type get address
"""
        Split script, detect output type, get address
        """ # Get the encoded address from the output script # Decode the address
self