o
    ¢ØÆh¤
  ã                   @   sh   d dl mZmZ d dlmZ d dlmZmZ d dlm	Z	m
Z
 d dlmZ d dlmZ G dd„ deƒZd	S )
é    )ÚABCÚabstractmethod)ÚAny)ÚChecksumAddressÚHash32)ÚSignedMessageÚSignedTransaction)ÚSignableMessage)ÚTransactionDictTypec                   @   sˆ   e Zd ZdZeedefdd„ƒƒZedede	fdd„ƒZ
edede	fd	d
„ƒZededefdd„ƒZdedefdd„Zdefdd„ZdS )ÚBaseAccountzN
    Specify convenience methods to sign transactions and message hashes.
    Úreturnc                 C   ó   dS )zÑ
        The checksummed public address for this account.

        .. code-block:: python

            >>> my_account.address # doctest: +SKIP
            "0xF0109fC8DF283027b6285cc889F5aA624EaC1F55"

        N© ©Úselfr   r   úe/var/www/html/HyperOracle/crypto_trader/venv/lib/python3.10/site-packages/eth_account/signers/base.pyÚaddress   ó    zBaseAccount.addressÚsignable_messagec                 C   r   )aH  
        Sign the EIP-191_ message.

        This uses the same structure
        as in :meth:`~eth_account.account.Account.sign_message`
        but without specifying the private key.

        :param signable_message: The encoded message, ready for signing

        .. _EIP-191: https://eips.ethereum.org/EIPS/eip-191
        Nr   )r   r   r   r   r   Úsign_message,   r   zBaseAccount.sign_messageÚmessage_hashc                 C   r   )a_  
        Sign the hash of a message.

        .. WARNING:: *Never* sign a hash that you didn't generate,
            it can be an arbitrary transaction. For example, it might
            send all of your account's ether to an attacker.
            Instead, prefer :meth:`~eth_account.account.Account.sign_message`,
            which cannot accidentally sign a transaction.

        This uses the same structure
        as in :meth:`~eth_account.account.Account.unsafe_sign_hash`
        but without specifying the private key.

        :param bytes message_hash: 32 byte hash of the message to sign
        Nr   )r   r   r   r   r   Úunsafe_sign_hash:   r   zBaseAccount.unsafe_sign_hashÚtransaction_dictc                 C   r   )a  
        Sign a transaction dict.

        This uses the same structure as in
        :meth:`~eth_account.account.Account.sign_transaction`
        but without specifying the private key.

        :param dict transaction_dict: transaction with all fields specified
        Nr   )r   r   r   r   r   Úsign_transactionL   r   zBaseAccount.sign_transactionÚotherc                 C   s   t | ƒt |ƒu o| j|jkS )z±
        Equality test between two accounts.

        Two accounts are considered the same if they are exactly the same type,
        and can sign for the same address.
        )Útyper   )r   r   r   r   r   Ú__eq__Z   s   zBaseAccount.__eq__c                 C   s   t t| ƒ| jfƒS )N)Úhashr   r   r   r   r   r   Ú__hash__c   s   zBaseAccount.__hash__N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úpropertyr   r   r   r	   r   r   r   r   r
   r   r   r   Úboolr   Úintr   r   r   r   r   r      s"    ÿþ	r   N)Úabcr   r   Útypingr   Ú
eth_typingr   r   Úeth_account.datastructuresr   r   Úeth_account.messagesr	   Úeth_account.typesr
   r   r   r   r   r   Ú<module>   s    