@polkadot/types-known 6.6.2-2 → 6.6.2-20

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 CHANGED
@@ -31,8 +31,6 @@ Object.defineProperty(exports, "packageInfo", {
31
31
  }
32
32
  });
33
33
 
34
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
35
-
36
34
  var _util = require("@polkadot/util");
37
35
 
38
36
  var _index = _interopRequireDefault(require("./chain/index.cjs"));
@@ -49,58 +47,69 @@ var _packageInfo = require("./packageInfo.cjs");
49
47
 
50
48
  var _xcm = require("./xcm.cjs");
51
49
 
52
- 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; }
53
-
54
- 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; }
55
-
50
+ // Copyright 2017-2021 @polkadot/types-known authors & contributors
51
+ // SPDX-License-Identifier: Apache-2.0
56
52
  // flatten a VersionedType[] into a Record<string, string>
57
53
 
58
54
  /** @internal */
59
- function filterVersions(versions = [], specVersion) {
60
- return versions.filter(({
61
- minmax: [min, max]
62
- }) => ((0, _util.isUndefined)(min) || (0, _util.isNull)(min) || specVersion >= min) && ((0, _util.isUndefined)(max) || (0, _util.isNull)(max) || specVersion <= max)).reduce((result, {
63
- types
64
- }) => _objectSpread(_objectSpread({}, result), types), {});
55
+ function filterVersions() {
56
+ let versions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
57
+ let specVersion = arguments.length > 1 ? arguments[1] : undefined;
58
+ return versions.filter(_ref => {
59
+ let {
60
+ minmax: [min, max]
61
+ } = _ref;
62
+ return ((0, _util.isUndefined)(min) || (0, _util.isNull)(min) || specVersion >= min) && ((0, _util.isUndefined)(max) || (0, _util.isNull)(max) || specVersion <= max);
63
+ }).reduce((result, _ref2) => {
64
+ let {
65
+ types
66
+ } = _ref2;
67
+ return (0, _util.objectSpread)(result, types);
68
+ }, {});
65
69
  }
66
70
  /**
67
71
  * @description Get types for specific modules (metadata override)
68
72
  */
69
73
 
70
74
 
71
- function getModuleTypes({
72
- knownTypes
73
- }, section) {
75
+ function getModuleTypes(_ref3, section) {
74
76
  var _knownTypes$typesAlia;
75
77
 
76
- return _objectSpread(_objectSpread({}, _modules.default[section] || {}), ((_knownTypes$typesAlia = knownTypes.typesAlias) === null || _knownTypes$typesAlia === void 0 ? void 0 : _knownTypes$typesAlia[section]) || {});
78
+ let {
79
+ knownTypes
80
+ } = _ref3;
81
+ return (0, _util.objectSpread)({}, _modules.default[section], (_knownTypes$typesAlia = knownTypes.typesAlias) === null || _knownTypes$typesAlia === void 0 ? void 0 : _knownTypes$typesAlia[section]);
77
82
  }
78
83
  /**
79
84
  * @description Based on the chain and runtimeVersion, get the applicable signed extensions (ready for registration)
80
85
  */
81
86
 
82
87
 
83
- function getSpecExtensions({
84
- knownTypes
85
- }, chainName, specName) {
88
+ function getSpecExtensions(_ref4, chainName, specName) {
86
89
  var _knownTypes$typesBund, _knownTypes$typesBund2, _knownTypes$typesBund3, _knownTypes$typesBund4, _knownTypes$typesBund5, _knownTypes$typesBund6;
87
90
 
91
+ let {
92
+ knownTypes
93
+ } = _ref4;
94
+
88
95
  const _chainName = chainName.toString();
89
96
 
90
97
  const _specName = specName.toString();
91
98
 
92
- return _objectSpread(_objectSpread({}, ((_knownTypes$typesBund = knownTypes.typesBundle) === null || _knownTypes$typesBund === void 0 ? void 0 : (_knownTypes$typesBund2 = _knownTypes$typesBund.spec) === null || _knownTypes$typesBund2 === void 0 ? void 0 : (_knownTypes$typesBund3 = _knownTypes$typesBund2[_specName]) === null || _knownTypes$typesBund3 === void 0 ? void 0 : _knownTypes$typesBund3.signedExtensions) || {}), ((_knownTypes$typesBund4 = knownTypes.typesBundle) === null || _knownTypes$typesBund4 === void 0 ? void 0 : (_knownTypes$typesBund5 = _knownTypes$typesBund4.chain) === null || _knownTypes$typesBund5 === void 0 ? void 0 : (_knownTypes$typesBund6 = _knownTypes$typesBund5[_chainName]) === null || _knownTypes$typesBund6 === void 0 ? void 0 : _knownTypes$typesBund6.signedExtensions) || {});
99
+ return (0, _util.objectSpread)({}, (_knownTypes$typesBund = knownTypes.typesBundle) === null || _knownTypes$typesBund === void 0 ? void 0 : (_knownTypes$typesBund2 = _knownTypes$typesBund.spec) === null || _knownTypes$typesBund2 === void 0 ? void 0 : (_knownTypes$typesBund3 = _knownTypes$typesBund2[_specName]) === null || _knownTypes$typesBund3 === void 0 ? void 0 : _knownTypes$typesBund3.signedExtensions, (_knownTypes$typesBund4 = knownTypes.typesBundle) === null || _knownTypes$typesBund4 === void 0 ? void 0 : (_knownTypes$typesBund5 = _knownTypes$typesBund4.chain) === null || _knownTypes$typesBund5 === void 0 ? void 0 : (_knownTypes$typesBund6 = _knownTypes$typesBund5[_chainName]) === null || _knownTypes$typesBund6 === void 0 ? void 0 : _knownTypes$typesBund6.signedExtensions);
93
100
  }
94
101
  /**
95
102
  * @description Based on the chain and runtimeVersion, get the applicable types (ready for registration)
96
103
  */
97
104
 
98
105
 
99
- function getSpecTypes({
100
- knownTypes
101
- }, chainName, specName, specVersion) {
106
+ function getSpecTypes(_ref5, chainName, specName, specVersion) {
102
107
  var _knownTypes$typesBund7, _knownTypes$typesBund8, _knownTypes$typesBund9, _knownTypes$typesBund10, _knownTypes$typesBund11, _knownTypes$typesBund12, _knownTypes$typesSpec, _knownTypes$typesChai;
103
108
 
109
+ let {
110
+ knownTypes
111
+ } = _ref5;
112
+
104
113
  const _chainName = chainName.toString();
105
114
 
106
115
  const _specName = specName.toString();
@@ -111,14 +120,16 @@ function getSpecTypes({
111
120
  // - types is the final catch-all override
112
121
 
113
122
 
114
- return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, filterVersions(_index2.default[_specName], _specVersion)), filterVersions(_index.default[_chainName], _specVersion)), filterVersions((_knownTypes$typesBund7 = knownTypes.typesBundle) === null || _knownTypes$typesBund7 === void 0 ? void 0 : (_knownTypes$typesBund8 = _knownTypes$typesBund7.spec) === null || _knownTypes$typesBund8 === void 0 ? void 0 : (_knownTypes$typesBund9 = _knownTypes$typesBund8[_specName]) === null || _knownTypes$typesBund9 === void 0 ? void 0 : _knownTypes$typesBund9.types, _specVersion)), filterVersions((_knownTypes$typesBund10 = knownTypes.typesBundle) === null || _knownTypes$typesBund10 === void 0 ? void 0 : (_knownTypes$typesBund11 = _knownTypes$typesBund10.chain) === null || _knownTypes$typesBund11 === void 0 ? void 0 : (_knownTypes$typesBund12 = _knownTypes$typesBund11[_chainName]) === null || _knownTypes$typesBund12 === void 0 ? void 0 : _knownTypes$typesBund12.types, _specVersion)), ((_knownTypes$typesSpec = knownTypes.typesSpec) === null || _knownTypes$typesSpec === void 0 ? void 0 : _knownTypes$typesSpec[_specName]) || {}), ((_knownTypes$typesChai = knownTypes.typesChain) === null || _knownTypes$typesChai === void 0 ? void 0 : _knownTypes$typesChai[_chainName]) || {}), knownTypes.types || {});
123
+ return (0, _util.objectSpread)({}, filterVersions(_index2.default[_specName], _specVersion), filterVersions(_index.default[_chainName], _specVersion), filterVersions((_knownTypes$typesBund7 = knownTypes.typesBundle) === null || _knownTypes$typesBund7 === void 0 ? void 0 : (_knownTypes$typesBund8 = _knownTypes$typesBund7.spec) === null || _knownTypes$typesBund8 === void 0 ? void 0 : (_knownTypes$typesBund9 = _knownTypes$typesBund8[_specName]) === null || _knownTypes$typesBund9 === void 0 ? void 0 : _knownTypes$typesBund9.types, _specVersion), filterVersions((_knownTypes$typesBund10 = knownTypes.typesBundle) === null || _knownTypes$typesBund10 === void 0 ? void 0 : (_knownTypes$typesBund11 = _knownTypes$typesBund10.chain) === null || _knownTypes$typesBund11 === void 0 ? void 0 : (_knownTypes$typesBund12 = _knownTypes$typesBund11[_chainName]) === null || _knownTypes$typesBund12 === void 0 ? void 0 : _knownTypes$typesBund12.types, _specVersion), (_knownTypes$typesSpec = knownTypes.typesSpec) === null || _knownTypes$typesSpec === void 0 ? void 0 : _knownTypes$typesSpec[_specName], (_knownTypes$typesChai = knownTypes.typesChain) === null || _knownTypes$typesChai === void 0 ? void 0 : _knownTypes$typesChai[_chainName], knownTypes.types);
115
124
  }
116
125
 
117
- function getSpecHasher({
118
- knownTypes
119
- }, chainName, specName) {
126
+ function getSpecHasher(_ref6, chainName, specName) {
120
127
  var _knownTypes$typesBund13, _knownTypes$typesBund14, _knownTypes$typesBund15, _knownTypes$typesBund16, _knownTypes$typesBund17, _knownTypes$typesBund18;
121
128
 
129
+ let {
130
+ knownTypes
131
+ } = _ref6;
132
+
122
133
  const _chainName = chainName.toString();
123
134
 
124
135
  const _specName = specName.toString();
@@ -130,33 +141,37 @@ function getSpecHasher({
130
141
  */
131
142
 
132
143
 
133
- function getSpecRpc({
134
- knownTypes
135
- }, chainName, specName) {
144
+ function getSpecRpc(_ref7, chainName, specName) {
136
145
  var _knownTypes$typesBund19, _knownTypes$typesBund20, _knownTypes$typesBund21, _knownTypes$typesBund22, _knownTypes$typesBund23, _knownTypes$typesBund24;
137
146
 
147
+ let {
148
+ knownTypes
149
+ } = _ref7;
150
+
138
151
  const _chainName = chainName.toString();
139
152
 
140
153
  const _specName = specName.toString();
141
154
 
142
- return _objectSpread(_objectSpread({}, ((_knownTypes$typesBund19 = knownTypes.typesBundle) === null || _knownTypes$typesBund19 === void 0 ? void 0 : (_knownTypes$typesBund20 = _knownTypes$typesBund19.spec) === null || _knownTypes$typesBund20 === void 0 ? void 0 : (_knownTypes$typesBund21 = _knownTypes$typesBund20[_specName]) === null || _knownTypes$typesBund21 === void 0 ? void 0 : _knownTypes$typesBund21.rpc) || {}), ((_knownTypes$typesBund22 = knownTypes.typesBundle) === null || _knownTypes$typesBund22 === void 0 ? void 0 : (_knownTypes$typesBund23 = _knownTypes$typesBund22.chain) === null || _knownTypes$typesBund23 === void 0 ? void 0 : (_knownTypes$typesBund24 = _knownTypes$typesBund23[_chainName]) === null || _knownTypes$typesBund24 === void 0 ? void 0 : _knownTypes$typesBund24.rpc) || {});
155
+ return (0, _util.objectSpread)({}, (_knownTypes$typesBund19 = knownTypes.typesBundle) === null || _knownTypes$typesBund19 === void 0 ? void 0 : (_knownTypes$typesBund20 = _knownTypes$typesBund19.spec) === null || _knownTypes$typesBund20 === void 0 ? void 0 : (_knownTypes$typesBund21 = _knownTypes$typesBund20[_specName]) === null || _knownTypes$typesBund21 === void 0 ? void 0 : _knownTypes$typesBund21.rpc, (_knownTypes$typesBund22 = knownTypes.typesBundle) === null || _knownTypes$typesBund22 === void 0 ? void 0 : (_knownTypes$typesBund23 = _knownTypes$typesBund22.chain) === null || _knownTypes$typesBund23 === void 0 ? void 0 : (_knownTypes$typesBund24 = _knownTypes$typesBund23[_chainName]) === null || _knownTypes$typesBund24 === void 0 ? void 0 : _knownTypes$typesBund24.rpc);
143
156
  }
144
157
  /**
145
158
  * @description Based on the chain and runtimeVersion, get the applicable alias definitions (ready for registration)
146
159
  */
147
160
 
148
161
 
149
- function getSpecAlias({
150
- knownTypes
151
- }, chainName, specName) {
162
+ function getSpecAlias(_ref8, chainName, specName) {
152
163
  var _knownTypes$typesBund25, _knownTypes$typesBund26, _knownTypes$typesBund27, _knownTypes$typesBund28, _knownTypes$typesBund29, _knownTypes$typesBund30;
153
164
 
165
+ let {
166
+ knownTypes
167
+ } = _ref8;
168
+
154
169
  const _chainName = chainName.toString();
155
170
 
156
171
  const _specName = specName.toString(); // as per versions, first spec, then chain then finally non-versioned
157
172
 
158
173
 
159
- return _objectSpread(_objectSpread(_objectSpread({}, ((_knownTypes$typesBund25 = knownTypes.typesBundle) === null || _knownTypes$typesBund25 === void 0 ? void 0 : (_knownTypes$typesBund26 = _knownTypes$typesBund25.spec) === null || _knownTypes$typesBund26 === void 0 ? void 0 : (_knownTypes$typesBund27 = _knownTypes$typesBund26[_specName]) === null || _knownTypes$typesBund27 === void 0 ? void 0 : _knownTypes$typesBund27.alias) || {}), ((_knownTypes$typesBund28 = knownTypes.typesBundle) === null || _knownTypes$typesBund28 === void 0 ? void 0 : (_knownTypes$typesBund29 = _knownTypes$typesBund28.chain) === null || _knownTypes$typesBund29 === void 0 ? void 0 : (_knownTypes$typesBund30 = _knownTypes$typesBund29[_chainName]) === null || _knownTypes$typesBund30 === void 0 ? void 0 : _knownTypes$typesBund30.alias) || {}), knownTypes.typesAlias || {});
174
+ return (0, _util.objectSpread)({}, (_knownTypes$typesBund25 = knownTypes.typesBundle) === null || _knownTypes$typesBund25 === void 0 ? void 0 : (_knownTypes$typesBund26 = _knownTypes$typesBund25.spec) === null || _knownTypes$typesBund26 === void 0 ? void 0 : (_knownTypes$typesBund27 = _knownTypes$typesBund26[_specName]) === null || _knownTypes$typesBund27 === void 0 ? void 0 : _knownTypes$typesBund27.alias, (_knownTypes$typesBund28 = knownTypes.typesBundle) === null || _knownTypes$typesBund28 === void 0 ? void 0 : (_knownTypes$typesBund29 = _knownTypes$typesBund28.chain) === null || _knownTypes$typesBund29 === void 0 ? void 0 : (_knownTypes$typesBund30 = _knownTypes$typesBund29[_chainName]) === null || _knownTypes$typesBund30 === void 0 ? void 0 : _knownTypes$typesBund30.alias, knownTypes.typesAlias);
160
175
  }
161
176
  /**
162
177
  * @description Returns a version record for known chains where upgrades are being tracked
package/bundle.js CHANGED
@@ -1,12 +1,6 @@
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
- import { bnToBn, isNull, isUndefined } from '@polkadot/util';
3
+ import { bnToBn, isNull, isUndefined, objectSpread } from '@polkadot/util';
10
4
  import typesChain from "./chain/index.js";
11
5
  import typesModules from "./modules.js";
12
6
  import typesSpec from "./spec/index.js";
@@ -22,7 +16,7 @@ function filterVersions(versions = [], specVersion) {
22
16
  minmax: [min, max]
23
17
  }) => (isUndefined(min) || isNull(min) || specVersion >= min) && (isUndefined(max) || isNull(max) || specVersion <= max)).reduce((result, {
24
18
  types
25
- }) => _objectSpread(_objectSpread({}, result), types), {});
19
+ }) => objectSpread(result, types), {});
26
20
  }
27
21
  /**
28
22
  * @description Get types for specific modules (metadata override)
@@ -34,7 +28,7 @@ export function getModuleTypes({
34
28
  }, section) {
35
29
  var _knownTypes$typesAlia;
36
30
 
37
- return _objectSpread(_objectSpread({}, typesModules[section] || {}), ((_knownTypes$typesAlia = knownTypes.typesAlias) === null || _knownTypes$typesAlia === void 0 ? void 0 : _knownTypes$typesAlia[section]) || {});
31
+ return objectSpread({}, typesModules[section], (_knownTypes$typesAlia = knownTypes.typesAlias) === null || _knownTypes$typesAlia === void 0 ? void 0 : _knownTypes$typesAlia[section]);
38
32
  }
39
33
  /**
40
34
  * @description Based on the chain and runtimeVersion, get the applicable signed extensions (ready for registration)
@@ -49,7 +43,7 @@ export function getSpecExtensions({
49
43
 
50
44
  const _specName = specName.toString();
51
45
 
52
- return _objectSpread(_objectSpread({}, ((_knownTypes$typesBund = knownTypes.typesBundle) === null || _knownTypes$typesBund === void 0 ? void 0 : (_knownTypes$typesBund2 = _knownTypes$typesBund.spec) === null || _knownTypes$typesBund2 === void 0 ? void 0 : (_knownTypes$typesBund3 = _knownTypes$typesBund2[_specName]) === null || _knownTypes$typesBund3 === void 0 ? void 0 : _knownTypes$typesBund3.signedExtensions) || {}), ((_knownTypes$typesBund4 = knownTypes.typesBundle) === null || _knownTypes$typesBund4 === void 0 ? void 0 : (_knownTypes$typesBund5 = _knownTypes$typesBund4.chain) === null || _knownTypes$typesBund5 === void 0 ? void 0 : (_knownTypes$typesBund6 = _knownTypes$typesBund5[_chainName]) === null || _knownTypes$typesBund6 === void 0 ? void 0 : _knownTypes$typesBund6.signedExtensions) || {});
46
+ return objectSpread({}, (_knownTypes$typesBund = knownTypes.typesBundle) === null || _knownTypes$typesBund === void 0 ? void 0 : (_knownTypes$typesBund2 = _knownTypes$typesBund.spec) === null || _knownTypes$typesBund2 === void 0 ? void 0 : (_knownTypes$typesBund3 = _knownTypes$typesBund2[_specName]) === null || _knownTypes$typesBund3 === void 0 ? void 0 : _knownTypes$typesBund3.signedExtensions, (_knownTypes$typesBund4 = knownTypes.typesBundle) === null || _knownTypes$typesBund4 === void 0 ? void 0 : (_knownTypes$typesBund5 = _knownTypes$typesBund4.chain) === null || _knownTypes$typesBund5 === void 0 ? void 0 : (_knownTypes$typesBund6 = _knownTypes$typesBund5[_chainName]) === null || _knownTypes$typesBund6 === void 0 ? void 0 : _knownTypes$typesBund6.signedExtensions);
53
47
  }
54
48
  /**
55
49
  * @description Based on the chain and runtimeVersion, get the applicable types (ready for registration)
@@ -70,7 +64,7 @@ export function getSpecTypes({
70
64
  // - types is the final catch-all override
71
65
 
72
66
 
73
- return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, filterVersions(typesSpec[_specName], _specVersion)), filterVersions(typesChain[_chainName], _specVersion)), filterVersions((_knownTypes$typesBund7 = knownTypes.typesBundle) === null || _knownTypes$typesBund7 === void 0 ? void 0 : (_knownTypes$typesBund8 = _knownTypes$typesBund7.spec) === null || _knownTypes$typesBund8 === void 0 ? void 0 : (_knownTypes$typesBund9 = _knownTypes$typesBund8[_specName]) === null || _knownTypes$typesBund9 === void 0 ? void 0 : _knownTypes$typesBund9.types, _specVersion)), filterVersions((_knownTypes$typesBund10 = knownTypes.typesBundle) === null || _knownTypes$typesBund10 === void 0 ? void 0 : (_knownTypes$typesBund11 = _knownTypes$typesBund10.chain) === null || _knownTypes$typesBund11 === void 0 ? void 0 : (_knownTypes$typesBund12 = _knownTypes$typesBund11[_chainName]) === null || _knownTypes$typesBund12 === void 0 ? void 0 : _knownTypes$typesBund12.types, _specVersion)), ((_knownTypes$typesSpec = knownTypes.typesSpec) === null || _knownTypes$typesSpec === void 0 ? void 0 : _knownTypes$typesSpec[_specName]) || {}), ((_knownTypes$typesChai = knownTypes.typesChain) === null || _knownTypes$typesChai === void 0 ? void 0 : _knownTypes$typesChai[_chainName]) || {}), knownTypes.types || {});
67
+ return objectSpread({}, filterVersions(typesSpec[_specName], _specVersion), filterVersions(typesChain[_chainName], _specVersion), filterVersions((_knownTypes$typesBund7 = knownTypes.typesBundle) === null || _knownTypes$typesBund7 === void 0 ? void 0 : (_knownTypes$typesBund8 = _knownTypes$typesBund7.spec) === null || _knownTypes$typesBund8 === void 0 ? void 0 : (_knownTypes$typesBund9 = _knownTypes$typesBund8[_specName]) === null || _knownTypes$typesBund9 === void 0 ? void 0 : _knownTypes$typesBund9.types, _specVersion), filterVersions((_knownTypes$typesBund10 = knownTypes.typesBundle) === null || _knownTypes$typesBund10 === void 0 ? void 0 : (_knownTypes$typesBund11 = _knownTypes$typesBund10.chain) === null || _knownTypes$typesBund11 === void 0 ? void 0 : (_knownTypes$typesBund12 = _knownTypes$typesBund11[_chainName]) === null || _knownTypes$typesBund12 === void 0 ? void 0 : _knownTypes$typesBund12.types, _specVersion), (_knownTypes$typesSpec = knownTypes.typesSpec) === null || _knownTypes$typesSpec === void 0 ? void 0 : _knownTypes$typesSpec[_specName], (_knownTypes$typesChai = knownTypes.typesChain) === null || _knownTypes$typesChai === void 0 ? void 0 : _knownTypes$typesChai[_chainName], knownTypes.types);
74
68
  }
75
69
  export function getSpecHasher({
76
70
  knownTypes
@@ -96,7 +90,7 @@ export function getSpecRpc({
96
90
 
97
91
  const _specName = specName.toString();
98
92
 
99
- return _objectSpread(_objectSpread({}, ((_knownTypes$typesBund19 = knownTypes.typesBundle) === null || _knownTypes$typesBund19 === void 0 ? void 0 : (_knownTypes$typesBund20 = _knownTypes$typesBund19.spec) === null || _knownTypes$typesBund20 === void 0 ? void 0 : (_knownTypes$typesBund21 = _knownTypes$typesBund20[_specName]) === null || _knownTypes$typesBund21 === void 0 ? void 0 : _knownTypes$typesBund21.rpc) || {}), ((_knownTypes$typesBund22 = knownTypes.typesBundle) === null || _knownTypes$typesBund22 === void 0 ? void 0 : (_knownTypes$typesBund23 = _knownTypes$typesBund22.chain) === null || _knownTypes$typesBund23 === void 0 ? void 0 : (_knownTypes$typesBund24 = _knownTypes$typesBund23[_chainName]) === null || _knownTypes$typesBund24 === void 0 ? void 0 : _knownTypes$typesBund24.rpc) || {});
93
+ return objectSpread({}, (_knownTypes$typesBund19 = knownTypes.typesBundle) === null || _knownTypes$typesBund19 === void 0 ? void 0 : (_knownTypes$typesBund20 = _knownTypes$typesBund19.spec) === null || _knownTypes$typesBund20 === void 0 ? void 0 : (_knownTypes$typesBund21 = _knownTypes$typesBund20[_specName]) === null || _knownTypes$typesBund21 === void 0 ? void 0 : _knownTypes$typesBund21.rpc, (_knownTypes$typesBund22 = knownTypes.typesBundle) === null || _knownTypes$typesBund22 === void 0 ? void 0 : (_knownTypes$typesBund23 = _knownTypes$typesBund22.chain) === null || _knownTypes$typesBund23 === void 0 ? void 0 : (_knownTypes$typesBund24 = _knownTypes$typesBund23[_chainName]) === null || _knownTypes$typesBund24 === void 0 ? void 0 : _knownTypes$typesBund24.rpc);
100
94
  }
101
95
  /**
102
96
  * @description Based on the chain and runtimeVersion, get the applicable alias definitions (ready for registration)
@@ -112,7 +106,7 @@ export function getSpecAlias({
112
106
  const _specName = specName.toString(); // as per versions, first spec, then chain then finally non-versioned
113
107
 
114
108
 
115
- return _objectSpread(_objectSpread(_objectSpread({}, ((_knownTypes$typesBund25 = knownTypes.typesBundle) === null || _knownTypes$typesBund25 === void 0 ? void 0 : (_knownTypes$typesBund26 = _knownTypes$typesBund25.spec) === null || _knownTypes$typesBund26 === void 0 ? void 0 : (_knownTypes$typesBund27 = _knownTypes$typesBund26[_specName]) === null || _knownTypes$typesBund27 === void 0 ? void 0 : _knownTypes$typesBund27.alias) || {}), ((_knownTypes$typesBund28 = knownTypes.typesBundle) === null || _knownTypes$typesBund28 === void 0 ? void 0 : (_knownTypes$typesBund29 = _knownTypes$typesBund28.chain) === null || _knownTypes$typesBund29 === void 0 ? void 0 : (_knownTypes$typesBund30 = _knownTypes$typesBund29[_chainName]) === null || _knownTypes$typesBund30 === void 0 ? void 0 : _knownTypes$typesBund30.alias) || {}), knownTypes.typesAlias || {});
109
+ return objectSpread({}, (_knownTypes$typesBund25 = knownTypes.typesBundle) === null || _knownTypes$typesBund25 === void 0 ? void 0 : (_knownTypes$typesBund26 = _knownTypes$typesBund25.spec) === null || _knownTypes$typesBund26 === void 0 ? void 0 : (_knownTypes$typesBund27 = _knownTypes$typesBund26[_specName]) === null || _knownTypes$typesBund27 === void 0 ? void 0 : _knownTypes$typesBund27.alias, (_knownTypes$typesBund28 = knownTypes.typesBundle) === null || _knownTypes$typesBund28 === void 0 ? void 0 : (_knownTypes$typesBund29 = _knownTypes$typesBund28.chain) === null || _knownTypes$typesBund29 === void 0 ? void 0 : (_knownTypes$typesBund30 = _knownTypes$typesBund29[_chainName]) === null || _knownTypes$typesBund30 === void 0 ? void 0 : _knownTypes$typesBund30.alias, knownTypes.typesAlias);
116
110
  }
117
111
  /**
118
112
  * @description Returns a version record for known chains where upgrades are being tracked
package/package.json CHANGED
@@ -20,13 +20,13 @@
20
20
  "./detectPackage.cjs"
21
21
  ],
22
22
  "type": "module",
23
- "version": "6.6.2-2",
23
+ "version": "6.6.2-20",
24
24
  "main": "index.js",
25
25
  "dependencies": {
26
- "@babel/runtime": "^7.15.4",
27
- "@polkadot/networks": "^7.7.1",
28
- "@polkadot/types": "6.6.2-2",
29
- "@polkadot/util": "^7.7.1"
26
+ "@babel/runtime": "^7.16.0",
27
+ "@polkadot/networks": "^7.7.2-6",
28
+ "@polkadot/types": "6.6.2-20",
29
+ "@polkadot/util": "^7.7.2-6"
30
30
  },
31
31
  "exports": {
32
32
  ".": {
package/packageInfo.cjs CHANGED
@@ -9,6 +9,6 @@ exports.packageInfo = void 0;
9
9
  // Auto-generated by @polkadot/dev, do not edit
10
10
  const packageInfo = {
11
11
  name: '@polkadot/types-known',
12
- version: '6.6.2-2'
12
+ version: '6.6.2-20'
13
13
  };
14
14
  exports.packageInfo = packageInfo;
package/packageInfo.js CHANGED
@@ -3,5 +3,5 @@
3
3
  // Auto-generated by @polkadot/dev, do not edit
4
4
  export const packageInfo = {
5
5
  name: '@polkadot/types-known',
6
- version: '6.6.2-2'
6
+ version: '6.6.2-20'
7
7
  };
@@ -1,17 +1,11 @@
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.default = void 0;
9
7
 
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
-
12
- 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; }
13
-
14
- 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; }
8
+ var _util = require("@polkadot/util");
15
9
 
16
10
  // Copyright 2017-2021 @polkadot/types-known authors & contributors
17
11
  // SPDX-License-Identifier: Apache-2.0
@@ -79,28 +73,26 @@ const sharedTypes = {
79
73
  _enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'NonProxy']
80
74
  }
81
75
  };
82
-
83
- const standaloneTypes = _objectSpread(_objectSpread({}, sharedTypes), {}, {
76
+ const standaloneTypes = (0, _util.objectSpread)({}, sharedTypes, {
84
77
  AccountInfo: 'AccountInfoWithRefCount',
85
78
  Address: 'LookupSource',
86
79
  LookupSource: 'IndicesLookupSource',
87
80
  Multiplier: 'Fixed64',
88
81
  RefCount: 'RefCountTo259'
89
82
  });
90
-
91
83
  const versioned = [{
92
84
  minmax: [240, 243],
93
- types: _objectSpread(_objectSpread({}, standaloneTypes), {}, {
85
+ types: (0, _util.objectSpread)({}, standaloneTypes, {
94
86
  ProxyType: {
95
87
  _enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'Vesting']
96
88
  }
97
89
  })
98
90
  }, {
99
91
  minmax: [244, 999],
100
- types: _objectSpread({}, standaloneTypes)
92
+ types: (0, _util.objectSpread)({}, standaloneTypes)
101
93
  }, {
102
94
  minmax: [1000, undefined],
103
- types: _objectSpread({}, sharedTypes)
95
+ types: (0, _util.objectSpread)({}, sharedTypes)
104
96
  }];
105
97
  var _default = versioned;
106
98
  exports.default = _default;
@@ -1,13 +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
 
10
4
  /* eslint-disable sort-keys */
5
+ import { objectSpread } from '@polkadot/util';
11
6
  const sharedTypes = {
12
7
  // Anchor
13
8
  AnchorData: {
@@ -70,27 +65,25 @@ const sharedTypes = {
70
65
  _enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'NonProxy']
71
66
  }
72
67
  };
73
-
74
- const standaloneTypes = _objectSpread(_objectSpread({}, sharedTypes), {}, {
68
+ const standaloneTypes = objectSpread({}, sharedTypes, {
75
69
  AccountInfo: 'AccountInfoWithRefCount',
76
70
  Address: 'LookupSource',
77
71
  LookupSource: 'IndicesLookupSource',
78
72
  Multiplier: 'Fixed64',
79
73
  RefCount: 'RefCountTo259'
80
74
  });
81
-
82
75
  const versioned = [{
83
76
  minmax: [240, 243],
84
- types: _objectSpread(_objectSpread({}, standaloneTypes), {}, {
77
+ types: objectSpread({}, standaloneTypes, {
85
78
  ProxyType: {
86
79
  _enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'Vesting']
87
80
  }
88
81
  })
89
82
  }, {
90
83
  minmax: [244, 999],
91
- types: _objectSpread({}, standaloneTypes)
84
+ types: objectSpread({}, standaloneTypes)
92
85
  }, {
93
86
  minmax: [1000, undefined],
94
- types: _objectSpread({}, sharedTypes)
87
+ types: objectSpread({}, sharedTypes)
95
88
  }];
96
89
  export default versioned;
package/spec/kusama.cjs CHANGED
@@ -1,20 +1,18 @@
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.default = void 0;
9
7
 
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
8
+ var _util = require("@polkadot/util");
11
9
 
12
10
  var _xcm = require("../xcm.cjs");
13
11
 
14
- 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; }
15
-
16
- 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; }
12
+ // Copyright 2017-2021 @polkadot/types-known authors & contributors
13
+ // SPDX-License-Identifier: Apache-2.0
17
14
 
15
+ /* eslint-disable sort-keys */
18
16
  const sharedTypes = {
19
17
  CompactAssignments: 'CompactAssignmentsWith24',
20
18
  RawSolution: 'RawSolutionWith24',
@@ -44,7 +42,7 @@ const addrAccountIdTypes = {
44
42
  const versioned = [{
45
43
  // 1020 is first CC3
46
44
  minmax: [1019, 1031],
47
- types: _objectSpread(_objectSpread({}, addrIndicesTypes), {}, {
45
+ types: (0, _util.objectSpread)({}, addrIndicesTypes, {
48
46
  BalanceLock: 'BalanceLockTo212',
49
47
  CompactAssignments: 'CompactAssignmentsTo257',
50
48
  DispatchError: 'DispatchErrorTo198',
@@ -63,7 +61,7 @@ const versioned = [{
63
61
  })
64
62
  }, {
65
63
  minmax: [1032, 1042],
66
- types: _objectSpread(_objectSpread({}, addrIndicesTypes), {}, {
64
+ types: (0, _util.objectSpread)({}, addrIndicesTypes, {
67
65
  BalanceLock: 'BalanceLockTo212',
68
66
  CompactAssignments: 'CompactAssignmentsTo257',
69
67
  DispatchInfo: 'DispatchInfoTo244',
@@ -81,7 +79,7 @@ const versioned = [{
81
79
  }, {
82
80
  // actual at 1045 (1043-1044 is dev)
83
81
  minmax: [1043, 1045],
84
- types: _objectSpread(_objectSpread({}, addrIndicesTypes), {}, {
82
+ types: (0, _util.objectSpread)({}, addrIndicesTypes, {
85
83
  BalanceLock: 'BalanceLockTo212',
86
84
  CompactAssignments: 'CompactAssignmentsTo257',
87
85
  DispatchInfo: 'DispatchInfoTo244',
@@ -97,7 +95,7 @@ const versioned = [{
97
95
  })
98
96
  }, {
99
97
  minmax: [1046, 1054],
100
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
98
+ types: (0, _util.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
101
99
  CompactAssignments: 'CompactAssignmentsTo257',
102
100
  DispatchInfo: 'DispatchInfoTo244',
103
101
  Heartbeat: 'HeartbeatTo244',
@@ -110,7 +108,7 @@ const versioned = [{
110
108
  })
111
109
  }, {
112
110
  minmax: [1055, 1056],
113
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
111
+ types: (0, _util.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
114
112
  CompactAssignments: 'CompactAssignmentsTo257',
115
113
  DispatchInfo: 'DispatchInfoTo244',
116
114
  Heartbeat: 'HeartbeatTo244',
@@ -122,7 +120,7 @@ const versioned = [{
122
120
  })
123
121
  }, {
124
122
  minmax: [1057, 1061],
125
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
123
+ types: (0, _util.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
126
124
  CompactAssignments: 'CompactAssignmentsTo257',
127
125
  DispatchInfo: 'DispatchInfoTo244',
128
126
  Heartbeat: 'HeartbeatTo244',
@@ -131,49 +129,49 @@ const versioned = [{
131
129
  })
132
130
  }, {
133
131
  minmax: [1062, 2012],
134
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
132
+ types: (0, _util.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
135
133
  CompactAssignments: 'CompactAssignmentsTo257',
136
134
  OpenTip: 'OpenTipTo225',
137
135
  RefCount: 'RefCountTo259'
138
136
  })
139
137
  }, {
140
138
  minmax: [2013, 2022],
141
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
139
+ types: (0, _util.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
142
140
  CompactAssignments: 'CompactAssignmentsTo257',
143
141
  RefCount: 'RefCountTo259'
144
142
  })
145
143
  }, {
146
144
  minmax: [2023, 2024],
147
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
145
+ types: (0, _util.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
148
146
  RefCount: 'RefCountTo259'
149
147
  })
150
148
  }, {
151
149
  minmax: [2025, 2027],
152
- types: _objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes)
150
+ types: (0, _util.objectSpread)({}, sharedTypes, addrAccountIdTypes)
153
151
  }, {
154
152
  minmax: [2028, 2029],
155
- types: _objectSpread(_objectSpread({}, sharedTypes), {}, {
153
+ types: (0, _util.objectSpread)({}, sharedTypes, {
156
154
  AccountInfo: 'AccountInfoWithDualRefCount',
157
155
  CompactAssignments: 'CompactAssignmentsWith16',
158
156
  RawSolution: 'RawSolutionWith16'
159
157
  })
160
158
  }, {
161
159
  minmax: [2030, 9000],
162
- types: _objectSpread(_objectSpread({}, sharedTypes), {}, {
160
+ types: (0, _util.objectSpread)({}, sharedTypes, {
163
161
  CompactAssignments: 'CompactAssignmentsWith16',
164
162
  RawSolution: 'RawSolutionWith16'
165
163
  })
166
164
  }, {
167
165
  minmax: [9010, 9099],
168
- types: _objectSpread(_objectSpread({}, sharedTypes), (0, _xcm.mapXcmTypes)('V0'))
166
+ types: (0, _util.objectSpread)({}, sharedTypes, (0, _xcm.mapXcmTypes)('V0'))
169
167
  }, {
170
168
  // jump from 9100 to 9110, however align with Rococo
171
169
  minmax: [9100, 9105],
172
- types: _objectSpread(_objectSpread({}, sharedTypes), (0, _xcm.mapXcmTypes)('V1'))
170
+ types: (0, _util.objectSpread)({}, sharedTypes, (0, _xcm.mapXcmTypes)('V1'))
173
171
  }, {
174
172
  // metadata v14
175
173
  minmax: [9106, undefined],
176
- types: _objectSpread({}, sharedTypes)
174
+ types: (0, _util.objectSpread)({}, sharedTypes)
177
175
  }];
178
176
  var _default = versioned;
179
177
  exports.default = _default;
package/spec/kusama.js CHANGED
@@ -1,13 +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
 
10
4
  /* eslint-disable sort-keys */
5
+ import { objectSpread } from '@polkadot/util';
11
6
  import { mapXcmTypes } from "../xcm.js";
12
7
  const sharedTypes = {
13
8
  CompactAssignments: 'CompactAssignmentsWith24',
@@ -38,7 +33,7 @@ const addrAccountIdTypes = {
38
33
  const versioned = [{
39
34
  // 1020 is first CC3
40
35
  minmax: [1019, 1031],
41
- types: _objectSpread(_objectSpread({}, addrIndicesTypes), {}, {
36
+ types: objectSpread({}, addrIndicesTypes, {
42
37
  BalanceLock: 'BalanceLockTo212',
43
38
  CompactAssignments: 'CompactAssignmentsTo257',
44
39
  DispatchError: 'DispatchErrorTo198',
@@ -57,7 +52,7 @@ const versioned = [{
57
52
  })
58
53
  }, {
59
54
  minmax: [1032, 1042],
60
- types: _objectSpread(_objectSpread({}, addrIndicesTypes), {}, {
55
+ types: objectSpread({}, addrIndicesTypes, {
61
56
  BalanceLock: 'BalanceLockTo212',
62
57
  CompactAssignments: 'CompactAssignmentsTo257',
63
58
  DispatchInfo: 'DispatchInfoTo244',
@@ -75,7 +70,7 @@ const versioned = [{
75
70
  }, {
76
71
  // actual at 1045 (1043-1044 is dev)
77
72
  minmax: [1043, 1045],
78
- types: _objectSpread(_objectSpread({}, addrIndicesTypes), {}, {
73
+ types: objectSpread({}, addrIndicesTypes, {
79
74
  BalanceLock: 'BalanceLockTo212',
80
75
  CompactAssignments: 'CompactAssignmentsTo257',
81
76
  DispatchInfo: 'DispatchInfoTo244',
@@ -91,7 +86,7 @@ const versioned = [{
91
86
  })
92
87
  }, {
93
88
  minmax: [1046, 1054],
94
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
89
+ types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
95
90
  CompactAssignments: 'CompactAssignmentsTo257',
96
91
  DispatchInfo: 'DispatchInfoTo244',
97
92
  Heartbeat: 'HeartbeatTo244',
@@ -104,7 +99,7 @@ const versioned = [{
104
99
  })
105
100
  }, {
106
101
  minmax: [1055, 1056],
107
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
102
+ types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
108
103
  CompactAssignments: 'CompactAssignmentsTo257',
109
104
  DispatchInfo: 'DispatchInfoTo244',
110
105
  Heartbeat: 'HeartbeatTo244',
@@ -116,7 +111,7 @@ const versioned = [{
116
111
  })
117
112
  }, {
118
113
  minmax: [1057, 1061],
119
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
114
+ types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
120
115
  CompactAssignments: 'CompactAssignmentsTo257',
121
116
  DispatchInfo: 'DispatchInfoTo244',
122
117
  Heartbeat: 'HeartbeatTo244',
@@ -125,48 +120,48 @@ const versioned = [{
125
120
  })
126
121
  }, {
127
122
  minmax: [1062, 2012],
128
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
123
+ types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
129
124
  CompactAssignments: 'CompactAssignmentsTo257',
130
125
  OpenTip: 'OpenTipTo225',
131
126
  RefCount: 'RefCountTo259'
132
127
  })
133
128
  }, {
134
129
  minmax: [2013, 2022],
135
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
130
+ types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
136
131
  CompactAssignments: 'CompactAssignmentsTo257',
137
132
  RefCount: 'RefCountTo259'
138
133
  })
139
134
  }, {
140
135
  minmax: [2023, 2024],
141
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
136
+ types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
142
137
  RefCount: 'RefCountTo259'
143
138
  })
144
139
  }, {
145
140
  minmax: [2025, 2027],
146
- types: _objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes)
141
+ types: objectSpread({}, sharedTypes, addrAccountIdTypes)
147
142
  }, {
148
143
  minmax: [2028, 2029],
149
- types: _objectSpread(_objectSpread({}, sharedTypes), {}, {
144
+ types: objectSpread({}, sharedTypes, {
150
145
  AccountInfo: 'AccountInfoWithDualRefCount',
151
146
  CompactAssignments: 'CompactAssignmentsWith16',
152
147
  RawSolution: 'RawSolutionWith16'
153
148
  })
154
149
  }, {
155
150
  minmax: [2030, 9000],
156
- types: _objectSpread(_objectSpread({}, sharedTypes), {}, {
151
+ types: objectSpread({}, sharedTypes, {
157
152
  CompactAssignments: 'CompactAssignmentsWith16',
158
153
  RawSolution: 'RawSolutionWith16'
159
154
  })
160
155
  }, {
161
156
  minmax: [9010, 9099],
162
- types: _objectSpread(_objectSpread({}, sharedTypes), mapXcmTypes('V0'))
157
+ types: objectSpread({}, sharedTypes, mapXcmTypes('V0'))
163
158
  }, {
164
159
  // jump from 9100 to 9110, however align with Rococo
165
160
  minmax: [9100, 9105],
166
- types: _objectSpread(_objectSpread({}, sharedTypes), mapXcmTypes('V1'))
161
+ types: objectSpread({}, sharedTypes, mapXcmTypes('V1'))
167
162
  }, {
168
163
  // metadata v14
169
164
  minmax: [9106, undefined],
170
- types: _objectSpread({}, sharedTypes)
165
+ types: objectSpread({}, sharedTypes)
171
166
  }];
172
167
  export default versioned;
package/spec/polkadot.cjs CHANGED
@@ -1,17 +1,11 @@
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.default = void 0;
9
7
 
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
-
12
- 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; }
13
-
14
- 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; }
8
+ var _util = require("@polkadot/util");
15
9
 
16
10
  // Copyright 2017-2021 @polkadot/types-known authors & contributors
17
11
  // SPDX-License-Identifier: Apache-2.0
@@ -44,37 +38,37 @@ const addrAccountIdTypes = {
44
38
 
45
39
  const versioned = [{
46
40
  minmax: [0, 12],
47
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
41
+ types: (0, _util.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
48
42
  CompactAssignments: 'CompactAssignmentsTo257',
49
43
  OpenTip: 'OpenTipTo225',
50
44
  RefCount: 'RefCountTo259'
51
45
  })
52
46
  }, {
53
47
  minmax: [13, 22],
54
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
48
+ types: (0, _util.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
55
49
  CompactAssignments: 'CompactAssignmentsTo257',
56
50
  RefCount: 'RefCountTo259'
57
51
  })
58
52
  }, {
59
53
  minmax: [23, 24],
60
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
54
+ types: (0, _util.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
61
55
  RefCount: 'RefCountTo259'
62
56
  })
63
57
  }, {
64
58
  minmax: [25, 27],
65
- types: _objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes)
59
+ types: (0, _util.objectSpread)({}, sharedTypes, addrAccountIdTypes)
66
60
  }, {
67
61
  minmax: [28, 29],
68
- types: _objectSpread(_objectSpread({}, sharedTypes), {}, {
62
+ types: (0, _util.objectSpread)({}, sharedTypes, {
69
63
  AccountInfo: 'AccountInfoWithDualRefCount'
70
64
  })
71
65
  }, {
72
66
  minmax: [30, 9109],
73
- types: _objectSpread({}, sharedTypes)
67
+ types: (0, _util.objectSpread)({}, sharedTypes)
74
68
  }, {
75
69
  // metadata v14
76
70
  minmax: [9110, undefined],
77
- types: _objectSpread({}, sharedTypes)
71
+ types: (0, _util.objectSpread)({}, sharedTypes)
78
72
  }];
79
73
  var _default = versioned;
80
74
  exports.default = _default;
package/spec/polkadot.js CHANGED
@@ -1,13 +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
 
10
4
  /* eslint-disable sort-keys */
5
+ import { objectSpread } from '@polkadot/util';
11
6
  const sharedTypes = {
12
7
  CompactAssignments: 'CompactAssignmentsWith16',
13
8
  RawSolution: 'RawSolutionWith16',
@@ -35,36 +30,36 @@ const addrAccountIdTypes = {
35
30
 
36
31
  const versioned = [{
37
32
  minmax: [0, 12],
38
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
33
+ types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
39
34
  CompactAssignments: 'CompactAssignmentsTo257',
40
35
  OpenTip: 'OpenTipTo225',
41
36
  RefCount: 'RefCountTo259'
42
37
  })
43
38
  }, {
44
39
  minmax: [13, 22],
45
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
40
+ types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
46
41
  CompactAssignments: 'CompactAssignmentsTo257',
47
42
  RefCount: 'RefCountTo259'
48
43
  })
49
44
  }, {
50
45
  minmax: [23, 24],
51
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
46
+ types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
52
47
  RefCount: 'RefCountTo259'
53
48
  })
54
49
  }, {
55
50
  minmax: [25, 27],
56
- types: _objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes)
51
+ types: objectSpread({}, sharedTypes, addrAccountIdTypes)
57
52
  }, {
58
53
  minmax: [28, 29],
59
- types: _objectSpread(_objectSpread({}, sharedTypes), {}, {
54
+ types: objectSpread({}, sharedTypes, {
60
55
  AccountInfo: 'AccountInfoWithDualRefCount'
61
56
  })
62
57
  }, {
63
58
  minmax: [30, 9109],
64
- types: _objectSpread({}, sharedTypes)
59
+ types: objectSpread({}, sharedTypes)
65
60
  }, {
66
61
  // metadata v14
67
62
  minmax: [9110, undefined],
68
- types: _objectSpread({}, sharedTypes)
63
+ types: objectSpread({}, sharedTypes)
69
64
  }];
70
65
  export default versioned;
package/spec/rococo.cjs CHANGED
@@ -1,20 +1,18 @@
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.default = void 0;
9
7
 
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
8
+ var _util = require("@polkadot/util");
11
9
 
12
10
  var _xcm = require("../xcm.cjs");
13
11
 
14
- 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; }
15
-
16
- 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; }
12
+ // Copyright 2017-2021 @polkadot/types-known authors & contributors
13
+ // SPDX-License-Identifier: Apache-2.0
17
14
 
15
+ /* eslint-disable sort-keys */
18
16
  // structs need to be in order
19
17
 
20
18
  /* eslint-disable sort-keys */
@@ -25,31 +23,31 @@ const sharedTypes = {
25
23
  };
26
24
  const versioned = [{
27
25
  minmax: [0, 200],
28
- types: _objectSpread(_objectSpread({}, sharedTypes), {}, {
26
+ types: (0, _util.objectSpread)({}, sharedTypes, {
29
27
  AccountInfo: 'AccountInfoWithDualRefCount',
30
28
  Address: 'AccountId',
31
29
  LookupSource: 'AccountId'
32
30
  })
33
31
  }, {
34
32
  minmax: [201, 214],
35
- types: _objectSpread(_objectSpread({}, sharedTypes), {}, {
33
+ types: (0, _util.objectSpread)({}, sharedTypes, {
36
34
  AccountInfo: 'AccountInfoWithDualRefCount'
37
35
  })
38
36
  }, {
39
37
  minmax: [215, 228],
40
- types: _objectSpread(_objectSpread({}, sharedTypes), {}, {
38
+ types: (0, _util.objectSpread)({}, sharedTypes, {
41
39
  Keys: 'SessionKeys6'
42
40
  })
43
41
  }, {
44
42
  minmax: [229, 9099],
45
- types: _objectSpread(_objectSpread({}, sharedTypes), (0, _xcm.mapXcmTypes)('V0'))
43
+ types: (0, _util.objectSpread)({}, sharedTypes, (0, _xcm.mapXcmTypes)('V0'))
46
44
  }, {
47
45
  minmax: [9100, 9105],
48
- types: _objectSpread(_objectSpread({}, sharedTypes), (0, _xcm.mapXcmTypes)('V1'))
46
+ types: (0, _util.objectSpread)({}, sharedTypes, (0, _xcm.mapXcmTypes)('V1'))
49
47
  }, {
50
48
  // metadata v14
51
49
  minmax: [9106, undefined],
52
- types: _objectSpread({}, sharedTypes)
50
+ types: (0, _util.objectSpread)({}, sharedTypes)
53
51
  }];
54
52
  var _default = versioned;
55
53
  exports.default = _default;
package/spec/rococo.js CHANGED
@@ -1,13 +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
 
10
4
  /* eslint-disable sort-keys */
5
+ import { objectSpread } from '@polkadot/util';
11
6
  import { mapXcmTypes } from "../xcm.js"; // structs need to be in order
12
7
 
13
8
  /* eslint-disable sort-keys */
@@ -19,30 +14,30 @@ const sharedTypes = {
19
14
  };
20
15
  const versioned = [{
21
16
  minmax: [0, 200],
22
- types: _objectSpread(_objectSpread({}, sharedTypes), {}, {
17
+ types: objectSpread({}, sharedTypes, {
23
18
  AccountInfo: 'AccountInfoWithDualRefCount',
24
19
  Address: 'AccountId',
25
20
  LookupSource: 'AccountId'
26
21
  })
27
22
  }, {
28
23
  minmax: [201, 214],
29
- types: _objectSpread(_objectSpread({}, sharedTypes), {}, {
24
+ types: objectSpread({}, sharedTypes, {
30
25
  AccountInfo: 'AccountInfoWithDualRefCount'
31
26
  })
32
27
  }, {
33
28
  minmax: [215, 228],
34
- types: _objectSpread(_objectSpread({}, sharedTypes), {}, {
29
+ types: objectSpread({}, sharedTypes, {
35
30
  Keys: 'SessionKeys6'
36
31
  })
37
32
  }, {
38
33
  minmax: [229, 9099],
39
- types: _objectSpread(_objectSpread({}, sharedTypes), mapXcmTypes('V0'))
34
+ types: objectSpread({}, sharedTypes, mapXcmTypes('V0'))
40
35
  }, {
41
36
  minmax: [9100, 9105],
42
- types: _objectSpread(_objectSpread({}, sharedTypes), mapXcmTypes('V1'))
37
+ types: objectSpread({}, sharedTypes, mapXcmTypes('V1'))
43
38
  }, {
44
39
  // metadata v14
45
40
  minmax: [9106, undefined],
46
- types: _objectSpread({}, sharedTypes)
41
+ types: objectSpread({}, sharedTypes)
47
42
  }];
48
43
  export default versioned;
@@ -1,20 +1,18 @@
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.default = void 0;
9
7
 
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
8
+ var _util = require("@polkadot/util");
11
9
 
12
10
  var _xcm = require("../xcm.cjs");
13
11
 
14
- 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; }
15
-
16
- 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; }
12
+ // Copyright 2017-2021 @polkadot/types-known authors & contributors
13
+ // SPDX-License-Identifier: Apache-2.0
17
14
 
15
+ /* eslint-disable sort-keys */
18
16
  const sharedTypes = {
19
17
  TAssetBalance: 'u128',
20
18
  ProxyType: {
@@ -24,14 +22,14 @@ const sharedTypes = {
24
22
 
25
23
  const versioned = [{
26
24
  minmax: [0, 3],
27
- types: _objectSpread(_objectSpread({}, sharedTypes), (0, _xcm.mapXcmTypes)('V0'))
25
+ types: (0, _util.objectSpread)({}, sharedTypes, (0, _xcm.mapXcmTypes)('V0'))
28
26
  }, {
29
27
  minmax: [4, 5],
30
- types: _objectSpread(_objectSpread({}, sharedTypes), (0, _xcm.mapXcmTypes)('V1'))
28
+ types: (0, _util.objectSpread)({}, sharedTypes, (0, _xcm.mapXcmTypes)('V1'))
31
29
  }, {
32
30
  // metadata V14
33
31
  minmax: [500, undefined],
34
- types: _objectSpread({}, sharedTypes)
32
+ types: (0, _util.objectSpread)({}, sharedTypes)
35
33
  }];
36
34
  var _default = versioned;
37
35
  exports.default = _default;
package/spec/statemint.js CHANGED
@@ -1,13 +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
 
10
4
  /* eslint-disable sort-keys */
5
+ import { objectSpread } from '@polkadot/util';
11
6
  import { mapXcmTypes } from "../xcm.js";
12
7
  const sharedTypes = {
13
8
  TAssetBalance: 'u128',
@@ -18,13 +13,13 @@ const sharedTypes = {
18
13
 
19
14
  const versioned = [{
20
15
  minmax: [0, 3],
21
- types: _objectSpread(_objectSpread({}, sharedTypes), mapXcmTypes('V0'))
16
+ types: objectSpread({}, sharedTypes, mapXcmTypes('V0'))
22
17
  }, {
23
18
  minmax: [4, 5],
24
- types: _objectSpread(_objectSpread({}, sharedTypes), mapXcmTypes('V1'))
19
+ types: objectSpread({}, sharedTypes, mapXcmTypes('V1'))
25
20
  }, {
26
21
  // metadata V14
27
22
  minmax: [500, undefined],
28
- types: _objectSpread({}, sharedTypes)
23
+ types: objectSpread({}, sharedTypes)
29
24
  }];
30
25
  export default versioned;
package/spec/westend.cjs CHANGED
@@ -1,20 +1,18 @@
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.default = void 0;
9
7
 
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
8
+ var _util = require("@polkadot/util");
11
9
 
12
10
  var _xcm = require("../xcm.cjs");
13
11
 
14
- 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; }
15
-
16
- 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; }
12
+ // Copyright 2017-2021 @polkadot/types-known authors & contributors
13
+ // SPDX-License-Identifier: Apache-2.0
17
14
 
15
+ /* eslint-disable sort-keys */
18
16
  const sharedTypes = {
19
17
  // 16 validators
20
18
  CompactAssignments: 'CompactAssignmentsWith16',
@@ -36,7 +34,7 @@ const addrAccountIdTypes = {
36
34
  };
37
35
  const versioned = [{
38
36
  minmax: [1, 2],
39
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
37
+ types: (0, _util.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
40
38
  CompactAssignments: 'CompactAssignmentsTo257',
41
39
  DispatchInfo: 'DispatchInfoTo244',
42
40
  Heartbeat: 'HeartbeatTo244',
@@ -47,7 +45,7 @@ const versioned = [{
47
45
  })
48
46
  }, {
49
47
  minmax: [3, 22],
50
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
48
+ types: (0, _util.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
51
49
  CompactAssignments: 'CompactAssignmentsTo257',
52
50
  DispatchInfo: 'DispatchInfoTo244',
53
51
  Heartbeat: 'HeartbeatTo244',
@@ -56,7 +54,7 @@ const versioned = [{
56
54
  })
57
55
  }, {
58
56
  minmax: [23, 42],
59
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
57
+ types: (0, _util.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
60
58
  CompactAssignments: 'CompactAssignmentsTo257',
61
59
  DispatchInfo: 'DispatchInfoTo244',
62
60
  Heartbeat: 'HeartbeatTo244',
@@ -64,29 +62,29 @@ const versioned = [{
64
62
  })
65
63
  }, {
66
64
  minmax: [43, 44],
67
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
65
+ types: (0, _util.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
68
66
  DispatchInfo: 'DispatchInfoTo244',
69
67
  Heartbeat: 'HeartbeatTo244',
70
68
  RefCount: 'RefCountTo259'
71
69
  })
72
70
  }, {
73
71
  minmax: [45, 47],
74
- types: _objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes)
72
+ types: (0, _util.objectSpread)({}, sharedTypes, addrAccountIdTypes)
75
73
  }, {
76
74
  minmax: [48, 49],
77
- types: _objectSpread(_objectSpread({}, sharedTypes), {}, {
75
+ types: (0, _util.objectSpread)({}, sharedTypes, {
78
76
  AccountInfo: 'AccountInfoWithDualRefCount'
79
77
  })
80
78
  }, {
81
79
  minmax: [50, 9099],
82
- types: _objectSpread(_objectSpread({}, sharedTypes), (0, _xcm.mapXcmTypes)('V0'))
80
+ types: (0, _util.objectSpread)({}, sharedTypes, (0, _xcm.mapXcmTypes)('V0'))
83
81
  }, {
84
82
  minmax: [9100, 9105],
85
- types: _objectSpread(_objectSpread({}, sharedTypes), (0, _xcm.mapXcmTypes)('V1'))
83
+ types: (0, _util.objectSpread)({}, sharedTypes, (0, _xcm.mapXcmTypes)('V1'))
86
84
  }, {
87
85
  // metadata v14
88
86
  minmax: [9106, undefined],
89
- types: _objectSpread({}, sharedTypes)
87
+ types: (0, _util.objectSpread)({}, sharedTypes)
90
88
  }];
91
89
  var _default = versioned;
92
90
  exports.default = _default;
package/spec/westend.js CHANGED
@@ -1,13 +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
 
10
4
  /* eslint-disable sort-keys */
5
+ import { objectSpread } from '@polkadot/util';
11
6
  import { mapXcmTypes } from "../xcm.js";
12
7
  const sharedTypes = {
13
8
  // 16 validators
@@ -30,7 +25,7 @@ const addrAccountIdTypes = {
30
25
  };
31
26
  const versioned = [{
32
27
  minmax: [1, 2],
33
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
28
+ types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
34
29
  CompactAssignments: 'CompactAssignmentsTo257',
35
30
  DispatchInfo: 'DispatchInfoTo244',
36
31
  Heartbeat: 'HeartbeatTo244',
@@ -41,7 +36,7 @@ const versioned = [{
41
36
  })
42
37
  }, {
43
38
  minmax: [3, 22],
44
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
39
+ types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
45
40
  CompactAssignments: 'CompactAssignmentsTo257',
46
41
  DispatchInfo: 'DispatchInfoTo244',
47
42
  Heartbeat: 'HeartbeatTo244',
@@ -50,7 +45,7 @@ const versioned = [{
50
45
  })
51
46
  }, {
52
47
  minmax: [23, 42],
53
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
48
+ types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
54
49
  CompactAssignments: 'CompactAssignmentsTo257',
55
50
  DispatchInfo: 'DispatchInfoTo244',
56
51
  Heartbeat: 'HeartbeatTo244',
@@ -58,28 +53,28 @@ const versioned = [{
58
53
  })
59
54
  }, {
60
55
  minmax: [43, 44],
61
- types: _objectSpread(_objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes), {}, {
56
+ types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
62
57
  DispatchInfo: 'DispatchInfoTo244',
63
58
  Heartbeat: 'HeartbeatTo244',
64
59
  RefCount: 'RefCountTo259'
65
60
  })
66
61
  }, {
67
62
  minmax: [45, 47],
68
- types: _objectSpread(_objectSpread({}, sharedTypes), addrAccountIdTypes)
63
+ types: objectSpread({}, sharedTypes, addrAccountIdTypes)
69
64
  }, {
70
65
  minmax: [48, 49],
71
- types: _objectSpread(_objectSpread({}, sharedTypes), {}, {
66
+ types: objectSpread({}, sharedTypes, {
72
67
  AccountInfo: 'AccountInfoWithDualRefCount'
73
68
  })
74
69
  }, {
75
70
  minmax: [50, 9099],
76
- types: _objectSpread(_objectSpread({}, sharedTypes), mapXcmTypes('V0'))
71
+ types: objectSpread({}, sharedTypes, mapXcmTypes('V0'))
77
72
  }, {
78
73
  minmax: [9100, 9105],
79
- types: _objectSpread(_objectSpread({}, sharedTypes), mapXcmTypes('V1'))
74
+ types: objectSpread({}, sharedTypes, mapXcmTypes('V1'))
80
75
  }, {
81
76
  // metadata v14
82
77
  minmax: [9106, undefined],
83
- types: _objectSpread({}, sharedTypes)
78
+ types: objectSpread({}, sharedTypes)
84
79
  }];
85
80
  export default versioned;
@@ -43,16 +43,20 @@ function checkOrder(network, versions) {
43
43
  /** @internal */
44
44
 
45
45
 
46
- function mapRaw([network, versions]) {
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(([blockNumber, specVersion]) => ({
53
- blockNumber: new _util.BN(blockNumber),
54
- specVersion: new _util.BN(specVersion)
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,18 +1,12 @@
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
8
 
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; }
9
+ var _util = require("@polkadot/util");
16
10
 
17
11
  // Copyright 2017-2021 @polkadot/types-known authors & contributors
18
12
  // SPDX-License-Identifier: Apache-2.0
@@ -20,7 +14,7 @@ const XCM_MAPPINGS = ['AssetInstance', 'Fungibility', 'Junction', 'Junctions', '
20
14
  exports.XCM_MAPPINGS = XCM_MAPPINGS;
21
15
 
22
16
  function mapXcmTypes(version) {
23
- return XCM_MAPPINGS.reduce((all, key) => _objectSpread(_objectSpread({}, all), {}, {
17
+ return XCM_MAPPINGS.reduce((all, key) => (0, _util.objectSpread)(all, {
24
18
  [key]: `${key}${version}`
25
19
  }), {});
26
20
  }
package/xcm.js CHANGED
@@ -1,14 +1,9 @@
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
3
+ import { objectSpread } from '@polkadot/util';
9
4
  export const XCM_MAPPINGS = ['AssetInstance', 'Fungibility', 'Junction', 'Junctions', 'MultiAsset', 'MultiAssetFilter', 'MultiLocation', 'Response', 'WildFungibility', 'WildMultiAsset', 'Xcm', 'XcmError', 'XcmOrder'];
10
5
  export function mapXcmTypes(version) {
11
- return XCM_MAPPINGS.reduce((all, key) => _objectSpread(_objectSpread({}, all), {}, {
6
+ return XCM_MAPPINGS.reduce((all, key) => objectSpread(all, {
12
7
  [key]: `${key}${version}`
13
8
  }), {});
14
9
  }