§
    Ìtºfä  ã                   ó  — d dl mZmZ d dlmZ d dlmZ dZdefd„Z	dedee
ef         defd	„Zdee
ef         d
edefd„Zdedefd„Zdedefd„Zdedefd„Zdedefd„Zdedefd„Zdedefd„Zdedefd„Zdedefd„ZdS )é    )ÚDictÚAny)Úa2b_hex)ÚsigningéA   Úreturnc                 ó   — dS )a9  
    keccak256(abi.encode(
            EIP712_MEMBER_REGISTER_TYPEHASH,
            obj.chainId,
            obj.verifyingContract,
            obj.member,
            obj.registered,
            keccak256(bytes(obj.eula)),
            keccak256(bytes(obj.profile))
        ));

    :param data:
    :return:
    N© )Údatas    úX/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/autobahn/xbr/_eip712_base.pyÚ_hashr   "   s   € € € ó    Úeth_privkeyr   c                 ó°   — t          j        || ¦  «        }t          j        |Ž }t          |¦  «        t          k    rt          |¦  «        t          k    sJ ‚|S )z 
    Sign the given data using the given Ethereum private key.

    :param eth_privkey: Signing key.
    :param data: Data to sign.
    :return: Signature.
    )r   Úsign_typed_dataÚv_r_s_to_signatureÚtypeÚbytesÚlenÚ_EIP712_SIG_LEN)r   r   Ú_argsÚ	signatures       r   Úsignr   3   sT   € õ Ô# D¨+Ñ6Ô6€Eõ Ô*¨EÐ2€Iõ �	‰?Œ?�eÒ#Ð#­¨I©¬½/Ò(IÐ(IÐ(IÐ(IàÐr   r   c                 óÜ   — t          |¦  «        t          k    rt          |¦  «        t          k    sJ ‚t	          j        | gt	          j        |¦  «        ¢R Ž }t          |dd…         ¦  «        S )z±
    Recover the Ethereum address of the signer, given the data and signature.

    :param data: Signed data.
    :param signature: Signature.
    :return: Signing address.
    é   N)r   r   r   r   r   Úrecover_typed_dataÚsignature_to_v_r_sr   )r   r   Úsigner_addresss      r   Úrecoverr   G   sf   € õ �	‰?Œ?�eÒ#Ð#­¨I©¬½/Ò(IÐ(IÐ(IÐ(IÝÔ/°Ð]µwÔ7QÐR[Ñ7\Ô7\Ð]Ð]Ð]€Nå�> ! " "Ô%Ñ&Ô&Ð&r   Úprovidedc                 óX   — t          | ¦  «        t          k    ot          | ¦  «        dk    S )z˜
    Check if the value is a proper Ethereum address.

    :param provided: The value to check.
    :return: True iff the value is of correct type.
    é   ©r   r   r   ©r    s    r   Ú
is_addressr%   U   ó%   € õ �‰>Œ>�UÒ"Ð:¥s¨8¡}¤}¸Ò':Ð:r   c                 óX   — t          | ¦  «        t          k    ot          | ¦  «        dk    S )z•
    Check if the value is a proper (binary) UUID.

    :param provided: The value to check.
    :return: True iff the value is of correct type.
    é   r#   r$   s    r   Ú
is_bytes16r)   _   r&   r   c                 óX   — t          | ¦  «        t          k    ot          | ¦  «        dk    S )zš
    Check if the value is of type bytes and length 32.

    :param provided: The value to check.
    :return: True iff the value is of correct type.
    é    r#   r$   s    r   Ú
is_bytes32r,   i   r&   r   c                 ób   — t          | ¦  «        t          k    ot          | ¦  «        t          k    S )zš
    Check if the value is a proper Ethereum signature.

    :param provided: The value to check.
    :return: True iff the value is of correct type.
    )r   r   r   r   r$   s    r   Úis_signaturer.   s   s%   € õ �‰>Œ>�UÒ"ÐG¥s¨8¡}¤}½Ò'GÐGr   c                 óX   — t          | ¦  «        t          k    ot          | ¦  «        dk    S )z£
    Check if the value is a proper Ethereum private key (seed).

    :param provided: The value to check.
    :return: True iff the value is of correct type.
    r+   r#   r$   s    r   Úis_eth_privkeyr0   }   r&   r   c                 óX   — t          | ¦  «        t          k    ot          | ¦  «        dk    S )z¢
    Check if the value is a proper WAMP-cryptosign public key.

    :param provided: The value to check.
    :return: True iff the value is of correct type.
    r+   r#   r$   s    r   Úis_cs_pubkeyr2   ‡   r&   r   c                 ó2   — t          | ¦  «        t          k    S )z�
    Check if the value is a proper Ethereum block number.

    :param provided: The value to check.
    :return: True iff the value is of correct type.
    ©r   Úintr$   s    r   Úis_block_numberr6   ‘   s   € õ �‰>Œ>�SÒ Ð r   c                 ó>   — t          | ¦  «        t          k    o| dk    S )z™
    Check if the value is a proper Ethereum chain ID.

    :param provided: The value to check.
    :return: True iff the value is of correct type.
    r   r4   r$   s    r   Úis_chain_idr8   ›   s   € õ �‰>Œ>�SÒ Ð1 X°¢\Ð1r   N)Útypingr   r   Úbinasciir   Úpy_eth_sig_utilsr   r   r   r   Ústrr   r   Úboolr%   r)   r,   r.   r0   r2   r6   r8   r
   r   r   ú<module>r>      så  ðð6 Ð Ð Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø $Ð $Ð $Ð $Ð $Ð $à€ð�5ð ð ð ð ð"�eð  4¨¨S¨¤>ð °eð ð ð ð ð('�$�s˜C�x”.ð '¨Uð '°uð 'ð 'ð 'ð 'ð;˜ð ; ð ;ð ;ð ;ð ;ð;˜ð ; ð ;ð ;ð ;ð ;ð;˜ð ; ð ;ð ;ð ;ð ;ðH˜3ð H 4ð Hð Hð Hð Hð;˜Sð ; Tð ;ð ;ð ;ð ;ð;˜3ð ; 4ð ;ð ;ð ;ð ;ð!˜cð ! dð !ð !ð !ð !ð	2˜#ð 	2 $ð 	2ð 	2ð 	2ð 	2ð 	2ð 	2r   