DisallowSigned extension (#3547)

This commit is contained in:
Jaco
2021-05-19 16:59:57 +02:00
committed by GitHub
parent 66d3486674
commit 8b7fccb744
3 changed files with 17 additions and 1 deletions
@@ -4,13 +4,18 @@
import type { ExtDef, ExtInfo, ExtTypes } from './types';
import { polkadot } from './polkadot';
import { shell } from './shell';
import { substrate } from './substrate';
// A mapping of the known signed extensions to the extra fields that they contain. Unlike in the actual extensions,
// we define the extra fields not as a Tuple, but rather as a struct so they can be named. These will be expanded
// into the various fields when added to the payload (we only support V4 onwards with these, V3 and earlier are
// deemed fixed and non-changeable)
const allExtensions: ExtDef = { ...substrate, ...polkadot };
const allExtensions: ExtDef = {
...substrate,
...shell,
...polkadot
};
// the v4 signed extensions (the order is important here, as applied by default)
const defaultExtensions: Array<keyof typeof allExtensions> = [
@@ -0,0 +1,10 @@
// Copyright 2017-2021 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ExtDef } from './types';
import { emptyCheck } from './emptyCheck';
export const shell: ExtDef = {
DisallowSigned: emptyCheck
};