
    E6i                     n    S SK Jr  S SK Jr  S SK Jr  S SK Jr  S SKrS SKrS SKrS SKJ	r	  S
S jr
S rS	 rg)    )absolute_import)division)print_function)unicode_literalsN)urlparsec                     0 n[         R                  " U 5       H=  u  pEU(       a  Uc  M  U(       a!  [        U[        5      (       a  [	        XQU5      nXSU'   M?     U$ )zClean up a dict of API parameters to be sent to the Coinbase API.

Some endpoints require boolean options to be represented as integers. By
default, will remove all keys whose value is None, so that they will not be
sent to the API endpoint at all.
)six	iteritems
isinstancedictclean_params)params
drop_nones	recursivecleanedkeyvalues         N/home/james-whalen/.local/lib/python3.13/site-packages/coinbase/wallet/util.pyr   r      sQ     'MM&)jcemZt,,5i8eCL * 
.    c                 F    [        U 40 UD6n[        R                  " U5      $ )z+Clean and JSON-encode a dict of parameters.)r   jsondumps)r   kwargsr   s      r   encode_paramsr      s     *6*'	G	r   c                 x    [        U 5      R                  S:w  a   SU -  n[        R                  " U[        5        U $ )zWarns if the URL is insecure.httpszWARNING: this client is sending a request to an insecure API endpoint. Any API request you make may expose your API key and secret to third parties. Consider using the default endpoint:

  %s
)r   schemewarningswarnUserWarning)uriwarning_messages     r   check_uri_securityr#   %   s:    c]W$	 	O
 MM/;/	*r   )TT)
__future__r   r   r   r   r   r	   r   coinbase.wallet.compatr   r   r   r#    r   r   <module>r'      s,    &  % '  
  +"	r   