@polkadot/types-known 10.4.1 → 10.5.1

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.
Files changed (65) hide show
  1. package/chain/index.d.ts +1 -2
  2. package/chain/index.js +1 -2
  3. package/cjs/chain/index.js +2 -2
  4. package/cjs/packageInfo.js +1 -1
  5. package/cjs/spec/centrifuge-chain.js +10 -9
  6. package/cjs/spec/index.js +22 -23
  7. package/cjs/spec/kusama.js +57 -30
  8. package/cjs/spec/node-template.js +2 -2
  9. package/cjs/spec/node.js +2 -2
  10. package/cjs/spec/polkadot.js +22 -13
  11. package/cjs/spec/rococo.js +19 -11
  12. package/cjs/spec/shell.js +2 -2
  13. package/cjs/spec/statemint.js +12 -9
  14. package/cjs/spec/westend.js +33 -16
  15. package/cjs/upgrades/e2e/index.js +3 -6
  16. package/cjs/upgrades/e2e/kusama.js +2 -2
  17. package/cjs/upgrades/e2e/polkadot.js +2 -2
  18. package/cjs/upgrades/e2e/westend.js +2 -2
  19. package/cjs/upgrades/index.js +2 -2
  20. package/cjs/upgrades/manual/index.js +3 -6
  21. package/cjs/upgrades/manual/kusama.js +2 -2
  22. package/cjs/upgrades/manual/polkadot.js +2 -2
  23. package/cjs/upgrades/manual/westend.js +2 -2
  24. package/cjs/util.js +36 -18
  25. package/package.json +6 -6
  26. package/packageInfo.js +1 -1
  27. package/spec/centrifuge-chain.d.ts +1 -2
  28. package/spec/centrifuge-chain.js +9 -9
  29. package/spec/index.d.ts +1 -2
  30. package/spec/index.js +10 -11
  31. package/spec/kusama.d.ts +1 -2
  32. package/spec/kusama.js +56 -30
  33. package/spec/node-template.d.ts +1 -2
  34. package/spec/node-template.js +1 -2
  35. package/spec/node.d.ts +1 -2
  36. package/spec/node.js +1 -2
  37. package/spec/polkadot.d.ts +1 -2
  38. package/spec/polkadot.js +21 -13
  39. package/spec/rococo.d.ts +1 -2
  40. package/spec/rococo.js +18 -11
  41. package/spec/shell.d.ts +1 -2
  42. package/spec/shell.js +1 -2
  43. package/spec/statemint.d.ts +1 -2
  44. package/spec/statemint.js +11 -9
  45. package/spec/westend.d.ts +1 -2
  46. package/spec/westend.js +32 -16
  47. package/upgrades/e2e/index.d.ts +3 -3
  48. package/upgrades/e2e/index.js +3 -3
  49. package/upgrades/e2e/kusama.d.ts +1 -2
  50. package/upgrades/e2e/kusama.js +1 -2
  51. package/upgrades/e2e/polkadot.d.ts +1 -2
  52. package/upgrades/e2e/polkadot.js +1 -2
  53. package/upgrades/e2e/westend.d.ts +1 -2
  54. package/upgrades/e2e/westend.js +1 -2
  55. package/upgrades/index.d.ts +1 -2
  56. package/upgrades/index.js +1 -2
  57. package/upgrades/manual/index.d.ts +3 -3
  58. package/upgrades/manual/index.js +3 -3
  59. package/upgrades/manual/kusama.d.ts +1 -2
  60. package/upgrades/manual/kusama.js +1 -2
  61. package/upgrades/manual/polkadot.d.ts +1 -2
  62. package/upgrades/manual/polkadot.js +1 -2
  63. package/upgrades/manual/westend.d.ts +1 -2
  64. package/upgrades/manual/westend.js +1 -2
  65. package/util.js +36 -17
package/chain/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
1
  import type { OverrideVersionedType } from '@polkadot/types/types';
2
- declare const typesChain: Record<string, OverrideVersionedType[]>;
3
- export default typesChain;
2
+ export declare const typesChain: Record<string, OverrideVersionedType[]>;
package/chain/index.js CHANGED
@@ -1,2 +1 @@
1
- const typesChain = {};
2
- export default typesChain;
1
+ export const typesChain = {};
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const typesChain = {};
4
- exports.default = typesChain;
3
+ exports.typesChain = void 0;
4
+ exports.typesChain = {};
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.packageInfo = void 0;
4
- exports.packageInfo = { name: '@polkadot/types-known', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '10.4.1' };
4
+ exports.packageInfo = { name: '@polkadot/types-known', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '10.5.1' };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const util_1 = require("@polkadot/util");
3
+ exports.versioned = void 0;
4
4
  const sharedTypes = {
5
5
  // Anchor
6
6
  AnchorData: {
@@ -70,17 +70,19 @@ const sharedTypes = {
70
70
  ]
71
71
  }
72
72
  };
73
- const standaloneTypes = (0, util_1.objectSpread)({}, sharedTypes, {
73
+ const standaloneTypes = {
74
+ ...sharedTypes,
74
75
  AccountInfo: 'AccountInfoWithRefCount',
75
76
  Address: 'LookupSource',
76
77
  LookupSource: 'IndicesLookupSource',
77
78
  Multiplier: 'Fixed64',
78
79
  RefCount: 'RefCountTo259'
79
- });
80
- const versioned = [
80
+ };
81
+ exports.versioned = [
81
82
  {
82
83
  minmax: [240, 243],
83
- types: (0, util_1.objectSpread)({}, standaloneTypes, {
84
+ types: {
85
+ ...standaloneTypes,
84
86
  ProxyType: {
85
87
  _enum: [
86
88
  'Any',
@@ -90,15 +92,14 @@ const versioned = [
90
92
  'Vesting'
91
93
  ]
92
94
  }
93
- })
95
+ }
94
96
  },
95
97
  {
96
98
  minmax: [244, 999],
97
- types: (0, util_1.objectSpread)({}, standaloneTypes)
99
+ types: { ...standaloneTypes }
98
100
  },
99
101
  {
100
102
  minmax: [1000, undefined],
101
- types: (0, util_1.objectSpread)({}, sharedTypes)
103
+ types: { ...sharedTypes }
102
104
  }
103
105
  ];
104
- exports.default = versioned;
package/cjs/spec/index.js CHANGED
@@ -1,26 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const centrifuge_chain_js_1 = tslib_1.__importDefault(require("./centrifuge-chain.js"));
5
- const kusama_js_1 = tslib_1.__importDefault(require("./kusama.js"));
6
- const node_js_1 = tslib_1.__importDefault(require("./node.js"));
7
- const node_template_js_1 = tslib_1.__importDefault(require("./node-template.js"));
8
- const polkadot_js_1 = tslib_1.__importDefault(require("./polkadot.js"));
9
- const rococo_js_1 = tslib_1.__importDefault(require("./rococo.js"));
10
- const shell_js_1 = tslib_1.__importDefault(require("./shell.js"));
11
- const statemint_js_1 = tslib_1.__importDefault(require("./statemint.js"));
12
- const westend_js_1 = tslib_1.__importDefault(require("./westend.js"));
13
- const typesSpec = {
14
- 'centrifuge-chain': centrifuge_chain_js_1.default,
15
- kusama: kusama_js_1.default,
16
- node: node_js_1.default,
17
- 'node-template': node_template_js_1.default,
18
- polkadot: polkadot_js_1.default,
19
- rococo: rococo_js_1.default,
20
- shell: shell_js_1.default,
21
- statemine: statemint_js_1.default,
22
- statemint: statemint_js_1.default,
23
- westend: westend_js_1.default,
24
- westmint: statemint_js_1.default
3
+ exports.typesSpec = void 0;
4
+ const centrifuge_chain_js_1 = require("./centrifuge-chain.js");
5
+ const kusama_js_1 = require("./kusama.js");
6
+ const node_js_1 = require("./node.js");
7
+ const node_template_js_1 = require("./node-template.js");
8
+ const polkadot_js_1 = require("./polkadot.js");
9
+ const rococo_js_1 = require("./rococo.js");
10
+ const shell_js_1 = require("./shell.js");
11
+ const statemint_js_1 = require("./statemint.js");
12
+ const westend_js_1 = require("./westend.js");
13
+ exports.typesSpec = {
14
+ 'centrifuge-chain': centrifuge_chain_js_1.versioned,
15
+ kusama: kusama_js_1.versioned,
16
+ node: node_js_1.versioned,
17
+ 'node-template': node_template_js_1.versioned,
18
+ polkadot: polkadot_js_1.versioned,
19
+ rococo: rococo_js_1.versioned,
20
+ shell: shell_js_1.versioned,
21
+ statemine: statemint_js_1.versioned,
22
+ statemint: statemint_js_1.versioned,
23
+ westend: westend_js_1.versioned,
24
+ westmint: statemint_js_1.versioned
25
25
  };
26
- exports.default = typesSpec;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.versioned = void 0;
3
4
  const types_create_1 = require("@polkadot/types-create");
4
- const util_1 = require("@polkadot/util");
5
5
  const sharedTypes = {
6
6
  CompactAssignments: 'CompactAssignmentsWith24',
7
7
  DispatchErrorModule: 'DispatchErrorModuleU8',
@@ -32,11 +32,12 @@ const addrAccountIdTypes = {
32
32
  LookupSource: 'AccountId',
33
33
  ValidatorPrefs: 'ValidatorPrefsWithCommission'
34
34
  };
35
- const versioned = [
35
+ exports.versioned = [
36
36
  {
37
37
  // 1020 is first CC3
38
38
  minmax: [1019, 1031],
39
- types: (0, util_1.objectSpread)({}, addrIndicesTypes, {
39
+ types: {
40
+ ...addrIndicesTypes,
40
41
  BalanceLock: 'BalanceLockTo212',
41
42
  CompactAssignments: 'CompactAssignmentsTo257',
42
43
  DispatchError: 'DispatchErrorTo198',
@@ -52,11 +53,12 @@ const versioned = [
52
53
  StakingLedger: 'StakingLedgerTo223',
53
54
  Votes: 'VotesTo230',
54
55
  Weight: 'u32'
55
- })
56
+ }
56
57
  },
57
58
  {
58
59
  minmax: [1032, 1042],
59
- types: (0, util_1.objectSpread)({}, addrIndicesTypes, {
60
+ types: {
61
+ ...addrIndicesTypes,
60
62
  BalanceLock: 'BalanceLockTo212',
61
63
  CompactAssignments: 'CompactAssignmentsTo257',
62
64
  DispatchInfo: 'DispatchInfoTo244',
@@ -70,12 +72,13 @@ const versioned = [
70
72
  StakingLedger: 'StakingLedgerTo223',
71
73
  Votes: 'VotesTo230',
72
74
  Weight: 'u32'
73
- })
75
+ }
74
76
  },
75
77
  {
76
78
  // actual at 1045 (1043-1044 is dev)
77
79
  minmax: [1043, 1045],
78
- types: (0, util_1.objectSpread)({}, addrIndicesTypes, {
80
+ types: {
81
+ ...addrIndicesTypes,
79
82
  BalanceLock: 'BalanceLockTo212',
80
83
  CompactAssignments: 'CompactAssignmentsTo257',
81
84
  DispatchInfo: 'DispatchInfoTo244',
@@ -88,11 +91,13 @@ const versioned = [
88
91
  StakingLedger: 'StakingLedgerTo223',
89
92
  Votes: 'VotesTo230',
90
93
  Weight: 'u32'
91
- })
94
+ }
92
95
  },
93
96
  {
94
97
  minmax: [1046, 1049],
95
- types: (0, util_1.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
98
+ types: {
99
+ ...sharedTypes,
100
+ ...addrAccountIdTypes,
96
101
  CompactAssignments: 'CompactAssignmentsTo257',
97
102
  DispatchInfo: 'DispatchInfoTo244',
98
103
  Heartbeat: 'HeartbeatTo244',
@@ -102,11 +107,13 @@ const versioned = [
102
107
  ReferendumInfo: 'ReferendumInfoTo239',
103
108
  StakingLedger: 'StakingLedgerTo223',
104
109
  Weight: 'u32'
105
- })
110
+ }
106
111
  },
107
112
  {
108
113
  minmax: [1050, 1054],
109
- types: (0, util_1.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
114
+ types: {
115
+ ...sharedTypes,
116
+ ...addrAccountIdTypes,
110
117
  CompactAssignments: 'CompactAssignmentsTo257',
111
118
  DispatchInfo: 'DispatchInfoTo244',
112
119
  Heartbeat: 'HeartbeatTo244',
@@ -116,11 +123,13 @@ const versioned = [
116
123
  ReferendumInfo: 'ReferendumInfoTo239',
117
124
  StakingLedger: 'StakingLedgerTo240',
118
125
  Weight: 'u32'
119
- })
126
+ }
120
127
  },
121
128
  {
122
129
  minmax: [1055, 1056],
123
- types: (0, util_1.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
130
+ types: {
131
+ ...sharedTypes,
132
+ ...addrAccountIdTypes,
124
133
  CompactAssignments: 'CompactAssignmentsTo257',
125
134
  DispatchInfo: 'DispatchInfoTo244',
126
135
  Heartbeat: 'HeartbeatTo244',
@@ -129,66 +138,85 @@ const versioned = [
129
138
  RefCount: 'RefCountTo259',
130
139
  StakingLedger: 'StakingLedgerTo240',
131
140
  Weight: 'u32'
132
- })
141
+ }
133
142
  },
134
143
  {
135
144
  minmax: [1057, 1061],
136
- types: (0, util_1.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
145
+ types: {
146
+ ...sharedTypes,
147
+ ...addrAccountIdTypes,
137
148
  CompactAssignments: 'CompactAssignmentsTo257',
138
149
  DispatchInfo: 'DispatchInfoTo244',
139
150
  Heartbeat: 'HeartbeatTo244',
140
151
  OpenTip: 'OpenTipTo225',
141
152
  RefCount: 'RefCountTo259'
142
- })
153
+ }
143
154
  },
144
155
  {
145
156
  minmax: [1062, 2012],
146
- types: (0, util_1.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
157
+ types: {
158
+ ...sharedTypes,
159
+ ...addrAccountIdTypes,
147
160
  CompactAssignments: 'CompactAssignmentsTo257',
148
161
  OpenTip: 'OpenTipTo225',
149
162
  RefCount: 'RefCountTo259'
150
- })
163
+ }
151
164
  },
152
165
  {
153
166
  minmax: [2013, 2022],
154
- types: (0, util_1.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
167
+ types: {
168
+ ...sharedTypes,
169
+ ...addrAccountIdTypes,
155
170
  CompactAssignments: 'CompactAssignmentsTo257',
156
171
  RefCount: 'RefCountTo259'
157
- })
172
+ }
158
173
  },
159
174
  {
160
175
  minmax: [2023, 2024],
161
- types: (0, util_1.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
176
+ types: {
177
+ ...sharedTypes,
178
+ ...addrAccountIdTypes,
162
179
  RefCount: 'RefCountTo259'
163
- })
180
+ }
164
181
  },
165
182
  {
166
183
  minmax: [2025, 2027],
167
- types: (0, util_1.objectSpread)({}, sharedTypes, addrAccountIdTypes)
184
+ types: {
185
+ ...sharedTypes,
186
+ ...addrAccountIdTypes
187
+ }
168
188
  },
169
189
  {
170
190
  minmax: [2028, 2029],
171
- types: (0, util_1.objectSpread)({}, sharedTypes, {
191
+ types: {
192
+ ...sharedTypes,
172
193
  AccountInfo: 'AccountInfoWithDualRefCount',
173
194
  CompactAssignments: 'CompactAssignmentsWith16',
174
195
  RawSolution: 'RawSolutionWith16'
175
- })
196
+ }
176
197
  },
177
198
  {
178
199
  minmax: [2030, 9000],
179
- types: (0, util_1.objectSpread)({}, sharedTypes, {
200
+ types: {
201
+ ...sharedTypes,
180
202
  CompactAssignments: 'CompactAssignmentsWith16',
181
203
  RawSolution: 'RawSolutionWith16'
182
- })
204
+ }
183
205
  },
184
206
  {
185
207
  minmax: [9010, 9099],
186
- types: (0, util_1.objectSpread)({}, sharedTypes, (0, types_create_1.mapXcmTypes)('V0'))
208
+ types: {
209
+ ...sharedTypes,
210
+ ...(0, types_create_1.mapXcmTypes)('V0')
211
+ }
187
212
  },
188
213
  {
189
214
  // jump from 9100 to 9110, however align with Rococo
190
215
  minmax: [9100, 9105],
191
- types: (0, util_1.objectSpread)({}, sharedTypes, (0, types_create_1.mapXcmTypes)('V1'))
216
+ types: {
217
+ ...sharedTypes,
218
+ ...(0, types_create_1.mapXcmTypes)('V1')
219
+ }
192
220
  },
193
221
  {
194
222
  // metadata v14
@@ -206,4 +234,3 @@ const versioned = [
206
234
  // }
207
235
  // }
208
236
  ];
209
- exports.default = versioned;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const versioned = [
3
+ exports.versioned = void 0;
4
+ exports.versioned = [
4
5
  {
5
6
  minmax: [0, undefined],
6
7
  types: {
@@ -10,4 +11,3 @@ const versioned = [
10
11
  }
11
12
  }
12
13
  ];
13
- exports.default = versioned;
package/cjs/spec/node.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const versioned = [
3
+ exports.versioned = void 0;
4
+ exports.versioned = [
4
5
  {
5
6
  minmax: [0, undefined],
6
7
  types: {
@@ -10,4 +11,3 @@ const versioned = [
10
11
  }
11
12
  }
12
13
  ];
13
- exports.default = versioned;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const util_1 = require("@polkadot/util");
3
+ exports.versioned = void 0;
4
4
  const sharedTypes = {
5
5
  CompactAssignments: 'CompactAssignmentsWith16',
6
6
  DispatchErrorModule: 'DispatchErrorModuleU8',
@@ -28,41 +28,51 @@ const addrAccountIdTypes = {
28
28
  LookupSource: 'AccountId',
29
29
  ValidatorPrefs: 'ValidatorPrefsWithCommission'
30
30
  };
31
- const versioned = [
31
+ exports.versioned = [
32
32
  {
33
33
  minmax: [0, 12],
34
- types: (0, util_1.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
34
+ types: {
35
+ ...sharedTypes,
36
+ ...addrAccountIdTypes,
35
37
  CompactAssignments: 'CompactAssignmentsTo257',
36
38
  OpenTip: 'OpenTipTo225',
37
39
  RefCount: 'RefCountTo259'
38
- })
40
+ }
39
41
  },
40
42
  {
41
43
  minmax: [13, 22],
42
- types: (0, util_1.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
44
+ types: {
45
+ ...sharedTypes,
46
+ ...addrAccountIdTypes,
43
47
  CompactAssignments: 'CompactAssignmentsTo257',
44
48
  RefCount: 'RefCountTo259'
45
- })
49
+ }
46
50
  },
47
51
  {
48
52
  minmax: [23, 24],
49
- types: (0, util_1.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
53
+ types: {
54
+ ...sharedTypes,
55
+ ...addrAccountIdTypes,
50
56
  RefCount: 'RefCountTo259'
51
- })
57
+ }
52
58
  },
53
59
  {
54
60
  minmax: [25, 27],
55
- types: (0, util_1.objectSpread)({}, sharedTypes, addrAccountIdTypes)
61
+ types: {
62
+ ...sharedTypes,
63
+ ...addrAccountIdTypes
64
+ }
56
65
  },
57
66
  {
58
67
  minmax: [28, 29],
59
- types: (0, util_1.objectSpread)({}, sharedTypes, {
68
+ types: {
69
+ ...sharedTypes,
60
70
  AccountInfo: 'AccountInfoWithDualRefCount'
61
- })
71
+ }
62
72
  },
63
73
  {
64
74
  minmax: [30, 9109],
65
- types: (0, util_1.objectSpread)({}, sharedTypes)
75
+ types: { ...sharedTypes }
66
76
  },
67
77
  {
68
78
  // metadata v14
@@ -80,4 +90,3 @@ const versioned = [
80
90
  // }
81
91
  // }
82
92
  ];
83
- exports.default = versioned;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.versioned = void 0;
3
4
  const types_create_1 = require("@polkadot/types-create");
4
- const util_1 = require("@polkadot/util");
5
5
  /* eslint-disable sort-keys */
6
6
  const sharedTypes = {
7
7
  DispatchErrorModule: 'DispatchErrorModuleU8',
@@ -9,34 +9,43 @@ const sharedTypes = {
9
9
  Keys: 'SessionKeys7B',
10
10
  Weight: 'WeightV1'
11
11
  };
12
- const versioned = [
12
+ exports.versioned = [
13
13
  {
14
14
  minmax: [0, 200],
15
- types: (0, util_1.objectSpread)({}, sharedTypes, {
15
+ types: {
16
+ ...sharedTypes,
16
17
  AccountInfo: 'AccountInfoWithDualRefCount',
17
18
  Address: 'AccountId',
18
19
  LookupSource: 'AccountId'
19
- })
20
+ }
20
21
  },
21
22
  {
22
23
  minmax: [201, 214],
23
- types: (0, util_1.objectSpread)({}, sharedTypes, {
24
+ types: {
25
+ ...sharedTypes,
24
26
  AccountInfo: 'AccountInfoWithDualRefCount'
25
- })
27
+ }
26
28
  },
27
29
  {
28
30
  minmax: [215, 228],
29
- types: (0, util_1.objectSpread)({}, sharedTypes, {
31
+ types: {
32
+ ...sharedTypes,
30
33
  Keys: 'SessionKeys6'
31
- })
34
+ }
32
35
  },
33
36
  {
34
37
  minmax: [229, 9099],
35
- types: (0, util_1.objectSpread)({}, sharedTypes, (0, types_create_1.mapXcmTypes)('V0'))
38
+ types: {
39
+ ...sharedTypes,
40
+ ...(0, types_create_1.mapXcmTypes)('V0')
41
+ }
36
42
  },
37
43
  {
38
44
  minmax: [9100, 9105],
39
- types: (0, util_1.objectSpread)({}, sharedTypes, (0, types_create_1.mapXcmTypes)('V1'))
45
+ types: {
46
+ ...sharedTypes,
47
+ ...(0, types_create_1.mapXcmTypes)('V1')
48
+ }
40
49
  },
41
50
  {
42
51
  // metadata v14
@@ -54,4 +63,3 @@ const versioned = [
54
63
  // }
55
64
  // }
56
65
  ];
57
- exports.default = versioned;
package/cjs/spec/shell.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const versioned = [
3
+ exports.versioned = void 0;
4
+ exports.versioned = [
4
5
  {
5
6
  minmax: [0, undefined],
6
7
  types: {
@@ -8,4 +9,3 @@ const versioned = [
8
9
  }
9
10
  }
10
11
  ];
11
- exports.default = versioned;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.versioned = void 0;
3
4
  const types_create_1 = require("@polkadot/types-create");
4
- const util_1 = require("@polkadot/util");
5
5
  const sharedTypes = {
6
6
  DispatchErrorModule: 'DispatchErrorModuleU8',
7
7
  TAssetBalance: 'u128',
@@ -18,21 +18,25 @@ const sharedTypes = {
18
18
  },
19
19
  Weight: 'WeightV1'
20
20
  };
21
- const versioned = [
21
+ exports.versioned = [
22
22
  {
23
23
  minmax: [0, 3],
24
- types: (0, util_1.objectSpread)({
24
+ types: {
25
25
  // Enum was modified mid-flight -
26
26
  // https://github.com/paritytech/substrate/pull/10382/files#diff-e4e016b33a82268b6208dc974eea841bad47597865a749fee2f937eb6fdf67b4R498
27
- DispatchError: 'DispatchErrorPre6First'
28
- }, sharedTypes, (0, types_create_1.mapXcmTypes)('V0'))
27
+ DispatchError: 'DispatchErrorPre6First',
28
+ ...sharedTypes,
29
+ ...(0, types_create_1.mapXcmTypes)('V0')
30
+ }
29
31
  },
30
32
  {
31
33
  minmax: [4, 5],
32
- types: (0, util_1.objectSpread)({
34
+ types: {
33
35
  // As above, see https://github.com/polkadot-js/api/issues/5301
34
- DispatchError: 'DispatchErrorPre6First'
35
- }, sharedTypes, (0, types_create_1.mapXcmTypes)('V1'))
36
+ DispatchError: 'DispatchErrorPre6First',
37
+ ...sharedTypes,
38
+ ...(0, types_create_1.mapXcmTypes)('V1')
39
+ }
36
40
  },
37
41
  {
38
42
  // metadata V14
@@ -50,4 +54,3 @@ const versioned = [
50
54
  // }
51
55
  // }
52
56
  ];
53
- exports.default = versioned;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.versioned = void 0;
3
4
  const types_create_1 = require("@polkadot/types-create");
4
- const util_1 = require("@polkadot/util");
5
5
  const sharedTypes = {
6
6
  // 16 validators
7
7
  CompactAssignments: 'CompactAssignmentsWith16',
@@ -24,10 +24,12 @@ const addrAccountIdTypes = {
24
24
  RawSolution: 'RawSolutionWith16',
25
25
  ValidatorPrefs: 'ValidatorPrefsWithCommission'
26
26
  };
27
- const versioned = [
27
+ exports.versioned = [
28
28
  {
29
29
  minmax: [1, 2],
30
- types: (0, util_1.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
30
+ types: {
31
+ ...sharedTypes,
32
+ ...addrAccountIdTypes,
31
33
  CompactAssignments: 'CompactAssignmentsTo257',
32
34
  DispatchInfo: 'DispatchInfoTo244',
33
35
  Heartbeat: 'HeartbeatTo244',
@@ -35,52 +37,68 @@ const versioned = [
35
37
  OpenTip: 'OpenTipTo225',
36
38
  RefCount: 'RefCountTo259',
37
39
  Weight: 'u32'
38
- })
40
+ }
39
41
  },
40
42
  {
41
43
  minmax: [3, 22],
42
- types: (0, util_1.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
44
+ types: {
45
+ ...sharedTypes,
46
+ ...addrAccountIdTypes,
43
47
  CompactAssignments: 'CompactAssignmentsTo257',
44
48
  DispatchInfo: 'DispatchInfoTo244',
45
49
  Heartbeat: 'HeartbeatTo244',
46
50
  OpenTip: 'OpenTipTo225',
47
51
  RefCount: 'RefCountTo259'
48
- })
52
+ }
49
53
  },
50
54
  {
51
55
  minmax: [23, 42],
52
- types: (0, util_1.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
56
+ types: {
57
+ ...sharedTypes,
58
+ ...addrAccountIdTypes,
53
59
  CompactAssignments: 'CompactAssignmentsTo257',
54
60
  DispatchInfo: 'DispatchInfoTo244',
55
61
  Heartbeat: 'HeartbeatTo244',
56
62
  RefCount: 'RefCountTo259'
57
- })
63
+ }
58
64
  },
59
65
  {
60
66
  minmax: [43, 44],
61
- types: (0, util_1.objectSpread)({}, sharedTypes, addrAccountIdTypes, {
67
+ types: {
68
+ ...sharedTypes,
69
+ ...addrAccountIdTypes,
62
70
  DispatchInfo: 'DispatchInfoTo244',
63
71
  Heartbeat: 'HeartbeatTo244',
64
72
  RefCount: 'RefCountTo259'
65
- })
73
+ }
66
74
  },
67
75
  {
68
76
  minmax: [45, 47],
69
- types: (0, util_1.objectSpread)({}, sharedTypes, addrAccountIdTypes)
77
+ types: {
78
+ ...sharedTypes,
79
+ ...addrAccountIdTypes
80
+ }
70
81
  },
71
82
  {
72
83
  minmax: [48, 49],
73
- types: (0, util_1.objectSpread)({}, sharedTypes, {
84
+ types: {
85
+ ...sharedTypes,
74
86
  AccountInfo: 'AccountInfoWithDualRefCount'
75
- })
87
+ }
76
88
  },
77
89
  {
78
90
  minmax: [50, 9099],
79
- types: (0, util_1.objectSpread)({}, sharedTypes, (0, types_create_1.mapXcmTypes)('V0'))
91
+ types: {
92
+ ...sharedTypes,
93
+ ...(0, types_create_1.mapXcmTypes)('V0')
94
+ }
80
95
  },
81
96
  {
82
97
  minmax: [9100, 9105],
83
- types: (0, util_1.objectSpread)({}, sharedTypes, (0, types_create_1.mapXcmTypes)('V1'))
98
+ types: {
99
+ ...sharedTypes,
100
+ ...(0, types_create_1.mapXcmTypes)('V1')
101
+ }
84
102
  },
85
103
  {
86
104
  // metadata v14
@@ -98,4 +116,3 @@ const versioned = [
98
116
  // }
99
117
  // }
100
118
  ];
101
- exports.default = versioned;