#NEWLINE# def __init__( self , secret_exponent = None , public_pair = None , hash160 = None , prefer_uncompressed = None , is_compressed = True , is_pay_to_script = False , netcode = 'BTC' ) : #NEWLINE# #INDENT# '\n        secret_exponent:\n            a long representing the secret exponent\n        public_pair:\n            a tuple of long integers on the ecdsa curve\n        hash160:\n            a hash160 value corresponding to a bitcoin address\n\n        Include at most one of secret_exponent, public_pair or hash160.\n\n        prefer_uncompressed:\n            whether or not to produce text outputs as compressed or uncompressed.\n\n        is_pay_to_script:\n            whether or not this key is for a pay-to-script style transaction\n\n        netcode:\n            the code for the network (as defined in pycoin.networks)\n\n        Include at most one of secret_exponent, public_pair or hash160.\n        prefer_uncompressed, is_compressed (booleans) are optional.\n        ' #NEWLINE# if ( [ secret_exponent , public_pair , hash160 ] . count ( None ) != 2 ) : #NEWLINE# #INDENT# raise ValueError ( 'exactly one of secret_exponent, public_pair, hash160 must be passed.' ) #NEWLINE# #UNINDENT# if ( prefer_uncompressed is None ) : #NEWLINE# #INDENT# prefer_uncompressed = ( not is_compressed ) #NEWLINE# #UNINDENT# self . _prefer_uncompressed = prefer_uncompressed #NEWLINE# self . _secret_exponent = secret_exponent #NEWLINE# self . _public_pair = public_pair #NEWLINE# self . _hash160_uncompressed = None #NEWLINE# self . _hash160_compressed = None #NEWLINE# if hash160 : #NEWLINE# #INDENT# if is_compressed : #NEWLINE# #INDENT# self . _hash160_compressed = hash160 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _hash160_uncompressed = hash160 #NEWLINE# #UNINDENT# #UNINDENT# self . _netcode = netcode #NEWLINE# if ( ( self . _public_pair is None ) and ( self . _secret_exponent is not None ) ) : #NEWLINE# #INDENT# if ( ( self . _secret_exponent < 1 ) or ( self . _secret_exponent >= ecdsa . generator_secp256k1 . order ( ) ) ) : #NEWLINE# #INDENT# raise InvalidSecretExponentError ( ) #NEWLINE# #UNINDENT# public_pair = ecdsa . public_pair_for_secret_exponent ( ecdsa . generator_secp256k1 , self . _secret_exponent ) #NEWLINE# self . _public_pair = public_pair #NEWLINE# #UNINDENT# if ( ( self . _public_pair is not None ) and ( ( None in self . _public_pair ) or ( not ecdsa . is_public_pair_valid ( ecdsa . generator_secp256k1 , self . _public_pair ) ) ) ) : #NEWLINE# #INDENT# raise InvalidPublicPairError ( )