U
    •uÄcy  ã                   @   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   s   dS )z3

        :param details:
        :return:
        N© )ÚselfÚdetailsr   r   ú[/var/www/html/VPFITNESS/school/venv/lib/python3.8/site-packages/autobahn/xbr/_interfaces.pyÚstatus#   s    zIMarketMaker.statusc                 C   s   dS )z`

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

        :param key_id:
        :param details:
        :return:
        Nr   ©r   r   r   r   r   r   Úrevoke5   s    zIMarketMaker.revokec                 C   s   dS r
   r   r   r   r   r   Úquote>   s    zIMarketMaker.quotec	           	      C   s   dS )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   s    zIMarketMaker.buyc                 C   s   dS )zK

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

        :param channel_id:
        :param details:
        :return:
        Nr   )r   r   r   r   r   r   Úget_payment_channel_   s    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   s   dS )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   s    zIProvider.sellN)r   r   r   r   r   r   r   r   r   r   r   r   i   s   r   c                   @   s   e Zd ZdZdS )Ú	IConsumerz!
    XBR Consumer interface.
    N©r   r   r   r   r   r   r   r   r   |   s   r   c                   @   s,   e Zd ZdZejdd„ ƒZejdd„ ƒZdS )ÚISellerz
    XBR Seller interface.
    c                 Ã   s   dS )z3

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

        :param uri:
        :param payload:
        :return:
        Nr   )r   ZuriÚpayloadr   r   r   Úwrap�   s    zISeller.wrapN)r   r   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ejdd„ ƒZdS )ÚIBuyerz
    XBR Buyer interface.
    c                 Ã   s   dS )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#   ž   s    zIBuyer.startc                 Ã   s   dS )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¦   s    zIBuyer.unwrapN)r   r   r   r   r   r   r#   r'   r   r   r   r   r&   ™   s
   
r&   c                   @   s   e Zd ZdZdS )Ú	IDelegatez!
    XBR Delegate interface.
    Nr   r   r   r   r   r(   ¹   s   r(   )r   ÚABCr   r   r   r    r&   r(   r   r   r   r   Ú<module>   s   K 