From d953e101ffe106391a1c879de129a99054903441 Mon Sep 17 00:00:00 2001 From: Jaco Date: Tue, 5 Jul 2022 12:10:29 +0200 Subject: [PATCH] Align augmentation with an import-first approach (#5032) --- packages/api-augment/src/kusama/consts.ts | 2 ++ packages/api-augment/src/kusama/errors.ts | 2 ++ packages/api-augment/src/kusama/events.ts | 2 ++ packages/api-augment/src/kusama/query.ts | 2 ++ packages/api-augment/src/kusama/runtime.ts | 2 ++ packages/api-augment/src/kusama/tx.ts | 2 ++ packages/api-augment/src/polkadot/consts.ts | 2 ++ packages/api-augment/src/polkadot/errors.ts | 2 ++ packages/api-augment/src/polkadot/events.ts | 2 ++ packages/api-augment/src/polkadot/query.ts | 2 ++ packages/api-augment/src/polkadot/runtime.ts | 2 ++ packages/api-augment/src/polkadot/tx.ts | 2 ++ packages/api-augment/src/substrate/consts.ts | 2 ++ packages/api-augment/src/substrate/errors.ts | 2 ++ packages/api-augment/src/substrate/events.ts | 2 ++ packages/api-augment/src/substrate/query.ts | 2 ++ packages/api-augment/src/substrate/runtime.ts | 2 ++ packages/api-augment/src/substrate/tx.ts | 2 ++ packages/rpc-augment/src/augment/jsonrpc.ts | 2 ++ packages/typegen/src/templates/calls.hbs | 2 ++ packages/typegen/src/templates/consts.hbs | 2 ++ packages/typegen/src/templates/errors.hbs | 2 ++ packages/typegen/src/templates/events.hbs | 2 ++ packages/typegen/src/templates/interfaceRegistry.hbs | 2 ++ packages/typegen/src/templates/lookup/types.hbs | 2 ++ packages/typegen/src/templates/query.hbs | 2 ++ packages/typegen/src/templates/rpc.hbs | 2 ++ packages/typegen/src/templates/tx.hbs | 2 ++ packages/types-augment/src/lookup/types-kusama.ts | 2 ++ packages/types-augment/src/lookup/types-polkadot.ts | 2 ++ packages/types-augment/src/lookup/types-substrate.ts | 2 ++ packages/types-augment/src/registry/interfaces.ts | 2 ++ packages/types-augment/src/registry/kusama.ts | 2 ++ packages/types-augment/src/registry/polkadot.ts | 2 ++ packages/types-augment/src/registry/substrate.ts | 2 ++ packages/types-create/src/types/augmentRegistry.ts | 4 +++- packages/types/src/types/augmentLookup.ts | 4 +++- packages/types/src/types/augmentRegistry.ts | 5 +++-- rollup.config.mjs | 3 +++ 39 files changed, 82 insertions(+), 4 deletions(-) diff --git a/packages/api-augment/src/kusama/consts.ts b/packages/api-augment/src/kusama/consts.ts index cba8f3325e..6654400f26 100644 --- a/packages/api-augment/src/kusama/consts.ts +++ b/packages/api-augment/src/kusama/consts.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ +import '@polkadot/api-base/types/consts'; + import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types'; import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { Codec } from '@polkadot/types-codec/types'; diff --git a/packages/api-augment/src/kusama/errors.ts b/packages/api-augment/src/kusama/errors.ts index 178555a647..dcea697604 100644 --- a/packages/api-augment/src/kusama/errors.ts +++ b/packages/api-augment/src/kusama/errors.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ +import '@polkadot/api-base/types/errors'; + import type { ApiTypes, AugmentedError } from '@polkadot/api-base/types'; export type __AugmentedError = AugmentedError; diff --git a/packages/api-augment/src/kusama/events.ts b/packages/api-augment/src/kusama/events.ts index 05224839ce..294a444c95 100644 --- a/packages/api-augment/src/kusama/events.ts +++ b/packages/api-augment/src/kusama/events.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ +import '@polkadot/api-base/types/events'; + import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types'; import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { ITuple } from '@polkadot/types-codec/types'; diff --git a/packages/api-augment/src/kusama/query.ts b/packages/api-augment/src/kusama/query.ts index 83786a62e0..69078fc235 100644 --- a/packages/api-augment/src/kusama/query.ts +++ b/packages/api-augment/src/kusama/query.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ +import '@polkadot/api-base/types/storage'; + import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types'; import type { Data } from '@polkadot/types'; import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, u32, u64 } from '@polkadot/types-codec'; diff --git a/packages/api-augment/src/kusama/runtime.ts b/packages/api-augment/src/kusama/runtime.ts index e0db995544..3a517b9b4f 100644 --- a/packages/api-augment/src/kusama/runtime.ts +++ b/packages/api-augment/src/kusama/runtime.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ +import '@polkadot/api-base/types/calls'; + import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types'; import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec'; import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; diff --git a/packages/api-augment/src/kusama/tx.ts b/packages/api-augment/src/kusama/tx.ts index d55d285bf8..a37e65c2f5 100644 --- a/packages/api-augment/src/kusama/tx.ts +++ b/packages/api-augment/src/kusama/tx.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ +import '@polkadot/api-base/types/submittable'; + import type { ApiTypes, AugmentedSubmittable, SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api-base/types'; import type { Data } from '@polkadot/types'; import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; diff --git a/packages/api-augment/src/polkadot/consts.ts b/packages/api-augment/src/polkadot/consts.ts index 2f6dc2dac0..0b471e885d 100644 --- a/packages/api-augment/src/polkadot/consts.ts +++ b/packages/api-augment/src/polkadot/consts.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ +import '@polkadot/api-base/types/consts'; + import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types'; import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { Codec } from '@polkadot/types-codec/types'; diff --git a/packages/api-augment/src/polkadot/errors.ts b/packages/api-augment/src/polkadot/errors.ts index a80a455984..4ec0e137f1 100644 --- a/packages/api-augment/src/polkadot/errors.ts +++ b/packages/api-augment/src/polkadot/errors.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ +import '@polkadot/api-base/types/errors'; + import type { ApiTypes, AugmentedError } from '@polkadot/api-base/types'; export type __AugmentedError = AugmentedError; diff --git a/packages/api-augment/src/polkadot/events.ts b/packages/api-augment/src/polkadot/events.ts index ecbeae4eda..6f71b0f8d1 100644 --- a/packages/api-augment/src/polkadot/events.ts +++ b/packages/api-augment/src/polkadot/events.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ +import '@polkadot/api-base/types/events'; + import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types'; import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { ITuple } from '@polkadot/types-codec/types'; diff --git a/packages/api-augment/src/polkadot/query.ts b/packages/api-augment/src/polkadot/query.ts index 1b0eec8f89..1834e735e9 100644 --- a/packages/api-augment/src/polkadot/query.ts +++ b/packages/api-augment/src/polkadot/query.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ +import '@polkadot/api-base/types/storage'; + import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types'; import type { Data } from '@polkadot/types'; import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, u32, u64 } from '@polkadot/types-codec'; diff --git a/packages/api-augment/src/polkadot/runtime.ts b/packages/api-augment/src/polkadot/runtime.ts index e0db995544..3a517b9b4f 100644 --- a/packages/api-augment/src/polkadot/runtime.ts +++ b/packages/api-augment/src/polkadot/runtime.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ +import '@polkadot/api-base/types/calls'; + import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types'; import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec'; import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; diff --git a/packages/api-augment/src/polkadot/tx.ts b/packages/api-augment/src/polkadot/tx.ts index ab0aff6047..98446f0811 100644 --- a/packages/api-augment/src/polkadot/tx.ts +++ b/packages/api-augment/src/polkadot/tx.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ +import '@polkadot/api-base/types/submittable'; + import type { ApiTypes, AugmentedSubmittable, SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api-base/types'; import type { Data } from '@polkadot/types'; import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; diff --git a/packages/api-augment/src/substrate/consts.ts b/packages/api-augment/src/substrate/consts.ts index 663fb5376c..749bc0a1a0 100644 --- a/packages/api-augment/src/substrate/consts.ts +++ b/packages/api-augment/src/substrate/consts.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ +import '@polkadot/api-base/types/consts'; + import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types'; import type { Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { Codec } from '@polkadot/types-codec/types'; diff --git a/packages/api-augment/src/substrate/errors.ts b/packages/api-augment/src/substrate/errors.ts index 267f21e009..f551094d45 100644 --- a/packages/api-augment/src/substrate/errors.ts +++ b/packages/api-augment/src/substrate/errors.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ +import '@polkadot/api-base/types/errors'; + import type { ApiTypes, AugmentedError } from '@polkadot/api-base/types'; export type __AugmentedError = AugmentedError; diff --git a/packages/api-augment/src/substrate/events.ts b/packages/api-augment/src/substrate/events.ts index 6e7f92b784..d379d02fe0 100644 --- a/packages/api-augment/src/substrate/events.ts +++ b/packages/api-augment/src/substrate/events.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ +import '@polkadot/api-base/types/events'; + import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types'; import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { ITuple } from '@polkadot/types-codec/types'; diff --git a/packages/api-augment/src/substrate/query.ts b/packages/api-augment/src/substrate/query.ts index 13f218875f..9b3cb18406 100644 --- a/packages/api-augment/src/substrate/query.ts +++ b/packages/api-augment/src/substrate/query.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ +import '@polkadot/api-base/types/storage'; + import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types'; import type { Data } from '@polkadot/types'; import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; diff --git a/packages/api-augment/src/substrate/runtime.ts b/packages/api-augment/src/substrate/runtime.ts index b102ae16ae..036c190431 100644 --- a/packages/api-augment/src/substrate/runtime.ts +++ b/packages/api-augment/src/substrate/runtime.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ +import '@polkadot/api-base/types/calls'; + import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types'; import type { Bytes, Null, Option, Result, Vec, u32, u64 } from '@polkadot/types-codec'; import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; diff --git a/packages/api-augment/src/substrate/tx.ts b/packages/api-augment/src/substrate/tx.ts index 6d9a71d20e..18a892686d 100644 --- a/packages/api-augment/src/substrate/tx.ts +++ b/packages/api-augment/src/substrate/tx.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ +import '@polkadot/api-base/types/submittable'; + import type { ApiTypes, AugmentedSubmittable, SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api-base/types'; import type { Data } from '@polkadot/types'; import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; diff --git a/packages/rpc-augment/src/augment/jsonrpc.ts b/packages/rpc-augment/src/augment/jsonrpc.ts index f6fe7e07f3..2f6ecf825f 100644 --- a/packages/rpc-augment/src/augment/jsonrpc.ts +++ b/packages/rpc-augment/src/augment/jsonrpc.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ +import '@polkadot/rpc-core/types/jsonrpc'; + import type { AugmentedRpc } from '@polkadot/rpc-core/types'; import type { Metadata, StorageKey } from '@polkadot/types'; import type { Bytes, HashMap, Json, Null, Option, Text, U256, U64, Vec, bool, f64, u32, u64 } from '@polkadot/types-codec'; diff --git a/packages/typegen/src/templates/calls.hbs b/packages/typegen/src/templates/calls.hbs index 625dca7387..9d5f8a1ae7 100644 --- a/packages/typegen/src/templates/calls.hbs +++ b/packages/typegen/src/templates/calls.hbs @@ -1,5 +1,7 @@ {{> header }} +import '@polkadot/api-base/types/calls'; + {{{ importsAll }}} export type __AugmentedCall = AugmentedCall; diff --git a/packages/typegen/src/templates/consts.hbs b/packages/typegen/src/templates/consts.hbs index e44c8302af..dee7d17cfa 100644 --- a/packages/typegen/src/templates/consts.hbs +++ b/packages/typegen/src/templates/consts.hbs @@ -1,5 +1,7 @@ {{> header }} +import '@polkadot/api-base/types/consts'; + {{{ importsAll }}} export type __AugmentedConst = AugmentedConst; diff --git a/packages/typegen/src/templates/errors.hbs b/packages/typegen/src/templates/errors.hbs index 146a4f751a..bfd3d8f8d5 100644 --- a/packages/typegen/src/templates/errors.hbs +++ b/packages/typegen/src/templates/errors.hbs @@ -1,5 +1,7 @@ {{> header }} +import '@polkadot/api-base/types/errors'; + {{{ importsAll }}} export type __AugmentedError = AugmentedError; diff --git a/packages/typegen/src/templates/events.hbs b/packages/typegen/src/templates/events.hbs index 061371164e..5176814c37 100644 --- a/packages/typegen/src/templates/events.hbs +++ b/packages/typegen/src/templates/events.hbs @@ -1,5 +1,7 @@ {{> header }} +import '@polkadot/api-base/types/events'; + {{{ importsAll }}} export type __AugmentedEvent = AugmentedEvent; diff --git a/packages/typegen/src/templates/interfaceRegistry.hbs b/packages/typegen/src/templates/interfaceRegistry.hbs index 1eb4e5952c..81d13b7e65 100644 --- a/packages/typegen/src/templates/interfaceRegistry.hbs +++ b/packages/typegen/src/templates/interfaceRegistry.hbs @@ -1,5 +1,7 @@ {{> header }} +import '@polkadot/types/types/registry'; + {{{ importsAll }}} declare module '@polkadot/types/types/registry' { diff --git a/packages/typegen/src/templates/lookup/types.hbs b/packages/typegen/src/templates/lookup/types.hbs index fcfd96ad66..7722c489e4 100644 --- a/packages/typegen/src/templates/lookup/types.hbs +++ b/packages/typegen/src/templates/lookup/types.hbs @@ -1,5 +1,7 @@ {{> header }} +import '@polkadot/types/lookup'; + {{{ importsAll }}} declare module '@polkadot/types/lookup' { diff --git a/packages/typegen/src/templates/query.hbs b/packages/typegen/src/templates/query.hbs index ffcd9a6fbd..1cb074e8bc 100644 --- a/packages/typegen/src/templates/query.hbs +++ b/packages/typegen/src/templates/query.hbs @@ -1,5 +1,7 @@ {{> header }} +import '@polkadot/api-base/types/storage'; + {{{ importsAll }}} export type __AugmentedQuery = AugmentedQuery unknown>; diff --git a/packages/typegen/src/templates/rpc.hbs b/packages/typegen/src/templates/rpc.hbs index 7ef182501a..bdf8fe9e7c 100644 --- a/packages/typegen/src/templates/rpc.hbs +++ b/packages/typegen/src/templates/rpc.hbs @@ -1,5 +1,7 @@ {{> header }} +import '@polkadot/rpc-core/types/jsonrpc'; + {{{ importsAll }}} declare module '@polkadot/rpc-core/types/jsonrpc' { diff --git a/packages/typegen/src/templates/tx.hbs b/packages/typegen/src/templates/tx.hbs index 8925154f6e..80e68b0562 100644 --- a/packages/typegen/src/templates/tx.hbs +++ b/packages/typegen/src/templates/tx.hbs @@ -1,5 +1,7 @@ {{> header }} +import '@polkadot/api-base/types/submittable'; + {{{ importsAll }}} export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>; diff --git a/packages/types-augment/src/lookup/types-kusama.ts b/packages/types-augment/src/lookup/types-kusama.ts index fcce46921b..bb242e755e 100644 --- a/packages/types-augment/src/lookup/types-kusama.ts +++ b/packages/types-augment/src/lookup/types-kusama.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-defs`, do not edit /* eslint-disable */ +import '@polkadot/types/lookup'; + import type { Compact, Enum, Null, Struct, Vec, u16, u32 } from '@polkadot/types-codec'; import type { ITuple } from '@polkadot/types-codec/types'; import type { PerU16 } from '@polkadot/types/interfaces/runtime'; diff --git a/packages/types-augment/src/lookup/types-polkadot.ts b/packages/types-augment/src/lookup/types-polkadot.ts index 5b9a8a6c54..bbc926d439 100644 --- a/packages/types-augment/src/lookup/types-polkadot.ts +++ b/packages/types-augment/src/lookup/types-polkadot.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-defs`, do not edit /* eslint-disable */ +import '@polkadot/types/lookup'; + import type { BitVec, Bytes, Compact, Enum, Null, Option, Result, Struct, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { ITuple } from '@polkadot/types-codec/types'; import type { EthereumAddress } from '@polkadot/types/interfaces/eth'; diff --git a/packages/types-augment/src/lookup/types-substrate.ts b/packages/types-augment/src/lookup/types-substrate.ts index 181155b55c..371bb26b63 100644 --- a/packages/types-augment/src/lookup/types-substrate.ts +++ b/packages/types-augment/src/lookup/types-substrate.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-defs`, do not edit /* eslint-disable */ +import '@polkadot/types/lookup'; + import type { Data } from '@polkadot/types'; import type { BTreeMap, Bytes, Compact, Enum, Null, Option, Result, Set, Struct, Text, U256, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { ITuple } from '@polkadot/types-codec/types'; diff --git a/packages/types-augment/src/registry/interfaces.ts b/packages/types-augment/src/registry/interfaces.ts index 54ffe7c0e5..c640f35bb3 100644 --- a/packages/types-augment/src/registry/interfaces.ts +++ b/packages/types-augment/src/registry/interfaces.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-defs`, do not edit /* eslint-disable */ +import '@polkadot/types/types/registry'; + import type { Data, StorageKey } from '@polkadot/types'; import type { BitVec, Bool, Bytes, F32, F64, I128, I16, I256, I32, I64, I8, Json, Null, OptionBool, Raw, Text, Type, U128, U16, U256, U32, U64, U8, USize, bool, f32, f64, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types-codec'; import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets'; diff --git a/packages/types-augment/src/registry/kusama.ts b/packages/types-augment/src/registry/kusama.ts index f6d89e9ce5..f2e2e80d4b 100644 --- a/packages/types-augment/src/registry/kusama.ts +++ b/packages/types-augment/src/registry/kusama.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-defs`, do not edit /* eslint-disable */ +import '@polkadot/types/types/registry'; + import type { KusamaRuntimeNposCompactSolution24, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeRuntime, KusamaRuntimeSessionKeys } from '@polkadot/types/lookup'; declare module '@polkadot/types/types/registry' { diff --git a/packages/types-augment/src/registry/polkadot.ts b/packages/types-augment/src/registry/polkadot.ts index 0a745639ba..d23586670b 100644 --- a/packages/types-augment/src/registry/polkadot.ts +++ b/packages/types-augment/src/registry/polkadot.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-defs`, do not edit /* eslint-disable */ +import '@polkadot/types/types/registry'; + import type { BitvecOrderLsb0, PalletTransactionPaymentChargeTransactionPayment, PalletXcmCall, PalletXcmError, PalletXcmEvent, PalletXcmOrigin, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2BackedCandidate, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CandidateDescriptor, PolkadotPrimitivesV2CandidateReceipt, PolkadotPrimitivesV2CollatorAppPublic, PolkadotPrimitivesV2CollatorAppSignature, PolkadotPrimitivesV2CommittedCandidateReceipt, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2DisputeStatement, PolkadotPrimitivesV2DisputeStatementSet, PolkadotPrimitivesV2InherentData, PolkadotPrimitivesV2InvalidDisputeStatementKind, PolkadotPrimitivesV2ParathreadClaim, PolkadotPrimitivesV2ParathreadEntry, PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2SignedUncheckedSigned, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidDisputeStatementKind, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotPrimitivesV2ValidatorAppSignature, PolkadotPrimitivesV2ValidityAttestation, PolkadotRuntimeCommonAuctionsPalletCall, PolkadotRuntimeCommonAuctionsPalletError, PolkadotRuntimeCommonAuctionsPalletEvent, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsPalletCall, PolkadotRuntimeCommonClaimsPalletError, PolkadotRuntimeCommonClaimsPalletEvent, PolkadotRuntimeCommonClaimsPrevalidateAttests, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonCrowdloanLastContribution, PolkadotRuntimeCommonCrowdloanPalletCall, PolkadotRuntimeCommonCrowdloanPalletError, PolkadotRuntimeCommonCrowdloanPalletEvent, PolkadotRuntimeCommonParasRegistrarPalletCall, PolkadotRuntimeCommonParasRegistrarPalletError, PolkadotRuntimeCommonParasRegistrarPalletEvent, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeCommonSlotsPalletCall, PolkadotRuntimeCommonSlotsPalletError, PolkadotRuntimeCommonSlotsPalletEvent, PolkadotRuntimeNposCompactSolution16, PolkadotRuntimeOriginCaller, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationPalletCall, PolkadotRuntimeParachainsConfigurationPalletError, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeParachainsDisputesPalletCall, PolkadotRuntimeParachainsDisputesPalletError, PolkadotRuntimeParachainsDisputesPalletEvent, PolkadotRuntimeParachainsDmpPalletCall, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsHrmpPalletCall, PolkadotRuntimeParachainsHrmpPalletError, PolkadotRuntimeParachainsHrmpPalletEvent, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInclusionPalletCall, PolkadotRuntimeParachainsInclusionPalletError, PolkadotRuntimeParachainsInclusionPalletEvent, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsInitializerPalletCall, PolkadotRuntimeParachainsOriginPalletOrigin, PolkadotRuntimeParachainsParasInherentPalletCall, PolkadotRuntimeParachainsParasInherentPalletError, PolkadotRuntimeParachainsParasPalletCall, PolkadotRuntimeParachainsParasPalletError, PolkadotRuntimeParachainsParasPalletEvent, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsParasPvfCheckCause, PolkadotRuntimeParachainsParasReplacementTimes, PolkadotRuntimeParachainsSchedulerAssignmentKind, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeParachainsSchedulerQueuedParathread, PolkadotRuntimeParachainsSharedPalletCall, PolkadotRuntimeParachainsUmpPalletCall, PolkadotRuntimeParachainsUmpPalletError, PolkadotRuntimeParachainsUmpPalletEvent, PolkadotRuntimeProxyType, PolkadotRuntimeRuntime, PolkadotRuntimeSessionKeys, SpCoreEcdsaPublic, SpRuntimeMultiSigner, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedResponse, XcmVersionedXcm } from '@polkadot/types/lookup'; declare module '@polkadot/types/types/registry' { diff --git a/packages/types-augment/src/registry/substrate.ts b/packages/types-augment/src/registry/substrate.ts index 2368794b50..bed35d400b 100644 --- a/packages/types-augment/src/registry/substrate.ts +++ b/packages/types-augment/src/registry/substrate.ts @@ -1,6 +1,8 @@ // Auto-generated via `yarn polkadot-types-from-defs`, do not edit /* eslint-disable */ +import '@polkadot/types/types/registry'; + import type { FinalityGrandpaEquivocationPrecommit, FinalityGrandpaEquivocationPrevote, FinalityGrandpaPrecommit, FinalityGrandpaPrevote, FrameSupportDispatchRawOrigin, FrameSupportPalletId, FrameSupportScheduleDispatchTime, FrameSupportScheduleLookupError, FrameSupportScheduleMaybeHashed, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsPostDispatchInfo, FrameSupportWeightsRuntimeDbWeight, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonZeroSender, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckTxVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, NodeRuntimeNposSolution16, NodeRuntimeOriginCaller, NodeRuntimeProxyType, NodeRuntimeRuntime, NodeRuntimeSessionKeys, PalletAllianceCall, PalletAllianceCid, PalletAllianceError, PalletAllianceEvent, PalletAllianceMemberRole, PalletAllianceMultihash, PalletAllianceUnscrupulousItem, PalletAllianceVersion, PalletAssetTxPaymentChargeAssetTxPayment, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAssetsCall, PalletAssetsDestroyWitness, PalletAssetsError, PalletAssetsEvent, PalletAssetsExistenceReason, PalletAuthorshipCall, PalletAuthorshipError, PalletAuthorshipUncleEntryItem, PalletBabeCall, PalletBabeError, PalletBagsListCall, PalletBagsListError, PalletBagsListEvent, PalletBagsListListBag, PalletBagsListListListError, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletBountiesBountyStatus, PalletBountiesCall, PalletBountiesError, PalletBountiesEvent, PalletChildBountiesCall, PalletChildBountiesChildBounty, PalletChildBountiesChildBountyStatus, PalletChildBountiesError, PalletChildBountiesEvent, PalletCollectiveCall, PalletCollectiveError, PalletCollectiveEvent, PalletCollectiveRawOrigin, PalletCollectiveVotes, PalletContractsCall, PalletContractsError, PalletContractsEvent, PalletContractsSchedule, PalletContractsScheduleHostFnWeights, PalletContractsScheduleInstructionWeights, PalletContractsScheduleLimits, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingCall, PalletConvictionVotingConviction, PalletConvictionVotingDelegations, PalletConvictionVotingError, PalletConvictionVotingEvent, PalletConvictionVotingTally, PalletConvictionVotingVoteAccountVote, PalletConvictionVotingVoteCasting, PalletConvictionVotingVoteDelegating, PalletConvictionVotingVotePriorLock, PalletConvictionVotingVoteVoting, PalletDemocracyCall, PalletDemocracyConviction, PalletDemocracyDelegations, PalletDemocracyError, PalletDemocracyEvent, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReferendumStatus, PalletDemocracyReleases, PalletDemocracyTally, PalletDemocracyVoteAccountVote, PalletDemocracyVotePriorLock, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhaseCall, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhaseError, PalletElectionProviderMultiPhaseEvent, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenCall, PalletElectionsPhragmenError, PalletElectionsPhragmenEvent, PalletElectionsPhragmenRenouncing, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltCall, PalletGiltError, PalletGiltEvent, PalletGiltGiltBid, PalletGrandpaCall, PalletGrandpaError, PalletGrandpaEvent, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityBitFlags, PalletIdentityCall, PalletIdentityError, PalletIdentityEvent, PalletIdentityIdentityField, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineCall, PalletImOnlineError, PalletImOnlineEvent, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Public, PalletImOnlineSr25519AppSr25519Signature, PalletIndicesCall, PalletIndicesError, PalletIndicesEvent, PalletLotteryCall, PalletLotteryError, PalletLotteryEvent, PalletLotteryLotteryConfig, PalletMembershipCall, PalletMembershipError, PalletMembershipEvent, PalletMultisigCall, PalletMultisigError, PalletMultisigEvent, PalletMultisigMultisig, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsCall, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsDefensiveError, PalletNominationPoolsError, PalletNominationPoolsEvent, PalletNominationPoolsPoolMember, PalletNominationPoolsPoolRoles, PalletNominationPoolsPoolState, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletNominationPoolsUnbondPool, PalletOffencesEvent, PalletPreimageCall, PalletPreimageError, PalletPreimageEvent, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyCall, PalletProxyError, PalletProxyEvent, PalletProxyProxyDefinition, PalletRankedCollectiveCall, PalletRankedCollectiveError, PalletRankedCollectiveEvent, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryCall, PalletRecoveryError, PalletRecoveryEvent, PalletRecoveryRecoveryConfig, PalletReferendaCall, PalletReferendaDecidingStatus, PalletReferendaDeposit, PalletReferendaError, PalletReferendaEvent, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletReferendaReferendumStatusConvictionVotingTally, PalletReferendaReferendumStatusRankedCollectiveTally, PalletRemarkCall, PalletRemarkError, PalletRemarkEvent, PalletSchedulerCall, PalletSchedulerError, PalletSchedulerEvent, PalletSchedulerScheduledV3, PalletSessionCall, PalletSessionError, PalletSessionEvent, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyCall, PalletSocietyError, PalletSocietyEvent, PalletSocietyJudgement, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingIndividualExposure, PalletStakingNominations, PalletStakingPalletCall, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingPalletError, PalletStakingPalletEvent, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingUnlockChunk, PalletStakingValidatorPrefs, PalletStateTrieMigrationCall, PalletStateTrieMigrationError, PalletStateTrieMigrationEvent, PalletStateTrieMigrationMigrationCompute, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTimestampCall, PalletTipsCall, PalletTipsError, PalletTipsEvent, PalletTipsOpenTip, PalletTransactionPaymentEvent, PalletTransactionPaymentReleases, PalletTransactionStorageCall, PalletTransactionStorageError, PalletTransactionStorageEvent, PalletTransactionStorageTransactionInfo, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniquesCall, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesDestroyWitness, PalletUniquesError, PalletUniquesEvent, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletUtilityCall, PalletUtilityError, PalletUtilityEvent, PalletVestingCall, PalletVestingError, PalletVestingEvent, PalletVestingReleases, PalletVestingVestingInfo, PalletWhitelistCall, PalletWhitelistError, PalletWhitelistEvent, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAllowedSlots, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpConsensusBabeDigestsPrimaryPreDigest, SpConsensusBabeDigestsSecondaryPlainPreDigest, SpConsensusBabeDigestsSecondaryVRFPreDigest, SpConsensusSlotsEquivocationProof, SpCoreCryptoKeyTypeId, SpCoreEcdsaSignature, SpCoreEd25519Public, SpCoreEd25519Signature, SpCoreOffchainOpaqueNetworkState, SpCoreSr25519Public, SpCoreSr25519Signature, SpCoreVoid, SpFinalityGrandpaAppPublic, SpFinalityGrandpaAppSignature, SpFinalityGrandpaEquivocation, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeArithmeticError, SpRuntimeBlakeTwo256, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpRuntimeHeader, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpRuntimeTransactionalError, SpSessionMembershipProof, SpStakingOffenceOffenceDetails, SpTransactionStorageProofTransactionStorageProof, SpVersionRuntimeVersion } from '@polkadot/types/lookup'; declare module '@polkadot/types/types/registry' { diff --git a/packages/types-create/src/types/augmentRegistry.ts b/packages/types-create/src/types/augmentRegistry.ts index 0090cfafa3..5b63ebf578 100644 --- a/packages/types-create/src/types/augmentRegistry.ts +++ b/packages/types-create/src/types/augmentRegistry.ts @@ -1,11 +1,13 @@ // Copyright 2017-2022 @polkadot/types-create authors & contributors // SPDX-License-Identifier: Apache-2.0 +import '@polkadot/types-codec/types/registry'; + import type { Codec, CodecClass, ICompact, INumber } from '@polkadot/types-codec/types'; import type { ILookup, TypeDef } from '@polkadot/types-create/types'; declare module '@polkadot/types-codec/types/registry' { - export interface Registry { + interface Registry { readonly lookup: ILookup; createLookupType (lookupId: ICompact | number): string; diff --git a/packages/types/src/types/augmentLookup.ts b/packages/types/src/types/augmentLookup.ts index e367dc3f3f..f8e9a4c482 100644 --- a/packages/types/src/types/augmentLookup.ts +++ b/packages/types/src/types/augmentLookup.ts @@ -1,13 +1,15 @@ // Copyright 2017-2022 @polkadot/types authors & contributors // SPDX-License-Identifier: Apache-2.0 +import '@polkadot/types-create/types/lookup'; + import type { Vec } from '@polkadot/types-codec'; import type { TypeDef } from '@polkadot/types-create/types'; import type { PortableType } from '../interfaces/metadata'; import type { SiLookupTypeId, SiType } from '../interfaces/scaleInfo'; declare module '@polkadot/types-create/types/lookup' { - export interface ILookup { + interface ILookup { readonly names: string[]; readonly types: Vec; diff --git a/packages/types/src/types/augmentRegistry.ts b/packages/types/src/types/augmentRegistry.ts index 67a96cb4ce..79278000e4 100644 --- a/packages/types/src/types/augmentRegistry.ts +++ b/packages/types/src/types/augmentRegistry.ts @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import '@polkadot/types-create/types/augmentRegistry'; +import '@polkadot/types-codec/types/registry'; import type { Codec, CodecClass } from '@polkadot/types-codec/types'; import type { TypeDef } from '@polkadot/types-create/types'; @@ -15,11 +16,11 @@ import type { DetectCodec } from './detect'; import type { CodecHasher, RegisteredTypes } from './registry'; declare module '@polkadot/types-codec/types/registry' { - export interface RegistryError { + interface RegistryError { fields: SiField[]; } - export interface Registry { + interface Registry { readonly firstCallIndex: Uint8Array; readonly knownTypes: RegisteredTypes; readonly metadata: MetadataLatest; diff --git a/rollup.config.mjs b/rollup.config.mjs index de33a10527..3960604cf9 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -30,6 +30,9 @@ const entries = [ ...all, [`@polkadot/${p}`]: path.resolve(process.cwd(), `packages/${p}/build/bundle.js`) }), { + // we point to a specific file for these (default augmentations) + '@polkadot/rpc-core/types/jsonrpc': path.resolve(process.cwd(), 'packages/rpc-core/build/types/jsonrpc.js'), + '@polkadot/types-codec/types/registry': path.resolve(process.cwd(), 'packages/types-codec/build/types/registry.js'), // re-exported in @polkadot/util-crypto, map directly '@polkadot/networks': '@polkadot/util-crypto' });