diff --git a/.123deno b/.123deno new file mode 100644 index 0000000000..e69de29bb2 diff --git a/CHANGELOG.md b/CHANGELOG.md index c1b808ff2a..0dc307d4d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGELOG +## master + +Changes: + +- Adjust type generation to correctly cater for ambient definitions + + ## 8.11.3 Jul 5, 2022 Changes: diff --git a/packages/api-augment/src/kusama/consts.ts b/packages/api-augment/src/kusama/consts.ts index 1e5ae2c3da..323c6e1190 100644 --- a/packages/api-augment/src/kusama/consts.ts +++ b/packages/api-augment/src/kusama/consts.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -// import '@polkadot/api-base/types/consts'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +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'; diff --git a/packages/api-augment/src/kusama/errors.ts b/packages/api-augment/src/kusama/errors.ts index 62d24b18d3..17e7be0eff 100644 --- a/packages/api-augment/src/kusama/errors.ts +++ b/packages/api-augment/src/kusama/errors.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -// import '@polkadot/api-base/types/errors'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/api-base/types/errors'; import type { ApiTypes, AugmentedError } from '@polkadot/api-base/types'; diff --git a/packages/api-augment/src/kusama/events.ts b/packages/api-augment/src/kusama/events.ts index 4738bf09f3..4ed740ae68 100644 --- a/packages/api-augment/src/kusama/events.ts +++ b/packages/api-augment/src/kusama/events.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -// import '@polkadot/api-base/types/events'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +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'; diff --git a/packages/api-augment/src/kusama/query.ts b/packages/api-augment/src/kusama/query.ts index 827547ee37..36a64e2bf2 100644 --- a/packages/api-augment/src/kusama/query.ts +++ b/packages/api-augment/src/kusama/query.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -// import '@polkadot/api-base/types/storage'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/api-base/types/storage'; import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types'; import type { Data } from '@polkadot/types'; diff --git a/packages/api-augment/src/kusama/runtime.ts b/packages/api-augment/src/kusama/runtime.ts index 4932333e66..ca22707580 100644 --- a/packages/api-augment/src/kusama/runtime.ts +++ b/packages/api-augment/src/kusama/runtime.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -// import '@polkadot/api-base/types/calls'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +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'; diff --git a/packages/api-augment/src/kusama/tx.ts b/packages/api-augment/src/kusama/tx.ts index 5ffb0b7105..5a42442904 100644 --- a/packages/api-augment/src/kusama/tx.ts +++ b/packages/api-augment/src/kusama/tx.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -// import '@polkadot/api-base/types/submittable'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/api-base/types/submittable'; import type { ApiTypes, AugmentedSubmittable, SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api-base/types'; import type { Data } from '@polkadot/types'; diff --git a/packages/api-augment/src/polkadot/consts.ts b/packages/api-augment/src/polkadot/consts.ts index f07daa85cf..982fe39379 100644 --- a/packages/api-augment/src/polkadot/consts.ts +++ b/packages/api-augment/src/polkadot/consts.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -// import '@polkadot/api-base/types/consts'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +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'; diff --git a/packages/api-augment/src/polkadot/errors.ts b/packages/api-augment/src/polkadot/errors.ts index 11160d1827..9b66759937 100644 --- a/packages/api-augment/src/polkadot/errors.ts +++ b/packages/api-augment/src/polkadot/errors.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -// import '@polkadot/api-base/types/errors'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/api-base/types/errors'; import type { ApiTypes, AugmentedError } from '@polkadot/api-base/types'; diff --git a/packages/api-augment/src/polkadot/events.ts b/packages/api-augment/src/polkadot/events.ts index 8896a0182e..5d0efb33c1 100644 --- a/packages/api-augment/src/polkadot/events.ts +++ b/packages/api-augment/src/polkadot/events.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -// import '@polkadot/api-base/types/events'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +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'; diff --git a/packages/api-augment/src/polkadot/query.ts b/packages/api-augment/src/polkadot/query.ts index bbafc2e074..afcf7d4477 100644 --- a/packages/api-augment/src/polkadot/query.ts +++ b/packages/api-augment/src/polkadot/query.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -// import '@polkadot/api-base/types/storage'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/api-base/types/storage'; import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types'; import type { Data } from '@polkadot/types'; diff --git a/packages/api-augment/src/polkadot/runtime.ts b/packages/api-augment/src/polkadot/runtime.ts index 4932333e66..ca22707580 100644 --- a/packages/api-augment/src/polkadot/runtime.ts +++ b/packages/api-augment/src/polkadot/runtime.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -// import '@polkadot/api-base/types/calls'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +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'; diff --git a/packages/api-augment/src/polkadot/tx.ts b/packages/api-augment/src/polkadot/tx.ts index cc3f96e00f..45acf92b07 100644 --- a/packages/api-augment/src/polkadot/tx.ts +++ b/packages/api-augment/src/polkadot/tx.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -// import '@polkadot/api-base/types/submittable'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/api-base/types/submittable'; import type { ApiTypes, AugmentedSubmittable, SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api-base/types'; import type { Data } from '@polkadot/types'; diff --git a/packages/api-augment/src/substrate/consts.ts b/packages/api-augment/src/substrate/consts.ts index 1b6b9e9a35..4a68a44a55 100644 --- a/packages/api-augment/src/substrate/consts.ts +++ b/packages/api-augment/src/substrate/consts.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -// import '@polkadot/api-base/types/consts'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +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'; diff --git a/packages/api-augment/src/substrate/errors.ts b/packages/api-augment/src/substrate/errors.ts index be6ae6c62e..f5bc71e135 100644 --- a/packages/api-augment/src/substrate/errors.ts +++ b/packages/api-augment/src/substrate/errors.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -// import '@polkadot/api-base/types/errors'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/api-base/types/errors'; import type { ApiTypes, AugmentedError } from '@polkadot/api-base/types'; diff --git a/packages/api-augment/src/substrate/events.ts b/packages/api-augment/src/substrate/events.ts index 4360bcdc44..d41c3f54a4 100644 --- a/packages/api-augment/src/substrate/events.ts +++ b/packages/api-augment/src/substrate/events.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -// import '@polkadot/api-base/types/events'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +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'; diff --git a/packages/api-augment/src/substrate/query.ts b/packages/api-augment/src/substrate/query.ts index 97a3bb4f9a..a45d9eaaac 100644 --- a/packages/api-augment/src/substrate/query.ts +++ b/packages/api-augment/src/substrate/query.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -// import '@polkadot/api-base/types/storage'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/api-base/types/storage'; import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types'; import type { Data } from '@polkadot/types'; diff --git a/packages/api-augment/src/substrate/runtime.ts b/packages/api-augment/src/substrate/runtime.ts index b0e7e43e36..4f77a4ffec 100644 --- a/packages/api-augment/src/substrate/runtime.ts +++ b/packages/api-augment/src/substrate/runtime.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -// import '@polkadot/api-base/types/calls'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +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'; diff --git a/packages/api-augment/src/substrate/tx.ts b/packages/api-augment/src/substrate/tx.ts index dcf5a5a3ec..224e42a93b 100644 --- a/packages/api-augment/src/substrate/tx.ts +++ b/packages/api-augment/src/substrate/tx.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -// import '@polkadot/api-base/types/submittable'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/api-base/types/submittable'; import type { ApiTypes, AugmentedSubmittable, SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api-base/types'; import type { Data } from '@polkadot/types'; diff --git a/packages/rpc-augment/src/augment/jsonrpc.ts b/packages/rpc-augment/src/augment/jsonrpc.ts index 0e40e811b8..13e4253e1d 100644 --- a/packages/rpc-augment/src/augment/jsonrpc.ts +++ b/packages/rpc-augment/src/augment/jsonrpc.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit /* eslint-disable */ -// import '@polkadot/rpc-core/types/jsonrpc'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/rpc-core/types/jsonrpc'; import type { AugmentedRpc } from '@polkadot/rpc-core/types'; import type { Metadata, StorageKey } from '@polkadot/types'; @@ -28,6 +30,8 @@ import type { MigrationStatusResult, ReadProof, RuntimeVersion, TraceBlockRespon import type { ApplyExtrinsicResult, ChainProperties, ChainType, Health, NetworkState, NodeRole, PeerInfo, SyncState } from '@polkadot/types/interfaces/system'; import type { IExtrinsic, Observable } from '@polkadot/types/types'; +export type __AugmentedRpc = AugmentedRpc<() => unknown>; + declare module '@polkadot/rpc-core/types/jsonrpc' { interface RpcInterface { author: { diff --git a/packages/typegen/src/templates/calls.hbs b/packages/typegen/src/templates/calls.hbs index 41174e0ff2..0d56a4cf3b 100644 --- a/packages/typegen/src/templates/calls.hbs +++ b/packages/typegen/src/templates/calls.hbs @@ -1,6 +1,8 @@ {{> header }} -// import '@polkadot/api-base/types/calls'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/api-base/types/calls'; {{{ importsAll }}} diff --git a/packages/typegen/src/templates/consts.hbs b/packages/typegen/src/templates/consts.hbs index 3a75cf26d2..8f2e8cddf9 100644 --- a/packages/typegen/src/templates/consts.hbs +++ b/packages/typegen/src/templates/consts.hbs @@ -1,6 +1,8 @@ {{> header }} -// import '@polkadot/api-base/types/consts'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/api-base/types/consts'; {{{ importsAll }}} diff --git a/packages/typegen/src/templates/errors.hbs b/packages/typegen/src/templates/errors.hbs index 123af79a6b..3b2f4f7dee 100644 --- a/packages/typegen/src/templates/errors.hbs +++ b/packages/typegen/src/templates/errors.hbs @@ -1,6 +1,8 @@ {{> header }} -// import '@polkadot/api-base/types/errors'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/api-base/types/errors'; {{{ importsAll }}} diff --git a/packages/typegen/src/templates/events.hbs b/packages/typegen/src/templates/events.hbs index 64e9b4f41d..527713ed34 100644 --- a/packages/typegen/src/templates/events.hbs +++ b/packages/typegen/src/templates/events.hbs @@ -1,6 +1,8 @@ {{> header }} -// import '@polkadot/api-base/types/events'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/api-base/types/events'; {{{ importsAll }}} diff --git a/packages/typegen/src/templates/interfaceRegistry.hbs b/packages/typegen/src/templates/interfaceRegistry.hbs index 804130e138..ea9ede29a4 100644 --- a/packages/typegen/src/templates/interfaceRegistry.hbs +++ b/packages/typegen/src/templates/interfaceRegistry.hbs @@ -1,6 +1,8 @@ {{> header }} -// import '@polkadot/types/types/registry'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/types/types/registry'; {{{ importsAll }}} diff --git a/packages/typegen/src/templates/lookup/types.hbs b/packages/typegen/src/templates/lookup/types.hbs index f857207979..a86780981f 100644 --- a/packages/typegen/src/templates/lookup/types.hbs +++ b/packages/typegen/src/templates/lookup/types.hbs @@ -1,6 +1,8 @@ {{> header }} -// import '@polkadot/types/lookup'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/types/lookup'; {{{ importsAll }}} diff --git a/packages/typegen/src/templates/query.hbs b/packages/typegen/src/templates/query.hbs index 4135144f88..535c41398f 100644 --- a/packages/typegen/src/templates/query.hbs +++ b/packages/typegen/src/templates/query.hbs @@ -1,6 +1,8 @@ {{> header }} -// import '@polkadot/api-base/types/storage'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/api-base/types/storage'; {{{ importsAll }}} diff --git a/packages/typegen/src/templates/rpc.hbs b/packages/typegen/src/templates/rpc.hbs index f8f6be53b7..52e7bc2063 100644 --- a/packages/typegen/src/templates/rpc.hbs +++ b/packages/typegen/src/templates/rpc.hbs @@ -1,9 +1,13 @@ {{> header }} -// import '@polkadot/rpc-core/types/jsonrpc'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/rpc-core/types/jsonrpc'; {{{ importsAll }}} +export type __AugmentedRpc = AugmentedRpc<() => unknown>; + declare module '@polkadot/rpc-core/types/jsonrpc' { interface RpcInterface { {{#each modules}} diff --git a/packages/typegen/src/templates/tx.hbs b/packages/typegen/src/templates/tx.hbs index 2acecf358a..915320b3ad 100644 --- a/packages/typegen/src/templates/tx.hbs +++ b/packages/typegen/src/templates/tx.hbs @@ -1,6 +1,8 @@ {{> header }} -// import '@polkadot/api-base/types/submittable'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/api-base/types/submittable'; {{{ importsAll }}} diff --git a/packages/types-augment/src/lookup/types-kusama.ts b/packages/types-augment/src/lookup/types-kusama.ts index c2fa55aedd..44f8d85de0 100644 --- a/packages/types-augment/src/lookup/types-kusama.ts +++ b/packages/types-augment/src/lookup/types-kusama.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-defs`, do not edit /* eslint-disable */ -// import '@polkadot/types/lookup'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +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'; diff --git a/packages/types-augment/src/lookup/types-polkadot.ts b/packages/types-augment/src/lookup/types-polkadot.ts index 22095630eb..e5b8e433f3 100644 --- a/packages/types-augment/src/lookup/types-polkadot.ts +++ b/packages/types-augment/src/lookup/types-polkadot.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-defs`, do not edit /* eslint-disable */ -// import '@polkadot/types/lookup'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +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'; diff --git a/packages/types-augment/src/lookup/types-substrate.ts b/packages/types-augment/src/lookup/types-substrate.ts index 02d472fe02..7d77500758 100644 --- a/packages/types-augment/src/lookup/types-substrate.ts +++ b/packages/types-augment/src/lookup/types-substrate.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-defs`, do not edit /* eslint-disable */ -// import '@polkadot/types/lookup'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +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'; diff --git a/packages/types-augment/src/registry/interfaces.ts b/packages/types-augment/src/registry/interfaces.ts index 98bcd7a54a..c90afc1a16 100644 --- a/packages/types-augment/src/registry/interfaces.ts +++ b/packages/types-augment/src/registry/interfaces.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-defs`, do not edit /* eslint-disable */ -// import '@polkadot/types/types/registry'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +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'; diff --git a/packages/types-augment/src/registry/kusama.ts b/packages/types-augment/src/registry/kusama.ts index 6bb9cdf21e..69bfc408be 100644 --- a/packages/types-augment/src/registry/kusama.ts +++ b/packages/types-augment/src/registry/kusama.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-defs`, do not edit /* eslint-disable */ -// import '@polkadot/types/types/registry'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +import '@polkadot/types/types/registry'; import type { KusamaRuntimeNposCompactSolution24, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeRuntime, KusamaRuntimeSessionKeys } from '@polkadot/types/lookup'; diff --git a/packages/types-augment/src/registry/polkadot.ts b/packages/types-augment/src/registry/polkadot.ts index 4fb5d07f98..f1e9fc676e 100644 --- a/packages/types-augment/src/registry/polkadot.ts +++ b/packages/types-augment/src/registry/polkadot.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-defs`, do not edit /* eslint-disable */ -// import '@polkadot/types/types/registry'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +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'; diff --git a/packages/types-augment/src/registry/substrate.ts b/packages/types-augment/src/registry/substrate.ts index 4d961ff10a..5961b894a2 100644 --- a/packages/types-augment/src/registry/substrate.ts +++ b/packages/types-augment/src/registry/substrate.ts @@ -1,7 +1,9 @@ // Auto-generated via `yarn polkadot-types-from-defs`, do not edit /* eslint-disable */ -// import '@polkadot/types/types/registry'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions +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'; diff --git a/packages/types-create/src/types/augmentRegistry.ts b/packages/types-create/src/types/augmentRegistry.ts index 5b63ebf578..58969a22c0 100644 --- a/packages/types-create/src/types/augmentRegistry.ts +++ b/packages/types-create/src/types/augmentRegistry.ts @@ -1,6 +1,8 @@ // Copyright 2017-2022 @polkadot/types-create authors & contributors // SPDX-License-Identifier: Apache-2.0 +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions import '@polkadot/types-codec/types/registry'; import type { Codec, CodecClass, ICompact, INumber } from '@polkadot/types-codec/types'; diff --git a/packages/types/src/types/augmentLookup.ts b/packages/types/src/types/augmentLookup.ts index f8e9a4c482..867187db71 100644 --- a/packages/types/src/types/augmentLookup.ts +++ b/packages/types/src/types/augmentLookup.ts @@ -1,6 +1,8 @@ // Copyright 2017-2022 @polkadot/types authors & contributors // SPDX-License-Identifier: Apache-2.0 +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions import '@polkadot/types-create/types/lookup'; import type { Vec } from '@polkadot/types-codec'; diff --git a/packages/types/src/types/augmentRegistry.ts b/packages/types/src/types/augmentRegistry.ts index 79278000e4..f0d966883c 100644 --- a/packages/types/src/types/augmentRegistry.ts +++ b/packages/types/src/types/augmentRegistry.ts @@ -1,8 +1,10 @@ // Copyright 2017-2022 @polkadot/types authors & contributors // SPDX-License-Identifier: Apache-2.0 -import '@polkadot/types-create/types/augmentRegistry'; +// import type lookup before we augment - in some environments +// this is required to allow for ambient/previous definitions import '@polkadot/types-codec/types/registry'; +import '@polkadot/types-create/types/augmentRegistry'; import type { Codec, CodecClass } from '@polkadot/types-codec/types'; import type { TypeDef } from '@polkadot/types-create/types'; diff --git a/packages/types/src/types/index.ts b/packages/types/src/types/index.ts index b37691ae1e..8acb33f2f0 100644 --- a/packages/types/src/types/index.ts +++ b/packages/types/src/types/index.ts @@ -1,13 +1,17 @@ // Copyright 2017-2022 @polkadot/types authors & contributors // SPDX-License-Identifier: Apache-2.0 +// augment our internal Lookup & Registry interfaces import './augmentLookup'; import './augmentRegistry'; -// used inside augmented definitions -export type { Observable } from 'rxjs'; +// augmented exports export * from '@polkadot/types/types/registry'; +// used inside augmented definitions +export type { Observable } from 'rxjs'; + +// other exports export * from '../create/types'; export * from './calls'; export * from './codec'; @@ -16,4 +20,3 @@ export * from './detect'; export * from './events'; export * from './extrinsic'; export * from './interfaces'; -export * from './registry';