@polkadot/types-create 6.12.2-7 → 7.0.2-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +10 -4
- package/packageInfo.cjs +1 -1
- package/packageInfo.js +1 -1
- package/util/index.cjs +13 -0
- package/util/index.d.ts +1 -0
- package/util/index.js +2 -1
- package/util/xcm.cjs +20 -0
- package/util/xcm.d.ts +2 -0
- package/util/xcm.js +9 -0
package/package.json
CHANGED
|
@@ -20,11 +20,12 @@
|
|
|
20
20
|
"./detectPackage.cjs"
|
|
21
21
|
],
|
|
22
22
|
"type": "module",
|
|
23
|
-
"version": "
|
|
23
|
+
"version": "7.0.2-0",
|
|
24
24
|
"main": "index.js",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@babel/runtime": "^7.16.
|
|
27
|
-
"@polkadot/
|
|
26
|
+
"@babel/runtime": "^7.16.5",
|
|
27
|
+
"@polkadot/types-codec": "7.0.2-0",
|
|
28
|
+
"@polkadot/util": "^8.2.2"
|
|
28
29
|
},
|
|
29
30
|
"exports": {
|
|
30
31
|
".": {
|
|
@@ -87,6 +88,11 @@
|
|
|
87
88
|
"require": "./util/typeSplit.cjs",
|
|
88
89
|
"default": "./util/typeSplit.js"
|
|
89
90
|
},
|
|
90
|
-
"./util/typeSplit.d.ts": "./util/typeSplit.d.ts"
|
|
91
|
+
"./util/typeSplit.d.ts": "./util/typeSplit.d.ts",
|
|
92
|
+
"./util/xcm": {
|
|
93
|
+
"require": "./util/xcm.cjs",
|
|
94
|
+
"default": "./util/xcm.js"
|
|
95
|
+
},
|
|
96
|
+
"./util/xcm.d.ts": "./util/xcm.d.ts"
|
|
91
97
|
}
|
|
92
98
|
}
|
package/packageInfo.cjs
CHANGED
package/packageInfo.js
CHANGED
package/util/index.cjs
CHANGED
|
@@ -41,4 +41,17 @@ Object.keys(_typeSplit).forEach(function (key) {
|
|
|
41
41
|
return _typeSplit[key];
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
var _xcm = require("./xcm.cjs");
|
|
47
|
+
|
|
48
|
+
Object.keys(_xcm).forEach(function (key) {
|
|
49
|
+
if (key === "default" || key === "__esModule") return;
|
|
50
|
+
if (key in exports && exports[key] === _xcm[key]) return;
|
|
51
|
+
Object.defineProperty(exports, key, {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () {
|
|
54
|
+
return _xcm[key];
|
|
55
|
+
}
|
|
56
|
+
});
|
|
44
57
|
});
|
package/util/index.d.ts
CHANGED
package/util/index.js
CHANGED
package/util/xcm.cjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.XCM_MAPPINGS = void 0;
|
|
7
|
+
exports.mapXcmTypes = mapXcmTypes;
|
|
8
|
+
|
|
9
|
+
var _util = require("@polkadot/util");
|
|
10
|
+
|
|
11
|
+
// Copyright 2017-2021 @polkadot/types-create authors & contributors
|
|
12
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
13
|
+
const XCM_MAPPINGS = ['AssetInstance', 'Fungibility', 'Junction', 'Junctions', 'MultiAsset', 'MultiAssetFilter', 'MultiLocation', 'Response', 'WildFungibility', 'WildMultiAsset', 'Xcm', 'XcmError', 'XcmOrder'];
|
|
14
|
+
exports.XCM_MAPPINGS = XCM_MAPPINGS;
|
|
15
|
+
|
|
16
|
+
function mapXcmTypes(version) {
|
|
17
|
+
return XCM_MAPPINGS.reduce((all, key) => (0, _util.objectSpread)(all, {
|
|
18
|
+
[key]: `${key}${version}`
|
|
19
|
+
}), {});
|
|
20
|
+
}
|
package/util/xcm.d.ts
ADDED
package/util/xcm.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Copyright 2017-2021 @polkadot/types-create authors & contributors
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { objectSpread } from '@polkadot/util';
|
|
4
|
+
export const XCM_MAPPINGS = ['AssetInstance', 'Fungibility', 'Junction', 'Junctions', 'MultiAsset', 'MultiAssetFilter', 'MultiLocation', 'Response', 'WildFungibility', 'WildMultiAsset', 'Xcm', 'XcmError', 'XcmOrder'];
|
|
5
|
+
export function mapXcmTypes(version) {
|
|
6
|
+
return XCM_MAPPINGS.reduce((all, key) => objectSpread(all, {
|
|
7
|
+
[key]: `${key}${version}`
|
|
8
|
+
}), {});
|
|
9
|
+
}
|