diff --git a/CHANGELOG.md b/CHANGELOG.md index 80160e4254..f74022c150 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Changes: - Return additional error information from internal u8a decoding failures - Adjust Westend types for 16 nominators-only +- Add support for `DisallowSigned` (as per shell runtime) extension ## 4.10.1 May 17, 2021 diff --git a/packages/types/src/extrinsic/signedExtensions/index.ts b/packages/types/src/extrinsic/signedExtensions/index.ts index 75eb61a7e8..fab342e2ba 100644 --- a/packages/types/src/extrinsic/signedExtensions/index.ts +++ b/packages/types/src/extrinsic/signedExtensions/index.ts @@ -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 = [ diff --git a/packages/types/src/extrinsic/signedExtensions/shell.ts b/packages/types/src/extrinsic/signedExtensions/shell.ts new file mode 100644 index 0000000000..e3daad12b4 --- /dev/null +++ b/packages/types/src/extrinsic/signedExtensions/shell.ts @@ -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 +};