Split @polkadot/types-known (#4342)

* Re-split types-known correctly

* yarn install

* circular :(

* combine?

* It builds... ship it ...
This commit is contained in:
Jaco
2021-12-17 06:38:54 +02:00
committed by GitHub
parent 43203195b4
commit 85e13cc2b1
31 changed files with 89 additions and 79 deletions
+1
View File
@@ -4,3 +4,4 @@
export * from './encodeTypes';
export * from './getTypeDef';
export * from './typeSplit';
export * from './xcm';
+12
View File
@@ -0,0 +1,12 @@
// Copyright 2017-2021 @polkadot/types-create authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { objectSpread } from '@polkadot/util';
export const XCM_MAPPINGS = ['AssetInstance', 'Fungibility', 'Junction', 'Junctions', 'MultiAsset', 'MultiAssetFilter', 'MultiLocation', 'Response', 'WildFungibility', 'WildMultiAsset', 'Xcm', 'XcmError', 'XcmOrder'];
export function mapXcmTypes (version: 'V0' | 'V1' | 'V2'): Record<string, string> {
return XCM_MAPPINGS.reduce<Record<string, string>>((all, key) =>
objectSpread(all, { [key]: `${key}${version}` }), {}
);
}