@polkadot/types-known 6.6.1 → 6.6.2-11
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/bundle.cjs +68 -35
- package/bundle.js +24 -12
- package/package.json +5 -5
- package/packageInfo.cjs +1 -1
- package/packageInfo.js +1 -1
- package/spec/centrifuge-chain.cjs +8 -17
- package/spec/centrifuge-chain.js +8 -14
- package/spec/kusama.cjs +43 -33
- package/spec/kusama.js +40 -32
- package/spec/polkadot.cjs +18 -20
- package/spec/polkadot.js +18 -17
- package/spec/rococo.cjs +17 -16
- package/spec/rococo.js +14 -15
- package/spec/statemint.cjs +11 -10
- package/spec/statemint.js +8 -9
- package/spec/westend.cjs +28 -21
- package/spec/westend.js +25 -20
- package/upgrades/index.cjs +9 -5
- package/xcm.cjs +1 -10
- package/xcm.js +1 -7
package/spec/westend.js
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
-
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
6
|
-
|
|
7
1
|
// Copyright 2017-2021 @polkadot/types-known authors & contributors
|
|
8
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
9
3
|
|
|
@@ -30,7 +24,8 @@ const addrAccountIdTypes = {
|
|
|
30
24
|
};
|
|
31
25
|
const versioned = [{
|
|
32
26
|
minmax: [1, 2],
|
|
33
|
-
types:
|
|
27
|
+
types: { ...sharedTypes,
|
|
28
|
+
...addrAccountIdTypes,
|
|
34
29
|
CompactAssignments: 'CompactAssignmentsTo257',
|
|
35
30
|
DispatchInfo: 'DispatchInfoTo244',
|
|
36
31
|
Heartbeat: 'HeartbeatTo244',
|
|
@@ -38,48 +33,58 @@ const versioned = [{
|
|
|
38
33
|
OpenTip: 'OpenTipTo225',
|
|
39
34
|
RefCount: 'RefCountTo259',
|
|
40
35
|
Weight: 'u32'
|
|
41
|
-
}
|
|
36
|
+
}
|
|
42
37
|
}, {
|
|
43
38
|
minmax: [3, 22],
|
|
44
|
-
types:
|
|
39
|
+
types: { ...sharedTypes,
|
|
40
|
+
...addrAccountIdTypes,
|
|
45
41
|
CompactAssignments: 'CompactAssignmentsTo257',
|
|
46
42
|
DispatchInfo: 'DispatchInfoTo244',
|
|
47
43
|
Heartbeat: 'HeartbeatTo244',
|
|
48
44
|
OpenTip: 'OpenTipTo225',
|
|
49
45
|
RefCount: 'RefCountTo259'
|
|
50
|
-
}
|
|
46
|
+
}
|
|
51
47
|
}, {
|
|
52
48
|
minmax: [23, 42],
|
|
53
|
-
types:
|
|
49
|
+
types: { ...sharedTypes,
|
|
50
|
+
...addrAccountIdTypes,
|
|
54
51
|
CompactAssignments: 'CompactAssignmentsTo257',
|
|
55
52
|
DispatchInfo: 'DispatchInfoTo244',
|
|
56
53
|
Heartbeat: 'HeartbeatTo244',
|
|
57
54
|
RefCount: 'RefCountTo259'
|
|
58
|
-
}
|
|
55
|
+
}
|
|
59
56
|
}, {
|
|
60
57
|
minmax: [43, 44],
|
|
61
|
-
types:
|
|
58
|
+
types: { ...sharedTypes,
|
|
59
|
+
...addrAccountIdTypes,
|
|
62
60
|
DispatchInfo: 'DispatchInfoTo244',
|
|
63
61
|
Heartbeat: 'HeartbeatTo244',
|
|
64
62
|
RefCount: 'RefCountTo259'
|
|
65
|
-
}
|
|
63
|
+
}
|
|
66
64
|
}, {
|
|
67
65
|
minmax: [45, 47],
|
|
68
|
-
types:
|
|
66
|
+
types: { ...sharedTypes,
|
|
67
|
+
...addrAccountIdTypes
|
|
68
|
+
}
|
|
69
69
|
}, {
|
|
70
70
|
minmax: [48, 49],
|
|
71
|
-
types:
|
|
71
|
+
types: { ...sharedTypes,
|
|
72
72
|
AccountInfo: 'AccountInfoWithDualRefCount'
|
|
73
|
-
}
|
|
73
|
+
}
|
|
74
74
|
}, {
|
|
75
75
|
minmax: [50, 9099],
|
|
76
|
-
types:
|
|
76
|
+
types: { ...sharedTypes,
|
|
77
|
+
...mapXcmTypes('V0')
|
|
78
|
+
}
|
|
77
79
|
}, {
|
|
78
80
|
minmax: [9100, 9105],
|
|
79
|
-
types:
|
|
81
|
+
types: { ...sharedTypes,
|
|
82
|
+
...mapXcmTypes('V1')
|
|
83
|
+
}
|
|
80
84
|
}, {
|
|
81
85
|
// metadata v14
|
|
82
86
|
minmax: [9106, undefined],
|
|
83
|
-
types:
|
|
87
|
+
types: { ...sharedTypes
|
|
88
|
+
}
|
|
84
89
|
}];
|
|
85
90
|
export default versioned;
|
package/upgrades/index.cjs
CHANGED
|
@@ -43,16 +43,20 @@ function checkOrder(network, versions) {
|
|
|
43
43
|
/** @internal */
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
function mapRaw(
|
|
46
|
+
function mapRaw(_ref) {
|
|
47
|
+
let [network, versions] = _ref;
|
|
47
48
|
const chain = _networks.selectableNetworks.find(n => n.network === network) || NET_EXTRA[network];
|
|
48
49
|
(0, _util.assert)(chain, () => `Unable to find info for chain ${network}`);
|
|
49
50
|
return {
|
|
50
51
|
genesisHash: (0, _util.hexToU8a)(chain.genesisHash[0]),
|
|
51
52
|
network,
|
|
52
|
-
versions: checkOrder(network, versions).map(
|
|
53
|
-
blockNumber
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
versions: checkOrder(network, versions).map(_ref2 => {
|
|
54
|
+
let [blockNumber, specVersion] = _ref2;
|
|
55
|
+
return {
|
|
56
|
+
blockNumber: new _util.BN(blockNumber),
|
|
57
|
+
specVersion: new _util.BN(specVersion)
|
|
58
|
+
};
|
|
59
|
+
})
|
|
56
60
|
};
|
|
57
61
|
} // Type overrides for specific spec types & versions as given in runtimeVersion
|
|
58
62
|
|
package/xcm.cjs
CHANGED
|
@@ -1,26 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.XCM_MAPPINGS = void 0;
|
|
9
7
|
exports.mapXcmTypes = mapXcmTypes;
|
|
10
|
-
|
|
11
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
-
|
|
13
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
14
|
-
|
|
15
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
16
|
-
|
|
17
8
|
// Copyright 2017-2021 @polkadot/types-known authors & contributors
|
|
18
9
|
// SPDX-License-Identifier: Apache-2.0
|
|
19
10
|
const XCM_MAPPINGS = ['AssetInstance', 'Fungibility', 'Junction', 'Junctions', 'MultiAsset', 'MultiAssetFilter', 'MultiLocation', 'Response', 'WildFungibility', 'WildMultiAsset', 'Xcm', 'XcmError', 'XcmOrder'];
|
|
20
11
|
exports.XCM_MAPPINGS = XCM_MAPPINGS;
|
|
21
12
|
|
|
22
13
|
function mapXcmTypes(version) {
|
|
23
|
-
return XCM_MAPPINGS.reduce((all, key) =>
|
|
14
|
+
return XCM_MAPPINGS.reduce((all, key) => ({ ...all,
|
|
24
15
|
[key]: `${key}${version}`
|
|
25
16
|
}), {});
|
|
26
17
|
}
|
package/xcm.js
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
-
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
6
|
-
|
|
7
1
|
// Copyright 2017-2021 @polkadot/types-known authors & contributors
|
|
8
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
9
3
|
export const XCM_MAPPINGS = ['AssetInstance', 'Fungibility', 'Junction', 'Junctions', 'MultiAsset', 'MultiAssetFilter', 'MultiLocation', 'Response', 'WildFungibility', 'WildMultiAsset', 'Xcm', 'XcmError', 'XcmOrder'];
|
|
10
4
|
export function mapXcmTypes(version) {
|
|
11
|
-
return XCM_MAPPINGS.reduce((all, key) =>
|
|
5
|
+
return XCM_MAPPINGS.reduce((all, key) => ({ ...all,
|
|
12
6
|
[key]: `${key}${version}`
|
|
13
7
|
}), {});
|
|
14
8
|
}
|