__init__.py 872 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/env python3
  2. #
  3. # MMGen Wallet, a terminal-based cryptocurrency wallet
  4. # Copyright (C)2013-2026 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. swap.proto.thorchain: THORChain swap protocol implementation for the MMGen Wallet suite
  12. """
  13. __all__ = ['SwapCfg', 'SwapAsset', 'Memo']
  14. name = 'THORChain'
  15. exp_prec = 4
  16. from ....util2 import ExpInt
  17. class ExpInt4(ExpInt):
  18. def __new__(cls, spec):
  19. return ExpInt.__new__(cls, spec, prec=exp_prec)
  20. def rpc_client(tx, amt):
  21. from .thornode import Thornode
  22. return Thornode(tx, amt)
  23. from .cfg import THORChainSwapCfg as SwapCfg
  24. from .asset import THORChainSwapAsset as SwapAsset
  25. from .memo import THORChainMemo as Memo