# Path: hashmal_lib/core/chainparams.py
# class ParamsPreset(object):
#     def __init__(self, **kwargs):
#     def raw_signature_hash(cls, script, txTo, inIdx, hashtype):
#     def signature_hash(cls, script, txTo, inIdx, hashtype):
# def add_preset(preset):
# def remove_preset(preset):
# def get_presets():
# def get_tx_fields():
# def set_tx_fields(fields):
# def set_tx_serializer(cls):
# def get_block_header_fields():
# def set_block_header_fields(fields):
# def get_block_fields():
# def set_block_fields(fields):
# def get_opcode_overrides():
# def set_opcode_overrides(ops):
# def set_opcodes(op_names, ops_by_name, disabled_ops):
# def get_script_engine_class():
# def set_script_engine_class(cls):
# def set_to_preset(name):
# def signature_hash(script, txTo, inIdx, hashtype):
#         HASH_ONE = b'\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'


from PyQt4 import QtCore
from hashmal_lib.core import chainparams
from base import Plugin, BasePluginUI, Category



def make_plugin():
    p = Plugin(ChainParams)
    p.has_gui = False
    return p

class ChainParamsObject(QtCore.QObject):
    """This class exists so that a signal can be emitted when chainparams presets change."""
    paramsPresetsChanged = QtCore.pyqtSignal()

class ChainParams(BasePluginUI):
    """For augmentation purposes, we use this plugin to help with chainparams presets."""
    tool_name = 'Chainparams'
    description = 'Chainparams allows plugins to add chainparams presets for Hashmal to use.'
    category = Category.Core

    def __init__(self, *args):
        super(ChainParams, self).__init__(*args)
        self.chainparams_object = ChainParamsObject()
        self.paramsPresetsChanged = self.chainparams_object.paramsPresetsChanged
        self.augment('chainparams_presets', None, callback=self.on_chainparams_augmented)

    def add_params_preset(self, preset):
        try:

# Path: hashmal_lib/core/chainparams.py
# class ParamsPreset(object):
#     def __init__(self, **kwargs):
#     def raw_signature_hash(cls, script, txTo, inIdx, hashtype):
#     def signature_hash(cls, script, txTo, inIdx, hashtype):
# def add_preset(preset):
# def remove_preset(preset):
# def get_presets():
# def get_tx_fields():
# def set_tx_fields(fields):
# def set_tx_serializer(cls):
# def get_block_header_fields():
# def set_block_header_fields(fields):
# def get_block_fields():
# def set_block_fields(fields):
# def get_opcode_overrides():
# def set_opcode_overrides(ops):
# def set_opcodes(op_names, ops_by_name, disabled_ops):
# def get_script_engine_class():
# def set_script_engine_class(cls):
# def set_to_preset(name):
# def signature_hash(script, txTo, inIdx, hashtype):
#         HASH_ONE = b'\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'


# Path: hashmal_lib/plugins/chainparams.py
from PyQt4 import QtCore
from hashmal_lib.core import chainparams
from base import Plugin, BasePluginUI, Category




def make_plugin():
    p = Plugin(ChainParams)
    p.has_gui = False
    return p

class ChainParamsObject(QtCore.QObject):
    """This class exists so that a signal can be emitted when chainparams presets change."""
    paramsPresetsChanged = QtCore.pyqtSignal()

class ChainParams(BasePluginUI):
    """For augmentation purposes, we use this plugin to help with chainparams presets."""
    tool_name = 'Chainparams'
    description = 'Chainparams allows plugins to add chainparams presets for Hashmal to use.'
    category = Category.Core

    def __init__(self, *args):
        super(ChainParams, self).__init__(*args)
        self.chainparams_object = ChainParamsObject()
        self.paramsPresetsChanged = self.chainparams_object.paramsPresetsChanged
        self.augment('chainparams_presets', None, callback=self.on_chainparams_augmented)

    def add_params_preset(self, preset):
        try:

            chainparams.add_preset(preset)