config.py 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #!/usr/bin/env python
  2. #
  3. # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
  4. # Copyright (C) 2013 by philemon <mmgen-py@yandex.com>
  5. #
  6. # This program is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation, either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. """
  19. config.py: Constants and configuration options for the mmgen suite
  20. """
  21. from decimal import Decimal
  22. tx_fee = Decimal("0.001")
  23. max_tx_fee = Decimal("0.1")
  24. proj_name = "mmgen"
  25. wallet_ext = "mmdat"
  26. seed_ext = "mmseed"
  27. mn_ext = "mmwords"
  28. brain_ext = "mmbrain"
  29. seedfile_exts = wallet_ext, seed_ext, mn_ext, brain_ext
  30. addrfile_ext = "addrs"
  31. keyfile_ext = "keys"
  32. default_wl = "electrum"
  33. #default_wl = "tirosh"
  34. cl_override_vars = 'seed_len','hash_preset','usr_randlen'
  35. seed_lens = 128,192,256
  36. seed_len = 256
  37. mnemonic_lens = [i / 32 * 3 for i in seed_lens]
  38. http_timeout = 30
  39. keyconv_exec = "keyconv"
  40. from os import getenv
  41. debug = True if getenv("MMGEN_DEBUG") else False
  42. mins_per_block = 8.5
  43. passwd_max_tries = 5
  44. max_randlen,min_randlen = 80,5
  45. usr_randlen = 20
  46. salt_len = 16
  47. hash_preset = '3'
  48. hash_presets = {
  49. # Scrypt params:
  50. # ID N p r
  51. # N is a power of two
  52. '1': [12, 8, 1],
  53. '2': [13, 8, 4],
  54. '3': [14, 8, 8],
  55. '4': [15, 8, 12],
  56. '5': [16, 8, 16],
  57. '6': [17, 8, 20],
  58. }
  59. from string import ascii_letters, digits
  60. addr_label_punc = ".","_",",","-"," "
  61. addr_label_symbols = tuple(ascii_letters + digits) + addr_label_punc
  62. max_addr_label_len = 16
  63. wallet_label_punc = ".", "_", " "
  64. wallet_label_symbols = tuple(ascii_letters + digits) + wallet_label_punc
  65. max_wallet_label_len = 32