unsigned.py 768 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env python3
  2. #
  3. # mmgen = Multi-Mode GENerator, a command-line cryptocurrency wallet
  4. # Copyright (C)2013-2022 The MMGen Project <mmgen@tuta.io>
  5. # Licensed under the GNU General Public License, Version 3:
  6. # https://www.gnu.org/licenses
  7. # Public project repositories:
  8. # https://github.com/mmgen/mmgen
  9. # https://gitlab.com/mmgen/mmgen
  10. """
  11. tx.unsigned: unsigned transaction class
  12. """
  13. from .completed import Completed
  14. from ..util import remove_dups
  15. class Unsigned(Completed):
  16. desc = 'unsigned transaction'
  17. ext = 'rawtx'
  18. def delete_attrs(self,desc,attr):
  19. for e in getattr(self,desc):
  20. if hasattr(e,attr):
  21. delattr(e,attr)
  22. def get_sids(self,desc):
  23. return remove_dups(
  24. (e.mmid.sid for e in getattr(self,desc) if e.mmid),
  25. quiet = True )