@polkadot/jsonrpc
Version:
Method definitions for the Polkadot RPC layer
42 lines (36 loc) • 1.46 kB
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _method = _interopRequireDefault(require("./create/method"));
var _param = _interopRequireDefault(require("./create/param"));
// 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.
const createBlock = {
description: 'Instructs the manual-seal authorship task to create a new block',
params: [(0, _param.default)('createEmpty', 'bool'), (0, _param.default)('finalize', 'bool'), (0, _param.default)('parentHash', 'Option<BlockHash>')],
type: 'CreatedBlock'
};
const finalizeBlock = {
description: 'Instructs the manual-seal authorship task to finalize a block',
params: [(0, _param.default)('hash', 'BlockHash'), (0, _param.default)('justification', 'Option<Justification>')],
type: 'bool'
};
const section = 'engine';
/**
* @summary Calls to interact with the block production engine
*/
var _default = {
isDeprecated: false,
isHidden: false,
description: 'Block production engine',
section,
methods: {
createBlock: (0, _method.default)(section, 'createBlock', createBlock),
finalizeBlock: (0, _method.default)(section, 'finalizeBlock', finalizeBlock)
}
};
exports.default = _default;