
    afo                         d dl mZ ddlmZmZmZmZmZmZm	Z	m
Z
mZ dededededed	ed
edededee         defdZdedededededed	ed
edededee         defdZdededededed	ed
edededededefdZdS )    )Optional   )	signrecoveris_chain_id
is_address
is_bytes16is_cs_pubkeyis_block_numberis_signatureis_eth_privkeychainIdverifyingContractmemberpairednodeIddomainIdnodeTypenodeKeyamountconfigreturnc
                 (   t          |           sJ t          |          sJ t          |          sJ t          |          sJ t          |          sJ t          |          sJ t	          |          t
          k    sJ t          |          sJ t	          |          t
          k    sJ |	t	          |	          t          k    sJ ddddddgddddd	dd
d	ddddddddddddddddddddddg
ddddd| |||||||||	pdd
d}
|
S )z

    :param chainId:
    :param verifyingContract:
    :param member:
    :param paired:
    :param nodeId:
    :param domainId:
    :param nodeKey:
    :param amount:
    :param config:
    :return:
    Nnamestring)r   typeversionr   uint256r   addressr   r   r   bytes16r   r   uint8r   r   r   )EIP712DomainEIP712NodePairr#   XBR1)r   r    )
r   r   r   r   r   r   r   r   r   r   )typesprimaryTypedomainmessage)r   r   r   r	   r   intr
   str)r   r   r   r   r   r   r   r   r   r   datas              P/var/www/html/env/lib/python3.11/site-packages/autobahn/xbr/_eip712_node_pair.py_create_eip712_node_pairr/       s"     w'(((((f6"""""fh>>S         <<3>T&\\S0000 #$ 
 &$ 	 &% 
 0% 
 %% 
 %% 
 %% 
 '% 
 '# 
 &% 
 %% 
 %$ K)5
 5
l (
 

 !2  l
 
yH HDT K    eth_privkeyc                 t    t          |           sJ t          |||||||||	|

  
        }t          | |          S )z

    :param eth_privkey: Ethereum address of buyer (a raw 20 bytes Ethereum address).
    :type eth_privkey: bytes

    :return: The signature according to EIP712 (32+32+1 raw bytes).
    :rtype: bytes
    )r   r/   r   )r1   r   r   r   r   r   r   r   r   r   r   r-   s               r.   sign_eip712_node_pairr3      sP     +&&&&&#G->PVX`bj$+VV= =DT"""r0   	signaturec                 t    t          |
          sJ t          | |||||||||	
  
        }t          ||
          S )z
    Recover the signer address the given EIP712 signature was signed with.

    :return: The (computed) signer address the signature was signed with.
    :rtype: bytes
    )r   r/   r   )r   r   r   r   r   r   r   r   r   r   r4   r-   s               r.   recover_eip712_node_pairr6      sP     	"""""#G->PVX`bj$+VV= =D4###r0   N)typingr   _eip712_baser   r   r   r   r	   r
   r   r   r   r+   bytesr,   dictr/   r3   r6    r0   r.   <module>r<      s  6      2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2ec ee eU e\_ e%*e6;eGJeUZe%(e2:3-eDHe e e eP#u #s #u #^c #mp #"'#38#DG#RW#"%#/7}#AF# # # #$$c $e $U $\_ $%*$6;$GJ$UZ$%($25$BG$LQ$ $ $ $ $ $r0   