"use strict";
// Copyright 2017-2020 @polkadot/jsonrpc authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
Object.defineProperty(exports, "__esModule", { value: true });
const util_1 = require("@polkadot/util");
/** @internal */
function createMethod(section, method, { description, isDeprecated = false, isHidden = false, isOptional = false, isSigned = false, params, pubsub, type }) {
    return {
        description,
        isDeprecated,
        isHidden,
        isOptional,
        isSigned,
        isSubscription: !util_1.isUndefined(pubsub),
        method,
        params,
        pubsub: pubsub || ['', '', ''],
        section,
        type
    };
}
exports.default = createMethod;
