@polkadot/types-known 6.12.1 → 6.12.2-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.cjs +16 -165
- package/bundle.d.ts +1 -33
- package/bundle.js +2 -115
- package/package.json +4 -99
- package/packageInfo.cjs +1 -1
- package/packageInfo.js +1 -1
- package/chain/index.cjs +0 -12
- package/chain/index.d.ts +0 -3
- package/chain/index.js +0 -5
- package/knownOrigins.cjs +0 -32
- package/knownOrigins.d.ts +0 -1
- package/knownOrigins.js +0 -25
- package/modules.cjs +0 -111
- package/modules.d.ts +0 -3
- package/modules.js +0 -104
- package/spec/centrifuge-chain.cjs +0 -98
- package/spec/centrifuge-chain.d.ts +0 -3
- package/spec/centrifuge-chain.js +0 -89
- package/spec/index.cjs +0 -45
- package/spec/index.d.ts +0 -3
- package/spec/index.js +0 -26
- package/spec/kusama.cjs +0 -177
- package/spec/kusama.d.ts +0 -3
- package/spec/kusama.js +0 -167
- package/spec/node-template.cjs +0 -17
- package/spec/node-template.d.ts +0 -3
- package/spec/node-template.js +0 -10
- package/spec/node.cjs +0 -17
- package/spec/node.d.ts +0 -3
- package/spec/node.js +0 -10
- package/spec/polkadot.cjs +0 -74
- package/spec/polkadot.d.ts +0 -3
- package/spec/polkadot.js +0 -65
- package/spec/rococo.cjs +0 -53
- package/spec/rococo.d.ts +0 -3
- package/spec/rococo.js +0 -43
- package/spec/shell.cjs +0 -17
- package/spec/shell.d.ts +0 -3
- package/spec/shell.js +0 -10
- package/spec/statemint.cjs +0 -35
- package/spec/statemint.d.ts +0 -3
- package/spec/statemint.js +0 -25
- package/spec/westend.cjs +0 -90
- package/spec/westend.d.ts +0 -3
- package/spec/westend.js +0 -80
- package/upgrades/index.cjs +0 -66
- package/upgrades/index.d.ts +0 -3
- package/upgrades/index.js +0 -47
- package/upgrades/kusama.cjs +0 -11
- package/upgrades/kusama.d.ts +0 -3
- package/upgrades/kusama.js +0 -4
- package/upgrades/polkadot.cjs +0 -11
- package/upgrades/polkadot.d.ts +0 -3
- package/upgrades/polkadot.js +0 -4
- package/upgrades/types.cjs +0 -1
- package/upgrades/types.d.ts +0 -1
- package/upgrades/types.js +0 -1
- package/upgrades/westend.cjs +0 -11
- package/upgrades/westend.d.ts +0 -3
- package/upgrades/westend.js +0 -4
- package/xcm.cjs +0 -20
- package/xcm.d.ts +0 -2
- package/xcm.js +0 -9
package/spec/westend.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
// Copyright 2017-2021 @polkadot/types-known authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
/* eslint-disable sort-keys */
|
|
5
|
-
import { objectSpread } from '@polkadot/util';
|
|
6
|
-
import { mapXcmTypes } from "../xcm.js";
|
|
7
|
-
const sharedTypes = {
|
|
8
|
-
// 16 validators
|
|
9
|
-
CompactAssignments: 'CompactAssignmentsWith16',
|
|
10
|
-
RawSolution: 'RawSolutionWith16',
|
|
11
|
-
// general
|
|
12
|
-
Keys: 'SessionKeys6',
|
|
13
|
-
ProxyType: {
|
|
14
|
-
_enum: ['Any', 'NonTransfer', 'Staking', 'SudoBalances', 'IdentityJudgement', 'CancelProxy']
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
const addrAccountIdTypes = {
|
|
18
|
-
AccountInfo: 'AccountInfoWithRefCount',
|
|
19
|
-
Address: 'AccountId',
|
|
20
|
-
CompactAssignments: 'CompactAssignmentsWith16',
|
|
21
|
-
LookupSource: 'AccountId',
|
|
22
|
-
Keys: 'SessionKeys5',
|
|
23
|
-
RawSolution: 'RawSolutionWith16',
|
|
24
|
-
ValidatorPrefs: 'ValidatorPrefsWithCommission'
|
|
25
|
-
};
|
|
26
|
-
const versioned = [{
|
|
27
|
-
minmax: [1, 2],
|
|
28
|
-
types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
|
|
29
|
-
CompactAssignments: 'CompactAssignmentsTo257',
|
|
30
|
-
DispatchInfo: 'DispatchInfoTo244',
|
|
31
|
-
Heartbeat: 'HeartbeatTo244',
|
|
32
|
-
Multiplier: 'Fixed64',
|
|
33
|
-
OpenTip: 'OpenTipTo225',
|
|
34
|
-
RefCount: 'RefCountTo259',
|
|
35
|
-
Weight: 'u32'
|
|
36
|
-
})
|
|
37
|
-
}, {
|
|
38
|
-
minmax: [3, 22],
|
|
39
|
-
types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
|
|
40
|
-
CompactAssignments: 'CompactAssignmentsTo257',
|
|
41
|
-
DispatchInfo: 'DispatchInfoTo244',
|
|
42
|
-
Heartbeat: 'HeartbeatTo244',
|
|
43
|
-
OpenTip: 'OpenTipTo225',
|
|
44
|
-
RefCount: 'RefCountTo259'
|
|
45
|
-
})
|
|
46
|
-
}, {
|
|
47
|
-
minmax: [23, 42],
|
|
48
|
-
types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
|
|
49
|
-
CompactAssignments: 'CompactAssignmentsTo257',
|
|
50
|
-
DispatchInfo: 'DispatchInfoTo244',
|
|
51
|
-
Heartbeat: 'HeartbeatTo244',
|
|
52
|
-
RefCount: 'RefCountTo259'
|
|
53
|
-
})
|
|
54
|
-
}, {
|
|
55
|
-
minmax: [43, 44],
|
|
56
|
-
types: objectSpread({}, sharedTypes, addrAccountIdTypes, {
|
|
57
|
-
DispatchInfo: 'DispatchInfoTo244',
|
|
58
|
-
Heartbeat: 'HeartbeatTo244',
|
|
59
|
-
RefCount: 'RefCountTo259'
|
|
60
|
-
})
|
|
61
|
-
}, {
|
|
62
|
-
minmax: [45, 47],
|
|
63
|
-
types: objectSpread({}, sharedTypes, addrAccountIdTypes)
|
|
64
|
-
}, {
|
|
65
|
-
minmax: [48, 49],
|
|
66
|
-
types: objectSpread({}, sharedTypes, {
|
|
67
|
-
AccountInfo: 'AccountInfoWithDualRefCount'
|
|
68
|
-
})
|
|
69
|
-
}, {
|
|
70
|
-
minmax: [50, 9099],
|
|
71
|
-
types: objectSpread({}, sharedTypes, mapXcmTypes('V0'))
|
|
72
|
-
}, {
|
|
73
|
-
minmax: [9100, 9105],
|
|
74
|
-
types: objectSpread({}, sharedTypes, mapXcmTypes('V1'))
|
|
75
|
-
}, {
|
|
76
|
-
// metadata v14
|
|
77
|
-
minmax: [9106, undefined],
|
|
78
|
-
types: {}
|
|
79
|
-
}];
|
|
80
|
-
export default versioned;
|
package/upgrades/index.cjs
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _networks = require("@polkadot/networks");
|
|
11
|
-
|
|
12
|
-
var _util = require("@polkadot/util");
|
|
13
|
-
|
|
14
|
-
var _kusama = _interopRequireDefault(require("./kusama.cjs"));
|
|
15
|
-
|
|
16
|
-
var _polkadot = _interopRequireDefault(require("./polkadot.cjs"));
|
|
17
|
-
|
|
18
|
-
var _westend = _interopRequireDefault(require("./westend.cjs"));
|
|
19
|
-
|
|
20
|
-
// Copyright 2017-2021 @polkadot/types-known authors & contributors
|
|
21
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
22
|
-
const allKnown = {
|
|
23
|
-
kusama: _kusama.default,
|
|
24
|
-
polkadot: _polkadot.default,
|
|
25
|
-
westend: _westend.default
|
|
26
|
-
}; // testnets are not available in the networks map
|
|
27
|
-
|
|
28
|
-
const NET_EXTRA = {
|
|
29
|
-
westend: {
|
|
30
|
-
genesisHash: ['0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e']
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
/** @internal */
|
|
34
|
-
|
|
35
|
-
function checkOrder(network, versions) {
|
|
36
|
-
const ooo = versions.filter((curr, index) => {
|
|
37
|
-
const prev = versions[index - 1];
|
|
38
|
-
return index === 0 ? false : curr[0] <= prev[0] || curr[1] <= prev[1];
|
|
39
|
-
});
|
|
40
|
-
(0, _util.assert)(!ooo.length, () => `${network}: Mismatched upgrade ordering: ${(0, _util.stringify)(ooo)}`);
|
|
41
|
-
return versions;
|
|
42
|
-
}
|
|
43
|
-
/** @internal */
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
function mapRaw(_ref) {
|
|
47
|
-
let [network, versions] = _ref;
|
|
48
|
-
const chain = _networks.selectableNetworks.find(n => n.network === network) || NET_EXTRA[network];
|
|
49
|
-
(0, _util.assert)(chain, () => `Unable to find info for chain ${network}`);
|
|
50
|
-
return {
|
|
51
|
-
genesisHash: (0, _util.hexToU8a)(chain.genesisHash[0]),
|
|
52
|
-
network,
|
|
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
|
-
})
|
|
60
|
-
};
|
|
61
|
-
} // Type overrides for specific spec types & versions as given in runtimeVersion
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const upgrades = Object.entries(allKnown).map(mapRaw);
|
|
65
|
-
var _default = upgrades;
|
|
66
|
-
exports.default = _default;
|
package/upgrades/index.d.ts
DELETED
package/upgrades/index.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// Copyright 2017-2021 @polkadot/types-known authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { selectableNetworks } from '@polkadot/networks';
|
|
4
|
-
import { assert, BN, hexToU8a, stringify } from '@polkadot/util';
|
|
5
|
-
import kusama from "./kusama.js";
|
|
6
|
-
import polkadot from "./polkadot.js";
|
|
7
|
-
import westend from "./westend.js";
|
|
8
|
-
const allKnown = {
|
|
9
|
-
kusama,
|
|
10
|
-
polkadot,
|
|
11
|
-
westend
|
|
12
|
-
}; // testnets are not available in the networks map
|
|
13
|
-
|
|
14
|
-
const NET_EXTRA = {
|
|
15
|
-
westend: {
|
|
16
|
-
genesisHash: ['0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e']
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
/** @internal */
|
|
20
|
-
|
|
21
|
-
function checkOrder(network, versions) {
|
|
22
|
-
const ooo = versions.filter((curr, index) => {
|
|
23
|
-
const prev = versions[index - 1];
|
|
24
|
-
return index === 0 ? false : curr[0] <= prev[0] || curr[1] <= prev[1];
|
|
25
|
-
});
|
|
26
|
-
assert(!ooo.length, () => `${network}: Mismatched upgrade ordering: ${stringify(ooo)}`);
|
|
27
|
-
return versions;
|
|
28
|
-
}
|
|
29
|
-
/** @internal */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
function mapRaw([network, versions]) {
|
|
33
|
-
const chain = selectableNetworks.find(n => n.network === network) || NET_EXTRA[network];
|
|
34
|
-
assert(chain, () => `Unable to find info for chain ${network}`);
|
|
35
|
-
return {
|
|
36
|
-
genesisHash: hexToU8a(chain.genesisHash[0]),
|
|
37
|
-
network,
|
|
38
|
-
versions: checkOrder(network, versions).map(([blockNumber, specVersion]) => ({
|
|
39
|
-
blockNumber: new BN(blockNumber),
|
|
40
|
-
specVersion: new BN(specVersion)
|
|
41
|
-
}))
|
|
42
|
-
};
|
|
43
|
-
} // Type overrides for specific spec types & versions as given in runtimeVersion
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const upgrades = Object.entries(allKnown).map(mapRaw);
|
|
47
|
-
export default upgrades;
|
package/upgrades/kusama.cjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
// Copyright 2017-2021 @polkadot/types-known authors & contributors
|
|
8
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
9
|
-
const upgrades = [[0, 1020], [26669, 1021], [38245, 1022], [54248, 1023], [59659, 1024], [67651, 1025], [82191, 1027], [83238, 1028], [101503, 1029], [203466, 1030], [295787, 1031], [461692, 1032], [504329, 1033], [569327, 1038], [587687, 1039], [653183, 1040], [693488, 1042], [901442, 1045], [1375086, 1050], [1445458, 1051], [1472960, 1052], [1475648, 1053], [1491596, 1054], [1574408, 1055], [2064961, 1058], [2201991, 1062], [2671528, 2005], [2704202, 2007], [2728002, 2008], [2832534, 2011], [2962294, 2012], [3240000, 2013], [3274408, 2015], [3323565, 2019], [3534175, 2022], [3860281, 2023], [4143129, 2024], [4401242, 2025], [4841367, 2026], [5961600, 2027], [6137912, 2028], [6561855, 2029], [7100891, 2030], [7468792, 9010], [7668600, 9030], [7812476, 9040], [8010981, 9050], [8073833, 9070], [8555825, 9080], [8945245, 9090], [9611377, 9100], [9625129, 9111], [9866422, 9122], [10403784, 9130]];
|
|
10
|
-
var _default = upgrades;
|
|
11
|
-
exports.default = _default;
|
package/upgrades/kusama.d.ts
DELETED
package/upgrades/kusama.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// Copyright 2017-2021 @polkadot/types-known authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
const upgrades = [[0, 1020], [26669, 1021], [38245, 1022], [54248, 1023], [59659, 1024], [67651, 1025], [82191, 1027], [83238, 1028], [101503, 1029], [203466, 1030], [295787, 1031], [461692, 1032], [504329, 1033], [569327, 1038], [587687, 1039], [653183, 1040], [693488, 1042], [901442, 1045], [1375086, 1050], [1445458, 1051], [1472960, 1052], [1475648, 1053], [1491596, 1054], [1574408, 1055], [2064961, 1058], [2201991, 1062], [2671528, 2005], [2704202, 2007], [2728002, 2008], [2832534, 2011], [2962294, 2012], [3240000, 2013], [3274408, 2015], [3323565, 2019], [3534175, 2022], [3860281, 2023], [4143129, 2024], [4401242, 2025], [4841367, 2026], [5961600, 2027], [6137912, 2028], [6561855, 2029], [7100891, 2030], [7468792, 9010], [7668600, 9030], [7812476, 9040], [8010981, 9050], [8073833, 9070], [8555825, 9080], [8945245, 9090], [9611377, 9100], [9625129, 9111], [9866422, 9122], [10403784, 9130]];
|
|
4
|
-
export default upgrades;
|
package/upgrades/polkadot.cjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
// Copyright 2017-2021 @polkadot/types-known authors & contributors
|
|
8
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
9
|
-
const upgrades = [[0, 0], [29231, 1], [188836, 5], [199405, 6], [214264, 7], [244358, 8], [303079, 9], [314201, 10], [342400, 11], [443963, 12], [528470, 13], [687751, 14], [746085, 15], [787923, 16], [799302, 17], [1205128, 18], [1603423, 23], [1733218, 24], [2005673, 25], [2436698, 26], [3613564, 27], [3899547, 28], [4345767, 29], [4876134, 30], [5661442, 9050], [6321619, 9080], [6713249, 9090], [7217907, 9100], [7229126, 9110], [7560558, 9122]];
|
|
10
|
-
var _default = upgrades;
|
|
11
|
-
exports.default = _default;
|
package/upgrades/polkadot.d.ts
DELETED
package/upgrades/polkadot.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// Copyright 2017-2021 @polkadot/types-known authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
const upgrades = [[0, 0], [29231, 1], [188836, 5], [199405, 6], [214264, 7], [244358, 8], [303079, 9], [314201, 10], [342400, 11], [443963, 12], [528470, 13], [687751, 14], [746085, 15], [787923, 16], [799302, 17], [1205128, 18], [1603423, 23], [1733218, 24], [2005673, 25], [2436698, 26], [3613564, 27], [3899547, 28], [4345767, 29], [4876134, 30], [5661442, 9050], [6321619, 9080], [6713249, 9090], [7217907, 9100], [7229126, 9110], [7560558, 9122]];
|
|
4
|
-
export default upgrades;
|
package/upgrades/types.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/upgrades/types.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type ChainUpgradesRaw = [number, number][];
|
package/upgrades/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/upgrades/westend.cjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
// Copyright 2017-2021 @polkadot/types-known authors & contributors
|
|
8
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
9
|
-
const upgrades = [[214356, 4], [392764, 7], [409740, 8], [809976, 20], [877581, 24], [879238, 25], [889472, 26], [902937, 27], [932751, 28], [991142, 29], [1030162, 31], [1119657, 32], [1199282, 33], [1342534, 34], [1392263, 35], [1431703, 36], [1433369, 37], [1490972, 41], [2087397, 43], [2316688, 44], [2549864, 45], [3925782, 46], [3925843, 47], [4207800, 48], [4627944, 49], [5124076, 50], [5478664, 900], [5482450, 9000], [5584305, 9010], [5784566, 9030], [5879822, 9031], [5896856, 9032], [5897316, 9033], [6117927, 9050], [6210274, 9070], [6379314, 9080], [6979141, 9090], [7568453, 9100], [7766394, 9111], [7911691, 9120], [7968866, 9121], [7982889, 9122]];
|
|
10
|
-
var _default = upgrades;
|
|
11
|
-
exports.default = _default;
|
package/upgrades/westend.d.ts
DELETED
package/upgrades/westend.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// Copyright 2017-2021 @polkadot/types-known authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
const upgrades = [[214356, 4], [392764, 7], [409740, 8], [809976, 20], [877581, 24], [879238, 25], [889472, 26], [902937, 27], [932751, 28], [991142, 29], [1030162, 31], [1119657, 32], [1199282, 33], [1342534, 34], [1392263, 35], [1431703, 36], [1433369, 37], [1490972, 41], [2087397, 43], [2316688, 44], [2549864, 45], [3925782, 46], [3925843, 47], [4207800, 48], [4627944, 49], [5124076, 50], [5478664, 900], [5482450, 9000], [5584305, 9010], [5784566, 9030], [5879822, 9031], [5896856, 9032], [5897316, 9033], [6117927, 9050], [6210274, 9070], [6379314, 9080], [6979141, 9090], [7568453, 9100], [7766394, 9111], [7911691, 9120], [7968866, 9121], [7982889, 9122]];
|
|
4
|
-
export default upgrades;
|
package/xcm.cjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.XCM_MAPPINGS = void 0;
|
|
7
|
-
exports.mapXcmTypes = mapXcmTypes;
|
|
8
|
-
|
|
9
|
-
var _util = require("@polkadot/util");
|
|
10
|
-
|
|
11
|
-
// Copyright 2017-2021 @polkadot/types-known authors & contributors
|
|
12
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
13
|
-
const XCM_MAPPINGS = ['AssetInstance', 'Fungibility', 'Junction', 'Junctions', 'MultiAsset', 'MultiAssetFilter', 'MultiLocation', 'Response', 'WildFungibility', 'WildMultiAsset', 'Xcm', 'XcmError', 'XcmOrder'];
|
|
14
|
-
exports.XCM_MAPPINGS = XCM_MAPPINGS;
|
|
15
|
-
|
|
16
|
-
function mapXcmTypes(version) {
|
|
17
|
-
return XCM_MAPPINGS.reduce((all, key) => (0, _util.objectSpread)(all, {
|
|
18
|
-
[key]: `${key}${version}`
|
|
19
|
-
}), {});
|
|
20
|
-
}
|
package/xcm.d.ts
DELETED
package/xcm.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// Copyright 2017-2021 @polkadot/types-known authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { objectSpread } from '@polkadot/util';
|
|
4
|
-
export const XCM_MAPPINGS = ['AssetInstance', 'Fungibility', 'Junction', 'Junctions', 'MultiAsset', 'MultiAssetFilter', 'MultiLocation', 'Response', 'WildFungibility', 'WildMultiAsset', 'Xcm', 'XcmError', 'XcmOrder'];
|
|
5
|
-
export function mapXcmTypes(version) {
|
|
6
|
-
return XCM_MAPPINGS.reduce((all, key) => objectSpread(all, {
|
|
7
|
-
[key]: `${key}${version}`
|
|
8
|
-
}), {});
|
|
9
|
-
}
|