o
    @Bi                     @   s   d dl Z d dlZee jG dd deZee jG dd deZee jG dd deZee jG dd	 d	eZee jG d
d d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   X/var/www/html/Trade-python/venv/lib/python3.10/site-packages/autobahn/xbr/_interfaces.pystatus%       zIMarketMaker.statusc                 C   r   )z`

        :param key_id:
        :param price:
        :param details:
        :return:
        Nr   )r   key_id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   revoke7   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_idchannel_seqbuyer_pubkey
datakey_idamountbalance	signaturer   r   r   r   buyI   r	   zIMarketMaker.buyc                 C   r   )zK

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

        :param channel_id:
        :param details:
        :return:
        Nr   )r   r   r   r   r   r   get_payment_channela   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   amount_paidpost_balancer   r   r   r   r   sellq   r	   zIProvider.sellN)r   r   r   r   r    r!   r%   r   r   r   r   r"   k   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                   @   ,   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,   r0   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
   enc_ser
ciphertextr   r   r   unwrap   r-   zIBuyer.unwrapN)r   r   r   r   r    r!   r,   r5   r   r   r   r   r2      r1   r2   )
r    sixadd_metaclassABCMetaobjectr   r"   r&   r(   r2   r   r   r   r   <module>   s   

K


