@polkadot/types-known 8.9.2-4 → 8.9.2-7
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/cjs/packageInfo.js +1 -1
- package/cjs/upgrades/index.js +10 -2
- package/mod.d.ts +1 -0
- package/mod.ts +4 -0
- package/package.json +6 -4
- package/packageInfo.js +1 -1
- package/upgrades/index.js +11 -3
package/cjs/packageInfo.js
CHANGED
package/cjs/upgrades/index.js
CHANGED
|
@@ -37,7 +37,11 @@ function checkOrder(network, versions) {
|
|
|
37
37
|
const prev = versions[index - 1];
|
|
38
38
|
return index === 0 ? false : curr[0] <= prev[0] || curr[1] <= prev[1];
|
|
39
39
|
});
|
|
40
|
-
|
|
40
|
+
|
|
41
|
+
if (ooo.length) {
|
|
42
|
+
throw new Error(`${network}: Mismatched upgrade ordering: ${(0, _util.stringify)(ooo)}`);
|
|
43
|
+
}
|
|
44
|
+
|
|
41
45
|
return versions;
|
|
42
46
|
}
|
|
43
47
|
/** @internal */
|
|
@@ -46,7 +50,11 @@ function checkOrder(network, versions) {
|
|
|
46
50
|
function mapRaw(_ref) {
|
|
47
51
|
let [network, versions] = _ref;
|
|
48
52
|
const chain = _networks.selectableNetworks.find(n => n.network === network) || NET_EXTRA[network];
|
|
49
|
-
|
|
53
|
+
|
|
54
|
+
if (!chain) {
|
|
55
|
+
throw new Error(`Unable to find info for chain ${network}`);
|
|
56
|
+
}
|
|
57
|
+
|
|
50
58
|
return {
|
|
51
59
|
genesisHash: (0, _util.hexToU8a)(chain.genesisHash[0]),
|
|
52
60
|
network,
|
package/mod.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index';
|
package/mod.ts
ADDED
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"./cjs/detectPackage.js"
|
|
21
21
|
],
|
|
22
22
|
"type": "module",
|
|
23
|
-
"version": "8.9.2-
|
|
23
|
+
"version": "8.9.2-7",
|
|
24
24
|
"main": "./cjs/index.js",
|
|
25
25
|
"module": "./index.js",
|
|
26
26
|
"types": "./index.d.ts",
|
|
@@ -52,6 +52,8 @@
|
|
|
52
52
|
"require": "./cjs/detectPackage.js",
|
|
53
53
|
"default": "./detectPackage.js"
|
|
54
54
|
},
|
|
55
|
+
"./mod.d.ts": "./mod.d.ts",
|
|
56
|
+
"./mod.ts": "./mod.ts",
|
|
55
57
|
"./package.json": "./package.json",
|
|
56
58
|
"./packageInfo.js": {
|
|
57
59
|
"types": "./packageInfo.d.ts",
|
|
@@ -147,9 +149,9 @@
|
|
|
147
149
|
"dependencies": {
|
|
148
150
|
"@babel/runtime": "^7.18.3",
|
|
149
151
|
"@polkadot/networks": "^9.5.1",
|
|
150
|
-
"@polkadot/types": "8.9.2-
|
|
151
|
-
"@polkadot/types-codec": "8.9.2-
|
|
152
|
-
"@polkadot/types-create": "8.9.2-
|
|
152
|
+
"@polkadot/types": "8.9.2-7",
|
|
153
|
+
"@polkadot/types-codec": "8.9.2-7",
|
|
154
|
+
"@polkadot/types-create": "8.9.2-7",
|
|
153
155
|
"@polkadot/util": "^9.5.1"
|
|
154
156
|
}
|
|
155
157
|
}
|
package/packageInfo.js
CHANGED
|
@@ -5,5 +5,5 @@ export const packageInfo = {
|
|
|
5
5
|
name: '@polkadot/types-known',
|
|
6
6
|
path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
|
|
7
7
|
type: 'esm',
|
|
8
|
-
version: '8.9.2-
|
|
8
|
+
version: '8.9.2-7'
|
|
9
9
|
};
|
package/upgrades/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright 2017-2022 @polkadot/types-known authors & contributors
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { selectableNetworks } from '@polkadot/networks';
|
|
4
|
-
import {
|
|
4
|
+
import { BN, hexToU8a, stringify } from '@polkadot/util';
|
|
5
5
|
import kusama from "./kusama.js";
|
|
6
6
|
import polkadot from "./polkadot.js";
|
|
7
7
|
import westend from "./westend.js";
|
|
@@ -23,7 +23,11 @@ function checkOrder(network, versions) {
|
|
|
23
23
|
const prev = versions[index - 1];
|
|
24
24
|
return index === 0 ? false : curr[0] <= prev[0] || curr[1] <= prev[1];
|
|
25
25
|
});
|
|
26
|
-
|
|
26
|
+
|
|
27
|
+
if (ooo.length) {
|
|
28
|
+
throw new Error(`${network}: Mismatched upgrade ordering: ${stringify(ooo)}`);
|
|
29
|
+
}
|
|
30
|
+
|
|
27
31
|
return versions;
|
|
28
32
|
}
|
|
29
33
|
/** @internal */
|
|
@@ -31,7 +35,11 @@ function checkOrder(network, versions) {
|
|
|
31
35
|
|
|
32
36
|
function mapRaw([network, versions]) {
|
|
33
37
|
const chain = selectableNetworks.find(n => n.network === network) || NET_EXTRA[network];
|
|
34
|
-
|
|
38
|
+
|
|
39
|
+
if (!chain) {
|
|
40
|
+
throw new Error(`Unable to find info for chain ${network}`);
|
|
41
|
+
}
|
|
42
|
+
|
|
35
43
|
return {
|
|
36
44
|
genesisHash: hexToU8a(chain.genesisHash[0]),
|
|
37
45
|
network,
|