@polkadot/types
Version:
Implementation of the Parity codec
84 lines (83 loc) • 2.13 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.rpc = void 0;
exports.rpc = {
generateAncestryProof: {
description: 'Generate an MMR ancestry proof for the given block number.',
params: [
{
name: 'prevBlockNumber',
type: 'u64'
},
{
isOptional: true,
name: 'bestKnownBlockNumber',
type: 'u64'
},
{
isHistoric: true,
isOptional: true,
name: 'at',
type: 'BlockHash'
}
],
type: 'MmrAncestryProof'
},
generateProof: {
description: 'Generate MMR proof for the given block numbers.',
params: [
{
name: 'blockNumbers',
type: 'Vec<u64>'
},
{
isOptional: true,
name: 'bestKnownBlockNumber',
type: 'u64'
},
{
isHistoric: true,
isOptional: true,
name: 'at',
type: 'BlockHash'
}
],
type: 'MmrLeafBatchProof'
},
root: {
description: 'Get the MMR root hash for the current best block.',
params: [
{
isHistoric: true,
isOptional: true,
name: 'at',
type: 'BlockHash'
}
],
type: 'MmrHash'
},
verifyProof: {
description: 'Verify an MMR proof',
params: [
{
name: 'proof',
type: 'MmrLeafBatchProof'
}
],
type: 'bool'
},
verifyProofStateless: {
description: 'Verify an MMR proof statelessly given an mmr_root',
params: [
{
name: 'root',
type: 'MmrHash'
},
{
name: 'proof',
type: 'MmrLeafBatchProof'
}
],
type: 'bool'
}
};