config.py 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. quiet,verbose = False,False
  22. min_screen_width = 80
  23. from decimal import Decimal
  24. tx_fee = Decimal("0.001")
  25. max_tx_fee = Decimal("0.1")
  26. proj_name = "mmgen"
  27. proj_name_cap = "MMGen"
  28. wallet_ext = "mmdat"
  29. seed_ext = "mmseed"
  30. mn_ext = "mmwords"
  31. brain_ext = "mmbrain"
  32. seedfile_exts = wallet_ext, seed_ext, mn_ext, brain_ext
  33. addrfile_ext = "addrs"
  34. keyfile_ext = "keys"
  35. default_wl = "electrum"
  36. #default_wl = "tirosh"
  37. cl_override_vars = 'seed_len','hash_preset','usr_randlen'
  38. seed_lens = 128,192,256
  39. seed_len = 256
  40. mnemonic_lens = [i / 32 * 3 for i in seed_lens]
  41. http_timeout = 30
  42. keyconv_exec = "keyconv"
  43. from os import getenv
  44. debug = True if getenv("MMGEN_DEBUG") else False
  45. mins_per_block = 8.5
  46. passwd_max_tries = 5
  47. max_randlen,min_randlen = 80,5
  48. usr_randlen = 20
  49. salt_len = 16
  50. hash_preset = '3'
  51. hash_presets = {
  52. # Scrypt params:
  53. # ID N p r
  54. # N is a power of two
  55. '1': [12, 8, 1],
  56. '2': [13, 8, 4],
  57. '3': [14, 8, 8],
  58. '4': [15, 8, 12],
  59. '5': [16, 8, 16],
  60. '6': [17, 8, 20],
  61. }
  62. mmgen_idx_max_digits = 7
  63. from string import ascii_letters, digits
  64. addr_label_symbols = tuple([chr(i) for i in range(0x20,0x7f)])
  65. max_addr_label_len = 32
  66. wallet_label_symbols = addr_label_symbols
  67. max_wallet_label_len = 32
  68. #addr_label_punc = ".","_",",","-"," ","(",")"
  69. #addr_label_symbols = tuple(ascii_letters + digits) + addr_label_punc
  70. #wallet_label_punc = addr_label_punc