@pezkuwi/types-known 16.5.5 → 16.5.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.
Files changed (250) hide show
  1. package/build/LICENSE +201 -0
  2. package/build/README.md +3 -0
  3. package/build/bundle.js +3 -0
  4. package/build/chain/index.js +1 -0
  5. package/build/cjs/bundle.d.ts +3 -0
  6. package/build/cjs/bundle.js +9 -0
  7. package/build/cjs/chain/index.d.ts +2 -0
  8. package/build/cjs/chain/index.js +4 -0
  9. package/build/cjs/index.d.ts +2 -0
  10. package/build/cjs/index.js +5 -0
  11. package/build/cjs/package.json +3 -0
  12. package/build/cjs/packageDetect.d.ts +1 -0
  13. package/build/cjs/packageDetect.js +6 -0
  14. package/build/cjs/packageInfo.d.ts +6 -0
  15. package/build/cjs/packageInfo.js +4 -0
  16. package/build/cjs/spec/centrifuge-chain.d.ts +2 -0
  17. package/build/cjs/spec/centrifuge-chain.js +105 -0
  18. package/build/cjs/spec/dicle.d.ts +2 -0
  19. package/build/cjs/spec/dicle.js +118 -0
  20. package/build/cjs/spec/index.d.ts +2 -0
  21. package/build/cjs/spec/index.js +27 -0
  22. package/build/cjs/spec/node-template.d.ts +2 -0
  23. package/build/cjs/spec/node-template.js +13 -0
  24. package/build/cjs/spec/node.d.ts +2 -0
  25. package/build/cjs/spec/node.js +13 -0
  26. package/build/cjs/spec/pezkuwi.d.ts +2 -0
  27. package/build/cjs/spec/pezkuwi.js +105 -0
  28. package/build/cjs/spec/pezkuwichain.d.ts +2 -0
  29. package/build/cjs/spec/pezkuwichain.js +65 -0
  30. package/build/cjs/spec/shell.d.ts +2 -0
  31. package/build/cjs/spec/shell.js +11 -0
  32. package/build/cjs/spec/statemine.d.ts +2 -0
  33. package/build/cjs/spec/statemine.js +55 -0
  34. package/build/cjs/spec/statemint.d.ts +2 -0
  35. package/build/cjs/spec/statemint.js +67 -0
  36. package/build/cjs/spec/westmint.d.ts +2 -0
  37. package/build/cjs/spec/westmint.js +55 -0
  38. package/build/cjs/spec/zagros.d.ts +2 -0
  39. package/build/cjs/spec/zagros.js +118 -0
  40. package/build/cjs/upgrades/e2e/dicle.d.ts +2 -0
  41. package/build/cjs/upgrades/e2e/dicle.js +6429 -0
  42. package/build/cjs/upgrades/e2e/index.d.ts +3 -0
  43. package/build/cjs/upgrades/e2e/index.js +9 -0
  44. package/build/cjs/upgrades/e2e/pezkuwi.d.ts +2 -0
  45. package/build/cjs/upgrades/e2e/pezkuwi.js +3707 -0
  46. package/build/cjs/upgrades/e2e/zagros.d.ts +2 -0
  47. package/build/cjs/upgrades/e2e/zagros.js +6429 -0
  48. package/build/cjs/upgrades/index.d.ts +2 -0
  49. package/build/cjs/upgrades/index.js +35 -0
  50. package/build/cjs/upgrades/manual/dicle.d.ts +2 -0
  51. package/build/cjs/upgrades/manual/dicle.js +25 -0
  52. package/build/cjs/upgrades/manual/index.d.ts +3 -0
  53. package/build/cjs/upgrades/manual/index.js +9 -0
  54. package/build/cjs/upgrades/manual/pezkuwi.d.ts +2 -0
  55. package/build/cjs/upgrades/manual/pezkuwi.js +17 -0
  56. package/build/cjs/upgrades/manual/zagros.d.ts +2 -0
  57. package/build/cjs/upgrades/manual/zagros.js +25 -0
  58. package/build/cjs/upgrades/types.d.ts +3 -0
  59. package/build/cjs/upgrades/types.js +2 -0
  60. package/build/cjs/util.d.ts +33 -0
  61. package/build/cjs/util.js +112 -0
  62. package/build/index.js +2 -0
  63. package/build/package.json +447 -0
  64. package/build/packageDetect.js +4 -0
  65. package/build/packageInfo.js +1 -0
  66. package/build/spec/centrifuge-chain.js +102 -0
  67. package/build/spec/dicle.d.ts +2 -0
  68. package/build/spec/dicle.js +115 -0
  69. package/build/spec/index.js +24 -0
  70. package/build/spec/node-template.js +10 -0
  71. package/build/spec/node.js +10 -0
  72. package/build/spec/pezkuwi.d.ts +2 -0
  73. package/build/spec/pezkuwi.js +102 -0
  74. package/build/spec/pezkuwichain.d.ts +2 -0
  75. package/build/spec/pezkuwichain.js +62 -0
  76. package/build/spec/shell.js +8 -0
  77. package/build/spec/statemine.js +52 -0
  78. package/build/spec/statemint.js +64 -0
  79. package/build/spec/westmint.js +52 -0
  80. package/build/spec/zagros.d.ts +2 -0
  81. package/build/spec/zagros.js +115 -0
  82. package/build/upgrades/e2e/dicle.d.ts +2 -0
  83. package/build/upgrades/e2e/dicle.js +6426 -0
  84. package/build/upgrades/e2e/index.d.ts +3 -3
  85. package/build/upgrades/e2e/index.js +3 -0
  86. package/build/upgrades/e2e/pezkuwi.d.ts +2 -0
  87. package/build/upgrades/e2e/pezkuwi.js +3704 -0
  88. package/build/upgrades/e2e/zagros.d.ts +2 -0
  89. package/build/upgrades/e2e/zagros.js +6426 -0
  90. package/build/upgrades/index.js +31 -0
  91. package/build/upgrades/manual/dicle.d.ts +2 -0
  92. package/build/upgrades/manual/dicle.js +22 -0
  93. package/build/upgrades/manual/index.d.ts +3 -3
  94. package/build/upgrades/manual/index.js +3 -0
  95. package/build/upgrades/manual/pezkuwi.d.ts +2 -0
  96. package/build/upgrades/manual/pezkuwi.js +14 -0
  97. package/build/upgrades/manual/zagros.d.ts +2 -0
  98. package/build/upgrades/manual/zagros.js +22 -0
  99. package/build/upgrades/types.js +1 -0
  100. package/build/util.js +103 -0
  101. package/build-deno/README.md +3 -0
  102. package/build-deno/bundle.ts +6 -0
  103. package/build-deno/chain/index.ts +4 -0
  104. package/build-deno/index.ts +4 -0
  105. package/build-deno/mod.ts +2 -0
  106. package/build-deno/packageDetect.ts +8 -0
  107. package/build-deno/packageInfo.ts +3 -0
  108. package/build-deno/spec/centrifuge-chain.ts +114 -0
  109. package/build-deno/spec/dicle.ts +123 -0
  110. package/build-deno/spec/index.ts +28 -0
  111. package/build-deno/spec/node-template.ts +15 -0
  112. package/build-deno/spec/node.ts +15 -0
  113. package/build-deno/spec/pezkuwi.ts +109 -0
  114. package/build-deno/spec/pezkuwichain.ts +70 -0
  115. package/build-deno/spec/shell.ts +13 -0
  116. package/build-deno/spec/statemine.ts +59 -0
  117. package/build-deno/spec/statemint.ts +71 -0
  118. package/build-deno/spec/westmint.ts +59 -0
  119. package/build-deno/spec/zagros.ts +123 -0
  120. package/build-deno/upgrades/e2e/dicle.ts +6431 -0
  121. package/build-deno/upgrades/e2e/index.ts +4 -0
  122. package/build-deno/upgrades/e2e/pezkuwi.ts +3709 -0
  123. package/build-deno/upgrades/e2e/zagros.ts +6431 -0
  124. package/build-deno/upgrades/index.ts +42 -0
  125. package/build-deno/upgrades/manual/dicle.ts +25 -0
  126. package/build-deno/upgrades/manual/index.ts +4 -0
  127. package/build-deno/upgrades/manual/pezkuwi.ts +17 -0
  128. package/build-deno/upgrades/manual/zagros.ts +25 -0
  129. package/build-deno/upgrades/types.ts +6 -0
  130. package/build-deno/util.ts +126 -0
  131. package/build-tsc/bundle.d.ts +3 -0
  132. package/build-tsc/chain/index.d.ts +2 -0
  133. package/build-tsc/index.d.ts +2 -0
  134. package/build-tsc/packageDetect.d.ts +1 -0
  135. package/build-tsc/packageInfo.d.ts +6 -0
  136. package/build-tsc/spec/index.d.ts +2 -0
  137. package/build-tsc/spec/pezkuwi.d.ts +2 -0
  138. package/build-tsc/spec/pezkuwichain.d.ts +2 -0
  139. package/build-tsc/spec/shell.d.ts +2 -0
  140. package/build-tsc/spec/statemine.d.ts +2 -0
  141. package/build-tsc/spec/statemint.d.ts +2 -0
  142. package/build-tsc/spec/westmint.d.ts +2 -0
  143. package/build-tsc/spec/zagros.d.ts +2 -0
  144. package/build-tsc/upgrades/e2e/index.d.ts +3 -0
  145. package/build-tsc/upgrades/index.d.ts +2 -0
  146. package/build-tsc/upgrades/manual/index.d.ts +3 -0
  147. package/build-tsc/upgrades/types.d.ts +3 -0
  148. package/build-tsc/util.d.ts +33 -0
  149. package/build-tsc-cjs/bundle.js +9 -0
  150. package/build-tsc-cjs/chain/index.js +4 -0
  151. package/build-tsc-cjs/index.js +5 -0
  152. package/build-tsc-cjs/packageDetect.js +6 -0
  153. package/build-tsc-cjs/packageInfo.js +4 -0
  154. package/build-tsc-cjs/spec/centrifuge-chain.js +105 -0
  155. package/build-tsc-cjs/spec/dicle.js +118 -0
  156. package/build-tsc-cjs/spec/index.js +27 -0
  157. package/build-tsc-cjs/spec/node-template.js +13 -0
  158. package/build-tsc-cjs/spec/node.js +13 -0
  159. package/build-tsc-cjs/spec/pezkuwi.js +105 -0
  160. package/build-tsc-cjs/spec/pezkuwichain.js +65 -0
  161. package/build-tsc-cjs/spec/shell.js +11 -0
  162. package/build-tsc-cjs/spec/statemine.js +55 -0
  163. package/build-tsc-cjs/spec/statemint.js +67 -0
  164. package/build-tsc-cjs/spec/westmint.js +55 -0
  165. package/build-tsc-cjs/spec/zagros.js +118 -0
  166. package/build-tsc-cjs/upgrades/e2e/dicle.js +6429 -0
  167. package/build-tsc-cjs/upgrades/e2e/index.js +9 -0
  168. package/build-tsc-cjs/upgrades/e2e/pezkuwi.js +3707 -0
  169. package/build-tsc-cjs/upgrades/e2e/zagros.js +6429 -0
  170. package/build-tsc-cjs/upgrades/index.js +35 -0
  171. package/build-tsc-cjs/upgrades/manual/dicle.js +25 -0
  172. package/build-tsc-cjs/upgrades/manual/index.js +9 -0
  173. package/build-tsc-cjs/upgrades/manual/pezkuwi.js +17 -0
  174. package/build-tsc-cjs/upgrades/manual/zagros.js +25 -0
  175. package/build-tsc-cjs/upgrades/types.js +2 -0
  176. package/build-tsc-cjs/util.js +112 -0
  177. package/build-tsc-esm/bundle.js +3 -0
  178. package/build-tsc-esm/chain/index.js +1 -0
  179. package/build-tsc-esm/index.js +2 -0
  180. package/build-tsc-esm/packageDetect.js +4 -0
  181. package/build-tsc-esm/packageInfo.js +1 -0
  182. package/build-tsc-esm/spec/centrifuge-chain.js +102 -0
  183. package/build-tsc-esm/spec/dicle.js +115 -0
  184. package/build-tsc-esm/spec/index.js +24 -0
  185. package/build-tsc-esm/spec/node-template.js +10 -0
  186. package/build-tsc-esm/spec/node.js +10 -0
  187. package/build-tsc-esm/spec/pezkuwi.js +102 -0
  188. package/build-tsc-esm/spec/pezkuwichain.js +62 -0
  189. package/build-tsc-esm/spec/shell.js +8 -0
  190. package/build-tsc-esm/spec/statemine.js +52 -0
  191. package/build-tsc-esm/spec/statemint.js +64 -0
  192. package/build-tsc-esm/spec/westmint.js +52 -0
  193. package/build-tsc-esm/spec/zagros.js +115 -0
  194. package/build-tsc-esm/upgrades/e2e/dicle.js +6426 -0
  195. package/build-tsc-esm/upgrades/e2e/index.js +3 -0
  196. package/build-tsc-esm/upgrades/e2e/pezkuwi.js +3704 -0
  197. package/build-tsc-esm/upgrades/e2e/zagros.js +6426 -0
  198. package/build-tsc-esm/upgrades/index.js +31 -0
  199. package/build-tsc-esm/upgrades/manual/dicle.js +22 -0
  200. package/build-tsc-esm/upgrades/manual/index.js +3 -0
  201. package/build-tsc-esm/upgrades/manual/pezkuwi.js +14 -0
  202. package/build-tsc-esm/upgrades/manual/zagros.js +22 -0
  203. package/build-tsc-esm/upgrades/types.js +1 -0
  204. package/build-tsc-esm/util.js +103 -0
  205. package/package.json +7 -7
  206. package/src/bundle.ts +1 -1
  207. package/src/chain/index.ts +1 -1
  208. package/src/index.ts +1 -1
  209. package/src/mod.ts +1 -1
  210. package/src/packageDetect.ts +2 -2
  211. package/src/packageInfo.ts +3 -3
  212. package/src/spec/centrifuge-chain.ts +1 -1
  213. package/src/spec/{westend.ts → dicle.ts} +1 -1
  214. package/src/spec/index.ts +9 -9
  215. package/src/spec/node-template.ts +1 -1
  216. package/src/spec/node.ts +1 -1
  217. package/src/spec/{polkadot.ts → pezkuwi.ts} +2 -2
  218. package/src/spec/{rococo.ts → pezkuwichain.ts} +1 -1
  219. package/src/spec/shell.ts +1 -1
  220. package/src/spec/statemine.ts +3 -3
  221. package/src/spec/statemint.ts +5 -5
  222. package/src/spec/westmint.ts +3 -3
  223. package/src/spec/zagros.ts +125 -0
  224. package/src/upgrades/e2e/{westend.ts → dicle.ts} +1 -1
  225. package/src/upgrades/e2e/index.spec.ts +7 -8
  226. package/src/upgrades/e2e/index.ts +4 -4
  227. package/src/upgrades/e2e/{polkadot.ts → pezkuwi.ts} +1 -1
  228. package/src/upgrades/e2e/{kusama.ts → zagros.ts} +1511 -449
  229. package/src/upgrades/index.spec.ts +4 -4
  230. package/src/upgrades/index.ts +10 -4
  231. package/src/upgrades/manual/{westend.ts → dicle.ts} +1 -1
  232. package/src/upgrades/manual/index.ts +4 -4
  233. package/src/upgrades/manual/{polkadot.ts → pezkuwi.ts} +1 -1
  234. package/src/upgrades/manual/zagros.ts +27 -0
  235. package/src/upgrades/types.ts +1 -1
  236. package/src/util.ts +1 -1
  237. package/tsconfig.build.tsbuildinfo +1 -1
  238. package/tsconfig.spec.tsbuildinfo +1 -0
  239. package/src/spec/kusama.ts +0 -258
  240. package/src/upgrades/manual/kusama.ts +0 -26
  241. /package/{build/spec/kusama.d.ts → build-tsc/spec/centrifuge-chain.d.ts} +0 -0
  242. /package/{build/spec/polkadot.d.ts → build-tsc/spec/dicle.d.ts} +0 -0
  243. /package/{build/spec/rococo.d.ts → build-tsc/spec/node-template.d.ts} +0 -0
  244. /package/{build/spec/westend.d.ts → build-tsc/spec/node.d.ts} +0 -0
  245. /package/{build/upgrades/e2e/kusama.d.ts → build-tsc/upgrades/e2e/dicle.d.ts} +0 -0
  246. /package/{build/upgrades/e2e/polkadot.d.ts → build-tsc/upgrades/e2e/pezkuwi.d.ts} +0 -0
  247. /package/{build/upgrades/e2e/westend.d.ts → build-tsc/upgrades/e2e/zagros.d.ts} +0 -0
  248. /package/{build/upgrades/manual/kusama.d.ts → build-tsc/upgrades/manual/dicle.d.ts} +0 -0
  249. /package/{build/upgrades/manual/polkadot.d.ts → build-tsc/upgrades/manual/pezkuwi.d.ts} +0 -0
  250. /package/{build/upgrades/manual/westend.d.ts → build-tsc/upgrades/manual/zagros.d.ts} +0 -0
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.upgrades = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const networks_1 = require("@pezkuwi/networks");
6
+ const util_1 = require("@pezkuwi/util");
7
+ const allKnown = tslib_1.__importStar(require("./e2e/index.js"));
8
+ const NET_EXTRA = {
9
+ dicle: {
10
+ genesisHash: ['0xd9d3cd7c1e5d890d969b957f4c5b71a111bbeeabc968f1d0d4538c2663f080a7']
11
+ },
12
+ pezkuwi: {
13
+ genesisHash: ['0x41693961995d879073269a008d0a52832caa3e0ae73869f02127f3d5daa4934c']
14
+ },
15
+ zagros: {
16
+ genesisHash: ['0x297f5a4d105b4b28312586ff1915572ffe4ee015ff772b76399ecbff25a22026']
17
+ }
18
+ };
19
+ /** @internal */
20
+ function mapRaw([network, versions]) {
21
+ const chain = networks_1.selectableNetworks.find((n) => n.network === network) || NET_EXTRA[network];
22
+ if (!chain) {
23
+ throw new Error(`Unable to find info for chain ${network}`);
24
+ }
25
+ return {
26
+ genesisHash: (0, util_1.hexToU8a)(chain.genesisHash[0]),
27
+ network,
28
+ versions: versions.map(([blockNumber, specVersion, apis]) => ({
29
+ apis,
30
+ blockNumber: new util_1.BN(blockNumber),
31
+ specVersion: new util_1.BN(specVersion)
32
+ }))
33
+ };
34
+ }
35
+ exports.upgrades = Object.entries(allKnown).map(mapRaw);
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.upgrades = void 0;
4
+ exports.upgrades = [
5
+ [214356, 4], [392764, 7], [409740, 8], [809976, 20], [877581, 24],
6
+ [879238, 25], [889472, 26], [902937, 27], [932751, 28], [991142, 29],
7
+ [1030162, 31], [1119657, 32], [1199282, 33], [1342534, 34], [1392263, 35],
8
+ [1431703, 36], [1433369, 37], [1490972, 41], [2087397, 43], [2316688, 44],
9
+ [2549864, 45], [3925782, 46], [3925843, 47], [4207800, 48], [4627944, 49],
10
+ [5124076, 50], [5478664, 900], [5482450, 9000], [5584305, 9010], [5784566, 9030],
11
+ [5879822, 9031], [5896856, 9032], [5897316, 9033], [6117927, 9050], [6210274, 9070],
12
+ [6379314, 9080], [6979141, 9090], [7568453, 9100], [7766394, 9111], [7911691, 9120],
13
+ [7968866, 9121], [7982889, 9122], [8514322, 9130], [9091726, 9140], [9091774, 9150],
14
+ [9406726, 9160], [9921066, 9170], [10007115, 9180], [10480973, 9190], [10578091, 9200],
15
+ [10678509, 9210], [10811001, 9220], [11096116, 9230], [11409279, 9250], [11584820, 9251],
16
+ [11716837, 9260], [11876919, 9261], [11987927, 9270], [12077324, 9271], [12301871, 9280],
17
+ [12604343, 9290], [12841034, 9300], [13128237, 9310], [13272363, 9320], [13483497, 9330],
18
+ [13649433, 9340], [13761100, 9350], [13847400, 9360], [14249200, 9370], [14576855, 9380],
19
+ [14849830, 9390], [15146832, 9400], [15332317, 9401], [15661793, 9420], [16165469, 9430],
20
+ [18293984, 102000], [18293991, 103000], [18451783, 104000], [18679741, 1005000], [19166695, 1006000],
21
+ [19234157, 1006001], [19542944, 1007000], [19621258, 1007001], [19761406, 1008000], [20056997, 1009000],
22
+ [20368318, 1010000], [20649086, 1011000], [21217837, 1011001], [21300429, 1013000], [21460051, 1014000],
23
+ [21925427, 1015000], [22500517, 1016000], [22759684, 1016001], [23056976, 1016002], [23544582, 1017000],
24
+ [24002343, 1017001]
25
+ ];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.zagros = exports.pezkuwi = exports.dicle = void 0;
4
+ var dicle_js_1 = require("./dicle.js");
5
+ Object.defineProperty(exports, "dicle", { enumerable: true, get: function () { return dicle_js_1.upgrades; } });
6
+ var pezkuwi_js_1 = require("./pezkuwi.js");
7
+ Object.defineProperty(exports, "pezkuwi", { enumerable: true, get: function () { return pezkuwi_js_1.upgrades; } });
8
+ var zagros_js_1 = require("./zagros.js");
9
+ Object.defineProperty(exports, "zagros", { enumerable: true, get: function () { return zagros_js_1.upgrades; } });
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.upgrades = void 0;
4
+ exports.upgrades = [
5
+ [0, 0], [29231, 1], [188836, 5], [199405, 6], [214264, 7],
6
+ [244358, 8], [303079, 9], [314201, 10], [342400, 11], [443963, 12],
7
+ [528470, 13], [687751, 14], [746085, 15], [787923, 16], [799302, 17],
8
+ [1205128, 18], [1603423, 23], [1733218, 24], [2005673, 25], [2436698, 26],
9
+ [3613564, 27], [3899547, 28], [4345767, 29], [4876134, 30], [5661442, 9050],
10
+ [6321619, 9080], [6713249, 9090], [7217907, 9100], [7229126, 9110], [7560558, 9122],
11
+ [8115869, 9140], [8638103, 9151], [9280179, 9170], [9738717, 9180], [10156856, 9190],
12
+ [10458576, 9200], [10655116, 9220], [10879371, 9230], [11328884, 9250], [11532856, 9260],
13
+ [11933818, 9270], [12217535, 9280], [12245277, 9281], [12532644, 9291], [12876189, 9300],
14
+ [13800015, 9340], [14188833, 9360], [14543918, 9370], [15978362, 9420], [16450000, 9430],
15
+ [17840000, 9431], [18407475, 1000001], [19551000, 1001002], [20181758, 1001003],
16
+ [20438530, 1002000], [21169168, 1002004], [21455374, 1002005], [21558004, 1002006], [21800141, 1002007]
17
+ ];
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.upgrades = void 0;
4
+ exports.upgrades = [
5
+ [214356, 4], [392764, 7], [409740, 8], [809976, 20], [877581, 24],
6
+ [879238, 25], [889472, 26], [902937, 27], [932751, 28], [991142, 29],
7
+ [1030162, 31], [1119657, 32], [1199282, 33], [1342534, 34], [1392263, 35],
8
+ [1431703, 36], [1433369, 37], [1490972, 41], [2087397, 43], [2316688, 44],
9
+ [2549864, 45], [3925782, 46], [3925843, 47], [4207800, 48], [4627944, 49],
10
+ [5124076, 50], [5478664, 900], [5482450, 9000], [5584305, 9010], [5784566, 9030],
11
+ [5879822, 9031], [5896856, 9032], [5897316, 9033], [6117927, 9050], [6210274, 9070],
12
+ [6379314, 9080], [6979141, 9090], [7568453, 9100], [7766394, 9111], [7911691, 9120],
13
+ [7968866, 9121], [7982889, 9122], [8514322, 9130], [9091726, 9140], [9091774, 9150],
14
+ [9406726, 9160], [9921066, 9170], [10007115, 9180], [10480973, 9190], [10578091, 9200],
15
+ [10678509, 9210], [10811001, 9220], [11096116, 9230], [11409279, 9250], [11584820, 9251],
16
+ [11716837, 9260], [11876919, 9261], [11987927, 9270], [12077324, 9271], [12301871, 9280],
17
+ [12604343, 9290], [12841034, 9300], [13128237, 9310], [13272363, 9320], [13483497, 9330],
18
+ [13649433, 9340], [13761100, 9350], [13847400, 9360], [14249200, 9370], [14576855, 9380],
19
+ [14849830, 9390], [15146832, 9400], [15332317, 9401], [15661793, 9420], [16165469, 9430],
20
+ [18293984, 102000], [18293991, 103000], [18451783, 104000], [18679741, 1005000], [19166695, 1006000],
21
+ [19234157, 1006001], [19542944, 1007000], [19621258, 1007001], [19761406, 1008000], [20056997, 1009000],
22
+ [20368318, 1010000], [20649086, 1011000], [21217837, 1011001], [21300429, 1013000], [21460051, 1014000],
23
+ [21925427, 1015000], [22500517, 1016000], [22759684, 1016001], [23056976, 1016002], [23544582, 1017000],
24
+ [24002343, 1017001]
25
+ ];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSpecExtensions = getSpecExtensions;
4
+ exports.getSpecTypes = getSpecTypes;
5
+ exports.getSpecHasher = getSpecHasher;
6
+ exports.getSpecRpc = getSpecRpc;
7
+ exports.getSpecRuntime = getSpecRuntime;
8
+ exports.getSpecAlias = getSpecAlias;
9
+ exports.getUpgradeVersion = getUpgradeVersion;
10
+ const util_1 = require("@pezkuwi/util");
11
+ const index_js_1 = require("./chain/index.js");
12
+ const index_js_2 = require("./spec/index.js");
13
+ const index_js_3 = require("./upgrades/index.js");
14
+ /**
15
+ * @description Perform the callback function using the stringified spec/chain
16
+ * @internal
17
+ * */
18
+ function withNames(chainName, specName, fn) {
19
+ return fn(chainName.toString(), specName.toString());
20
+ }
21
+ /**
22
+ * @descriptionFflatten a VersionedType[] into a Record<string, string>
23
+ * @internal
24
+ * */
25
+ function filterVersions(versions = [], specVersion) {
26
+ return versions
27
+ .filter(({ minmax: [min, max] }) => (min === undefined || min === null || specVersion >= min) &&
28
+ (max === undefined || max === null || specVersion <= max))
29
+ .reduce((result, { types }) => ({ ...result, ...types }), {});
30
+ }
31
+ /**
32
+ * @description Based on the chain and runtimeVersion, get the applicable signed extensions (ready for registration)
33
+ */
34
+ function getSpecExtensions({ knownTypes }, chainName, specName) {
35
+ return withNames(chainName, specName, (c, s) => ({
36
+ ...(knownTypes.typesBundle?.spec?.[s]?.signedExtensions ?? {}),
37
+ ...(knownTypes.typesBundle?.chain?.[c]?.signedExtensions ?? {})
38
+ }));
39
+ }
40
+ /**
41
+ * @description Based on the chain and runtimeVersion, get the applicable types (ready for registration)
42
+ */
43
+ function getSpecTypes({ knownTypes }, chainName, specName, specVersion) {
44
+ const _specVersion = (0, util_1.bnToBn)(specVersion).toNumber();
45
+ return withNames(chainName, specName, (c, s) => ({
46
+ // The order here is always, based on -
47
+ // - spec then chain
48
+ // - typesBundle takes higher precedence
49
+ // - types is the final catch-all override
50
+ ...filterVersions(index_js_2.typesSpec[s], _specVersion),
51
+ ...filterVersions(index_js_1.typesChain[c], _specVersion),
52
+ ...filterVersions(knownTypes.typesBundle?.spec?.[s]?.types, _specVersion),
53
+ ...filterVersions(knownTypes.typesBundle?.chain?.[c]?.types, _specVersion),
54
+ ...(knownTypes.typesSpec?.[s] ?? {}),
55
+ ...(knownTypes.typesChain?.[c] ?? {}),
56
+ ...(knownTypes.types ?? {})
57
+ }));
58
+ }
59
+ /**
60
+ * @description Based on the chain or spec, return the hasher used
61
+ */
62
+ function getSpecHasher({ knownTypes }, chainName, specName) {
63
+ return withNames(chainName, specName, (c, s) => knownTypes.hasher ||
64
+ knownTypes.typesBundle?.chain?.[c]?.hasher ||
65
+ knownTypes.typesBundle?.spec?.[s]?.hasher ||
66
+ null);
67
+ }
68
+ /**
69
+ * @description Based on the chain and runtimeVersion, get the applicable rpc definitions (ready for registration)
70
+ */
71
+ function getSpecRpc({ knownTypes }, chainName, specName) {
72
+ return withNames(chainName, specName, (c, s) => ({
73
+ ...(knownTypes.typesBundle?.spec?.[s]?.rpc ?? {}),
74
+ ...(knownTypes.typesBundle?.chain?.[c]?.rpc ?? {})
75
+ }));
76
+ }
77
+ /**
78
+ * @description Based on the chain and runtimeVersion, get the applicable runtime definitions (ready for registration)
79
+ */
80
+ function getSpecRuntime({ knownTypes }, chainName, specName) {
81
+ return withNames(chainName, specName, (c, s) => ({
82
+ ...(knownTypes.typesBundle?.spec?.[s]?.runtime ?? {}),
83
+ ...(knownTypes.typesBundle?.chain?.[c]?.runtime ?? {})
84
+ }));
85
+ }
86
+ /**
87
+ * @description Based on the chain and runtimeVersion, get the applicable alias definitions (ready for registration)
88
+ */
89
+ function getSpecAlias({ knownTypes }, chainName, specName) {
90
+ return withNames(chainName, specName, (c, s) => ({
91
+ // as per versions, first spec, then chain then finally non-versioned
92
+ ...(knownTypes.typesBundle?.spec?.[s]?.alias ?? {}),
93
+ ...(knownTypes.typesBundle?.chain?.[c]?.alias ?? {}),
94
+ ...(knownTypes.typesAlias ?? {})
95
+ }));
96
+ }
97
+ /**
98
+ * @description Returns a version record for known chains where upgrades are being tracked
99
+ */
100
+ function getUpgradeVersion(genesisHash, blockNumber) {
101
+ const known = index_js_3.upgrades.find((u) => genesisHash.eq(u.genesisHash));
102
+ return known
103
+ ? [
104
+ known.versions.reduce((last, version) => {
105
+ return blockNumber.gt(version.blockNumber)
106
+ ? version
107
+ : last;
108
+ }, undefined),
109
+ known.versions.find((version) => blockNumber.lte(version.blockNumber))
110
+ ]
111
+ : [undefined, undefined];
112
+ }
@@ -0,0 +1,3 @@
1
+ export { mapXcmTypes } from '@pezkuwi/types-create';
2
+ export { packageInfo } from './packageInfo.js';
3
+ export * from './util.js';
@@ -0,0 +1 @@
1
+ export const typesChain = {};
@@ -0,0 +1,2 @@
1
+ import './packageDetect.js';
2
+ export * from './bundle.js';
@@ -0,0 +1,4 @@
1
+ import { packageInfo as typesInfo } from '@pezkuwi/types/packageInfo';
2
+ import { detectPackage } from '@pezkuwi/util';
3
+ import { packageInfo } from './packageInfo.js';
4
+ detectPackage(packageInfo, null, [typesInfo]);
@@ -0,0 +1 @@
1
+ export const packageInfo = { name: '@pezkuwi/types-known', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '16.5.7' };
@@ -0,0 +1,102 @@
1
+ const sharedTypes = {
2
+ // Anchor
3
+ AnchorData: {
4
+ anchoredBlock: 'u64',
5
+ docRoot: 'H256',
6
+ id: 'H256'
7
+ },
8
+ DispatchErrorModule: 'DispatchErrorModuleU8',
9
+ PreCommitData: {
10
+ expirationBlock: 'u64',
11
+ identity: 'H256',
12
+ signingRoot: 'H256'
13
+ },
14
+ // Fees
15
+ Fee: {
16
+ key: 'Hash',
17
+ price: 'Balance'
18
+ },
19
+ // MultiAccount
20
+ MultiAccountData: {
21
+ deposit: 'Balance',
22
+ depositor: 'AccountId',
23
+ signatories: 'Vec<AccountId>',
24
+ threshold: 'u16'
25
+ },
26
+ // Bridge
27
+ ChainId: 'u8',
28
+ DepositNonce: 'u64',
29
+ ResourceId: '[u8; 32]',
30
+ 'chainbridge::ChainId': 'u8',
31
+ // NFT
32
+ RegistryId: 'H160',
33
+ TokenId: 'U256',
34
+ AssetId: {
35
+ registryId: 'RegistryId',
36
+ tokenId: 'TokenId'
37
+ },
38
+ AssetInfo: {
39
+ metadata: 'Bytes'
40
+ },
41
+ MintInfo: {
42
+ anchorId: 'Hash',
43
+ proofs: 'Vec<ProofMint>',
44
+ staticHashes: '[Hash; 3]'
45
+ },
46
+ Proof: {
47
+ leafHash: 'H256',
48
+ sortedHashes: 'H256'
49
+ },
50
+ ProofMint: {
51
+ hashes: 'Vec<Hash>',
52
+ property: 'Bytes',
53
+ salt: '[u8; 32]',
54
+ value: 'Bytes'
55
+ },
56
+ RegistryInfo: {
57
+ fields: 'Vec<Bytes>',
58
+ ownerCanBurn: 'bool'
59
+ },
60
+ ProxyType: {
61
+ _enum: [
62
+ 'Any',
63
+ 'NonTransfer',
64
+ 'Governance',
65
+ 'Staking',
66
+ 'NonProxy'
67
+ ]
68
+ }
69
+ };
70
+ const standaloneTypes = {
71
+ ...sharedTypes,
72
+ AccountInfo: 'AccountInfoWithRefCount',
73
+ Address: 'LookupSource',
74
+ LookupSource: 'IndicesLookupSource',
75
+ Multiplier: 'Fixed64',
76
+ RefCount: 'RefCountTo259'
77
+ };
78
+ export const versioned = [
79
+ {
80
+ minmax: [240, 243],
81
+ types: {
82
+ ...standaloneTypes,
83
+ ProxyType: {
84
+ _enum: [
85
+ 'Any',
86
+ 'NonTransfer',
87
+ 'Governance',
88
+ 'Staking',
89
+ 'Vesting'
90
+ ]
91
+ }
92
+ }
93
+ },
94
+ {
95
+ minmax: [244, 999],
96
+ types: { ...standaloneTypes }
97
+ },
98
+ {
99
+ minmax: [1000, undefined],
100
+ types: { ...sharedTypes }
101
+ }
102
+ ];
@@ -0,0 +1,115 @@
1
+ import { mapXcmTypes } from '@pezkuwi/types-create';
2
+ const sharedTypes = {
3
+ // 16 validators
4
+ CompactAssignments: 'CompactAssignmentsWith16',
5
+ DispatchErrorModule: 'DispatchErrorModuleU8',
6
+ RawSolution: 'RawSolutionWith16',
7
+ // general
8
+ Keys: 'SessionKeys6',
9
+ ProxyType: {
10
+ _enum: ['Any', 'NonTransfer', 'Staking', 'SudoBalances', 'IdentityJudgement', 'CancelProxy']
11
+ },
12
+ Weight: 'WeightV1'
13
+ };
14
+ const addrAccountIdTypes = {
15
+ AccountInfo: 'AccountInfoWithRefCount',
16
+ Address: 'AccountId',
17
+ CompactAssignments: 'CompactAssignmentsWith16',
18
+ DispatchErrorModule: 'DispatchErrorModuleU8',
19
+ LookupSource: 'AccountId',
20
+ Keys: 'SessionKeys5',
21
+ RawSolution: 'RawSolutionWith16',
22
+ ValidatorPrefs: 'ValidatorPrefsWithCommission'
23
+ };
24
+ export const versioned = [
25
+ {
26
+ minmax: [1, 2],
27
+ types: {
28
+ ...sharedTypes,
29
+ ...addrAccountIdTypes,
30
+ CompactAssignments: 'CompactAssignmentsTo257',
31
+ DispatchInfo: 'DispatchInfoTo244',
32
+ Heartbeat: 'HeartbeatTo244',
33
+ Multiplier: 'Fixed64',
34
+ OpenTip: 'OpenTipTo225',
35
+ RefCount: 'RefCountTo259',
36
+ Weight: 'u32'
37
+ }
38
+ },
39
+ {
40
+ minmax: [3, 22],
41
+ types: {
42
+ ...sharedTypes,
43
+ ...addrAccountIdTypes,
44
+ CompactAssignments: 'CompactAssignmentsTo257',
45
+ DispatchInfo: 'DispatchInfoTo244',
46
+ Heartbeat: 'HeartbeatTo244',
47
+ OpenTip: 'OpenTipTo225',
48
+ RefCount: 'RefCountTo259'
49
+ }
50
+ },
51
+ {
52
+ minmax: [23, 42],
53
+ types: {
54
+ ...sharedTypes,
55
+ ...addrAccountIdTypes,
56
+ CompactAssignments: 'CompactAssignmentsTo257',
57
+ DispatchInfo: 'DispatchInfoTo244',
58
+ Heartbeat: 'HeartbeatTo244',
59
+ RefCount: 'RefCountTo259'
60
+ }
61
+ },
62
+ {
63
+ minmax: [43, 44],
64
+ types: {
65
+ ...sharedTypes,
66
+ ...addrAccountIdTypes,
67
+ DispatchInfo: 'DispatchInfoTo244',
68
+ Heartbeat: 'HeartbeatTo244',
69
+ RefCount: 'RefCountTo259'
70
+ }
71
+ },
72
+ {
73
+ minmax: [45, 47],
74
+ types: {
75
+ ...sharedTypes,
76
+ ...addrAccountIdTypes
77
+ }
78
+ },
79
+ {
80
+ minmax: [48, 49],
81
+ types: {
82
+ ...sharedTypes,
83
+ AccountInfo: 'AccountInfoWithDualRefCount'
84
+ }
85
+ },
86
+ {
87
+ minmax: [50, 9099],
88
+ types: {
89
+ ...sharedTypes,
90
+ ...mapXcmTypes('V0')
91
+ }
92
+ },
93
+ {
94
+ minmax: [9100, 9105],
95
+ types: {
96
+ ...sharedTypes,
97
+ ...mapXcmTypes('V1')
98
+ }
99
+ },
100
+ {
101
+ // metadata v14
102
+ minmax: [9106, undefined],
103
+ types: {
104
+ Weight: 'WeightV1'
105
+ }
106
+ }
107
+ // ,
108
+ // {
109
+ // // weight v2 introduction
110
+ // minmax: [9300, undefined],
111
+ // types: {
112
+ // Weight: 'WeightV2'
113
+ // }
114
+ // }
115
+ ];
@@ -0,0 +1,24 @@
1
+ import { versioned as centrifugeChain } from './centrifuge-chain.js';
2
+ import { versioned as dicle } from './dicle.js';
3
+ import { versioned as node } from './node.js';
4
+ import { versioned as nodeTemplate } from './node-template.js';
5
+ import { versioned as pezkuwi } from './pezkuwi.js';
6
+ import { versioned as pezkuwichain } from './pezkuwichain.js';
7
+ import { versioned as shell } from './shell.js';
8
+ import { versioned as statemine } from './statemine.js';
9
+ import { versioned as statemint } from './statemint.js';
10
+ import { versioned as westmint } from './westmint.js';
11
+ import { versioned as zagros } from './zagros.js';
12
+ export const typesSpec = {
13
+ 'centrifuge-chain': centrifugeChain,
14
+ dicle,
15
+ node,
16
+ 'node-template': nodeTemplate,
17
+ pezkuwi,
18
+ pezkuwichain,
19
+ shell,
20
+ statemine,
21
+ statemint,
22
+ zagros,
23
+ westmint
24
+ };
@@ -0,0 +1,10 @@
1
+ export const versioned = [
2
+ {
3
+ minmax: [0, undefined],
4
+ types: {
5
+ // nothing, API tracks master
6
+ // (v2 weights are not yet the default)
7
+ Weight: 'WeightV2'
8
+ }
9
+ }
10
+ ];
@@ -0,0 +1,10 @@
1
+ export const versioned = [
2
+ {
3
+ minmax: [0, undefined],
4
+ types: {
5
+ // nothing, API tracks master
6
+ // (v2 weights are not yet the default)
7
+ Weight: 'WeightV2'
8
+ }
9
+ }
10
+ ];
@@ -0,0 +1,102 @@
1
+ const sharedTypes = {
2
+ CompactAssignments: 'CompactAssignmentsWith16',
3
+ DispatchErrorModule: 'DispatchErrorModuleU8',
4
+ RawSolution: 'RawSolutionWith16',
5
+ Keys: 'SessionKeys6',
6
+ ProxyType: {
7
+ _enum: {
8
+ Any: 0,
9
+ NonTransfer: 1,
10
+ Governance: 2,
11
+ Staking: 3,
12
+ UnusedSudoBalances: 4,
13
+ IdentityJudgement: 5,
14
+ CancelProxy: 6,
15
+ Auction: 7
16
+ }
17
+ },
18
+ Weight: 'WeightV1'
19
+ };
20
+ const addrAccountIdTypes = {
21
+ AccountInfo: 'AccountInfoWithRefCount',
22
+ Address: 'AccountId',
23
+ DispatchErrorModule: 'DispatchErrorModuleU8',
24
+ Keys: 'SessionKeys5',
25
+ LookupSource: 'AccountId',
26
+ ValidatorPrefs: 'ValidatorPrefsWithCommission'
27
+ };
28
+ export const versioned = [
29
+ {
30
+ minmax: [0, 10],
31
+ types: {
32
+ ...sharedTypes,
33
+ ...addrAccountIdTypes,
34
+ CompactAssignments: 'CompactAssignmentsTo257',
35
+ OpenTip: 'OpenTipTo225',
36
+ RefCount: 'RefCountTo259',
37
+ ElectionResult: 'ElectionResultToSpec10'
38
+ }
39
+ },
40
+ {
41
+ minmax: [11, 12],
42
+ types: {
43
+ ...sharedTypes,
44
+ ...addrAccountIdTypes,
45
+ CompactAssignments: 'CompactAssignmentsTo257',
46
+ OpenTip: 'OpenTipTo225',
47
+ RefCount: 'RefCountTo259'
48
+ }
49
+ },
50
+ {
51
+ minmax: [13, 22],
52
+ types: {
53
+ ...sharedTypes,
54
+ ...addrAccountIdTypes,
55
+ CompactAssignments: 'CompactAssignmentsTo257',
56
+ RefCount: 'RefCountTo259'
57
+ }
58
+ },
59
+ {
60
+ minmax: [23, 24],
61
+ types: {
62
+ ...sharedTypes,
63
+ ...addrAccountIdTypes,
64
+ RefCount: 'RefCountTo259'
65
+ }
66
+ },
67
+ {
68
+ minmax: [25, 27],
69
+ types: {
70
+ ...sharedTypes,
71
+ ...addrAccountIdTypes
72
+ }
73
+ },
74
+ {
75
+ minmax: [28, 29],
76
+ types: {
77
+ ...sharedTypes,
78
+ AccountInfo: 'AccountInfoWithDualRefCount'
79
+ }
80
+ },
81
+ {
82
+ minmax: [30, 9109],
83
+ types: {
84
+ ...sharedTypes
85
+ }
86
+ },
87
+ {
88
+ // metadata v14
89
+ minmax: [9110, undefined],
90
+ types: {
91
+ Weight: 'WeightV1'
92
+ }
93
+ }
94
+ // ,
95
+ // {
96
+ // // weight v2 introduction
97
+ // minmax: [9300, undefined],
98
+ // types: {
99
+ // Weight: 'WeightV2'
100
+ // }
101
+ // }
102
+ ];