coinex-api 0.0.15__py3-none-any.whl → 0.0.17__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. coinex/__init__.py +7 -0
  2. coinex/ccxt/__init__.py +101 -0
  3. coinex/ccxt/abstract/coinex.py +237 -0
  4. coinex/ccxt/async_support/__init__.py +80 -0
  5. coinex/ccxt/async_support/base/__init__.py +1 -0
  6. coinex/ccxt/async_support/base/exchange.py +2100 -0
  7. coinex/ccxt/async_support/base/throttler.py +50 -0
  8. coinex/ccxt/async_support/base/ws/__init__.py +38 -0
  9. coinex/ccxt/async_support/base/ws/aiohttp_client.py +147 -0
  10. coinex/ccxt/async_support/base/ws/cache.py +213 -0
  11. coinex/ccxt/async_support/base/ws/client.py +214 -0
  12. coinex/ccxt/async_support/base/ws/fast_client.py +97 -0
  13. coinex/ccxt/async_support/base/ws/functions.py +59 -0
  14. coinex/ccxt/async_support/base/ws/future.py +69 -0
  15. coinex/ccxt/async_support/base/ws/order_book.py +78 -0
  16. coinex/ccxt/async_support/base/ws/order_book_side.py +174 -0
  17. coinex/ccxt/async_support/coinex.py +5833 -0
  18. coinex/ccxt/base/__init__.py +27 -0
  19. coinex/ccxt/base/decimal_to_precision.py +174 -0
  20. coinex/ccxt/base/errors.py +267 -0
  21. coinex/ccxt/base/exchange.py +6769 -0
  22. coinex/ccxt/base/precise.py +297 -0
  23. coinex/ccxt/base/types.py +577 -0
  24. coinex/ccxt/coinex.py +5832 -0
  25. coinex/ccxt/pro/__init__.py +21 -0
  26. coinex/ccxt/pro/coinex.py +1366 -0
  27. coinex/ccxt/static_dependencies/README.md +1 -0
  28. coinex/ccxt/static_dependencies/__init__.py +1 -0
  29. coinex/ccxt/static_dependencies/ecdsa/__init__.py +14 -0
  30. coinex/ccxt/static_dependencies/ecdsa/_version.py +520 -0
  31. coinex/ccxt/static_dependencies/ecdsa/curves.py +56 -0
  32. coinex/ccxt/static_dependencies/ecdsa/der.py +221 -0
  33. coinex/ccxt/static_dependencies/ecdsa/ecdsa.py +310 -0
  34. coinex/ccxt/static_dependencies/ecdsa/ellipticcurve.py +197 -0
  35. coinex/ccxt/static_dependencies/ecdsa/keys.py +332 -0
  36. coinex/ccxt/static_dependencies/ecdsa/numbertheory.py +531 -0
  37. coinex/ccxt/static_dependencies/ecdsa/rfc6979.py +100 -0
  38. coinex/ccxt/static_dependencies/ecdsa/util.py +266 -0
  39. coinex/ccxt/static_dependencies/ethereum/__init__.py +7 -0
  40. coinex/ccxt/static_dependencies/ethereum/abi/__init__.py +16 -0
  41. coinex/ccxt/static_dependencies/ethereum/abi/abi.py +19 -0
  42. coinex/ccxt/static_dependencies/ethereum/abi/base.py +152 -0
  43. coinex/ccxt/static_dependencies/ethereum/abi/codec.py +217 -0
  44. coinex/ccxt/static_dependencies/ethereum/abi/constants.py +3 -0
  45. coinex/ccxt/static_dependencies/ethereum/abi/decoding.py +565 -0
  46. coinex/ccxt/static_dependencies/ethereum/abi/encoding.py +720 -0
  47. coinex/ccxt/static_dependencies/ethereum/abi/exceptions.py +139 -0
  48. coinex/ccxt/static_dependencies/ethereum/abi/grammar.py +443 -0
  49. coinex/ccxt/static_dependencies/ethereum/abi/packed.py +13 -0
  50. coinex/ccxt/static_dependencies/ethereum/abi/py.typed +0 -0
  51. coinex/ccxt/static_dependencies/ethereum/abi/registry.py +643 -0
  52. coinex/ccxt/static_dependencies/ethereum/abi/tools/__init__.py +3 -0
  53. coinex/ccxt/static_dependencies/ethereum/abi/tools/_strategies.py +230 -0
  54. coinex/ccxt/static_dependencies/ethereum/abi/utils/__init__.py +0 -0
  55. coinex/ccxt/static_dependencies/ethereum/abi/utils/numeric.py +83 -0
  56. coinex/ccxt/static_dependencies/ethereum/abi/utils/padding.py +27 -0
  57. coinex/ccxt/static_dependencies/ethereum/abi/utils/string.py +19 -0
  58. coinex/ccxt/static_dependencies/ethereum/account/__init__.py +3 -0
  59. coinex/ccxt/static_dependencies/ethereum/account/encode_typed_data/__init__.py +4 -0
  60. coinex/ccxt/static_dependencies/ethereum/account/encode_typed_data/encoding_and_hashing.py +239 -0
  61. coinex/ccxt/static_dependencies/ethereum/account/encode_typed_data/helpers.py +40 -0
  62. coinex/ccxt/static_dependencies/ethereum/account/messages.py +263 -0
  63. coinex/ccxt/static_dependencies/ethereum/account/py.typed +0 -0
  64. coinex/ccxt/static_dependencies/ethereum/hexbytes/__init__.py +5 -0
  65. coinex/ccxt/static_dependencies/ethereum/hexbytes/_utils.py +54 -0
  66. coinex/ccxt/static_dependencies/ethereum/hexbytes/main.py +65 -0
  67. coinex/ccxt/static_dependencies/ethereum/hexbytes/py.typed +0 -0
  68. coinex/ccxt/static_dependencies/ethereum/typing/__init__.py +63 -0
  69. coinex/ccxt/static_dependencies/ethereum/typing/abi.py +6 -0
  70. coinex/ccxt/static_dependencies/ethereum/typing/bls.py +7 -0
  71. coinex/ccxt/static_dependencies/ethereum/typing/discovery.py +5 -0
  72. coinex/ccxt/static_dependencies/ethereum/typing/encoding.py +7 -0
  73. coinex/ccxt/static_dependencies/ethereum/typing/enums.py +17 -0
  74. coinex/ccxt/static_dependencies/ethereum/typing/ethpm.py +9 -0
  75. coinex/ccxt/static_dependencies/ethereum/typing/evm.py +20 -0
  76. coinex/ccxt/static_dependencies/ethereum/typing/networks.py +1122 -0
  77. coinex/ccxt/static_dependencies/ethereum/typing/py.typed +0 -0
  78. coinex/ccxt/static_dependencies/ethereum/utils/__init__.py +115 -0
  79. coinex/ccxt/static_dependencies/ethereum/utils/abi.py +72 -0
  80. coinex/ccxt/static_dependencies/ethereum/utils/address.py +171 -0
  81. coinex/ccxt/static_dependencies/ethereum/utils/applicators.py +151 -0
  82. coinex/ccxt/static_dependencies/ethereum/utils/conversions.py +190 -0
  83. coinex/ccxt/static_dependencies/ethereum/utils/currency.py +107 -0
  84. coinex/ccxt/static_dependencies/ethereum/utils/curried/__init__.py +269 -0
  85. coinex/ccxt/static_dependencies/ethereum/utils/debug.py +20 -0
  86. coinex/ccxt/static_dependencies/ethereum/utils/decorators.py +132 -0
  87. coinex/ccxt/static_dependencies/ethereum/utils/encoding.py +6 -0
  88. coinex/ccxt/static_dependencies/ethereum/utils/exceptions.py +4 -0
  89. coinex/ccxt/static_dependencies/ethereum/utils/functional.py +75 -0
  90. coinex/ccxt/static_dependencies/ethereum/utils/hexadecimal.py +74 -0
  91. coinex/ccxt/static_dependencies/ethereum/utils/humanize.py +188 -0
  92. coinex/ccxt/static_dependencies/ethereum/utils/logging.py +159 -0
  93. coinex/ccxt/static_dependencies/ethereum/utils/module_loading.py +31 -0
  94. coinex/ccxt/static_dependencies/ethereum/utils/numeric.py +43 -0
  95. coinex/ccxt/static_dependencies/ethereum/utils/py.typed +0 -0
  96. coinex/ccxt/static_dependencies/ethereum/utils/toolz.py +76 -0
  97. coinex/ccxt/static_dependencies/ethereum/utils/types.py +54 -0
  98. coinex/ccxt/static_dependencies/ethereum/utils/typing/__init__.py +18 -0
  99. coinex/ccxt/static_dependencies/ethereum/utils/typing/misc.py +14 -0
  100. coinex/ccxt/static_dependencies/ethereum/utils/units.py +31 -0
  101. coinex/ccxt/static_dependencies/keccak/__init__.py +3 -0
  102. coinex/ccxt/static_dependencies/keccak/keccak.py +197 -0
  103. coinex/ccxt/static_dependencies/lark/__init__.py +38 -0
  104. coinex/ccxt/static_dependencies/lark/__pyinstaller/__init__.py +6 -0
  105. coinex/ccxt/static_dependencies/lark/__pyinstaller/hook-lark.py +14 -0
  106. coinex/ccxt/static_dependencies/lark/ast_utils.py +59 -0
  107. coinex/ccxt/static_dependencies/lark/common.py +86 -0
  108. coinex/ccxt/static_dependencies/lark/exceptions.py +292 -0
  109. coinex/ccxt/static_dependencies/lark/grammar.py +130 -0
  110. coinex/ccxt/static_dependencies/lark/grammars/__init__.py +0 -0
  111. coinex/ccxt/static_dependencies/lark/grammars/common.lark +59 -0
  112. coinex/ccxt/static_dependencies/lark/grammars/lark.lark +62 -0
  113. coinex/ccxt/static_dependencies/lark/grammars/python.lark +302 -0
  114. coinex/ccxt/static_dependencies/lark/grammars/unicode.lark +7 -0
  115. coinex/ccxt/static_dependencies/lark/indenter.py +143 -0
  116. coinex/ccxt/static_dependencies/lark/lark.py +658 -0
  117. coinex/ccxt/static_dependencies/lark/lexer.py +678 -0
  118. coinex/ccxt/static_dependencies/lark/load_grammar.py +1428 -0
  119. coinex/ccxt/static_dependencies/lark/parse_tree_builder.py +391 -0
  120. coinex/ccxt/static_dependencies/lark/parser_frontends.py +257 -0
  121. coinex/ccxt/static_dependencies/lark/parsers/__init__.py +0 -0
  122. coinex/ccxt/static_dependencies/lark/parsers/cyk.py +340 -0
  123. coinex/ccxt/static_dependencies/lark/parsers/earley.py +314 -0
  124. coinex/ccxt/static_dependencies/lark/parsers/earley_common.py +42 -0
  125. coinex/ccxt/static_dependencies/lark/parsers/earley_forest.py +801 -0
  126. coinex/ccxt/static_dependencies/lark/parsers/grammar_analysis.py +203 -0
  127. coinex/ccxt/static_dependencies/lark/parsers/lalr_analysis.py +332 -0
  128. coinex/ccxt/static_dependencies/lark/parsers/lalr_interactive_parser.py +158 -0
  129. coinex/ccxt/static_dependencies/lark/parsers/lalr_parser.py +122 -0
  130. coinex/ccxt/static_dependencies/lark/parsers/lalr_parser_state.py +110 -0
  131. coinex/ccxt/static_dependencies/lark/parsers/xearley.py +165 -0
  132. coinex/ccxt/static_dependencies/lark/py.typed +0 -0
  133. coinex/ccxt/static_dependencies/lark/reconstruct.py +107 -0
  134. coinex/ccxt/static_dependencies/lark/tools/__init__.py +70 -0
  135. coinex/ccxt/static_dependencies/lark/tools/nearley.py +202 -0
  136. coinex/ccxt/static_dependencies/lark/tools/serialize.py +32 -0
  137. coinex/ccxt/static_dependencies/lark/tools/standalone.py +196 -0
  138. coinex/ccxt/static_dependencies/lark/tree.py +267 -0
  139. coinex/ccxt/static_dependencies/lark/tree_matcher.py +186 -0
  140. coinex/ccxt/static_dependencies/lark/tree_templates.py +180 -0
  141. coinex/ccxt/static_dependencies/lark/utils.py +343 -0
  142. coinex/ccxt/static_dependencies/lark/visitors.py +596 -0
  143. coinex/ccxt/static_dependencies/marshmallow/__init__.py +81 -0
  144. coinex/ccxt/static_dependencies/marshmallow/base.py +65 -0
  145. coinex/ccxt/static_dependencies/marshmallow/class_registry.py +94 -0
  146. coinex/ccxt/static_dependencies/marshmallow/decorators.py +231 -0
  147. coinex/ccxt/static_dependencies/marshmallow/error_store.py +60 -0
  148. coinex/ccxt/static_dependencies/marshmallow/exceptions.py +71 -0
  149. coinex/ccxt/static_dependencies/marshmallow/fields.py +2114 -0
  150. coinex/ccxt/static_dependencies/marshmallow/orderedset.py +89 -0
  151. coinex/ccxt/static_dependencies/marshmallow/py.typed +0 -0
  152. coinex/ccxt/static_dependencies/marshmallow/schema.py +1228 -0
  153. coinex/ccxt/static_dependencies/marshmallow/types.py +12 -0
  154. coinex/ccxt/static_dependencies/marshmallow/utils.py +378 -0
  155. coinex/ccxt/static_dependencies/marshmallow/validate.py +678 -0
  156. coinex/ccxt/static_dependencies/marshmallow/warnings.py +2 -0
  157. coinex/ccxt/static_dependencies/marshmallow_dataclass/__init__.py +1047 -0
  158. coinex/ccxt/static_dependencies/marshmallow_dataclass/collection_field.py +51 -0
  159. coinex/ccxt/static_dependencies/marshmallow_dataclass/lazy_class_attribute.py +45 -0
  160. coinex/ccxt/static_dependencies/marshmallow_dataclass/mypy.py +71 -0
  161. coinex/ccxt/static_dependencies/marshmallow_dataclass/py.typed +0 -0
  162. coinex/ccxt/static_dependencies/marshmallow_dataclass/typing.py +14 -0
  163. coinex/ccxt/static_dependencies/marshmallow_dataclass/union_field.py +82 -0
  164. coinex/ccxt/static_dependencies/marshmallow_oneofschema/__init__.py +1 -0
  165. coinex/ccxt/static_dependencies/marshmallow_oneofschema/one_of_schema.py +193 -0
  166. coinex/ccxt/static_dependencies/marshmallow_oneofschema/py.typed +0 -0
  167. coinex/ccxt/static_dependencies/msgpack/__init__.py +55 -0
  168. coinex/ccxt/static_dependencies/msgpack/_cmsgpack.pyx +11 -0
  169. coinex/ccxt/static_dependencies/msgpack/_packer.pyx +374 -0
  170. coinex/ccxt/static_dependencies/msgpack/_unpacker.pyx +547 -0
  171. coinex/ccxt/static_dependencies/msgpack/buff_converter.h +8 -0
  172. coinex/ccxt/static_dependencies/msgpack/exceptions.py +48 -0
  173. coinex/ccxt/static_dependencies/msgpack/ext.py +168 -0
  174. coinex/ccxt/static_dependencies/msgpack/fallback.py +951 -0
  175. coinex/ccxt/static_dependencies/msgpack/pack.h +89 -0
  176. coinex/ccxt/static_dependencies/msgpack/pack_template.h +820 -0
  177. coinex/ccxt/static_dependencies/msgpack/sysdep.h +194 -0
  178. coinex/ccxt/static_dependencies/msgpack/unpack.h +391 -0
  179. coinex/ccxt/static_dependencies/msgpack/unpack_define.h +95 -0
  180. coinex/ccxt/static_dependencies/msgpack/unpack_template.h +464 -0
  181. coinex/ccxt/static_dependencies/parsimonious/__init__.py +10 -0
  182. coinex/ccxt/static_dependencies/parsimonious/exceptions.py +105 -0
  183. coinex/ccxt/static_dependencies/parsimonious/expressions.py +479 -0
  184. coinex/ccxt/static_dependencies/parsimonious/grammar.py +487 -0
  185. coinex/ccxt/static_dependencies/parsimonious/nodes.py +325 -0
  186. coinex/ccxt/static_dependencies/parsimonious/utils.py +40 -0
  187. coinex/ccxt/static_dependencies/starknet/__init__.py +0 -0
  188. coinex/ccxt/static_dependencies/starknet/abi/v0/__init__.py +2 -0
  189. coinex/ccxt/static_dependencies/starknet/abi/v0/model.py +44 -0
  190. coinex/ccxt/static_dependencies/starknet/abi/v0/parser.py +216 -0
  191. coinex/ccxt/static_dependencies/starknet/abi/v0/schemas.py +72 -0
  192. coinex/ccxt/static_dependencies/starknet/abi/v0/shape.py +63 -0
  193. coinex/ccxt/static_dependencies/starknet/abi/v1/__init__.py +2 -0
  194. coinex/ccxt/static_dependencies/starknet/abi/v1/core_structures.json +14 -0
  195. coinex/ccxt/static_dependencies/starknet/abi/v1/model.py +39 -0
  196. coinex/ccxt/static_dependencies/starknet/abi/v1/parser.py +220 -0
  197. coinex/ccxt/static_dependencies/starknet/abi/v1/parser_transformer.py +179 -0
  198. coinex/ccxt/static_dependencies/starknet/abi/v1/schemas.py +66 -0
  199. coinex/ccxt/static_dependencies/starknet/abi/v1/shape.py +47 -0
  200. coinex/ccxt/static_dependencies/starknet/abi/v2/__init__.py +2 -0
  201. coinex/ccxt/static_dependencies/starknet/abi/v2/model.py +89 -0
  202. coinex/ccxt/static_dependencies/starknet/abi/v2/parser.py +293 -0
  203. coinex/ccxt/static_dependencies/starknet/abi/v2/parser_transformer.py +192 -0
  204. coinex/ccxt/static_dependencies/starknet/abi/v2/schemas.py +132 -0
  205. coinex/ccxt/static_dependencies/starknet/abi/v2/shape.py +107 -0
  206. coinex/ccxt/static_dependencies/starknet/cairo/__init__.py +0 -0
  207. coinex/ccxt/static_dependencies/starknet/cairo/data_types.py +123 -0
  208. coinex/ccxt/static_dependencies/starknet/cairo/deprecated_parse/__init__.py +0 -0
  209. coinex/ccxt/static_dependencies/starknet/cairo/deprecated_parse/cairo_types.py +77 -0
  210. coinex/ccxt/static_dependencies/starknet/cairo/deprecated_parse/parser.py +46 -0
  211. coinex/ccxt/static_dependencies/starknet/cairo/deprecated_parse/parser_transformer.py +138 -0
  212. coinex/ccxt/static_dependencies/starknet/cairo/felt.py +64 -0
  213. coinex/ccxt/static_dependencies/starknet/cairo/type_parser.py +121 -0
  214. coinex/ccxt/static_dependencies/starknet/cairo/v1/__init__.py +0 -0
  215. coinex/ccxt/static_dependencies/starknet/cairo/v1/type_parser.py +59 -0
  216. coinex/ccxt/static_dependencies/starknet/cairo/v2/__init__.py +0 -0
  217. coinex/ccxt/static_dependencies/starknet/cairo/v2/type_parser.py +77 -0
  218. coinex/ccxt/static_dependencies/starknet/ccxt_utils.py +7 -0
  219. coinex/ccxt/static_dependencies/starknet/common.py +15 -0
  220. coinex/ccxt/static_dependencies/starknet/constants.py +39 -0
  221. coinex/ccxt/static_dependencies/starknet/hash/__init__.py +0 -0
  222. coinex/ccxt/static_dependencies/starknet/hash/address.py +79 -0
  223. coinex/ccxt/static_dependencies/starknet/hash/compiled_class_hash_objects.py +111 -0
  224. coinex/ccxt/static_dependencies/starknet/hash/selector.py +16 -0
  225. coinex/ccxt/static_dependencies/starknet/hash/storage.py +12 -0
  226. coinex/ccxt/static_dependencies/starknet/hash/utils.py +78 -0
  227. coinex/ccxt/static_dependencies/starknet/models/__init__.py +0 -0
  228. coinex/ccxt/static_dependencies/starknet/models/typed_data.py +45 -0
  229. coinex/ccxt/static_dependencies/starknet/serialization/__init__.py +24 -0
  230. coinex/ccxt/static_dependencies/starknet/serialization/_calldata_reader.py +40 -0
  231. coinex/ccxt/static_dependencies/starknet/serialization/_context.py +142 -0
  232. coinex/ccxt/static_dependencies/starknet/serialization/data_serializers/__init__.py +10 -0
  233. coinex/ccxt/static_dependencies/starknet/serialization/data_serializers/_common.py +82 -0
  234. coinex/ccxt/static_dependencies/starknet/serialization/data_serializers/array_serializer.py +43 -0
  235. coinex/ccxt/static_dependencies/starknet/serialization/data_serializers/bool_serializer.py +37 -0
  236. coinex/ccxt/static_dependencies/starknet/serialization/data_serializers/byte_array_serializer.py +66 -0
  237. coinex/ccxt/static_dependencies/starknet/serialization/data_serializers/cairo_data_serializer.py +71 -0
  238. coinex/ccxt/static_dependencies/starknet/serialization/data_serializers/enum_serializer.py +71 -0
  239. coinex/ccxt/static_dependencies/starknet/serialization/data_serializers/felt_serializer.py +50 -0
  240. coinex/ccxt/static_dependencies/starknet/serialization/data_serializers/named_tuple_serializer.py +58 -0
  241. coinex/ccxt/static_dependencies/starknet/serialization/data_serializers/option_serializer.py +43 -0
  242. coinex/ccxt/static_dependencies/starknet/serialization/data_serializers/output_serializer.py +40 -0
  243. coinex/ccxt/static_dependencies/starknet/serialization/data_serializers/payload_serializer.py +72 -0
  244. coinex/ccxt/static_dependencies/starknet/serialization/data_serializers/struct_serializer.py +36 -0
  245. coinex/ccxt/static_dependencies/starknet/serialization/data_serializers/tuple_serializer.py +36 -0
  246. coinex/ccxt/static_dependencies/starknet/serialization/data_serializers/uint256_serializer.py +76 -0
  247. coinex/ccxt/static_dependencies/starknet/serialization/data_serializers/uint_serializer.py +100 -0
  248. coinex/ccxt/static_dependencies/starknet/serialization/data_serializers/unit_serializer.py +32 -0
  249. coinex/ccxt/static_dependencies/starknet/serialization/errors.py +10 -0
  250. coinex/ccxt/static_dependencies/starknet/serialization/factory.py +229 -0
  251. coinex/ccxt/static_dependencies/starknet/serialization/function_serialization_adapter.py +110 -0
  252. coinex/ccxt/static_dependencies/starknet/serialization/tuple_dataclass.py +59 -0
  253. coinex/ccxt/static_dependencies/starknet/utils/__init__.py +0 -0
  254. coinex/ccxt/static_dependencies/starknet/utils/constructor_args_translator.py +86 -0
  255. coinex/ccxt/static_dependencies/starknet/utils/iterable.py +13 -0
  256. coinex/ccxt/static_dependencies/starknet/utils/schema.py +13 -0
  257. coinex/ccxt/static_dependencies/starknet/utils/typed_data.py +182 -0
  258. coinex/ccxt/static_dependencies/starkware/__init__.py +0 -0
  259. coinex/ccxt/static_dependencies/starkware/crypto/__init__.py +0 -0
  260. coinex/ccxt/static_dependencies/starkware/crypto/fast_pedersen_hash.py +50 -0
  261. coinex/ccxt/static_dependencies/starkware/crypto/math_utils.py +78 -0
  262. coinex/ccxt/static_dependencies/starkware/crypto/signature.py +2344 -0
  263. coinex/ccxt/static_dependencies/starkware/crypto/utils.py +63 -0
  264. coinex/ccxt/static_dependencies/sympy/__init__.py +0 -0
  265. coinex/ccxt/static_dependencies/sympy/core/__init__.py +0 -0
  266. coinex/ccxt/static_dependencies/sympy/core/intfunc.py +35 -0
  267. coinex/ccxt/static_dependencies/sympy/external/__init__.py +0 -0
  268. coinex/ccxt/static_dependencies/sympy/external/gmpy.py +345 -0
  269. coinex/ccxt/static_dependencies/sympy/external/importtools.py +187 -0
  270. coinex/ccxt/static_dependencies/sympy/external/ntheory.py +637 -0
  271. coinex/ccxt/static_dependencies/sympy/external/pythonmpq.py +341 -0
  272. coinex/ccxt/static_dependencies/toolz/__init__.py +26 -0
  273. coinex/ccxt/static_dependencies/toolz/_signatures.py +784 -0
  274. coinex/ccxt/static_dependencies/toolz/_version.py +520 -0
  275. coinex/ccxt/static_dependencies/toolz/compatibility.py +30 -0
  276. coinex/ccxt/static_dependencies/toolz/curried/__init__.py +101 -0
  277. coinex/ccxt/static_dependencies/toolz/curried/exceptions.py +22 -0
  278. coinex/ccxt/static_dependencies/toolz/curried/operator.py +22 -0
  279. coinex/ccxt/static_dependencies/toolz/dicttoolz.py +339 -0
  280. coinex/ccxt/static_dependencies/toolz/functoolz.py +1049 -0
  281. coinex/ccxt/static_dependencies/toolz/itertoolz.py +1057 -0
  282. coinex/ccxt/static_dependencies/toolz/recipes.py +46 -0
  283. coinex/ccxt/static_dependencies/toolz/utils.py +9 -0
  284. coinex/ccxt/static_dependencies/typing_inspect/__init__.py +0 -0
  285. coinex/ccxt/static_dependencies/typing_inspect/typing_inspect.py +851 -0
  286. coinex_api-0.0.17.dist-info/METADATA +425 -0
  287. coinex_api-0.0.17.dist-info/RECORD +288 -0
  288. coinex_api-0.0.15.dist-info/METADATA +0 -79
  289. coinex_api-0.0.15.dist-info/RECORD +0 -3
  290. {coinex_api-0.0.15.dist-info → coinex_api-0.0.17.dist-info}/WHEEL +0 -0
@@ -0,0 +1,221 @@
1
+ from __future__ import division
2
+
3
+ import binascii
4
+ import base64
5
+
6
+
7
+ class UnexpectedDER(Exception):
8
+ pass
9
+
10
+
11
+ def encode_constructed(tag, value):
12
+ return int.to_bytes(0xa0+tag, 1, 'big') + encode_length(len(value)) + value
13
+
14
+
15
+ def encode_integer(r):
16
+ assert r >= 0 # can't support negative numbers yet
17
+ h = ("%x" % r).encode()
18
+ if len(h) % 2:
19
+ h = b'0' + h
20
+ s = binascii.unhexlify(h)
21
+ num = s[0] if isinstance(s[0], int) else ord(s[0])
22
+ if num <= 0x7f:
23
+ return b'\x02' + int.to_bytes(len(s), 1, 'big') + s
24
+ else:
25
+ # DER integers are two's complement, so if the first byte is
26
+ # 0x80-0xff then we need an extra 0x00 byte to prevent it from
27
+ # looking negative.
28
+ return b'\x02' + int.to_bytes(len(s)+1, 1, 'big') + b'\x00' + s
29
+
30
+
31
+ def encode_bitstring(s):
32
+ return b'\x03' + encode_length(len(s)) + s
33
+
34
+
35
+ def encode_octet_string(s):
36
+ return b'\x04' + encode_length(len(s)) + s
37
+
38
+
39
+ def encode_oid(first, second, *pieces):
40
+ assert first <= 2
41
+ assert second <= 39
42
+ encoded_pieces = [int.to_bytes(40*first+second, 1, 'big')] + [encode_number(p)
43
+ for p in pieces]
44
+ body = b''.join(encoded_pieces)
45
+ return b'\x06' + encode_length(len(body)) + body
46
+
47
+
48
+ def encode_sequence(*encoded_pieces):
49
+ total_len = sum([len(p) for p in encoded_pieces])
50
+ return b'\x30' + encode_length(total_len) + b''.join(encoded_pieces)
51
+
52
+
53
+ def encode_number(n):
54
+ b128_digits = []
55
+ while n:
56
+ b128_digits.insert(0, (n & 0x7f) | 0x80)
57
+ n = n >> 7
58
+ if not b128_digits:
59
+ b128_digits.append(0)
60
+ b128_digits[-1] &= 0x7f
61
+ return b''.join([int.to_bytes(d, 1, 'big') for d in b128_digits])
62
+
63
+
64
+ def remove_constructed(string):
65
+ s0 = string[0] if isinstance(string[0], int) else ord(string[0])
66
+ if (s0 & 0xe0) != 0xa0:
67
+ raise UnexpectedDER("wanted constructed tag (0xa0-0xbf), got 0x%02x"
68
+ % s0)
69
+ tag = s0 & 0x1f
70
+ length, llen = read_length(string[1:])
71
+ body = string[1+llen:1+llen+length]
72
+ rest = string[1+llen+length:]
73
+ return tag, body, rest
74
+
75
+
76
+ def remove_sequence(string):
77
+ if not string.startswith(b'\x30'):
78
+ n = string[0] if isinstance(string[0], int) else ord(string[0])
79
+ raise UnexpectedDER("wanted sequence (0x30), got 0x%02x" % n)
80
+ length, lengthlength = read_length(string[1:])
81
+ endseq = 1+lengthlength+length
82
+ return string[1+lengthlength:endseq], string[endseq:]
83
+
84
+
85
+ def remove_octet_string(string):
86
+ if not string.startswith(b'\x04'):
87
+ n = string[0] if isinstance(string[0], int) else ord(string[0])
88
+ raise UnexpectedDER("wanted octetstring (0x04), got 0x%02x" % n)
89
+ length, llen = read_length(string[1:])
90
+ body = string[1+llen:1+llen+length]
91
+ rest = string[1+llen+length:]
92
+ return body, rest
93
+
94
+
95
+ def remove_object(string):
96
+ if not string.startswith(b'\x06'):
97
+ n = string[0] if isinstance(string[0], int) else ord(string[0])
98
+ raise UnexpectedDER("wanted object (0x06), got 0x%02x" % n)
99
+ length, lengthlength = read_length(string[1:])
100
+ body = string[1+lengthlength:1+lengthlength+length]
101
+ rest = string[1+lengthlength+length:]
102
+ numbers = []
103
+ while body:
104
+ n, ll = read_number(body)
105
+ numbers.append(n)
106
+ body = body[ll:]
107
+ n0 = numbers.pop(0)
108
+ first = n0//40
109
+ second = n0-(40*first)
110
+ numbers.insert(0, first)
111
+ numbers.insert(1, second)
112
+ return tuple(numbers), rest
113
+
114
+
115
+ def remove_integer(string):
116
+ if not string.startswith(b'\x02'):
117
+ n = string[0] if isinstance(string[0], int) else ord(string[0])
118
+ raise UnexpectedDER("wanted integer (0x02), got 0x%02x" % n)
119
+ length, llen = read_length(string[1:])
120
+ numberbytes = string[1+llen:1+llen+length]
121
+ rest = string[1+llen+length:]
122
+ nbytes = numberbytes[0] if isinstance(numberbytes[0], int) else ord(numberbytes[0])
123
+ assert nbytes < 0x80 # can't support negative numbers yet
124
+ return int(binascii.hexlify(numberbytes), 16), rest
125
+
126
+
127
+ def read_number(string):
128
+ number = 0
129
+ llen = 0
130
+ # base-128 big endian, with b7 set in all but the last byte
131
+ while True:
132
+ if llen > len(string):
133
+ raise UnexpectedDER("ran out of length bytes")
134
+ number = number << 7
135
+ d = string[llen] if isinstance(string[llen], int) else ord(string[llen])
136
+ number += (d & 0x7f)
137
+ llen += 1
138
+ if not d & 0x80:
139
+ break
140
+ return number, llen
141
+
142
+
143
+ def encode_length(l):
144
+ assert l >= 0
145
+ if l < 0x80:
146
+ return int.to_bytes(l, 1, 'big')
147
+ s = ("%x" % l).encode()
148
+ if len(s) % 2:
149
+ s = b'0' + s
150
+ s = binascii.unhexlify(s)
151
+ llen = len(s)
152
+ return int.to_bytes(0x80 | llen, 1, 'big') + s
153
+
154
+
155
+ def read_length(string):
156
+ num = string[0] if isinstance(string[0], int) else ord(string[0])
157
+ if not (num & 0x80):
158
+ # short form
159
+ return (num & 0x7f), 1
160
+ # else long-form: b0&0x7f is number of additional base256 length bytes,
161
+ # big-endian
162
+ llen = num & 0x7f
163
+ if llen > len(string)-1:
164
+ raise UnexpectedDER("ran out of length bytes")
165
+ return int(binascii.hexlify(string[1:1+llen]), 16), 1+llen
166
+
167
+
168
+ def remove_bitstring(string):
169
+ num = string[0] if isinstance(string[0], int) else ord(string[0])
170
+ if not string.startswith(b'\x03'):
171
+ raise UnexpectedDER("wanted bitstring (0x03), got 0x%02x" % num)
172
+ length, llen = read_length(string[1:])
173
+ body = string[1+llen:1+llen+length]
174
+ rest = string[1+llen+length:]
175
+ return body, rest
176
+
177
+ # SEQUENCE([1, STRING(secexp), cont[0], OBJECT(curvename), cont[1], BINTSTRING)
178
+
179
+
180
+ # signatures: (from RFC3279)
181
+ # ansi-X9-62 OBJECT IDENTIFIER ::= {
182
+ # iso(1) member-body(2) us(840) 10045 }
183
+ #
184
+ # id-ecSigType OBJECT IDENTIFIER ::= {
185
+ # ansi-X9-62 signatures(4) }
186
+ # ecdsa-with-SHA1 OBJECT IDENTIFIER ::= {
187
+ # id-ecSigType 1 }
188
+ ## so 1,2,840,10045,4,1
189
+ ## so 0x42, .. ..
190
+
191
+ # Ecdsa-Sig-Value ::= SEQUENCE {
192
+ # r INTEGER,
193
+ # s INTEGER }
194
+
195
+ # id-public-key-type OBJECT IDENTIFIER ::= { ansi-X9.62 2 }
196
+ #
197
+ # id-ecPublicKey OBJECT IDENTIFIER ::= { id-publicKeyType 1 }
198
+
199
+ # I think the secp224r1 identifier is (t=06,l=05,v=2b81040021)
200
+ # secp224r1 OBJECT IDENTIFIER ::= {
201
+ # iso(1) identified-organization(3) certicom(132) curve(0) 33 }
202
+ # and the secp384r1 is (t=06,l=05,v=2b81040022)
203
+ # secp384r1 OBJECT IDENTIFIER ::= {
204
+ # iso(1) identified-organization(3) certicom(132) curve(0) 34 }
205
+
206
+ def unpem(pem):
207
+ if isinstance(pem, str):
208
+ pem = pem.encode()
209
+
210
+ d = b''.join([l.strip() for l in pem.split(b'\n')
211
+ if l and not l.startswith(b'-----')])
212
+ return base64.b64decode(d)
213
+
214
+
215
+ def topem(der, name):
216
+ b64 = base64.b64encode(der)
217
+ lines = [("-----BEGIN %s-----\n" % name).encode()]
218
+ lines.extend([b64[start:start+64]+b'\n'
219
+ for start in range(0, len(b64), 64)])
220
+ lines.append(("-----END %s-----\n" % name).encode())
221
+ return b''.join(lines)
@@ -0,0 +1,310 @@
1
+ #! /usr/bin/env python
2
+
3
+ """
4
+ Implementation of Elliptic-Curve Digital Signatures.
5
+
6
+ Classes and methods for elliptic-curve signatures:
7
+ private keys, public keys, signatures,
8
+ NIST prime-modulus curves with modulus lengths of
9
+ 192, 224, 256, 384, and 521 bits.
10
+
11
+ Example:
12
+
13
+ # (In real-life applications, you would probably want to
14
+ # protect against defects in SystemRandom.)
15
+ from random import SystemRandom
16
+ randrange = SystemRandom().randrange
17
+
18
+ # Generate a public/private key pair using the NIST Curve P-192:
19
+
20
+ g = generator_192
21
+ n = g.order()
22
+ secret = randrange( 1, n )
23
+ pubkey = Public_key( g, g * secret )
24
+ privkey = Private_key( pubkey, secret )
25
+
26
+ # Signing a hash value:
27
+
28
+ hash = randrange( 1, n )
29
+ signature = privkey.sign( hash, randrange( 1, n ) )
30
+
31
+ # Verifying a signature for a hash value:
32
+
33
+ if pubkey.verifies( hash, signature ):
34
+ print_("Demo verification succeeded.")
35
+ else:
36
+ print_("*** Demo verification failed.")
37
+
38
+ # Verification fails if the hash value is modified:
39
+
40
+ if pubkey.verifies( hash-1, signature ):
41
+ print_("**** Demo verification failed to reject tampered hash.")
42
+ else:
43
+ print_("Demo verification correctly rejected tampered hash.")
44
+
45
+ Version of 2009.05.16.
46
+
47
+ Revision history:
48
+ 2005.12.31 - Initial version.
49
+ 2008.11.25 - Substantial revisions introducing new classes.
50
+ 2009.05.16 - Warn against using random.randrange in real applications.
51
+ 2009.05.17 - Use random.SystemRandom by default.
52
+
53
+ Written in 2005 by Peter Pearson and placed in the public domain.
54
+ """
55
+
56
+ from . import ellipticcurve
57
+ from . import numbertheory
58
+
59
+
60
+ class RSZeroError(RuntimeError):
61
+ pass
62
+
63
+
64
+ class Signature(object):
65
+ """ECDSA signature.
66
+ """
67
+
68
+ def __init__(self, r, s, recovery_param):
69
+ self.r = r
70
+ self.s = s
71
+ self.recovery_param = recovery_param
72
+
73
+ def recover_public_keys(self, hash, generator):
74
+ """Returns two public keys for which the signature is valid
75
+ hash is signed hash
76
+ generator is the used generator of the signature
77
+ """
78
+ curve = generator.curve()
79
+ n = generator.order()
80
+ r = self.r
81
+ s = self.s
82
+ e = hash
83
+ x = r
84
+
85
+ # Compute the curve point with x as x-coordinate
86
+ alpha = (pow(x, 3, curve.p()) + (curve.a() * x) + curve.b()) % curve.p()
87
+ beta = numbertheory.square_root_mod_prime(alpha, curve.p())
88
+ y = beta if beta % 2 == 0 else curve.p() - beta
89
+
90
+ # Compute the public key
91
+ R1 = ellipticcurve.Point(curve, x, y, n)
92
+ Q1 = numbertheory.inverse_mod(r, n) * (s * R1 + (-e % n) * generator)
93
+ Pk1 = Public_key(generator, Q1)
94
+
95
+ # And the second solution
96
+ R2 = ellipticcurve.Point(curve, x, -y, n)
97
+ Q2 = numbertheory.inverse_mod(r, n) * (s * R2 + (-e % n) * generator)
98
+ Pk2 = Public_key(generator, Q2)
99
+
100
+ return [Pk1, Pk2]
101
+
102
+
103
+ class Public_key(object):
104
+ """Public key for ECDSA.
105
+ """
106
+
107
+ def __init__(self, generator, point):
108
+ """generator is the Point that generates the group,
109
+ point is the Point that defines the public key.
110
+ """
111
+
112
+ self.curve = generator.curve()
113
+ self.generator = generator
114
+ self.point = point
115
+ n = generator.order()
116
+ if not n:
117
+ raise RuntimeError("Generator point must have order.")
118
+ if not n * point == ellipticcurve.INFINITY:
119
+ raise RuntimeError("Generator point order is bad.")
120
+ if point.x() < 0 or n <= point.x() or point.y() < 0 or n <= point.y():
121
+ raise RuntimeError("Generator point has x or y out of range.")
122
+
123
+ def verifies(self, hash, signature):
124
+ """Verify that signature is a valid signature of hash.
125
+ Return True if the signature is valid.
126
+ """
127
+
128
+ # From X9.62 J.3.1.
129
+
130
+ G = self.generator
131
+ n = G.order()
132
+ r = signature.r
133
+ s = signature.s
134
+ if r < 1 or r > n - 1:
135
+ return False
136
+ if s < 1 or s > n - 1:
137
+ return False
138
+ c = numbertheory.inverse_mod(s, n)
139
+ u1 = (hash * c) % n
140
+ u2 = (r * c) % n
141
+ xy = u1 * G + u2 * self.point
142
+ v = xy.x() % n
143
+ return v == r
144
+
145
+
146
+ class Private_key(object):
147
+ """Private key for ECDSA.
148
+ """
149
+
150
+ def __init__(self, public_key, secret_multiplier):
151
+ """public_key is of class Public_key;
152
+ secret_multiplier is a large integer.
153
+ """
154
+
155
+ self.public_key = public_key
156
+ self.secret_multiplier = secret_multiplier
157
+
158
+ def sign(self, hash, random_k):
159
+ """Return a signature for the provided hash, using the provided
160
+ random nonce. It is absolutely vital that random_k be an unpredictable
161
+ number in the range [1, self.public_key.point.order()-1]. If
162
+ an attacker can guess random_k, he can compute our private key from a
163
+ single signature. Also, if an attacker knows a few high-order
164
+ bits (or a few low-order bits) of random_k, he can compute our private
165
+ key from many signatures. The generation of nonces with adequate
166
+ cryptographic strength is very difficult and far beyond the scope
167
+ of this comment.
168
+
169
+ May raise RuntimeError, in which case retrying with a new
170
+ random value k is in order.
171
+ """
172
+
173
+ G = self.public_key.generator
174
+ n = G.order()
175
+ k = random_k % n
176
+ p1 = k * G
177
+ r = p1.x() % n
178
+ if r == 0:
179
+ raise RSZeroError("amazingly unlucky random number r")
180
+ s = (numbertheory.inverse_mod(k, n) *
181
+ (hash + (self.secret_multiplier * r) % n)) % n
182
+ if s == 0:
183
+ raise RSZeroError("amazingly unlucky random number s")
184
+ recovery_param = p1.y() % 2 or (2 if p1.x() == k else 0)
185
+ return Signature(r, s, recovery_param)
186
+
187
+
188
+ def int_to_string(x):
189
+ """Convert integer x into a string of bytes, as per X9.62."""
190
+ assert x >= 0
191
+ if x == 0:
192
+ return b'\0'
193
+ result = []
194
+ while x:
195
+ ordinal = x & 0xFF
196
+ result.append(int.to_bytes(ordinal, 1, 'big'))
197
+ x >>= 8
198
+
199
+ result.reverse()
200
+ return b''.join(result)
201
+
202
+
203
+ def string_to_int(s):
204
+ """Convert a string of bytes into an integer, as per X9.62."""
205
+ result = 0
206
+ for c in s:
207
+ if not isinstance(c, int):
208
+ c = ord(c)
209
+ result = 256 * result + c
210
+ return result
211
+
212
+
213
+ def digest_integer(m):
214
+ """Convert an integer into a string of bytes, compute
215
+ its SHA-1 hash, and convert the result to an integer."""
216
+ #
217
+ # I don't expect this function to be used much. I wrote
218
+ # it in order to be able to duplicate the examples
219
+ # in ECDSAVS.
220
+ #
221
+ from hashlib import sha1
222
+ return string_to_int(sha1(int_to_string(m)).digest())
223
+
224
+
225
+ def point_is_valid(generator, x, y):
226
+ """Is (x,y) a valid public key based on the specified generator?"""
227
+
228
+ # These are the tests specified in X9.62.
229
+
230
+ n = generator.order()
231
+ curve = generator.curve()
232
+ if x < 0 or n <= x or y < 0 or n <= y:
233
+ return False
234
+ if not curve.contains_point(x, y):
235
+ return False
236
+ if not n * ellipticcurve.Point(curve, x, y) == ellipticcurve.INFINITY:
237
+ return False
238
+ return True
239
+
240
+
241
+ # NIST Curve P-192:
242
+ _p = 6277101735386680763835789423207666416083908700390324961279
243
+ _r = 6277101735386680763835789423176059013767194773182842284081
244
+ # s = 0x3045ae6fc8422f64ed579528d38120eae12196d5L
245
+ # c = 0x3099d2bbbfcb2538542dcd5fb078b6ef5f3d6fe2c745de65L
246
+ _b = 0x64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1
247
+ _Gx = 0x188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012
248
+ _Gy = 0x07192b95ffc8da78631011ed6b24cdd573f977a11e794811
249
+
250
+ curve_192 = ellipticcurve.CurveFp(_p, -3, _b)
251
+ generator_192 = ellipticcurve.Point(curve_192, _Gx, _Gy, _r)
252
+
253
+ # NIST Curve P-224:
254
+ _p = 26959946667150639794667015087019630673557916260026308143510066298881
255
+ _r = 26959946667150639794667015087019625940457807714424391721682722368061
256
+ # s = 0xbd71344799d5c7fcdc45b59fa3b9ab8f6a948bc5L
257
+ # c = 0x5b056c7e11dd68f40469ee7f3c7a7d74f7d121116506d031218291fbL
258
+ _b = 0xb4050a850c04b3abf54132565044b0b7d7bfd8ba270b39432355ffb4
259
+ _Gx = 0xb70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21
260
+ _Gy = 0xbd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34
261
+
262
+ curve_224 = ellipticcurve.CurveFp(_p, -3, _b)
263
+ generator_224 = ellipticcurve.Point(curve_224, _Gx, _Gy, _r)
264
+
265
+ # NIST Curve P-256:
266
+ _p = 115792089210356248762697446949407573530086143415290314195533631308867097853951
267
+ _r = 115792089210356248762697446949407573529996955224135760342422259061068512044369
268
+ # s = 0xc49d360886e704936a6678e1139d26b7819f7e90L
269
+ # c = 0x7efba1662985be9403cb055c75d4f7e0ce8d84a9c5114abcaf3177680104fa0dL
270
+ _b = 0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b
271
+ _Gx = 0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296
272
+ _Gy = 0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5
273
+
274
+ curve_256 = ellipticcurve.CurveFp(_p, -3, _b)
275
+ generator_256 = ellipticcurve.Point(curve_256, _Gx, _Gy, _r)
276
+
277
+ # NIST Curve P-384:
278
+ _p = 39402006196394479212279040100143613805079739270465446667948293404245721771496870329047266088258938001861606973112319
279
+ _r = 39402006196394479212279040100143613805079739270465446667946905279627659399113263569398956308152294913554433653942643
280
+ # s = 0xa335926aa319a27a1d00896a6773a4827acdac73L
281
+ # c = 0x79d1e655f868f02fff48dcdee14151ddb80643c1406d0ca10dfe6fc52009540a495e8042ea5f744f6e184667cc722483L
282
+ _b = 0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef
283
+ _Gx = 0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7
284
+ _Gy = 0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f
285
+
286
+ curve_384 = ellipticcurve.CurveFp(_p, -3, _b)
287
+ generator_384 = ellipticcurve.Point(curve_384, _Gx, _Gy, _r)
288
+
289
+ # NIST Curve P-521:
290
+ _p = 6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057151
291
+ _r = 6864797660130609714981900799081393217269435300143305409394463459185543183397655394245057746333217197532963996371363321113864768612440380340372808892707005449
292
+ # s = 0xd09e8800291cb85396cc6717393284aaa0da64baL
293
+ # c = 0x0b48bfa5f420a34949539d2bdfc264eeeeb077688e44fbf0ad8f6d0edb37bd6b533281000518e19f1b9ffbe0fe9ed8a3c2200b8f875e523868c70c1e5bf55bad637L
294
+ _b = 0x051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00
295
+ _Gx = 0xc6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66
296
+ _Gy = 0x11839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650
297
+
298
+ curve_521 = ellipticcurve.CurveFp(_p, -3, _b)
299
+ generator_521 = ellipticcurve.Point(curve_521, _Gx, _Gy, _r)
300
+
301
+ # Certicom secp256-k1
302
+ _a = 0x0000000000000000000000000000000000000000000000000000000000000000
303
+ _b = 0x0000000000000000000000000000000000000000000000000000000000000007
304
+ _p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f
305
+ _Gx = 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
306
+ _Gy = 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8
307
+ _r = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141
308
+
309
+ curve_secp256k1 = ellipticcurve.CurveFp(_p, _a, _b)
310
+ generator_secp256k1 = ellipticcurve.Point(curve_secp256k1, _Gx, _Gy, _r)