rpc.py 670 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/env python3
  2. #
  3. # MMGen Wallet, a terminal-based cryptocurrency wallet
  4. # Copyright (C)2013-2024 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-wallet
  9. # https://gitlab.com/mmgen/mmgen-wallet
  10. """
  11. tw.rpc: Tracking wallet RPC class for the MMGen suite
  12. """
  13. from ..objmethods import MMGenObject
  14. class TwRPC:
  15. def __new__(cls,proto,*args,**kwargs):
  16. return MMGenObject.__new__(proto.base_proto_subclass(cls,'tw.rpc'))
  17. def __init__(self,proto,rpc,twctl):
  18. self.proto = proto
  19. self.rpc = rpc
  20. self.twctl = twctl