# Path: python3-src/steembase/operations.py
# class Operation(GrapheneOperation):
#     def __init__(self, op):
#         super(Operation, self).__init__(op)
# 
#     def operations(self):
#         return operations
# 
#     def getOperationKlass(self):
#         return Operation
# 
#     def getOperationNameForId(self, i):
#         for key in operations:
#             if int(operations[key]) is int(i):
#                 return key
#         return "Unknown Operation ID %d" % i
# 
#     def _getklass(self, name):
#         module = __import__("steembase.operations", fromlist=["operations"])
#         class_ = getattr(module, name)
#         return class_
# 
#     def __str__(self):
#         return json.dumps([
#             self.getOperationNameForId(self.opId),
#             self.op.json()
#         ])
# 
# Path: python3-src/steembase/chains.py



from graphenebase.signedtransactions import Signed_Transaction as GrapheneSigned_Transaction
from .operations import Operation
from .chains import known_chains
import logging
log = logging.getLogger(__name__)


class Signed_Transaction(GrapheneSigned_Transaction):
    """ Create a signed transaction and offer method to create the
        signature

        :param num refNum: parameter ref_block_num (see ``getBlockParams``)
        :param num refPrefix: parameter ref_block_prefix (see ``getBlockParams``)
        :param str expiration: expiration date
        :param Array operations:  array of operations
    """
    def __init__(self, *args, **kwargs):
        super(Signed_Transaction, self).__init__(*args, **kwargs)

    def sign(self, wifkeys, chain="STEEM"):
        return super(Signed_Transaction, self).sign(wifkeys, chain)

    def verify(self, pubkeys=[], chain="STEEM"):
        return super(Signed_Transaction, self).verify(pubkeys, chain)

    def getOperationKlass(self):
        return Operation

    def getKnownChains(self):

# Path: python3-src/steembase/operations.py
# class Operation(GrapheneOperation):
#     def __init__(self, op):
#         super(Operation, self).__init__(op)
# 
#     def operations(self):
#         return operations
# 
#     def getOperationKlass(self):
#         return Operation
# 
#     def getOperationNameForId(self, i):
#         for key in operations:
#             if int(operations[key]) is int(i):
#                 return key
#         return "Unknown Operation ID %d" % i
# 
#     def _getklass(self, name):
#         module = __import__("steembase.operations", fromlist=["operations"])
#         class_ = getattr(module, name)
#         return class_
# 
#     def __str__(self):
#         return json.dumps([
#             self.getOperationNameForId(self.opId),
#             self.op.json()
#         ])
# 
# Path: python3-src/steembase/chains.py



# Path: python3-src/steembase/signedtransactions.py
from graphenebase.signedtransactions import Signed_Transaction as GrapheneSigned_Transaction
from .operations import Operation
from .chains import known_chains
import logging

log = logging.getLogger(__name__)


class Signed_Transaction(GrapheneSigned_Transaction):
    """ Create a signed transaction and offer method to create the
        signature

        :param num refNum: parameter ref_block_num (see ``getBlockParams``)
        :param num refPrefix: parameter ref_block_prefix (see ``getBlockParams``)
        :param str expiration: expiration date
        :param Array operations:  array of operations
    """
    def __init__(self, *args, **kwargs):
        super(Signed_Transaction, self).__init__(*args, **kwargs)

    def sign(self, wifkeys, chain="STEEM"):
        return super(Signed_Transaction, self).sign(wifkeys, chain)

    def verify(self, pubkeys=[], chain="STEEM"):
        return super(Signed_Transaction, self).verify(pubkeys, chain)

    def getOperationKlass(self):
        return Operation

    def getKnownChains(self):

        return known_chains