o
    èó·iy  ã                   @   sx   d dl Z G dd„ de jƒZG dd„ de jƒZG dd„ de jƒZG dd	„ d	e jƒZG d
d„ de jƒZG dd„ deeƒZdS )é    Nc                   @   sr   e Zd ZdZejdd„ ƒZejdd„ ƒZejdd„ ƒZejdd	„ ƒZ	ejd
d„ ƒZ
ejdd„ ƒZejdd„ ƒZdS )ÚIMarketMakerz%
    XBR Market Maker interface.
    c                 C   ó   dS )z3

        :param details:
        :return:
        N© )ÚselfÚdetailsr   r   ú^C:\Users\psant\Downloads\PAF backend\school\venv\Lib\site-packages\autobahn/xbr/_interfaces.pyÚstatus#   ó    zIMarketMaker.statusc                 C   r   )z`

        :param key_id:
        :param price:
        :param details:
        :return:
        Nr   )r   Úkey_idZpricer   r   r   r   Úoffer+   r	   zIMarketMaker.offerc                 C   r   ©zJ

        :param key_id:
        :param details:
        :return:
        Nr   ©r   r
   r   r   r   r   Úrevoke5   r	   zIMarketMaker.revokec                 C   r   r   r   r   r   r   r   Úquote>   r	   zIMarketMaker.quotec	           	      C   r   )zë

        :param channel_id:
        :param channel_seq:
        :param buyer_pubkey:
        :param datakey_id:
        :param amount:
        :param balance:
        :param signature:
        :param details:
        :return:
        Nr   )	r   Ú
channel_idZchannel_seqÚbuyer_pubkeyZ
datakey_idÚamountZbalanceÚ	signaturer   r   r   r   ÚbuyG   r	   zIMarketMaker.buyc                 C   r   )zK

        :param address:
        :param details:
        :return:
        Nr   )r   Úaddressr   r   r   r   Úget_payment_channelsV   r	   z!IMarketMaker.get_payment_channelsc                 C   r   )zN

        :param channel_id:
        :param details:
        :return:
        Nr   )r   r   r   r   r   r   Úget_payment_channel_   r	   z IMarketMaker.get_payment_channelN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚabcÚabstractmethodr   r   r   r   r   r   r   r   r   r   r   r      s     

	



r   c                   @   s   e Zd ZdZejdd„ ƒZdS )Ú	IProviderz!
    XBR Provider interface.
    c                 C   r   )zº

        :param key_id:
        :param buyer_pubkey:
        :param amount_paid:
        :param post_balance:
        :param signature:
        :param details:
        :return:
        Nr   )r   r
   r   Zamount_paidZpost_balancer   r   r   r   r   Úselln   r	   zIProvider.sellN)r   r   r   r   r   r   r   r   r   r   r   r   i   s    r   c                   @   ó   e Zd ZdZdS )Ú	IConsumerz!
    XBR Consumer interface.
    N©r   r   r   r   r   r   r   r   r!   |   ó    r!   c                   @   ó,   e Zd ZdZejdd„ ƒZejdd„ ƒZdS )ÚISellerz
    XBR Seller interface.
    c                 Ã   ó   �dS )z3

        :param session:
        :return:
        Nr   ©r   Úsessionr   r   r   Ústart‡   ó    zISeller.startc                 Ã   r&   )zG

        :param uri:
        :param payload:
        :return:
        Nr   )r   ÚuriÚpayloadr   r   r   Úwrap�   r*   zISeller.wrapN)r   r   r   r   r   r   r)   r-   r   r   r   r   r%   ‚   ó    
r%   c                   @   r$   )ÚIBuyerz
    XBR Buyer interface.
    c                 Ã   r&   )z‘
        Start buying keys over the provided session.

        :param session: WAMP session that allows to talk to the XBR Market Maker.
        Nr   r'   r   r   r   r)   ž   r*   zIBuyer.startc                 Ã   r&   )aô  
        Decrypt and deserialize received XBR payload.

        :param key_id: The ID of the datakey the payload is encrypted with.
        :type key_id: bytes

        :param enc_ser: The serializer that was used for serializing the payload. One of ``cbor``, ``json``, ``msgpack``, ``ubjson``.
        :type enc_ser: str

        :param ciphertext: The encrypted payload to unwrap.
        :type ciphertext: bytes

        :returns: The unwrapped application payload.
        :rtype: object
        Nr   )r   r
   Zenc_serZ
ciphertextr   r   r   Úunwrap¦   r*   zIBuyer.unwrapN)r   r   r   r   r   r   r)   r0   r   r   r   r   r/   ™   r.   r/   c                   @   r    )Ú	IDelegatez!
    XBR Delegate interface.
    Nr"   r   r   r   r   r1   ¹   r#   r1   )r   ÚABCr   r   r!   r%   r/   r1   r   r   r   r   Ú<module>   s   K 