Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72ce4e2a36 | ||
|
|
993096b3ef | ||
|
|
1a9fe6b728 | ||
|
|
651d651213 | ||
|
|
42b9735c32 | ||
|
|
c364ee3301 | ||
|
|
f96e8c42a0 | ||
|
|
7a2da0c6d1 | ||
|
|
8fd076380e | ||
|
|
bfd1d517dd | ||
|
|
75a5702c13 | ||
|
|
6316fae5fa | ||
|
|
76ba1e54b7 | ||
|
|
cb1078ac4b | ||
|
|
c998d261fd | ||
|
|
c71bd49ee4 | ||
|
|
4e71139ab9 | ||
|
|
b22620b8fe | ||
|
|
40ac28be04 | ||
|
|
669d7ccdcb | ||
|
|
58b3808da9 | ||
|
|
1bed656be8 | ||
|
|
e750800dec | ||
|
|
fd1871b2cd | ||
|
|
8cc1038252 | ||
|
|
7494451e00 | ||
|
|
f7e5d6091e | ||
|
|
7b41b63048 | ||
|
|
61a6fbdbd1 | ||
|
|
173b3119bc | ||
|
|
d5e31e4d44 | ||
|
|
9670dd9c66 | ||
|
|
145d067ab9 | ||
|
|
e84c58d1d0 | ||
|
|
8efc552b9b | ||
|
|
2b3d40a29b | ||
|
|
d91d29cff5 | ||
|
|
17fa8fa120 | ||
|
|
cecd43305e | ||
|
|
9501da9e25 | ||
|
|
9becdced12 | ||
|
|
262372666c | ||
|
|
83907f79fe | ||
|
|
abce780033 | ||
|
|
a6b23ca635 | ||
|
|
508439ce59 | ||
|
|
64e30dd0a7 | ||
|
|
33fd56a61d | ||
|
|
4ec2c32854 | ||
|
|
3ca93ee283 | ||
|
|
7cf36bbf68 | ||
|
|
da100e80f2 | ||
|
|
9d9a99e71e | ||
|
|
6ce045c9a1 | ||
|
|
5c0fe9b34b | ||
|
|
f9acee5c5f | ||
|
|
91afebc020 | ||
|
|
0e95f51e94 | ||
|
|
67e8232718 | ||
|
|
72719ff3a2 | ||
|
|
585bedb996 | ||
|
|
bc199956f3 | ||
|
|
1772458304 | ||
|
|
e75272e15b | ||
|
|
85473c9912 | ||
|
|
a3e1499f20 | ||
|
|
127122990e | ||
|
|
3dfe19c601 | ||
|
|
c054f96c80 | ||
|
|
11c1b998be | ||
|
|
fdebf8b74b | ||
|
|
7c91ee5ccc | ||
|
|
c146727510 | ||
|
|
096da21c76 | ||
|
|
d3c16b5cb4 | ||
|
|
87b4cecc1b | ||
|
|
d79a5301fb | ||
|
|
7481983e44 | ||
|
|
47291533e6 | ||
|
|
a15d0dd0df | ||
|
|
1dca21d607 | ||
|
|
b19d5d4dbc | ||
|
|
c6c9a1259c | ||
|
|
8b1191a17f | ||
|
|
94a900583f | ||
|
|
0581fc71ce | ||
|
|
73a5566ded | ||
|
|
ce6e1e8825 | ||
|
|
b04e7b0cee | ||
|
|
50332dab75 | ||
|
|
e615f855d1 | ||
|
|
87bee8ac29 | ||
|
|
49724380f2 | ||
|
|
68d928742d | ||
|
|
fc9c5c8279 | ||
|
|
d402744e7d | ||
|
|
cf7e7cd92a | ||
|
|
e71c2b0cc5 | ||
|
|
6aef459464 | ||
|
|
5954ec8d98 | ||
|
|
1f751e07fc | ||
|
|
b872fc1e9c | ||
|
|
1e604cc5fb | ||
|
|
25ab1d1239 | ||
|
|
df6530831d | ||
|
|
0bfa069f1b | ||
|
|
a204048320 | ||
|
|
a887cd0159 | ||
|
|
8cddcd2513 | ||
|
|
72d1326de6 | ||
|
|
27de09999c | ||
|
|
55c6a4f267 | ||
|
|
92dfe00851 | ||
|
|
f82c572704 | ||
|
|
119f88e6d2 | ||
|
|
e5dc4065ff | ||
|
|
e2b4e0d3e6 | ||
|
|
1921d75d01 | ||
|
|
216435e1a1 | ||
|
|
86398e21f8 | ||
|
|
fd84892dac | ||
|
|
2329af239e | ||
|
|
f95f36110f | ||
|
|
3b7b44f048 | ||
|
|
a1e7566114 | ||
|
|
ec4ec4fa5e | ||
|
|
cf26e34008 | ||
|
|
15c440d72f | ||
|
|
9b9c621265 | ||
|
|
eb7fd94c20 | ||
|
|
54baf26d4f | ||
|
|
1ab7475a58 | ||
|
|
b5adbe72f8 | ||
|
|
778d79a9a5 | ||
|
|
cd4b5e36dd | ||
|
|
9de00f5a46 | ||
|
|
60e8148e8c | ||
|
|
56358b1016 | ||
|
|
68ce512573 | ||
|
|
b0b2145d15 | ||
|
|
ab683fb3f8 | ||
|
|
bfb92e6d8b | ||
|
|
65b019e635 | ||
|
|
dac94c5196 | ||
|
|
83204f15fc | ||
|
|
fe6473351c | ||
|
|
90efba4c36 | ||
|
|
771d06b2a2 | ||
|
|
217da1451a | ||
|
|
f92f2ea357 | ||
|
|
38a978b9be | ||
|
|
0945d26c03 | ||
|
|
3f38963e85 | ||
|
|
534e7e3650 | ||
|
|
c6d3a68dd0 | ||
|
|
bad574609c | ||
|
|
35132f4b28 | ||
|
|
49e8e18a0f | ||
|
|
436bd956b6 | ||
|
|
9ead1a8c46 | ||
|
|
0f61aa2ace | ||
|
|
4a2a70c0fb | ||
|
|
97d553c52f | ||
|
|
23586f9849 | ||
|
|
dda0c3b980 | ||
|
|
aafd0a90c7 | ||
|
|
e64eb91ba9 | ||
|
|
02947a1c08 | ||
|
|
5a44d3b6e0 | ||
|
|
0bac3d4915 | ||
|
|
ab3f0253bd | ||
|
|
6f199db86a | ||
|
|
a95bca939d | ||
|
|
c5446d6fef | ||
|
|
b1ec8d160a | ||
|
|
b0acdbd96c | ||
|
|
af3d20ebe1 | ||
|
|
5897fb7e3b | ||
|
|
bdafcd9e97 | ||
|
|
095710349a | ||
|
|
586f02f831 | ||
|
|
5ca873b501 | ||
|
|
058a3ac640 | ||
|
|
5a4d11cb39 | ||
|
|
fb0796d408 | ||
|
|
e21b101ef7 | ||
|
|
79e828837f | ||
|
|
21aeb17a34 | ||
|
|
642414295c | ||
|
|
28c2e5524d | ||
|
|
5e1ccd177e | ||
|
|
c300e1b63d | ||
|
|
e2859e4761 | ||
|
|
4f06d6d2c5 | ||
|
|
67d617ce11 | ||
|
|
ab3a22a207 | ||
|
|
7b00fd3925 | ||
|
|
2b703062d0 | ||
|
|
0bca92cdb8 | ||
|
|
a437f98b31 | ||
|
|
8666d580df | ||
|
|
651bb35acf | ||
|
|
f78a00cd7f | ||
|
|
e55c9d248c | ||
|
|
986355b56f | ||
|
|
dd9123f790 | ||
|
|
d28d2b5f48 | ||
|
|
0b3cad94bc | ||
|
|
2b29dda2ad | ||
|
|
3d3af779c1 | ||
|
|
d04cc7b940 | ||
|
|
2ef84c5dcd | ||
|
|
36c24826ec | ||
|
|
184f702efd | ||
|
|
b392c19922 | ||
|
|
38de00d8d8 | ||
|
|
f9c58203a0 | ||
|
|
baaa27ba9e | ||
|
|
365fde895a | ||
|
|
b17a6d3920 | ||
|
|
0d8df6380e | ||
|
|
52cd797488 | ||
|
|
a71d401f1d | ||
|
|
61b68393e7 | ||
|
|
7d6933ed39 | ||
|
|
32a04fd24f | ||
|
|
009461f564 | ||
|
|
00cb2ef875 | ||
|
|
fed0d5bf0d | ||
|
|
53e9305f41 | ||
|
|
2ca9da3304 | ||
|
|
7a4d32710c | ||
|
|
15c8859b06 | ||
|
|
e0e9829417 | ||
|
|
00bc5c818b | ||
|
|
f43600d773 | ||
|
|
fc112988f0 | ||
|
|
a9fa603ad8 | ||
|
|
d86bff91a7 | ||
|
|
26b5303c2d | ||
|
|
b4ebdc29a1 | ||
|
|
6e4dc0b52d | ||
|
|
02ec613def | ||
|
|
a83e1da941 | ||
|
|
c4e8270b45 | ||
|
|
ddb9b44460 | ||
|
|
887812eeaa | ||
|
|
6415eb6515 | ||
|
|
06c829d30f | ||
|
|
efd6ba9a4c | ||
|
|
a1f2473fb4 | ||
|
|
9e53fc060d | ||
|
|
364001f287 | ||
|
|
5bcd56d6c3 | ||
|
|
5b3f18e6fd | ||
|
|
8ab79958f0 | ||
|
|
1343aa4651 | ||
|
|
a311fed87e | ||
|
|
c0590bc5fe | ||
|
|
d650744984 | ||
|
|
7baf2ecf7a | ||
|
|
accfce9785 | ||
|
|
0349c39907 | ||
|
|
155701a7b1 | ||
|
|
c6e5cb812b | ||
|
|
63f3fc8a89 | ||
|
|
591e9b145d | ||
|
|
caca8ce345 | ||
|
|
ccae7c9421 | ||
|
|
be0a764be7 | ||
|
|
4be19804b2 | ||
|
|
7874a8e723 | ||
|
|
5e9eed426a | ||
|
|
ff3b798ea4 | ||
|
|
62163ea5a7 | ||
|
|
96cde82c60 | ||
|
|
a2ea6a36d1 | ||
|
|
5531d180d7 | ||
|
|
aacf0726e4 | ||
|
|
9fde30a1d6 | ||
|
|
0982f68507 | ||
|
|
bfabfcd99f | ||
|
|
64ac37ee4d | ||
|
|
442a0fbbf8 | ||
|
|
615e4c67fd | ||
|
|
1c7f3b157d | ||
|
|
b0ce49de18 | ||
|
|
95798b4636 | ||
|
|
88da5011e0 | ||
|
|
18f596d448 | ||
|
|
2c7b904c37 | ||
|
|
c30ae402da | ||
|
|
1a0677800e | ||
|
|
8dbc373ac5 | ||
|
|
cf956f869c | ||
|
|
09a34a7f05 | ||
|
|
18a9205868 | ||
|
|
9a9fa90f5e | ||
|
|
114f4f82bf | ||
|
|
3d0865d95d | ||
|
|
60993d8fa4 | ||
|
|
89227fd031 | ||
|
|
9ecf4f2ee0 | ||
|
|
390610127a | ||
|
|
5ef0fedd26 | ||
|
|
da289238b0 | ||
|
|
8289e181cc | ||
|
|
d06860861c | ||
|
|
1797d6b42c | ||
|
|
6a9a53c48c | ||
|
|
d680b3dd39 | ||
|
|
3b479879ca | ||
|
|
ea2c942ece | ||
|
|
df2039f54d | ||
|
|
501638b2d9 | ||
|
|
d163d91909 | ||
|
|
dc7f687563 | ||
|
|
ca4802326c | ||
|
|
f9b2d26381 | ||
|
|
28a5ac4279 | ||
|
|
feb652cef3 | ||
|
|
f87479f9da | ||
|
|
2be54afe24 | ||
|
|
24d9d053a1 | ||
|
|
3299292368 | ||
|
|
58b320a791 | ||
|
|
6998d9232b | ||
|
|
43e11d8f56 | ||
|
|
22d06b93a6 | ||
|
|
bc3f066c3b | ||
|
|
de30dd5bfe | ||
|
|
a64228c9b2 | ||
|
|
5374f8448f | ||
|
|
c5371c146b | ||
|
|
5de73b706e | ||
|
|
7fc736769a | ||
|
|
747855b161 | ||
|
|
3bdf49b042 | ||
|
|
93175f6a01 | ||
|
|
b4150d5dbf | ||
|
|
dfbbfa8a7d | ||
|
|
97116a3d8a | ||
|
|
0c7fed3090 | ||
|
|
5a4414d36d | ||
|
|
7d41d34a03 | ||
|
|
f983b6aa90 | ||
|
|
9271f7f05a | ||
|
|
46c00d4883 | ||
|
|
2d26e748f0 | ||
|
|
db1a699c0a | ||
|
|
53f9abe4e2 | ||
|
|
263d2a40f3 | ||
|
|
c73c26d133 | ||
|
|
63afad4862 | ||
|
|
fca68ae286 | ||
|
|
efc4a291b1 | ||
|
|
ed14218205 | ||
|
|
4ec727ed6b | ||
|
|
a1ccedf76e | ||
|
|
ec1f6ca5f5 | ||
|
|
dcca12bc23 | ||
|
|
d9d0d7b0c8 | ||
|
|
1a5de033e6 | ||
|
|
3460a74f7e | ||
|
|
56eee35e05 | ||
|
|
bc81ca45ef | ||
|
|
7a8a4f1c64 | ||
|
|
4c811a3fdd | ||
|
|
6fcd984205 | ||
|
|
62bbf09f5c | ||
|
|
dea14bcfc4 | ||
|
|
5246a6771c | ||
|
|
bc2a51e28e | ||
|
|
dd085cee79 | ||
|
|
a1e25176dd | ||
|
|
c241d2430f | ||
|
|
0f84a4f53d | ||
|
|
200ea2310c | ||
|
|
a22a111f72 | ||
|
|
2a16dc80c9 | ||
|
|
0dcf349831 | ||
|
|
f77a97b1fe | ||
|
|
38209a3123 | ||
|
|
c0d5408d8f | ||
|
|
700812aa60 | ||
|
|
ae24a99fcb | ||
|
|
257c9579d0 | ||
|
|
74a969bb54 | ||
|
|
00b26f48b4 | ||
|
|
641ca4daee | ||
|
|
4ab9ad6765 | ||
|
|
1c3fc93ebd | ||
|
|
03f323fae1 | ||
|
|
7cae843e9b | ||
|
|
ab3b162d7e | ||
|
|
21425900bb | ||
|
|
b82bf68954 | ||
|
|
cfffa68c96 | ||
|
|
f08be2f928 | ||
|
|
f213063972 | ||
|
|
3828f41a0f | ||
|
|
bc62b46fa5 | ||
|
|
9f0a32474d | ||
|
|
ebde5a3c19 | ||
|
|
321b759723 | ||
|
|
f49f05c820 | ||
|
|
e9fec17599 | ||
|
|
6f24d2f5dc | ||
|
|
c028c69582 | ||
|
|
136ec7c600 | ||
|
|
0455a94630 | ||
|
|
3c7dc4b82a | ||
|
|
52e36534cf | ||
|
|
0320e9b410 | ||
|
|
f4655a233a | ||
|
|
4826906b6d | ||
|
|
2f2bbc01bb | ||
|
|
d8136a8e61 | ||
|
|
319535a1e9 | ||
|
|
c2944f2dc1 | ||
|
|
1fcc278381 | ||
|
|
fd87b08396 | ||
|
|
114c8d3f98 | ||
|
|
a8b38b09d6 | ||
|
|
47df39e02d | ||
|
|
dd58202af7 | ||
|
|
6ee830b838 | ||
|
|
3c3f1bf78e | ||
|
|
8282159f70 | ||
|
|
d946a99a35 | ||
|
|
2235cbde19 | ||
|
|
e89212b435 | ||
|
|
9913701e82 | ||
|
|
61a8b4041e | ||
|
|
56fb5c9985 | ||
|
|
eb9a0c4a66 | ||
|
|
ac07123e54 | ||
|
|
a9865bb60a | ||
|
|
62741a10dd | ||
|
|
c277b3d865 | ||
|
|
edde226740 | ||
|
|
88a9316dbd | ||
|
|
23b7ff1794 | ||
|
|
f1fda12353 | ||
|
|
e2e0e38d35 | ||
|
|
74279380e3 | ||
|
|
e0c5f7cab0 | ||
|
|
7a088f9ce7 | ||
|
|
d9ea5ee921 | ||
|
|
4b8792fe7c | ||
|
|
5cc25fb40c | ||
|
|
2494801d50 | ||
|
|
dbcb39734a | ||
|
|
0be50b285b | ||
|
|
2f07e1c45f | ||
|
|
39eff81207 | ||
|
|
19f3c5b16b | ||
|
|
cdd74ea084 | ||
|
|
54c96ed975 | ||
|
|
4e507246e3 | ||
|
|
d0e0008399 | ||
|
|
a6eeba83c1 | ||
|
|
541eceae82 | ||
|
|
3d0a1701fa | ||
|
|
0e46592f4d | ||
|
|
a561253de9 | ||
|
|
0c6a4754f0 | ||
|
|
60dd4e9699 | ||
|
|
f10f79c0ac | ||
|
|
8394c71cfa | ||
|
|
dd0bd21d88 | ||
|
|
58875b8125 | ||
|
|
7e0586794a | ||
|
|
d800886ee0 | ||
|
|
0bdfc37096 | ||
|
|
db3b3f606b | ||
|
|
717043c557 | ||
|
|
8cee4c462a | ||
|
|
f6f1646147 | ||
|
|
dd533f9831 | ||
|
|
5ba13358a5 | ||
|
|
3a3680194d | ||
|
|
d436e42bb0 | ||
|
|
d6d1575ba9 | ||
|
|
15e5f4d401 | ||
|
|
f4c2b150d3 | ||
|
|
c1d727fbe8 | ||
|
|
475891575b | ||
|
|
02b7807ba5 | ||
|
|
d15f0b3ac5 | ||
|
|
e8f782e1f2 | ||
|
|
0f627bed2d | ||
|
|
427cf3e105 | ||
|
|
9e98f81dc0 | ||
|
|
f98422c42b | ||
|
|
267c6242a3 | ||
|
|
94cbbf5356 | ||
|
|
c1b1ad7843 | ||
|
|
ce5769471f | ||
|
|
09222d9055 | ||
|
|
9c4554ddb3 | ||
|
|
1ba4c0c277 | ||
|
|
ac46305d15 | ||
|
|
ad59abfc37 | ||
|
|
5a48ca3a0a | ||
|
|
d3dabadf95 | ||
|
|
212d0e33ae | ||
|
|
a6adeb739f | ||
|
|
cd440ea3c4 | ||
|
|
eb480d7ce9 | ||
|
|
298397f499 | ||
|
|
6b17bf5a7a | ||
|
|
3b3da09f33 | ||
|
|
976d708fae | ||
|
|
92c250e9a7 | ||
|
|
ba43c288fe | ||
|
|
ef0d1f4e8a | ||
|
|
cc31d1176e | ||
|
|
b45e0d4e0d | ||
|
|
3b894da9f2 | ||
|
|
83500c05b3 | ||
|
|
c554e5eef7 | ||
|
|
6b655838a0 | ||
|
|
4bd23463ab | ||
|
|
9c758cce95 | ||
|
|
abdc50f405 | ||
|
|
b849d50995 | ||
|
|
3d2307f12a | ||
|
|
320135dbe5 | ||
|
|
074e790bfc | ||
|
|
d561fc9dc7 | ||
|
|
8b37ed6dda | ||
|
|
d2a7df9e0b | ||
|
|
66ab71b29e | ||
|
|
8d2300ca3f | ||
|
|
b4bb6613b1 | ||
|
|
2389ea16e1 | ||
|
|
e33139919f | ||
|
|
4c8e7135de | ||
|
|
4115a93ed3 | ||
|
|
a7526ba5f3 | ||
|
|
8fe02a1434 | ||
|
|
ac25d0704d | ||
|
|
82d0bfc51b | ||
|
|
8e514ad511 | ||
|
|
abb45e5fcf | ||
|
|
71273dbce3 | ||
|
|
3d5b69d6e6 | ||
|
|
d51ddc70f9 | ||
|
|
9052f16e0f | ||
|
|
dd19d17b60 | ||
|
|
58ba63069a | ||
|
|
6206569e5b | ||
|
|
c3bb18fbaf | ||
|
|
186cfc93b5 | ||
|
|
9a92089810 | ||
|
|
211c487297 | ||
|
|
3f3c5a753f | ||
|
|
d1d0168793 | ||
|
|
a1f6e207f4 | ||
|
|
de4e56ace0 | ||
|
|
6c5ca7ebec | ||
|
|
d9f3d319fb | ||
|
|
4fd3289739 | ||
|
|
1a267c58f3 | ||
|
|
745a1b7838 | ||
|
|
7e62e08b5d | ||
|
|
2328bf8779 | ||
|
|
1fb35ae110 | ||
|
|
91278f67ac | ||
|
|
f8121e364d | ||
|
|
5c0ff26585 | ||
|
|
7366fc201d | ||
|
|
6ce7deb1df | ||
|
|
b80a28f65d | ||
|
|
4f7f7769be | ||
|
|
a79dcca89f | ||
|
|
17a7427e04 | ||
|
|
43abd5f525 | ||
|
|
660fe4e087 | ||
|
|
3b9d03bb2e | ||
|
|
1cbbe3bb12 | ||
|
|
a79e9f56a1 | ||
|
|
3b39de3852 | ||
|
|
0526b8dbfc | ||
|
|
3aeca2942b | ||
|
|
591b96206d | ||
|
|
b2c8e748c3 | ||
|
|
be9feced65 | ||
|
|
f73ed3ef36 | ||
|
|
cf1fabaecf | ||
|
|
ac8446b30c | ||
|
|
abb802bc92 | ||
|
|
9cc2cd8240 | ||
|
|
efbbde74fc | ||
|
|
ba5a02b5f5 | ||
|
|
e035ba20ac | ||
|
|
116b6ee1b5 | ||
|
|
8d1736c047 | ||
|
|
4408f3a3ac | ||
|
|
058edbe9c5 | ||
|
|
0c5211c1a6 | ||
|
|
7a5ef6249e | ||
|
|
5fa64a9e26 | ||
|
|
48d2dbd885 | ||
|
|
254e218a7b | ||
|
|
e44cf73a45 | ||
|
|
61589add1b | ||
|
|
046f51daf6 | ||
|
|
4c3b6a660e | ||
|
|
5145a0c181 | ||
|
|
95fc6c0fd3 | ||
|
|
84621a26cb | ||
|
|
60652cdf22 | ||
|
|
a37045036e | ||
|
|
3887f6f836 | ||
|
|
fcdb31dc3c | ||
|
|
f4ee507a17 | ||
|
|
58881bc317 | ||
|
|
42d39a81e4 | ||
|
|
f818e334eb | ||
|
|
e861a0a4eb | ||
|
|
611ff12a3d | ||
|
|
9ac9d72082 | ||
|
|
aa30b39525 | ||
|
|
91161b95c3 | ||
|
|
9fe2798b70 | ||
|
|
f233671c27 | ||
|
|
29244d211b | ||
|
|
73b226b30b | ||
|
|
97c7625557 | ||
|
|
0e96488024 | ||
|
|
baf681e98d | ||
|
|
32c9580bfc | ||
|
|
aa09601e88 | ||
|
|
b9805cdc94 | ||
|
|
feb36d43a4 | ||
|
|
92c88d7c13 | ||
|
|
033fc4f480 | ||
|
|
4ca9670e4e | ||
|
|
8fee66c0fa | ||
|
|
9a3b5d7a2c | ||
|
|
f166431b02 | ||
|
|
088fdc6171 | ||
|
|
910c77fd39 | ||
|
|
dacf2875b7 | ||
|
|
cbcc79972a | ||
|
|
0faddf1df6 | ||
|
|
697c8b8e7a | ||
|
|
99403b8246 | ||
|
|
4b7e1003e0 | ||
|
|
5fd6d39aed | ||
|
|
cedb1afe6f | ||
|
|
4bff8e5158 | ||
|
|
474aedde34 | ||
|
|
a8d7566186 | ||
|
|
beb7b54e4a | ||
|
|
d08cc74aad | ||
|
|
27e4279c55 | ||
|
|
6cd2f3b386 | ||
|
|
472c971c5b | ||
|
|
d8756455c2 | ||
|
|
5aae48cc28 | ||
|
|
4ab3b55383 | ||
|
|
6ea6b90e03 | ||
|
|
eb5c888cb8 | ||
|
|
cda07dfa0b | ||
|
|
4abae3200b | ||
|
|
b60895beb4 | ||
|
|
855d70a3b3 | ||
|
|
583d9bfe36 | ||
|
|
d519611a25 | ||
|
|
9a9bace8e8 | ||
|
|
40810f2fdb | ||
|
|
361a77580e | ||
|
|
ea45c7e689 | ||
|
|
cc1d51a6ca | ||
|
|
b8233fb7b8 | ||
|
|
5cbe80066d | ||
|
|
3f6c10256c | ||
|
|
609b2830b0 | ||
|
|
b7bbd2d615 | ||
|
|
41d6429782 | ||
|
|
ae168a00a9 | ||
|
|
79694d8a95 | ||
|
|
95be64cbd7 | ||
|
|
76bf7a0079 | ||
|
|
142390f27d | ||
|
|
d0145ce58c | ||
|
|
9217f83870 | ||
|
|
cf261724c3 | ||
|
|
375afb5dff | ||
|
|
9e5779644c | ||
|
|
a6a92837e4 | ||
|
|
d84f40dd77 | ||
|
|
5183c28d5e | ||
|
|
5ed3ea51d3 | ||
|
|
39d76c969d | ||
|
|
5cf4c4edbe | ||
|
|
f6c376a3e7 | ||
|
|
d9a2265b0f | ||
|
|
0c1b1c48f2 | ||
|
|
7c24998e28 | ||
|
|
bf442a4bd4 | ||
|
|
40f432badb | ||
|
|
15a8681ba0 | ||
|
|
61ed6e97f4 | ||
|
|
eee4bf51d6 | ||
|
|
b9cbb9e2e8 |
@@ -1,24 +0,0 @@
|
||||
// Copyright 2017-2023 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
const base = require('@polkadot/dev/config/eslint.cjs');
|
||||
|
||||
module.exports = {
|
||||
...base,
|
||||
ignorePatterns: [
|
||||
...base.ignorePatterns
|
||||
],
|
||||
parserOptions: {
|
||||
...base.parserOptions,
|
||||
project: [
|
||||
'./tsconfig.eslint.json'
|
||||
]
|
||||
},
|
||||
rules: {
|
||||
...base.rules,
|
||||
// add override for any (a metric ton of them, initial conversion)
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
// this seems very broken atm, false positives
|
||||
'@typescript-eslint/unbound-method': 'off'
|
||||
}
|
||||
};
|
||||
@@ -11,6 +11,6 @@ jobs:
|
||||
steps:
|
||||
- uses: jacogr/action-approve@795afd1dd096a2071d7ec98740661af4e853b7da
|
||||
with:
|
||||
authors: jacogr
|
||||
authors: jacogr, TarikGul
|
||||
labels: -auto
|
||||
token: ${{ secrets.GH_PAT_BOT }}
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
steps:
|
||||
- uses: jacogr/action-merge@d2d64b4545acd93b0a9575177d3d215ae3f92029
|
||||
with:
|
||||
checks: build,lint,test
|
||||
checks: pr (build),pr (lint),pr (test)
|
||||
labels: -auto
|
||||
strategy: squash
|
||||
token: ${{ secrets.GH_PAT_BOT }}
|
||||
|
||||
@@ -10,16 +10,16 @@ jobs:
|
||||
env:
|
||||
YARN_ENABLE_SCRIPTS: false
|
||||
steps:
|
||||
- uses: dessant/lock-threads@f1a42f0f44eb83361d617a014663e1a76cf282d2
|
||||
- uses: dessant/lock-threads@c1b35aecc5cdb1a34539d14196df55838bb2f836
|
||||
with:
|
||||
github-token: ${{ secrets.GH_PAT_BOT }}
|
||||
issue-lock-inactive-days: '7'
|
||||
issue-lock-comment: >
|
||||
issue-inactive-days: '7'
|
||||
issue-comment: >
|
||||
This thread has been automatically locked since there has not been
|
||||
any recent activity after it was closed. Please open a new issue
|
||||
if you think you have a related problem or query.
|
||||
pr-lock-inactive-days: '2'
|
||||
pr-lock-comment: >
|
||||
pr-inactive-days: '2'
|
||||
pr-comment: >
|
||||
This pull request has been automatically locked since there
|
||||
has not been any recent activity after it was closed.
|
||||
Please open a new issue for related bugs.
|
||||
|
||||
@@ -3,20 +3,23 @@ on: [pull_request]
|
||||
|
||||
jobs:
|
||||
pr:
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
step: ['lint', 'test', 'build', 'deno']
|
||||
name: ${{ matrix.step }}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
YARN_ENABLE_SCRIPTS: false
|
||||
steps:
|
||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
||||
- uses: denoland/setup-deno@004814556e37c54a2f6e31384c9e18e983317366
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
deno-version: vx.x.x
|
||||
node-version: 'lts/*'
|
||||
- uses: denoland/setup-deno@v1
|
||||
with:
|
||||
deno-version: v1.42.x
|
||||
- name: ${{ matrix.step }}
|
||||
if: always()
|
||||
run: |
|
||||
yarn install --immutable | grep -v 'YN0013'
|
||||
yarn install --immutable
|
||||
yarn ${{ matrix.step }}
|
||||
|
||||
@@ -10,7 +10,6 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
step: ['build:release']
|
||||
name: ${{ matrix.step }}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
YARN_ENABLE_SCRIPTS: false
|
||||
@@ -19,11 +18,14 @@ jobs:
|
||||
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT_BOT }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GH_PAT_BOT }}
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- name: ${{ matrix.step }}
|
||||
run: |
|
||||
yarn install --immutable | grep -v 'YN0013'
|
||||
yarn install --immutable
|
||||
yarn ${{ matrix.step }}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
name: 'Close stale issues and PRs'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '55 1/3 * * *'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
YARN_ENABLE_SCRIPTS: false
|
||||
steps:
|
||||
- uses: actions/stale@98ed4cb500039dbcccf4bd9bedada4d0187f2757
|
||||
with:
|
||||
repo-token: ${{ secrets.GH_PAT_BOT }}
|
||||
stale-issue-message: 'This issue has been open for 21 days with no activity and is not labelled as an enhancement. It will be closed in 7 days.'
|
||||
stale-issue-label: 'stale'
|
||||
exempt-issue-labels: '-size-l,-size-m,-size-s,-size-xl,-size-xs,[bug]'
|
||||
days-before-stale: 21
|
||||
days-before-close: 7
|
||||
@@ -19,6 +19,7 @@ NOTES.md
|
||||
!.yarn/plugins
|
||||
.pnp.*
|
||||
.vscode/
|
||||
.idea/
|
||||
cc-test-reporter
|
||||
lerna-debug.log*
|
||||
npm-debug.log*
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
module.exports = require('@polkadot/dev/config/prettier.cjs');
|
||||
|
||||
Vendored
-363
File diff suppressed because one or more lines are too long
-550
File diff suppressed because one or more lines are too long
Vendored
-785
File diff suppressed because one or more lines are too long
+934
File diff suppressed because one or more lines are too long
+9
-7
@@ -1,13 +1,15 @@
|
||||
compressionLevel: mixed
|
||||
|
||||
enableGlobalCache: false
|
||||
|
||||
enableImmutableInstalls: false
|
||||
|
||||
enableProgressBars: false
|
||||
|
||||
logFilters:
|
||||
- code: YN0013
|
||||
level: discard
|
||||
|
||||
nodeLinker: node-modules
|
||||
|
||||
plugins:
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
|
||||
spec: "@yarnpkg/plugin-interactive-tools"
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
|
||||
spec: "@yarnpkg/plugin-version"
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.2.0.cjs
|
||||
yarnPath: .yarn/releases/yarn-4.5.1.cjs
|
||||
|
||||
+739
@@ -1,5 +1,744 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 15.0.2 Dec 13, 2024
|
||||
|
||||
Changes:
|
||||
|
||||
- Fix metadata on init when its value is u32 max ([#6043](https://github.com/polkadot-js/api/pull/6043))
|
||||
- This ensures runtime api information is correctly generated and the correct metadata is used as part of the registry. At the moment this is only an issue on westend asset hub, as reported by users.
|
||||
|
||||
|
||||
## 15.0.1 Nov 27, 2024
|
||||
|
||||
Breaking Changes:
|
||||
|
||||
- Allow external signers to modify the payload ([#6030](https://github.com/polkadot-js/api/pull/6030)) (Thanks to https://github.com/Tbaut)
|
||||
- Add `allowCallDataAlteration` to `SignatureOptions`, and `SignerOptions`. This will default to true when its not inputted. This is strictly tied to signing payloads via external signers.
|
||||
|
||||
Contributed:
|
||||
|
||||
- fix(ExtrinsicPayload): decode assetId with and without option ([#6037](https://github.com/polkadot-js/api/pull/6037)) (Thanks to https://github.com/carlosala)
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust ExtrinsicV5 to fit current spec ([#6029](https://github.com/polkadot-js/api/pull/6029))
|
||||
- This removes the `signed` functionality for ExtrinsicV5 since it is no longer supported
|
||||
- Update docs for WsProvider, and RpcCore ([#6031](https://github.com/polkadot-js/api/pull/6031))
|
||||
- Add testing for assetId access from ExtrinsicPayload ([#6033](https://github.com/polkadot-js/api/pull/6033))
|
||||
- Update Substrate types to 1.16.2 ([#6034](https://github.com/polkadot-js/api/pull/6034))
|
||||
|
||||
|
||||
## 14.3.1 Nov 11, 2024
|
||||
|
||||
Changes:
|
||||
|
||||
- Add rpcCacheCapacity option to ApiOptions ([#6020](https://github.com/polkadot-js/api/pull/6020))
|
||||
- Update metadata script for types-support ([#6021](https://github.com/polkadot-js/api/pull/6021))
|
||||
- Add AssetHub to types-support and test generation ([#6022](https://github.com/polkadot-js/api/pull/6022))
|
||||
- Fix node v22 testing compatibility w/ dev bump ([#6024](https://github.com/polkadot-js/api/pull/6024))
|
||||
- Fix isClaimed for edgecase with non validator Ids ([#6027](https://github.com/polkadot-js/api/pull/6027))
|
||||
- Fix isClaimed in api.derive.staking.{stakerRewards, stakerRewardsMultiEras, stakerRewardsMulti} ([#6026](https://github.com/polkadot-js/api/pull/6026))
|
||||
- Upgrade common to 13.2.3 ([#6025](https://github.com/polkadot-js/api/pull/6025))
|
||||
|
||||
|
||||
## 14.2.3 Nov 5, 2024
|
||||
|
||||
Changes:
|
||||
|
||||
- Increase RPC-CORE default cache capacity ([#6016](https://github.com/polkadot-js/api/pull/6016))
|
||||
- Set CI to use Node.js Iron (v20) ([#6018](https://github.com/polkadot-js/api/pull/6018))
|
||||
|
||||
|
||||
## 14.2.2 Oct 31, 2024
|
||||
|
||||
Changes:
|
||||
|
||||
- fix: update LRUcache to not keep thread ([#6013](https://github.com/polkadot-js/api/pull/6013))
|
||||
- Adjust `api.derive.staking.nextElected` to use erasStakersOverview ([#6011](https://github.com/polkadot-js/api/pull/6011))
|
||||
|
||||
|
||||
## 14.2.1 Oct 28, 2024
|
||||
|
||||
Changes:
|
||||
|
||||
- Add isClaimed field to api.derive.staking._stakerRewards ([#6007](https://github.com/polkadot-js/api/pull/6007))
|
||||
- Upgrade polkadot/common to 13.1.2 ([#6008](https://github.com/polkadot-js/api/pull/6008))
|
||||
- Bump yarn to 4.5.1 ([#6005](https://github.com/polkadot-js/api/pull/6005))
|
||||
|
||||
|
||||
## 14.1.1 Oct 21, 2024
|
||||
|
||||
Changes:
|
||||
|
||||
- Fix deno build in CI to version 1.42.x ([#5999](https://github.com/polkadot-js/api/pull/5999))
|
||||
- Add LRU TTL cache implementation ([#5997](https://github.com/polkadot-js/api/pull/5997))
|
||||
- This focuses on performance advancements and less memory usage
|
||||
- Update non-pjs deps ([#6000](https://github.com/polkadot-js/api/pull/6000))
|
||||
- Set static metadata to v15 and update typegen to generate runtime apis and use v15 metadata ([#5987](https://github.com/polkadot-js/api/pull/5987))
|
||||
- Additionally: This does update the static types to be inline with polkadot 1003003
|
||||
- Bump dev to 0.81.2 ([#6001](https://github.com/polkadot-js/api/pull/6001))
|
||||
- Allows for correct CJS targetting
|
||||
- Bump common to 13.2.1 ([#6002](https://github.com/polkadot-js/api/pull/6002))
|
||||
|
||||
|
||||
## 14.0.1 Oct 2, 2024
|
||||
|
||||
Changes:
|
||||
|
||||
- TransactionExtension, ExtrinsicV5
|
||||
- This is a very large feature that gives support for Extrinsic V5. This is not a breaking change, but because of the impact it has it is a Major bump.
|
||||
- This PR acts as a forward compatible feature that still focuses on v4, but allows for the use of v5 when:
|
||||
a: The metadata extrinsic version is set to 5
|
||||
b: The extrinsic version is set to 5 when manually constructing transactions.
|
||||
- The PR allows the decoding of all v4, and v5 extrinsics including {bare, signed, general} transactions.
|
||||
- Address parsing issues for H160 accounts in api.derive.accounts.{*} ([#5991](https://github.com/polkadot-js/api/pull/5991))
|
||||
|
||||
|
||||
## 13.2.1 Sep 23, 2024
|
||||
|
||||
Changes:
|
||||
|
||||
- Generate Runtime Apis Dynamically ([#5986](https://github.com/polkadot-js/api/pull/5986))
|
||||
- Fix logging for older runtimes for runtime-api decoration ([#5988](https://github.com/polkadot-js/api/pull/5988))
|
||||
|
||||
|
||||
## 13.1.1 Sep 17, 2024
|
||||
|
||||
Changes:
|
||||
|
||||
- Upgrade polkadot/common to 13.1.1 ([#5982](https://github.com/polkadot-js/api/pull/5982))
|
||||
- Implement xcm dryRunApi ([#5970](https://github.com/polkadot-js/api/pull/5970))
|
||||
- Initialize the API with metadata V15 ([#5941](https://github.com/polkadot-js/api/pull/5941))
|
||||
- Bump yarn to 4.5.0 ([#5983](https://github.com/polkadot-js/api/pull/5983))
|
||||
|
||||
|
||||
## 13.0.1 Sep 10, 2024
|
||||
|
||||
Breaking Changes:
|
||||
|
||||
- Change assetId type in `SignerPayloadJSON` to HexString ([#5967](https://github.com/polkadot-js/api/pull/5967))
|
||||
- Keep assetId hex as an Option for `toPayload` ([#5968](https://github.com/polkadot-js/api/pull/5968))
|
||||
|
||||
NOTE: This is part of the current change to generalize the SignerPayloadJSON in order to simplify its integration across other tools. The return value of `assetId` field with `toPayload` will always be its true type now, which in this case is `Option<TAssetConversion>` where `TAssetConversion` is equal to `MultiLocation | AssetId`.
|
||||
|
||||
Changes:
|
||||
|
||||
- Bump dev and typescript ([#5964](https://github.com/polkadot-js/api/pull/5964))
|
||||
- Bump yarn to 4.1.1 ([#5978](https://github.com/polkadot-js/api/pull/5978))
|
||||
- Add kusama types-known v1.3.0 upgrade ([#5971](https://github.com/polkadot-js/api/pull/5971))
|
||||
- Update Kusama augmented types to 1.3.0 ([#5972](https://github.com/polkadot-js/api/pull/5972))
|
||||
- Please reference the PR above to view any changes in the runtime types
|
||||
|
||||
## 12.4.2 Aug 21, 2024
|
||||
|
||||
Changes:
|
||||
|
||||
- Fix derive.balances.all when data is undefined ([#5961](https://github.com/polkadot-js/api/pull/5961))
|
||||
|
||||
|
||||
## 12.4.1 Aug 19, 2024
|
||||
|
||||
Contributed:
|
||||
|
||||
- Add a check for tip in Submittable (Thanks to https://github.com/gupnik) ([#5953](https://github.com/polkadot-js/api/pull/5953))
|
||||
|
||||
Changes:
|
||||
|
||||
- Bump yarn to 4.4.0 ([#5952](https://github.com/polkadot-js/api/pull/5952))
|
||||
- Update General Deps (patch only) ([#5954](https://github.com/polkadot-js/api/pull/5954))
|
||||
- Rework api.derive.balance.{account, all} to work with the new frame account data ([#5955](https://github.com/polkadot-js/api/pull/5955))
|
||||
- Adds `transferable` and `frameSystemAccountInfo` to the output of `api.derive.balance.all`
|
||||
- Revise api.derive.balances.all to include ED when necessary ([#5957](https://github.com/polkadot-js/api/pull/5957))
|
||||
- Fixes the formula used for transferable balance
|
||||
|
||||
|
||||
## 12.3.1 Aug 5, 2024
|
||||
|
||||
Contributed:
|
||||
|
||||
- Revert alias for Noir types (Thanks to https://github.com/conr2d) ([#5946](https://github.com/polkadot-js/api/pull/5946))
|
||||
- Increase Vec Max Length (Thanks to https://github.com/rzadp) ([#5947](https://github.com/polkadot-js/api/pull/5947))
|
||||
|
||||
Changes:
|
||||
|
||||
- Upgrade known Polkadot and Westend CodeUpdated blocks ([#5948](https://github.com/polkadot-js/api/pull/5948))
|
||||
- Update substrate types via metadata ([#5949](https://github.com/polkadot-js/api/pull/5949))
|
||||
- Note: Please review the above PR for any changes to the augmented types.
|
||||
- Support for BeefyApi v4 ([#5950](https://github.com/polkadot-js/api/pull/5950))
|
||||
|
||||
|
||||
## 12.2.3 July 29, 2024
|
||||
|
||||
Contributed:
|
||||
|
||||
- Fix Fungible Api (Thanks to https://github.com/bkontur)
|
||||
|
||||
|
||||
## 12.2.2 July 25, 2024
|
||||
|
||||
Changes:
|
||||
|
||||
- Fix toHuman error on mode
|
||||
|
||||
|
||||
## 12.2.1 July 13, 2024
|
||||
|
||||
Changes:
|
||||
|
||||
- Bump polkadot/common to 13.0.2
|
||||
- This contains the latest changes to the Ledger interface in `@polkadot/hw-ledger`. For more info please see ([13.0.1](https://github.com/polkadot-js/common/releases/tag/v13.0.1))
|
||||
- Bump Substrate Metadata to Latest
|
||||
- This includes additions and removals to the api's type augmentation. For more info please see ([#5936](https://github.com/polkadot-js/api/pull/5936))
|
||||
- Update Polkadot 1002006 types-known
|
||||
- Bump yarn to 4.3.1
|
||||
|
||||
|
||||
## 12.1.1 July 2, 2024
|
||||
|
||||
Contributed:
|
||||
|
||||
- Implement xcm payment api (Thanks to https://github.com/girazoki)
|
||||
|
||||
Changes:
|
||||
|
||||
- Update Augmented types for polkadot 1002005
|
||||
- Update Augmented types for kusama 1002006
|
||||
- Note: This removes type support for the Identity pallet for Kusama, and stateTrieMigration
|
||||
- Update upgrade blocks for {Kusama, Polkadot}
|
||||
|
||||
|
||||
## 12.0.2 June 27, 2024
|
||||
|
||||
**Important Changes**:
|
||||
|
||||
- `withSignedTransaction`: This option has been added to `SignerOptions`. When using `signAndSend`, `signAsync`, and `dryRun` you may now enable or disable the use of the `signedTransaction` field by adding the `withSignedTransaction` option. When withSignedTransaction is not enabled but the signer adds a signedTransaction the api will error.
|
||||
- Always disabled by default.
|
||||
- This ensures no big breaking changes happen to the interface of `signPayload`.
|
||||
- `withSignedTransaction` has also been added to the `SignerPayload` type which allows for `payload.toPayload()` to include the option.
|
||||
- `signAsync`: now accepts the `signedTransaction` field as well. This means that if `withSignedTransaction` is enabled, and `signedTransaction` is present the api will adjust the current payload attached to the SubmittableExtrinsic, and add the signature. Then the user can call `.send()` as they please.
|
||||
- `dryRun`: All steps will be the same as signAsync with the exception that .send() has never needed to be called.
|
||||
|
||||
Contributed:
|
||||
|
||||
- Add LocationToAccountApi::convert_location runtime API (Thanks to https://github.com/bkontur)
|
||||
|
||||
|
||||
## 12.0.1 June 24, 2024
|
||||
|
||||
**Important Changes**:
|
||||
|
||||
- Addition of an optional `signedTransaction` field to the [`SignerResult`](https://github.com/polkadot-js/api/blob/586f02f8310529f16e4047fd94e31bc6c6573366/packages/types/src/types/extrinsic.ts#L138-L158) response for injected signers. This only applies to the `signPayload` method exposed in the [`Signer`](https://github.com/polkadot-js/api/blob/586f02f8310529f16e4047fd94e31bc6c6573366/packages/types/src/types/extrinsic.ts#L160-L175) interface for polkadot-js. As the name suggests the field expects a signed transaction (extrinsic) when inputted. When its present, the api will not add the signature to the payload, but instead broadcast the inputted signed transaction. This means the signer may modify the payload it's given. The only part of the payload that may not be modified is the call data. This is verified on the api, and will throw an error if it does not match the initial payloads call data.
|
||||
- This is very useful for signers that want to adjust the `mode` and `metadataHash` field for the `CheckMetadataHash` signed extension.
|
||||
- Note that this is not your traditional breaking change since it more-so acts as an addition, but since this is a high magnitude change it is going to be considered a MAJOR bump.
|
||||
- For more info please review the following PR [(#5914)](https://github.com/polkadot-js/api/pull/5914)
|
||||
|
||||
Changes:
|
||||
|
||||
- Replace `system_accountNextIndex` with runtime api call `accountNonceApi` for `api.derive.tx.signingInfo`
|
||||
- Sanitize `eras` for `api.derive.staking._stakerRewards`
|
||||
|
||||
|
||||
## 11.3.1 June 17, 2024
|
||||
|
||||
Changes:
|
||||
|
||||
- Fix period assumption on signingInfo (derive)
|
||||
- Bump dev to 0.79.3
|
||||
- Update {Polkadot, Kusama, Westend} types-known
|
||||
- Bump Substrate metadata to latest
|
||||
- NOTE: Moving forward when bumping the metadata for {Polkadot, Kusama, Substrate} the version will
|
||||
always be a minor bump since it can add, modify, remove augmented types.
|
||||
|
||||
|
||||
## 11.2.1 May 28, 2024
|
||||
|
||||
Contributed:
|
||||
|
||||
- fix: Re-subscribe to chain updates on reconnection if not a clone (Thanks to https://github.com/F-OBrien)
|
||||
|
||||
Changes:
|
||||
|
||||
- Add support for AuraUnincludedSegmentApi (Thanks to https://github.com/bee344)
|
||||
- Add support for ParachainHost v11 Api
|
||||
- Update Kusama and Westend block upgrades
|
||||
- Update Substrate metadata to latest
|
||||
|
||||
|
||||
## 11.1.1 May 21, 2024
|
||||
|
||||
Changes
|
||||
|
||||
- Dedupe nextElected accountIds in `api.derive.staking.nextElected`
|
||||
- Bump @polkadot/dev to 0.79.1 w/ topo sort
|
||||
- Bump yarn to 4.2.2
|
||||
- fix: updated extrinsics' assetId `toHuman` (Thanks to https://github.com/bee344)
|
||||
- fix `api.derive.accounts.{info && identity}`
|
||||
- feat: Add support for `CheckMetadataHash` signedExtension (Thanks to https://github.com/bee344)
|
||||
|
||||
|
||||
## 11.0.3 May 8, 2024
|
||||
|
||||
Changes
|
||||
|
||||
- Make `api.derive.staking.*` backwards compatible
|
||||
- Fix `claimedRewards` regression in `api.derive.staking.queryMulti`
|
||||
- Update Substrate to latest
|
||||
|
||||
|
||||
## 11.0.2 Apr 24, 2024
|
||||
|
||||
Changes
|
||||
|
||||
- Fix type for TAssetConversion in Polkadot Asset hub
|
||||
|
||||
|
||||
## 11.0.1 Apr 23, 2024
|
||||
|
||||
Breaking Changes:
|
||||
|
||||
Note! The following breaking changes only refer to `@polkadot/api-derive` calls under `api.derive.staking.*` due to the most recent breaking changes in runtime version v1.2. Please refer to the link next to the bullet points for more information.
|
||||
|
||||
- Update` api.derive.staking` calls with breaking changes ([#5860](https://github.com/polkadot-js/api/pull/5860))
|
||||
- Add `claimedRewardsEra` to api.derive.staking.query for compatibility with legacyClaimedRewards ([#5862](https://github.com/polkadot-js/api/pull/5862))
|
||||
|
||||
Contributed:
|
||||
|
||||
- Bump @substrate/connect to 0.8.10 (Thanks to https://github.com/kratico)
|
||||
|
||||
Changes:
|
||||
|
||||
- Update polkadot types-known for latest runtime upgrades
|
||||
|
||||
|
||||
## 10.13.1 Apr 16, 2024
|
||||
|
||||
Changes:
|
||||
|
||||
- Update CI actions and setup_node to v4
|
||||
- Update substrate metadata to latest
|
||||
- Support ParachainHost runtime api v6, 7, 8, 9, 10
|
||||
- Resolve correct module for council derive
|
||||
- Update westend types-known for 1010000
|
||||
- Update kusama types-known for 1001003
|
||||
|
||||
|
||||
## 10.12.6 Apr 2, 2024
|
||||
|
||||
**NOTE**: Because of a broken CI build for 10.12.5 -> 10.12.6 is a replacement
|
||||
|
||||
Contributed:
|
||||
|
||||
- chore: fix typos in error (Thanks to https://github.com/xiaoxianBoy)
|
||||
|
||||
Changes:
|
||||
|
||||
- Upgrade westend types-known for 1009000
|
||||
- Add `disableAscii` option for toHuman, and toPrimitive
|
||||
- V14 Update substrate latest metadata
|
||||
- V15 Update substrate latest metadata
|
||||
- Bump yarn to 4.1.1
|
||||
- Add `assetId` getter field to to necessary ExtrinsicPayloads
|
||||
- Add Updated Runtime Defintions
|
||||
- ValidateStatement
|
||||
- MMRApi
|
||||
- mmr_root
|
||||
- mmr_leaf_count
|
||||
- Core v5
|
||||
- GenesisBuilder
|
||||
- MixnetApi
|
||||
|
||||
|
||||
## 10.12.5 Apr 2, 2024
|
||||
|
||||
Contributed:
|
||||
|
||||
- chore: fix typos in error (Thanks to https://github.com/xiaoxianBoy)
|
||||
|
||||
Changes:
|
||||
|
||||
- Upgrade westend types-known for 1009000
|
||||
- Add `disableAscii` option for toHuman, and toPrimitive
|
||||
- V14 Update substrate latest metadata
|
||||
- V15 Update substrate latest metadata
|
||||
- Bump yarn to 4.1.1
|
||||
- Add `assetId` getter field to to necessary ExtrinsicPayloads
|
||||
- Add Updated Runtime Defintions
|
||||
- ValidateStatement
|
||||
- MMRApi
|
||||
- mmr_root
|
||||
- mmr_leaf_count
|
||||
- Core v5
|
||||
- GenesisBuilder
|
||||
- MixnetApi
|
||||
|
||||
|
||||
## 10.12.4 Mar 19, 2024
|
||||
|
||||
Contributed:
|
||||
|
||||
- Fix add muln(2) to signingInfo Derive (Thanks to https://github.com/pepoviola)
|
||||
|
||||
|
||||
## 10.12.3 Mar 18, 2024
|
||||
|
||||
Contributed:
|
||||
|
||||
- Bump @substrate/connect to 0.8.8 (Thanks to https://github.com/kratico)
|
||||
- Fix optional chaining operator in toHuman (Thanks to https://github.com/Imod7)
|
||||
- Fix check if minimumPeriod is zero (Thanks to https://github.com/pepoviola)
|
||||
|
||||
Changes:
|
||||
|
||||
- Fix api.derive.staking.eraExposure for compatibility
|
||||
- Fix invalid Lookup assignment on augmentation and update polkadot and kusama metadata
|
||||
- Update polkadot runtime upgrade per block
|
||||
- Update kusama runtime upgrade per block
|
||||
- Update westend runtime upgrade per block
|
||||
|
||||
## 10.12.2 Mar 11, 2024
|
||||
|
||||
Contributed:
|
||||
|
||||
- fix cache key (rpc-provider) (Thanks to https://github.com/ermalkaleci)
|
||||
|
||||
Changes:
|
||||
|
||||
- Update to latest Substrate metadata
|
||||
|
||||
|
||||
## 10.12.1 Mar 4, 2024
|
||||
|
||||
Contributed:
|
||||
|
||||
- Ink! V5 Support (Thanks to https://github.com/peetzweg)
|
||||
|
||||
|
||||
## 10.11.3 Feb 27, 2024
|
||||
|
||||
Contributed:
|
||||
|
||||
- Fix sorting of `Option` values and error on duplicates from BTreeSet/BTreeMap (Thanks to https://github.com/Neopallium)
|
||||
- Fix BEEFY compact signed commitment in versioned finality proofs (Thanks to https://github.com/mfornos)
|
||||
- Update @substrate/connect (Thanks to https://github.com/kratico)
|
||||
|
||||
Changes:
|
||||
|
||||
- Bump dev w/ packageDetect adjustments
|
||||
- Update copyright year
|
||||
- Bump nock, and dev deps
|
||||
- Allow `cacheCapacity` option for the `WsProvider`
|
||||
- Bump yarn
|
||||
|
||||
|
||||
## 10.11.2 Dec 18, 2023
|
||||
|
||||
Contributed:
|
||||
|
||||
- Add `chainIsEthereum` key to `Registry` interface (Thanks to https://github.com/fgamundi)
|
||||
- Adjust types for `ChargeAssetTxPayment` (Thanks to https://github.com/bee344)
|
||||
|
||||
Changes:
|
||||
|
||||
- Support `[8a;32]` types in known keys
|
||||
- Update to latest Substrate metadata
|
||||
|
||||
|
||||
## 10.11.1 Nov 18, 2023
|
||||
|
||||
Contributed:
|
||||
|
||||
- Support for latest `ChargeAssetTxPayment` (Thanks to https://github.com/bee344)
|
||||
- Support for latest `beefy::subscribeJustifications()` (Thanks to https://github.com/serban300)
|
||||
|
||||
Changes:
|
||||
|
||||
- Add known `intrablockEntropy` storage key
|
||||
- Add support for `SkipCheckIfFeeless` signed extension
|
||||
- Ensure all usages of `balances.transfer` (in tests) have been removed
|
||||
- Drop support for Node 16 (EOL 11 Sep 2023)
|
||||
|
||||
|
||||
## 10.10.1 Oct 14, 2023
|
||||
|
||||
Contributed:
|
||||
|
||||
- Add aliases for Noir type paths (Thanks to https://github.com/conr2d)
|
||||
- Add runtime `FungliblesApi` version 2 (Thanks to https://github.com/bkontur)
|
||||
- Add runtime `EthereumApi` version 5 (Thanks to https://github.com/timbrinded)
|
||||
- Add runtime `AssetConversionApi` (Thanks to https://github.com/jsidorenko)
|
||||
- Adjust types for runtime `AssetConversionApi` (Thanks to https://github.com/jsidorenko)
|
||||
- Expand test cases for `Int` conversions (Thanks to https://github.com/peetzweg)
|
||||
- Add `isEthereum` to chain properties (Thanks to https://github.com/fgamundi)
|
||||
- Allow RiscV contracts via check (Thanks to https://github.com/statictype)
|
||||
|
||||
Changes:
|
||||
|
||||
- Serialize any additional payload fields via `toJSON()`
|
||||
- Expose internal `rpc-core` stats on `api.stats` getter
|
||||
- Add support for latest/stable V15 metadata interfaces
|
||||
- Add runtime `BeefyApi` version 3
|
||||
- Add runtime `ParachainHost` version 5
|
||||
- Expose `chain.subscribeFinalizedBlocks` derive
|
||||
- Consistently use `import.meta.url` inside tests
|
||||
- Group `Uint/Int` tests for maintainability
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
|
||||
|
||||
## 10.9.1 Jun 12, 2023
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust object index access for stricter tsconfig settings
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
|
||||
|
||||
## 10.8.1 Jun 5, 2023
|
||||
|
||||
Contributed:
|
||||
|
||||
- Added support for extended Contracts ABI V4 definitions (Thanks to https://github.com/statictype)
|
||||
|
||||
Changes:
|
||||
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
- Cleanup (some) linting overrides
|
||||
|
||||
|
||||
## 10.7.3 May 28, 2023
|
||||
|
||||
Changes:
|
||||
|
||||
- Ensure that `.paymentInfo` never mutates the underlying/existing signature
|
||||
|
||||
|
||||
## 10.7.2 May 21, 2023
|
||||
|
||||
Contributed:
|
||||
|
||||
- Allow `api.setSigner(...)` to clear existing (Thanks to https://github.com/polymath-eric)
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust `@polkadot/types-create` exports with no duplicates
|
||||
|
||||
|
||||
## 10.7.1 May 13, 2023
|
||||
|
||||
Changes:
|
||||
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
- Add `module` to `package.json` export map (ESM-only)
|
||||
|
||||
|
||||
## 10.6.1 May 7, 2023
|
||||
|
||||
Contributed:
|
||||
|
||||
- Extract runtime details for custom documentation (Thanks to https://github.com/FlorianFranzen)
|
||||
|
||||
Changes:
|
||||
|
||||
- Apply historic `Scheduled` types for Kusama (as reported, non-comprehensive)
|
||||
- Adjust Deno types inside `WsProvider`
|
||||
- Allow parsing of (experimental) metadata v15
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
|
||||
|
||||
## 10.5.1 Apr 29, 2023
|
||||
|
||||
Changes:
|
||||
|
||||
- Default to hex-only in `Int/UInt.toJSON` for > 128-bit values
|
||||
- Allow for disabling of `isPedantic` storage checks in API options
|
||||
- Adjust usage of `objectSpread`, default to runtime as required
|
||||
- Adjust compilation output for `__internal__` class fields
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
|
||||
|
||||
## 10.4.1 Apr 22, 2023
|
||||
|
||||
Contributed:
|
||||
|
||||
- Apply `noInitWarn` flag to signed extension warnings (Thanks to https://github.com/xlc)
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust `AccountId20` detection with partial match
|
||||
- Cleanup block author extraction derives
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
- Drop support for Node 14 (EOL 30 Apr 2023)
|
||||
|
||||
|
||||
## 10.3.4 Apr 16, 2023
|
||||
|
||||
Changes:
|
||||
|
||||
- Ensure block author extract uses the correct as-at block construction state
|
||||
|
||||
|
||||
## 10.3.3 Apr 15, 2023
|
||||
|
||||
Contributed:
|
||||
|
||||
- Add support for Fungibles runtime api (Thanks to https://github.com/bkontur)
|
||||
- Update Nimbus Collator lookups (Thanks to https://github.com/grenade)
|
||||
|
||||
Changes:
|
||||
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
- Minimal support for a `@tsconfig/stricter` setup
|
||||
|
||||
|
||||
## 10.3.2 Apr 10, 2023
|
||||
|
||||
Changes:
|
||||
|
||||
- Revert throw on MSB BitVec (`toHuman()` output is still incorrect)
|
||||
|
||||
|
||||
## 10.3.1 Apr 9, 2023
|
||||
|
||||
Changes:
|
||||
|
||||
- Add `BitVec.toBoolArray()` helper function
|
||||
- Tie down `BitVec` from metadata to only allow (default) Lsb
|
||||
- Support for `TransactionPaymentApi/4`
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
|
||||
|
||||
## 10.2.2 Apr 1, 2023
|
||||
|
||||
Contributed:
|
||||
|
||||
- Support expanded Nimbus lookups to Collators (Thanks to https://github.com/grenade)
|
||||
|
||||
Changes:
|
||||
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
|
||||
|
||||
## 10.2.1 Mar 25, 2023
|
||||
|
||||
Contributed:
|
||||
|
||||
- Add support for new Frontier `AccountId20` mapping (Thanks to https://github.com/koushiro)
|
||||
- Adjust MMR RPCs & runtime calls to align with latest (Thanks to https://github.com/Lederstrumpf)
|
||||
|
||||
Changes:
|
||||
|
||||
- Use Promise resolve/reject to track state in typegen on-chain metadata retrievals
|
||||
- Adjust signing header retrieval, catering for discarded state fallbacks
|
||||
- Add support for `ParachainHost v4` runtime calls
|
||||
- Basic support for markdown generation for different chains (only Kusama & Polkadot currently added)
|
||||
- Add not-to-be-used `ISize` type support (same as `USize`, throwing on use - added for completeness)
|
||||
- Ensure `AccountId20.eq` does not fail on null/undefined inputs
|
||||
- Expand tests around `toU8a()` where the `isBare` flag is is being used
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
|
||||
|
||||
## 10.1.4 Mar 19, 2023
|
||||
|
||||
Changes:
|
||||
|
||||
- Add methods for v2 `Metadata_*` runtime calls
|
||||
|
||||
|
||||
## 10.1.3 Mar 15, 2023
|
||||
|
||||
Changes:
|
||||
|
||||
- Remove incorrect `.module.` specifiers in typegen code
|
||||
- Mark unsafe RPC methods (and include in `rpc.md` generation)
|
||||
|
||||
|
||||
## 10.1.2 Mar 11, 2023
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust type exports to remove invalid generated exports from `/src/`
|
||||
- Apply missing `/*#__PURE__*/` exports in `api-derive`
|
||||
|
||||
|
||||
## 10.1.1 Mar 11, 2023
|
||||
|
||||
Contributed:
|
||||
|
||||
- Fix yargs usage inside ESM modules (Thanks to https://github.com/conr2d)
|
||||
|
||||
Changes:
|
||||
|
||||
- Align runtime APIs with latest Substrate
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
- Use consistent `.js` imports in source files (TS moduleResolution)
|
||||
|
||||
|
||||
## 10.0.1 Mar 4, 2023
|
||||
|
||||
Contributed:
|
||||
|
||||
- Expose per-endpoint stats for providers (Thanks to https://github.com/jeluard)
|
||||
- Adjust ink! primitive extraction for v4 (Thanks to https://github.com/statictype)
|
||||
|
||||
Changes:
|
||||
|
||||
- Ensure that provider disconnect clears all subscriptions
|
||||
- Adjust typegen to internally use `import()` (catering for ESM provided types)
|
||||
- Swap TS -> JS compiler to use tsc (from babel)
|
||||
- Adjust all tests to use `node:test` runner (ESM variants)
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
|
||||
|
||||
## 9.14.2 Feb 19, 2023
|
||||
|
||||
Changes:
|
||||
|
||||
- Don't allow `WsProvider.connect()` on an open connection (creates resource leaks)
|
||||
- Adjust typegen to use metadata-defined aliases in query return decoration
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
|
||||
|
||||
## 9.14.1 Feb 12, 2023
|
||||
|
||||
Changes:
|
||||
|
||||
- Extract aliases for `*_runtime::Runtime{Call, Event}` from metadata
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
|
||||
|
||||
## 9.13.6 Feb 5, 2023
|
||||
|
||||
Contributed:
|
||||
|
||||
- Align `eth_getTransactionCount` with frontier (Thanks to https://github.com/alko89)
|
||||
|
||||
Changes:
|
||||
|
||||
- Additional override for `Compact<{ refTime: u64 }>` chains
|
||||
- Add script to retrieve local rpc, version & metadata for typegen
|
||||
|
||||
|
||||
## 9.13.5 Feb 2, 2023
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust `Weight` alias for 1.5 chains
|
||||
- Ensure correct registry is pass through for runtime TS generation
|
||||
|
||||
|
||||
## 9.13.4 Feb 1, 2023
|
||||
|
||||
Changes:
|
||||
|
||||
- None from 9.13.3 (The previous version had npm registry publishing issues)
|
||||
|
||||
|
||||
## 9.13.3 Feb 1, 2023
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust `Weight` alias detection to cater for `WeightV0/u32` overrides (e.g. early Kusama blocks)
|
||||
|
||||
|
||||
## 9.13.2 Jan 29, 2023
|
||||
|
||||
Changes:
|
||||
|
||||
+38
-5
@@ -1,30 +1,35 @@
|
||||
3351 Jaco Allow null as valid param to Int/UInt (#5458)
|
||||
3512 Jaco Bump deps (#5785)
|
||||
139 Tarik Gul 15.0.2 (#6044)
|
||||
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
|
||||
37 Keith Ingram Update contract types and rpc (#4541)
|
||||
35 Stefanie Doll Updated child storage parameters (#1709)
|
||||
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
|
||||
18 Xiliang Chen fix unkown rpc (#5325)
|
||||
19 Xiliang Chen no warm for unknown signed extensions (#5601)
|
||||
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
|
||||
14 Nikos Kontakis Bump substrate connect to 0.7.16 (#5307)
|
||||
11 Ian He HttpProvider support clone() (#3949)
|
||||
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
|
||||
6 Andreea Eftene Update check for contract instantiation (#5699)
|
||||
6 Branislav Kontur Fix for fungiblesApi (#5944)
|
||||
5 Alberto Nicolas Penayo added use of accountNonceApi (#5915)
|
||||
5 Chevdor Fix metadata package link (#3458)
|
||||
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
|
||||
5 Julien Eluard General WsProvider extensibility improvements (#5467)
|
||||
5 Matias Volpe Bump @substrate/connect to 0.8.10 (#5863)
|
||||
5 Thibaut Sardan Allow external signers to modify the payload (#6030)
|
||||
4 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
|
||||
4 Alex Wang fix issue that creates duplicate providers (#983)
|
||||
4 Alexander Popiak Add asset id in signing (#4009)
|
||||
4 Joshy Orndorff spelling; efect -> effect (#2295)
|
||||
4 Julien Eluard Clarified WsProvider constructor parameters documentation (#5404)
|
||||
4 Nantian fix bigint type (#3869)
|
||||
4 Scott Twiname Add support for historical BlockNumber rpc methods (#4574)
|
||||
4 Thibaut Sardan no subscription for http (#3127)
|
||||
3 André Silva add support for ValidationCodeHash (#3640)
|
||||
3 Andreea Eftene Fix code source type (#5236)
|
||||
3 Antoine Estienne Adapted to display moonbeam author (#3108)
|
||||
3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707)
|
||||
3 Ewa Kowalska Handle no council for bounties proposals (#3062)
|
||||
3 hamidra add support for n key entries for NMaps (#3886)
|
||||
3 Hamza Tokuchi more typos (#2532)
|
||||
3 Jeeyong Um Revert "Alias for Noir types (#5678)" (#5946)
|
||||
3 Josep M Sobrepere docs: improve rpc-provider README (#4719)
|
||||
3 KarishmaBothara Backward compatibility thing (#3511)
|
||||
3 Miguel Hervas Adding RT4 Types (#3007)
|
||||
@@ -33,12 +38,17 @@
|
||||
2 Alexander Krupenkin Add [u8; 33] type width for U8aFixed type (#2391)
|
||||
2 Branan Riley Add proxy type for Centrifuge (#3940)
|
||||
2 Caio Add `Range` and `RangeInclusive` types (#3791)
|
||||
2 Francisco Gamundi Add chainIsEthereum prop to Registry interface (#5761)
|
||||
2 HackFisher Update maxExtrinsic definition (#4703)
|
||||
2 Jakub Pánik All heads subscription (#1899)
|
||||
2 James Lefrère Add `.eq()` usage to docs and fix docs typos (#1405)
|
||||
2 Javier Viola add muln(2), as was in the old code (#5829)
|
||||
2 Jegor Sidorenko Use Box<XcmV3MultiLocation> instead of MultiAssetId (#5700)
|
||||
2 Keith Yeung Allow keyPrefix to accept an additional argument for double maps (#2230)
|
||||
2 MOZGIII Follow-up fix after #4665 (#4666)
|
||||
2 Paweł Nguyen Fix a minor typo in cookbook blocks docs (#2294)
|
||||
2 peetzweg/ feat: ink! v5 (#5791)
|
||||
2 rob thijssen nimbus author mapping correction (#5590)
|
||||
2 sung wu Update tx.md (#2485)
|
||||
2 Veliko Abi constructor takes different parameters (#3347)
|
||||
2 Wei Tang Use /usr/bin/env bash instead of /bin/bash (#2053)
|
||||
@@ -46,24 +56,36 @@
|
||||
2 Zannis Kalampoukis fix: Typegen handles structs and vectors of structs without erroring (#4743)
|
||||
2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594)
|
||||
1 Alan Sapede Adds Eth feeHistory & maxPriorityFeePerGas rpc (#4956)
|
||||
1 Aleš Ferlan fix: use H160 for address in getTransactionCount (#5472)
|
||||
1 Brad Larson [NEW] Support for custom headers with providers (#2423)
|
||||
1 Btwiuse Arch Add side effect check workaround (#4994) (#5009)
|
||||
1 Cameron Marshall implement xcm dry run api (#5970)
|
||||
1 Carlo Sala fix(ExtrinsicPayload): decode assetId with and without option (#6037)
|
||||
1 chriswmercer little readme tweak (#279)
|
||||
1 codingsh #2182 - add: search for docs (#2232)
|
||||
1 coolcorexix Investigate 4559 v2 (#4608)
|
||||
1 Dan Forbes Add WeightToFeeCoefficient type (#2296)
|
||||
1 Daniel Maricic Fixed typo in README (#2402)
|
||||
1 Daniel Savu fix: Generate custom type definitions (#4224)
|
||||
1 Daria choosing AccountId20 type if the address is 20 bytes (#5991)
|
||||
1 David Don't log full error (#2952)
|
||||
1 David Duong Avoid reserved words during named enum fields augmentation (#5203)
|
||||
1 Denis Tsai realign AccountKey20Junction to polkadot xcm's Junction enum (#3770)
|
||||
1 djuanito.eth Update fees to current constants (#2320)
|
||||
1 Dominique fix: add optional chaining operator in `toHuman` (#5825)
|
||||
1 Drew Stone Update evm definitions to include vicinity (#2279)
|
||||
1 Dylan Galea Updated users of the polkadot-js/api (#2027)
|
||||
1 Ermal Kaleci fix cache key (rpc-provider) (#5745)
|
||||
1 filvecchiato Add lru ttl cache implementation (#5997)
|
||||
1 filvecchiato fix: update LRUcache to not keep thread (#6013)
|
||||
1 flex Change BeefySignedCommitment signatures type to EcdsaSignature (#4204)
|
||||
1 Florian Franzen metadataMd: use endpoint for rpc and runtime details too (#5628)
|
||||
1 Francis O'Brien fix: Re-subscribe to chain updates on reconnection if not a clone (#5794)
|
||||
1 Furqan A fix: fixed 404 to the docs from the api readme (#3985)
|
||||
1 Gérard Dethier Fix LRUCache memory leak. (#4520)
|
||||
1 Gerben van de Wiel Adding some extra notes on changes in the specname (#2329)
|
||||
1 girazoki Implement xcm payment api (#5911)
|
||||
1 gupnik Adds a check for tip in Submittable (#5953)
|
||||
1 HackFisher fix OutboundLaneData types (#3992)
|
||||
1 Hoani Bryson Multiple Endpoint support for WsProvider (#2234)
|
||||
1 Hyungsuk Kang Update fees.ts (#1014)
|
||||
@@ -78,8 +100,10 @@
|
||||
1 Kian Paimani Update definitions.ts (#2514)
|
||||
1 Krzysztof Jelski Derive for bounties and descriptions (#2925)
|
||||
1 Lae Make sure awaiting on an api object won't stuck forever on error (#1763)
|
||||
1 Lauro Gripa Fix multi call of `defenderVotes` and `isDefenderVoter` flag in `society.members` derivation (#5834)
|
||||
1 Lezek123 BTreeSet and BTreeMap - encoding and serialization fixes (#3789)
|
||||
1 Lovesh Harchandani Fix name of "getBlock" in package "api-derive" and export it in "index.ts" (#2857)
|
||||
1 Marc Fornós add beefy compact signed commitment definition (#5781)
|
||||
1 Mario Neises fix usage with typescript (#405)
|
||||
1 Mario Pino Add PolkaStats to API users (#1593)
|
||||
1 Mark Robert Henderson Update warnings.ts to have the latest URLs (#2720)
|
||||
@@ -93,21 +117,30 @@
|
||||
1 Paul M Fox Basic BTreeMaps codec support (#1474)
|
||||
1 philipstanislaus Update types for centrifuge chain v1.2.0 (#2424)
|
||||
1 Pierre Krieger Update substrate/connect to 0.7.6 (#4940)
|
||||
1 polymath-eric Allow unset external signer (#5649)
|
||||
1 Przemek Rzad Increase Vec max length (#5947)
|
||||
1 Qinxuan Chen Add fp_account::AccountId20 mapping (#5551)
|
||||
1 qiuhao update DeriveCustom type (#2581)
|
||||
1 r0t0r-r0t0r Fix memory leak on raw rpc call (#4505)
|
||||
1 Raphael Flechtner fix: typegen disconnect ws on success (#4901)
|
||||
1 Robert Gabriel Jakabosky Fix sorting of `Option` values and error on duplicates from BTreeSet/BTreeMap. (#5731)
|
||||
1 Robert Hambrock update MMR API (#5479)
|
||||
1 Rocco Musolino remove broken link (#2671)
|
||||
1 sander2 fix: type generation for nested tuples (#5395)
|
||||
1 satellitex Add BTreeSet<V> Codec (#1639)
|
||||
1 satellitex Add traits replace rules. for invalid cases `::<type>` and `<type>::`. (#885)
|
||||
1 Satyam Agrawal update as per the 0.97.0-beta.38 release (#1617)
|
||||
1 Sean Young Solang requires u256 and i256 types (#2752)
|
||||
1 Serban Iorga Fix `beefy::subscribeJustifications()` return type (#5740)
|
||||
1 serge make WS provider timeout configurable (#4758)
|
||||
1 Sergei Pepyakin INK! -> ink! (#1347)
|
||||
1 Shunji Zhan small polish (#5276)
|
||||
1 Snoppy chore: fix typos (#5835)
|
||||
1 Stephen Shelton Add transaction-payment runtime API V3 (#5430)
|
||||
1 Tim B added EthRTApiV5 ifaces (#5680)
|
||||
1 WoeOm adapt Darwinia, Crab Network types (#3498)
|
||||
1 Xat_MassacrE Fix packages/types/src/codec/utils/encodeTypes.ts encodeSubTypes bug (#1544)
|
||||
1 xiaolou86 Fix typos (#5747)
|
||||
1 yjh fix MetadataVersioned.asV12 (#2983)
|
||||
1 Yuri fixes #3693 Fix uniques return types (#3694)
|
||||
1 Zeke Mostov fix: Allow sudo for polkadot indexed proxy enum (#3286)
|
||||
@@ -1,8 +1,8 @@
|
||||
# @polkadot/api
|
||||
|
||||
This library provides a clean wrapper around all the methods exposed by a Polkadot/Substrate network client and defines all the types exposed by a node. For complete documentation around the classes, interfaces and their use, visit the [documentation portal](https://polkadot.js.org/docs/api/).
|
||||
This library provides a clean wrapper around all the methods exposed by a Polkadot/Substrate network client and defines all the types exposed by a node. For complete documentation around the interfaces and their use, visit the [documentation portal](https://polkadot.js.org/docs/api/).
|
||||
|
||||
If you are an existing user, please be sure to track the [CHANGELOG](CHANGELOG.md) and [UPGRADING](UPGRADING.md) guides when changing versions.
|
||||
If you are an existing user, please be sure to track the [CHANGELOG](CHANGELOG.md) when changing versions.
|
||||
|
||||
## tutorials
|
||||
|
||||
|
||||
-201
@@ -1,201 +0,0 @@
|
||||
# Upgrade guide
|
||||
|
||||
This is an upgrade guide for users of the API. It does not attempt to detail each version (the [CHANGELOG](CHANGELOG.md) has all the changes between versions), but rather tries to explain the rationale behind major breaking changes and how users of the API should handle this.
|
||||
|
||||
While we try to keep the user-facing interfaces as stable as possible, sometimes you just need to make additions to move forward and improve things down the road, as painful as they may be. Like you, we are also users of the API, and eat our own dog food - and as such, feel any pains introduced first.
|
||||
|
||||
|
||||
## 0.97.1 (and newer)
|
||||
|
||||
The 0.97 series lays the groundwork to allow type registration to be ties to a specific chain and a specific Api instance. In the past, 2 Api instances in the same process would share types, which mean that you could not connect to 2 independent chains with different types. This is very problematic for Polkadot chains, where the idea is to connect to multiple chains.
|
||||
|
||||
When using the Api, a new `Registry` will be created on using `new Api(...)` or `Api.create(...)` and this will be transparently passed when creating types. In the cases where you create type instances explicitly or create type classes for injection, you would need to make adjustments.
|
||||
|
||||
### Type classes
|
||||
|
||||
In a number of instances, developers are creating classes and making these available for interacting with their chains. For instance, an example of a custom type could be -
|
||||
|
||||
```js
|
||||
import { Struct, Text, u32 } from '@polkadot/types';
|
||||
|
||||
export class Preferences extends Struct {
|
||||
constructor (value?: ahy) {
|
||||
super({
|
||||
name: Text,
|
||||
id: u32
|
||||
}, value);
|
||||
}
|
||||
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
In the current iteration, the underlying `@polkadot/types` bases structures now require a `Registry` to be passed as the first parameter. This means that the above signature would be adjusted to -
|
||||
|
||||
```js
|
||||
// the next import is only required for TypeScript
|
||||
import { Registry } from '@polkadot/types/types';
|
||||
import { Struct, Text, u32 } from '@polkadot/types';
|
||||
|
||||
export class Preferences extends Struct {
|
||||
constructor (registry: Registry, value?: ahy) {
|
||||
super(registry, {
|
||||
name: Text,
|
||||
id: u32
|
||||
}, value);
|
||||
}
|
||||
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
Where the type is used or returned from the API, the `Registry` will be automatically passed to class creation.
|
||||
|
||||
### createType
|
||||
|
||||
Previously, when creating a type instance such as `BlockNumber`, you would do `api.createType('BlockNumber', <initValue>)`, this is unchanged. In the cases where you directly import from `@polkadot/types`, the following pattern is required -
|
||||
|
||||
```js
|
||||
import { createType } from '@polkadot/types';
|
||||
|
||||
...
|
||||
const blockNumber = createType(api.registry, 'BlockNumber', 12345);
|
||||
```
|
||||
|
||||
In some cases, you would want to explicitly pass a `Registry` interface to the API, instead of relying on it explicitly. This is generally applicable in the cases where you want to use the `createType` independently from the API -
|
||||
|
||||
```js
|
||||
import { ApiPromise } from '@polkadot/api';
|
||||
import { TypeRegistry, createType } from '@polkadot/types';
|
||||
|
||||
...
|
||||
const registry = new TypeRegistry();
|
||||
const blockNumber = createType(registry, 'BlockNumber', 12345);
|
||||
const api = await ApiPromise.create({ registry });
|
||||
```
|
||||
|
||||
### Extrinsic metadata
|
||||
|
||||
In some applications, the undocumented `findFunction` has been used to determine the Api has the metadata for a specific extrinsic. The has been exposed on top of `GenericCall`, and it typically used in applications such as signers. Along with the compulsory registry, the above functions have been moved to the `Registry` itself, so if you previously had -
|
||||
|
||||
```js
|
||||
const { meta, method, section } = GenericCall.findFunction(extrinsic.callIndex);
|
||||
```
|
||||
|
||||
You need to change it to -
|
||||
|
||||
```js
|
||||
const { meta, method, section } = registry.findMetaCall(extrinsic.callIndex);
|
||||
```
|
||||
|
||||
## 0.90.1 (and newer), from 0.81.1 (and older)
|
||||
|
||||
The 0.90.1 release caters for the [Kusama network](https://kusama.network/) and pulls in all the changes to support [Substrate 2.x](https://github.com/paritytech/substrate), all while maintaining backwards compatibility to allow operation on networks such as [Polkadot's Alexander](https://polkadot.network/).
|
||||
|
||||
To support the network and the new transaction formats, a number of changes were made to how extrinsics are handled and signed. In addition, as support for ongoing work where type definitions are to be supplied by the actual node metadata, the foundation has been laid to move to type definitions as opposed to classes for runtime types.
|
||||
|
||||
### Modules
|
||||
|
||||
The first thing to be aware of is breakages when connecting to any new network, here older networks such as Alex are unaffected - the node metadata defines exactly what is available to the chain, so endpoints that worked yesterday still works today.
|
||||
|
||||
There will no doubt be breakages in using calls to now non-existent endpoints (as populated by the metadata) if you are upgrading your nodes to Substrate 2.x. Substrate 2.x has had a number of internal changes, where new modules and features are introduced (such as `babe` and `technicalCommittee`), some modules have been renamed (such as `contract` -> `contracts`) and modules such as `session` has been reworked to a large degree.
|
||||
|
||||
To cater for both 1.x and 2.x support, the [@polkadot/api-derive](packages/api-derive) endpoints, do feature detection for the node type and should continue working as-is. Additionally, a number of new derives have been added, specifically around elections.
|
||||
|
||||
### Type renames
|
||||
|
||||
To better align with the actual types from the metadata, and avoid (too much) context switching, some types from the `@polkadot/types` have been renamed. These include -
|
||||
|
||||
- `Vector` -> `Vec`
|
||||
- `U{8|16|32|64|128|256}` have been removed, only the lowercase version of these remain, i.e. `u32`.
|
||||
|
||||
### Type usage
|
||||
|
||||
The [@polkadot/api](packages/api) has always handled the conversion of types for parameters when making calls or queries. For example, when making a transfer to `BOB` (address), any of the following is valid -
|
||||
|
||||
- `api.tx.balances.transfer(BOB, 12345)` - value specified as a number
|
||||
- `api.tx.balances.transfer(BOB, '12345')` - value specified as a string
|
||||
- `api.tx.balances.transfer(BOB, '0x3039')` - value specified as a hex
|
||||
- `api.tx.balances.transfer(BOB, new BN(12345))` - value specified as a [BN](https://github.com/indutny/bn.js/)
|
||||
|
||||
Internally the API will take the input and convert the value into a `Balance`, serialize it using the SCALE codec and transfer it to the node. In some cases users would construct the `Balance` type manually, by importing the class and calling `new` on it. This last approach has now been removed, and where classes are still available (limited reach), discouraged.
|
||||
|
||||
First the rationale behind this - in all cases Substrate is very flexible, so while Polkadot (and the Substrate base), define `type Balance = u128`, this can be different between chains. (This also applies to the majority of built-in supported types). As such, type construction should be done via the actual registered types.
|
||||
|
||||
```js
|
||||
// this is applicable everywhere, import the type creator, using the registry
|
||||
import { createType } from '@polkadot/types';
|
||||
|
||||
// construct the Balance, of type Balance (type is inferred and available with TS)
|
||||
const value = createType('Balance', 12345);
|
||||
|
||||
// use value here as you normally would
|
||||
...
|
||||
```
|
||||
|
||||
The impact of this will be noticeable, if you have been importing the old-style type classes from `@polkadot/types`, those imports are not available anymore. For creation, just pass everything through the `createType`.
|
||||
|
||||
If a TypeScript user, you can find the updated type (it is a type definition only, not a class), under `@polkadot/types/interfaces`. To do type casting, using interfaces -
|
||||
|
||||
```js
|
||||
// import the TypeScript runtime interfaces we wish to use
|
||||
import { Balance, Hash } from '@polkadot/types/interfaces';
|
||||
|
||||
// import the primitives we wish to use
|
||||
import { createType, Compact, Vec, u32 } from '@polkadot/types';
|
||||
|
||||
// define an interface we want to use inside our code
|
||||
interface MyProps {
|
||||
balance: Compact<Balance>;
|
||||
changes: Vec<Hash>;
|
||||
counter?: u32;
|
||||
}
|
||||
|
||||
// assign something to this structure
|
||||
const props = {
|
||||
balance: createType('Compact<Balance>', 12345),
|
||||
changes: createType('Vec<Hash>', []) // empty for now
|
||||
};
|
||||
```
|
||||
|
||||
### Type definitions
|
||||
|
||||
One of the major pain points in working with a custom Substrate node is the definition of types to cater for chains. There are 2 approaches: defining types via a JSON format or extending your own classes in TypeScript (or JS) and injecting these. For the latter category, there are some impacts in the way you define these.
|
||||
|
||||
If using JSON definitions, nothing changes, your types are still defined as -
|
||||
|
||||
```json
|
||||
{
|
||||
"MyStruct": {
|
||||
"balance": "Compact<Balance>",
|
||||
"values": "Vec<AccountId>",
|
||||
"counter": "u32"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
For the definition of any structures using the Substrate specific types as classes, some adjustments are needed. Since the base modules types are now not available in classes, however it is needed for definitions, the following approach is encouraged -
|
||||
|
||||
```js
|
||||
// import the ClassOf, it works the same as `createType` (along with type detection)
|
||||
// and acts as a replacement for the direct import and use of specific classes
|
||||
import { ClassOf, Struct, u32 } from '@polkadot/types';
|
||||
|
||||
export class MyStruct extends Struct {
|
||||
constructor (value?: any) {
|
||||
super({
|
||||
balance: ClassOf('Compact<Balance>'),
|
||||
values: ClassOf('Vec<AccountId>'),
|
||||
counter: u32
|
||||
}, value);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Internally the [@polkadot/types](packages/types) package now only defines classes where there are specific encoding logic applied. For all other types, the definitions are done via a JSON-like format and then the TypeScript definitions are generated from these. (In a world where nodes inject types and the type definitions are not needed, this functionality will be useful to allow TS developers to auto-generate type definitions based on what the node defines.)
|
||||
|
||||
### Signing transactions (Signer interface)
|
||||
|
||||
For users of the API signer interfaces (such as extensions and mobile signers), the interfaces have undergone some changes to cater for the extrinsic v2 format as defined by Substrate. If you are only supporting current chains (e.g. Alexander), no changes are required, however the old `sign` interface does not support chains such as Kusama, so all users are encouraged to upgrade to the new `signPayload` interface.
|
||||
|
||||
This has already been implemented in both the [polkadot-js extension](https://github.com/polkadot-js/extension/blob/5f22f67d558655c605eb6f6beecef6826ed6c159/packages/extension/src/page/Signer.ts#L16v) as well as the [simple single signer](https://github.com/polkadot-js/api/blob/d56905d1b566be6f17eb570ac01448378fc91b67/packages/api/test/util/SingleAccountSigner.ts#L37).
|
||||
@@ -1,4 +0,0 @@
|
||||
// Copyright 2017-2023 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
module.exports = require('@polkadot/dev/config/babel-config-cjs.cjs');
|
||||
@@ -0,0 +1,23 @@
|
||||
// Copyright 2017-2024 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import baseConfig from '@polkadot/dev/config/eslint';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: [
|
||||
// see the tsconfig.eslint.json for explanation
|
||||
'packages/api-augment/src/kusama/*.ts',
|
||||
'packages/api-augment/src/polkadot/*.ts'
|
||||
]
|
||||
},
|
||||
...baseConfig,
|
||||
{
|
||||
rules: {
|
||||
// add override for any (a metric ton of them, initial conversion)
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
// we generally use this in isFunction, not via calling
|
||||
'@typescript-eslint/unbound-method': 'off'
|
||||
}
|
||||
}
|
||||
];
|
||||
@@ -1,19 +0,0 @@
|
||||
// Copyright 2017-2023 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
const config = require('@polkadot/dev/config/jest.cjs');
|
||||
|
||||
module.exports = {
|
||||
...config,
|
||||
moduleNameMapper: {
|
||||
'@polkadot/api-(augment|base|contract|derive)(.*)$': '<rootDir>/packages/api-$1/src/$2',
|
||||
// eslint-disable-next-line sort-keys
|
||||
'@polkadot/api(.*)$': '<rootDir>/packages/api/src/$1',
|
||||
'@polkadot/rpc-(augment|core|provider)(.*)$': '<rootDir>/packages/rpc-$1/src/$2',
|
||||
'@polkadot/typegen(.*)$': '<rootDir>/packages/typegen/src/$1',
|
||||
'@polkadot/types-(augment|codec|create|known|support)(.*)$': '<rootDir>/packages/types-$1/src/$2',
|
||||
// eslint-disable-next-line sort-keys
|
||||
'@polkadot/types(.*)$': '<rootDir>/packages/types/src/$1'
|
||||
},
|
||||
testTimeout: 30000
|
||||
};
|
||||
+17
-17
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"engines": {
|
||||
"node": ">=18.14"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api#readme",
|
||||
"license": "Apache-2.0",
|
||||
"packageManager": "yarn@3.2.0",
|
||||
"packageManager": "yarn@4.5.1",
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -11,40 +14,37 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "9.13.2",
|
||||
"version": "15.0.2",
|
||||
"versions": {
|
||||
"git": "9.13.2",
|
||||
"npm": "9.13.2"
|
||||
"git": "15.0.2",
|
||||
"npm": "15.0.2"
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "yarn build:interfaces && polkadot-dev-build-ts",
|
||||
"build:extra": "(cd packages/typegen && copyfiles scripts/* build)",
|
||||
"build:interfaces": "polkadot-types-internal-interfaces",
|
||||
"build:metadata": "yarn build:interfaces && yarn test:one packages/types/src/metadata/v14",
|
||||
"build:before": "polkadot-dev-copy-dir --cd packages/typegen scripts build",
|
||||
"build:interfaces": "node --loader @polkadot/dev-ts packages/typegen/scripts/polkadot-types-internal-interfaces.mjs",
|
||||
"build:metadata": "yarn build:interfaces && polkadot-dev-run-test packages/types/src/metadata/v14",
|
||||
"build:release": "polkadot-ci-ghact-build",
|
||||
"build:rollup": "polkadot-exec-rollup --config",
|
||||
"build:upgrades": "yarn test:one packages/types-known/src/upgrades/e2e",
|
||||
"build:upgrades": "polkadot-dev-run-test upgrades/e2e",
|
||||
"chain:info": "polkadot-types-chain-info",
|
||||
"clean": "polkadot-dev-clean-build",
|
||||
"deno": "yarn polkadot-dev-deno-map && yarn build && deno check --import-map=import_map.json mod.ts",
|
||||
"lint": "polkadot-dev-run-lint",
|
||||
"postinstall": "polkadot-dev-yarn-only",
|
||||
"test": "NODE_OPTIONS=--experimental-vm-modules polkadot-dev-run-test --coverage --forceExit --runInBand --testPathIgnorePatterns e2e",
|
||||
"test:one": "NODE_OPTIONS=--experimental-vm-modules polkadot-dev-run-test --detectOpenHandles --forceExit"
|
||||
"test": "polkadot-dev-run-test --env node ^e2e",
|
||||
"test:node": "polkadot-dev-run-test --env node ^e2e",
|
||||
"test:one": "polkadot-dev-run-test --env node"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.20.12",
|
||||
"@babel/register": "^7.18.9",
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@polkadot/dev": "^0.68.2",
|
||||
"@polkadot/dev": "^0.82.1",
|
||||
"@polkadot/typegen": "workspace:packages/typegen",
|
||||
"@types/jest": "^29.4.0",
|
||||
"copyfiles": "^2.4.1"
|
||||
"@types/node": "^22.7.5"
|
||||
},
|
||||
"resolutions": {
|
||||
"typescript": "^4.9.4"
|
||||
"typescript": "^5.5.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
{
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"contributors": [],
|
||||
"description": "API generated augmentation",
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
"node": ">=18"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-augment#readme",
|
||||
"license": "Apache-2.0",
|
||||
"maintainers": [],
|
||||
"name": "@polkadot/api-augment",
|
||||
"repository": {
|
||||
"directory": "packages/api-augment",
|
||||
@@ -16,19 +14,19 @@
|
||||
"url": "https://github.com/polkadot-js/api.git"
|
||||
},
|
||||
"sideEffects": [
|
||||
"./detectPackage.js",
|
||||
"./detectPackage.cjs"
|
||||
"./packageDetect.js",
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.13.2",
|
||||
"version": "15.0.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@polkadot/api-base": "9.13.2",
|
||||
"@polkadot/rpc-augment": "9.13.2",
|
||||
"@polkadot/types": "9.13.2",
|
||||
"@polkadot/types-augment": "9.13.2",
|
||||
"@polkadot/types-codec": "9.13.2",
|
||||
"@polkadot/util": "^10.3.1"
|
||||
"@polkadot/api-base": "15.0.2",
|
||||
"@polkadot/rpc-augment": "15.0.2",
|
||||
"@polkadot/types": "15.0.2",
|
||||
"@polkadot/types-augment": "15.0.2",
|
||||
"@polkadot/types-codec": "15.0.2",
|
||||
"@polkadot/util": "^13.2.3",
|
||||
"tslib": "^2.8.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api-augment authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// for the API, we decorate not only the endpoints, but all types
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright 2017-2023 @polkadot/api-augment authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import './substrate';
|
||||
import './substrate/index.js';
|
||||
|
||||
export { packageInfo } from './packageInfo';
|
||||
export { packageInfo } from './packageInfo.js';
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
// Copyright 2017-2023 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { packageInfo as baseInfo } from '@polkadot/api-base/packageInfo';
|
||||
import { packageInfo as typesInfo } from '@polkadot/types/packageInfo';
|
||||
import { packageInfo as codecInfo } from '@polkadot/types-codec/packageInfo';
|
||||
|
||||
export default [baseInfo, typesInfo, codecInfo];
|
||||
@@ -1,11 +0,0 @@
|
||||
// Copyright 2017-2023 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
import { detectPackage } from '@polkadot/util';
|
||||
|
||||
import others from './detectOther';
|
||||
import { packageInfo } from './packageInfo';
|
||||
|
||||
detectPackage(packageInfo, null, others);
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright 2017-2023 @polkadot/api-augment authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import './detectPackage';
|
||||
import './packageDetect.js';
|
||||
|
||||
export * from './bundle';
|
||||
export * from './bundle.js';
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
import '@polkadot/api-base/types/consts';
|
||||
|
||||
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
|
||||
import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { Bytes, Option, Vec, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { Codec, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { Perbill, Percent, Permill, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
|
||||
import type { Perbill, Permill, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight, StagingXcmV4Junctions } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
|
||||
|
||||
@@ -33,18 +33,6 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
authorship: {
|
||||
/**
|
||||
* The number of blocks back we should accept uncles.
|
||||
* This means that we will deal with uncle-parents that are
|
||||
* `UncleGenerations + 1` before `now`.
|
||||
**/
|
||||
uncleGenerations: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
babe: {
|
||||
/**
|
||||
* The amount of time, in slots, that each epoch should last.
|
||||
@@ -64,6 +52,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Max number of authorities allowed
|
||||
**/
|
||||
maxAuthorities: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of nominators for each validator.
|
||||
**/
|
||||
maxNominators: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -71,16 +63,31 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
};
|
||||
balances: {
|
||||
/**
|
||||
* The minimum amount required to keep an account open.
|
||||
* The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!
|
||||
*
|
||||
* If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for
|
||||
* this pallet. However, you do so at your own risk: this will open up a major DoS vector.
|
||||
* In case you have multiple sources of provider references, you may also get unexpected
|
||||
* behaviour if you set this to zero.
|
||||
*
|
||||
* Bottom line: Do yourself a favour and make it at least one!
|
||||
**/
|
||||
existentialDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of individual freeze locks that can exist on an account at any time.
|
||||
**/
|
||||
maxFreezes: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of locks that should exist on an account.
|
||||
* Not strictly enforced, but used for weight estimation.
|
||||
*
|
||||
* Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
|
||||
**/
|
||||
maxLocks: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of named reserves that can exist on an account.
|
||||
*
|
||||
* Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
|
||||
**/
|
||||
maxReserves: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -88,6 +95,29 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
beefy: {
|
||||
/**
|
||||
* The maximum number of authorities that can be added.
|
||||
**/
|
||||
maxAuthorities: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of nominators for each validator.
|
||||
**/
|
||||
maxNominators: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of entries to keep in the set id to session index mapping.
|
||||
*
|
||||
* Since the `SetIdSession` map is only used for validating equivocations this
|
||||
* value should relate to the bonding duration of whatever staking system is
|
||||
* being used (if any). If equivocation handling is not enabled then this value
|
||||
* can be zero.
|
||||
**/
|
||||
maxSetIdSessionEntries: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
bounties: {
|
||||
/**
|
||||
* The amount held on deposit for placing a bounty proposal.
|
||||
@@ -176,14 +206,29 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
coretime: {
|
||||
/**
|
||||
* The ParaId of the coretime chain.
|
||||
**/
|
||||
brokerId: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The coretime chain pot location.
|
||||
**/
|
||||
brokerPotLocation: StagingXcmV4Junctions & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
crowdloan: {
|
||||
/**
|
||||
* The minimum amount that may be contributed into a crowdloan. Should almost certainly be at
|
||||
* least `ExistentialDeposit`.
|
||||
* The minimum amount that may be contributed into a crowdloan. Should almost certainly be
|
||||
* at least `ExistentialDeposit`.
|
||||
**/
|
||||
minContribution: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* `PalletId` for the crowdloan pallet. An appropriate value could be `PalletId(*b"py/cfund")`
|
||||
* `PalletId` for the crowdloan pallet. An appropriate value could be
|
||||
* `PalletId(*b"py/cfund")`
|
||||
**/
|
||||
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -195,93 +240,12 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
democracy: {
|
||||
/**
|
||||
* Period in blocks where an external proposal may not be re-submitted after being vetoed.
|
||||
**/
|
||||
cooloffPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The period between a proposal being approved and enacted.
|
||||
*
|
||||
* It should generally be a little more than the unstake period to ensure that
|
||||
* voting stakers have an opportunity to remove themselves from the system in the case
|
||||
* where they are on the losing side of a vote.
|
||||
**/
|
||||
enactmentPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Minimum voting period allowed for a fast-track referendum.
|
||||
**/
|
||||
fastTrackVotingPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Indicator for whether an emergency origin is even allowed to happen. Some chains may
|
||||
* want to set this permanently to `false`, others may want to condition it on things such
|
||||
* as an upgrade having happened recently.
|
||||
**/
|
||||
instantAllowed: bool & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* How often (in blocks) new public referenda are launched.
|
||||
**/
|
||||
launchPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of items which can be blacklisted.
|
||||
**/
|
||||
maxBlacklisted: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of deposits a public proposal may have at any time.
|
||||
**/
|
||||
maxDeposits: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of public proposals that can exist at any time.
|
||||
**/
|
||||
maxProposals: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of votes for an account.
|
||||
*
|
||||
* Also used to compute weight, an overly big value can
|
||||
* lead to extrinsic with very big weight: see `delegate` for instance.
|
||||
**/
|
||||
maxVotes: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum amount to be used as a deposit for a public referendum proposal.
|
||||
**/
|
||||
minimumDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum period of vote locking.
|
||||
*
|
||||
* It should be no shorter than enactment period to ensure that in the case of an approval,
|
||||
* those successful voters are locked into the consequences that their votes entail.
|
||||
**/
|
||||
voteLockingPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* How often (in blocks) to check for new votes.
|
||||
**/
|
||||
votingPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* The minimum amount of improvement to the solution score that defines a solution as
|
||||
* "better" in the Signed phase.
|
||||
**/
|
||||
betterSignedThreshold: Perbill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum amount of improvement to the solution score that defines a solution as
|
||||
* "better" in the Unsigned phase.
|
||||
**/
|
||||
betterUnsignedThreshold: Perbill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of electable targets to put in the snapshot.
|
||||
**/
|
||||
maxElectableTargets: u16 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of electing voters to put in the snapshot. At the moment, snapshots
|
||||
* are only over a single block, but once multi-block elections are introduced they will
|
||||
* take place over multiple blocks.
|
||||
**/
|
||||
maxElectingVoters: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of winners that can be elected by this `ElectionProvider`
|
||||
* implementation.
|
||||
@@ -292,6 +256,7 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
minerMaxLength: u32 & AugmentedConst<ApiType>;
|
||||
minerMaxVotesPerVoter: u32 & AugmentedConst<ApiType>;
|
||||
minerMaxWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||
minerMaxWinners: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The priority of the unsigned transaction submitted in the unsigned-phase
|
||||
**/
|
||||
@@ -303,10 +268,6 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* to submit the worker's solution.
|
||||
**/
|
||||
offchainRepeat: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Base deposit for a signed solution.
|
||||
**/
|
||||
signedDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Per-byte deposit for a signed solution.
|
||||
**/
|
||||
@@ -337,18 +298,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* this value.
|
||||
**/
|
||||
signedMaxWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Duration of the signed phase.
|
||||
**/
|
||||
signedPhase: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Base reward for a signed solution
|
||||
**/
|
||||
signedRewardBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Duration of the unsigned phase.
|
||||
**/
|
||||
unsignedPhase: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -400,52 +353,18 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
maxAuthorities: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
* The maximum number of nominators for each validator.
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
identity: {
|
||||
maxNominators: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount held on deposit for a registered identity
|
||||
**/
|
||||
basicDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount held on deposit per additional field for a registered identity.
|
||||
**/
|
||||
fieldDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O
|
||||
* required to access an identity, but can be pretty high.
|
||||
**/
|
||||
maxAdditionalFields: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maxmimum number of registrars allowed in the system. Needed to bound the complexity
|
||||
* of, e.g., updating judgements.
|
||||
**/
|
||||
maxRegistrars: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of sub-accounts allowed per identified account.
|
||||
**/
|
||||
maxSubAccounts: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount held on deposit for a registered subaccount. This should account for the fact
|
||||
* that one storage item's value will increase by the size of an account ID, and there will
|
||||
* be another trie item whose value is the size of an account ID plus 32 bytes.
|
||||
**/
|
||||
subAccountDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
imOnline: {
|
||||
/**
|
||||
* A configuration for base priority of unsigned transactions.
|
||||
* The maximum number of entries to keep in the set id to session index mapping.
|
||||
*
|
||||
* This is exposed so that it can be tuned for particular runtime, when
|
||||
* multiple pallets send unsigned transactions.
|
||||
* Since the `SetIdSession` map is only used for validating equivocations this
|
||||
* value should relate to the bonding duration of whatever staking system is
|
||||
* being used (if any). If equivocation handling is not enabled then this value
|
||||
* can be zero.
|
||||
**/
|
||||
unsignedPriority: u64 & AugmentedConst<ApiType>;
|
||||
maxSetIdSessionEntries: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -461,6 +380,43 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
messageQueue: {
|
||||
/**
|
||||
* The size of the page; this implies the maximum message size which can be sent.
|
||||
*
|
||||
* A good value depends on the expected message sizes, their weights, the weight that is
|
||||
* available for processing them and the maximal needed message size. The maximal message
|
||||
* size is slightly lower than this as defined by [`MaxMessageLenOf`].
|
||||
**/
|
||||
heapSize: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum amount of weight (if any) to be used from remaining weight `on_idle` which
|
||||
* should be provided to the message queue for servicing enqueued items `on_idle`.
|
||||
* Useful for parachains to process messages at the same block they are received.
|
||||
*
|
||||
* If `None`, it will not call `ServiceQueues::service_queues` in `on_idle`.
|
||||
**/
|
||||
idleMaxServiceWeight: Option<SpWeightsWeightV2Weight> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of stale pages (i.e. of overweight messages) allowed before culling
|
||||
* can happen. Once there are more stale pages than this, then historical pages may be
|
||||
* dropped, even if they contain unprocessed overweight messages.
|
||||
**/
|
||||
maxStale: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of weight (if any) which should be provided to the message queue for
|
||||
* servicing enqueued items `on_initialize`.
|
||||
*
|
||||
* This may be legitimately `None` in the case that you will call
|
||||
* `ServiceQueues::service_queues` manually or set [`Self::IdleMaxServiceWeight`] to have
|
||||
* it run in `on_idle`.
|
||||
**/
|
||||
serviceWeight: Option<SpWeightsWeightV2Weight> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
multisig: {
|
||||
/**
|
||||
* The base amount of currency needed to reserve for creating a multisig execution or to
|
||||
@@ -540,10 +496,6 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* this value multiplied by `Period`.
|
||||
**/
|
||||
queueCount: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The name for the reserve ID.
|
||||
**/
|
||||
reserveId: U8aFixed & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum proportion which may be thawed and the period over which it is reset.
|
||||
**/
|
||||
@@ -555,16 +507,31 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
};
|
||||
nisCounterpartBalances: {
|
||||
/**
|
||||
* The minimum amount required to keep an account open.
|
||||
* The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!
|
||||
*
|
||||
* If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for
|
||||
* this pallet. However, you do so at your own risk: this will open up a major DoS vector.
|
||||
* In case you have multiple sources of provider references, you may also get unexpected
|
||||
* behaviour if you set this to zero.
|
||||
*
|
||||
* Bottom line: Do yourself a favour and make it at least one!
|
||||
**/
|
||||
existentialDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of individual freeze locks that can exist on an account at any time.
|
||||
**/
|
||||
maxFreezes: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of locks that should exist on an account.
|
||||
* Not strictly enforced, but used for weight estimation.
|
||||
*
|
||||
* Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
|
||||
**/
|
||||
maxLocks: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of named reserves that can exist on an account.
|
||||
*
|
||||
* Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
|
||||
**/
|
||||
maxReserves: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -588,6 +555,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Such a scenario would also be the equivalent of the pool being 90% slashed.
|
||||
**/
|
||||
maxPointsToBalance: u8 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of simultaneous unbonding chunks that can exist per member.
|
||||
**/
|
||||
maxUnbonding: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The nomination pool's pallet id.
|
||||
**/
|
||||
@@ -597,62 +568,27 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
paras: {
|
||||
unsignedPriority: u64 & AugmentedConst<ApiType>;
|
||||
onDemandAssignmentProvider: {
|
||||
/**
|
||||
* The maximum number of blocks some historical revenue
|
||||
* information stored for.
|
||||
**/
|
||||
maxHistoricalRevenue: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Identifier for the internal revenue balance.
|
||||
**/
|
||||
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The default value for the spot traffic multiplier.
|
||||
**/
|
||||
trafficDefaultValue: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
phragmenElection: {
|
||||
/**
|
||||
* How much should be locked up in order to submit one's candidacy.
|
||||
**/
|
||||
candidacyBond: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Number of members to elect.
|
||||
**/
|
||||
desiredMembers: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Number of runners_up to keep.
|
||||
**/
|
||||
desiredRunnersUp: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of candidates in a phragmen election.
|
||||
*
|
||||
* Warning: The election happens onchain, and this value will determine
|
||||
* the size of the election. When this limit is reached no more
|
||||
* candidates are accepted in the election.
|
||||
**/
|
||||
maxCandidates: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of voters to allow in a phragmen election.
|
||||
*
|
||||
* Warning: This impacts the size of the election which is run onchain.
|
||||
* When the limit is reached the new voters are ignored.
|
||||
**/
|
||||
maxVoters: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Identifier for the elections-phragmen pallet's lock
|
||||
**/
|
||||
palletId: U8aFixed & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* How long each seat is kept. This defines the next block number at which an election
|
||||
* round will happen. If set to zero, no elections are ever triggered and the module will
|
||||
* be in passive mode.
|
||||
**/
|
||||
termDuration: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Base deposit associated with voting.
|
||||
*
|
||||
* This should be sensibly high to economically ensure the pallet cannot be attacked by
|
||||
* creating a gigantic number of votes.
|
||||
**/
|
||||
votingBondBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of bond that need to be locked for each vote (32 bytes).
|
||||
**/
|
||||
votingBondFactor: u128 & AugmentedConst<ApiType>;
|
||||
paras: {
|
||||
unsignedPriority: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -776,7 +712,7 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The deposit to be paid to run a parathread.
|
||||
* The deposit to be paid to run a on-demand parachain.
|
||||
* This should include the cost for storing the genesis head and validation code.
|
||||
**/
|
||||
paraDeposit: u128 & AugmentedConst<ApiType>;
|
||||
@@ -792,6 +728,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
maximumWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of scheduled calls in the queue for a single block.
|
||||
*
|
||||
* NOTE:
|
||||
* + Dependent pallets' benchmarks might require a higher limit for the setting. Set a
|
||||
* higher limit under `runtime-benchmarks` feature.
|
||||
**/
|
||||
maxScheduledPerBlock: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -814,27 +754,31 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
[key: string]: Codec;
|
||||
};
|
||||
society: {
|
||||
/**
|
||||
* The minimum amount of a deposit required for a bid to be made.
|
||||
**/
|
||||
candidateDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The number of blocks between membership challenges.
|
||||
**/
|
||||
challengePeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of candidates that we accept per round.
|
||||
* The number of blocks on which new candidates can claim their membership and be the
|
||||
* named head.
|
||||
**/
|
||||
maxCandidateIntake: u32 & AugmentedConst<ApiType>;
|
||||
claimPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of strikes before a member gets funds slashed.
|
||||
**/
|
||||
graceStrikes: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of bids at once.
|
||||
**/
|
||||
maxBids: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum duration of the payout lock.
|
||||
**/
|
||||
maxLockDuration: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The number of times a member may vote the wrong way (or not at all, when they are a
|
||||
* skeptic) before they become suspended.
|
||||
* The maximum number of payouts a member may have waiting unclaimed.
|
||||
**/
|
||||
maxStrikes: u32 & AugmentedConst<ApiType>;
|
||||
maxPayouts: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The societies's pallet id
|
||||
**/
|
||||
@@ -844,14 +788,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
periodSpend: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The number of blocks between candidate/membership rotation periods.
|
||||
* The number of blocks on which new candidates should be voted on. Together with
|
||||
* `ClaimPeriod`, this sums to the number of blocks between candidate intake periods.
|
||||
**/
|
||||
rotationPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of the unpaid reward that gets deducted in the case that either a skeptic
|
||||
* doesn't vote or someone votes in the wrong way.
|
||||
**/
|
||||
wrongSideDeduction: u128 & AugmentedConst<ApiType>;
|
||||
votingPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -868,8 +808,8 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Following information is kept for eras in `[current_era -
|
||||
* HistoryDepth, current_era]`: `ErasStakers`, `ErasStakersClipped`,
|
||||
* `ErasValidatorPrefs`, `ErasValidatorReward`, `ErasRewardPoints`,
|
||||
* `ErasTotalStake`, `ErasStartSessionIndex`,
|
||||
* `StakingLedger.claimed_rewards`.
|
||||
* `ErasTotalStake`, `ErasStartSessionIndex`, `ClaimedRewards`, `ErasStakersPaged`,
|
||||
* `ErasStakersOverview`.
|
||||
*
|
||||
* Must be more than the number of eras delayed by session.
|
||||
* I.e. active era must always be in history. I.e. `active_era >
|
||||
@@ -879,23 +819,26 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* this should be set to same value or greater as in storage.
|
||||
*
|
||||
* Note: `HistoryDepth` is used as the upper bound for the `BoundedVec`
|
||||
* item `StakingLedger.claimed_rewards`. Setting this value lower than
|
||||
* item `StakingLedger.legacy_claimed_rewards`. Setting this value lower than
|
||||
* the existing value can lead to inconsistencies in the
|
||||
* `StakingLedger` and will need to be handled properly in a migration.
|
||||
* The test `reducing_history_depth_abrupt` shows this effect.
|
||||
**/
|
||||
historyDepth: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum number of nominations per nominator.
|
||||
**/
|
||||
maxNominations: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of nominators rewarded for each validator.
|
||||
* The maximum size of each `T::ExposurePage`.
|
||||
*
|
||||
* For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can
|
||||
* claim their reward. This used to limit the i/o cost for the nominator payout.
|
||||
* An `ExposurePage` is weakly bounded to a maximum of `MaxExposurePageSize`
|
||||
* nominators.
|
||||
*
|
||||
* For older non-paged exposure, a reward payout was restricted to the top
|
||||
* `MaxExposurePageSize` nominators. This is to limit the i/o cost for the
|
||||
* nominator payout.
|
||||
*
|
||||
* Note: `MaxExposurePageSize` is used to bound `ClaimedRewards` and is unsafe to reduce
|
||||
* without handling it in a migration.
|
||||
**/
|
||||
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
|
||||
maxExposurePageSize: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of `unlocking` chunks a [`StakingLedger`] can
|
||||
* have. Effectively determines how many unique eras a staker may be
|
||||
@@ -951,7 +894,7 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
ss58Prefix: u16 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Get the chain's current version.
|
||||
* Get the chain's in-code version.
|
||||
**/
|
||||
version: SpVersionRuntimeVersion & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -961,10 +904,12 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
};
|
||||
timestamp: {
|
||||
/**
|
||||
* The minimum period between blocks. Beware that this is different to the *expected*
|
||||
* period that the block production apparatus provides. Your chosen consensus system will
|
||||
* generally work with this to determine a sensible block time. e.g. For Aura, it will be
|
||||
* double this period on default settings.
|
||||
* The minimum period between blocks.
|
||||
*
|
||||
* Be aware that this is different to the *expected* period that the block production
|
||||
* apparatus provides. Your chosen consensus system will generally work with this to
|
||||
* determine a sensible block time. For example, in the Aura pallet it will be double this
|
||||
* period on default settings.
|
||||
**/
|
||||
minimumPeriod: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -972,40 +917,12 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
tips: {
|
||||
/**
|
||||
* The amount held on deposit per byte within the tip report reason or bounty description.
|
||||
**/
|
||||
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum acceptable reason length.
|
||||
*
|
||||
* Benchmarks depend on this value, be sure to update weights file when changing this value
|
||||
**/
|
||||
maximumReasonLength: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The period for which a tip remains open after is has achieved threshold tippers.
|
||||
**/
|
||||
tipCountdown: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The percent of the final tip which goes to the original reporter of the tip.
|
||||
**/
|
||||
tipFindersFee: Percent & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount held on deposit for placing a tip report.
|
||||
**/
|
||||
tipReportDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
transactionPayment: {
|
||||
/**
|
||||
* A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their
|
||||
* A fee multiplier for `Operational` extrinsics to compute "virtual tip" to boost their
|
||||
* `priority`
|
||||
*
|
||||
* This value is multipled by the `final_fee` to obtain a "virtual tip" that is later
|
||||
* This value is multiplied by the `final_fee` to obtain a "virtual tip" that is later
|
||||
* added to a tip component in regular `priority` calculations.
|
||||
* It means that a `Normal` transaction can front-run a similarly-sized `Operational`
|
||||
* extrinsic (with no tip), by including a tip value greater than the virtual tip.
|
||||
@@ -1046,18 +963,9 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Fraction of a proposal's value that should be bonded in order to place the proposal.
|
||||
* An accepted proposal gets these back. A rejected proposal does not.
|
||||
* The period during which an approved treasury spend has to be claimed.
|
||||
**/
|
||||
proposalBond: Permill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum amount of funds that should be placed in a deposit for making a proposal.
|
||||
**/
|
||||
proposalBondMaximum: Option<u128> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Minimum amount of funds that should be placed in a deposit for making a proposal.
|
||||
**/
|
||||
proposalBondMinimum: u128 & AugmentedConst<ApiType>;
|
||||
payoutPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Period between successive spends.
|
||||
**/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
||||
// Copyright 2017-2023 @polkadot/api-augment authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '../base';
|
||||
import './consts';
|
||||
import './errors';
|
||||
import './events';
|
||||
import './query';
|
||||
import './registry';
|
||||
import './runtime';
|
||||
import './tx';
|
||||
import '../base.js';
|
||||
import './consts.js';
|
||||
import './errors.js';
|
||||
import './events.js';
|
||||
import './query.js';
|
||||
import './registry.js';
|
||||
import './runtime.js';
|
||||
import './tx.js';
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api-augment authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '@polkadot/types-augment/registry/substrate';
|
||||
|
||||
@@ -6,24 +6,14 @@
|
||||
import '@polkadot/api-base/types/calls';
|
||||
|
||||
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
|
||||
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
|
||||
import type { BTreeMap, BitVec, Bytes, Null, Option, Result, Text, Vec, bool, u128, u32, u64 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
|
||||
import type { ValidatorSet } from '@polkadot/types/interfaces/beefy';
|
||||
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
|
||||
import type { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||
import type { OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
|
||||
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
|
||||
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
|
||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
|
||||
import type { SessionIndex } from '@polkadot/types/interfaces/session';
|
||||
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
||||
import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
|
||||
import type { ParaId, ValidationCodeHash } from '@polkadot/types/interfaces/parachains';
|
||||
import type { AccountId32, H256, RuntimeCall, Slot } from '@polkadot/types/interfaces/runtime';
|
||||
import type { PalletTransactionPaymentFeeDetails, PalletTransactionPaymentRuntimeDispatchInfo, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotPrimitivesV7ApprovalVotingParams, PolkadotPrimitivesV7AsyncBackingAsyncBackingParams, PolkadotPrimitivesV7AsyncBackingBackingState, PolkadotPrimitivesV7CandidateCommitments, PolkadotPrimitivesV7CandidateEvent, PolkadotPrimitivesV7CommittedCandidateReceipt, PolkadotPrimitivesV7CoreState, PolkadotPrimitivesV7DisputeState, PolkadotPrimitivesV7ExecutorParams, PolkadotPrimitivesV7GroupRotationInfo, PolkadotPrimitivesV7OccupiedCoreAssumption, PolkadotPrimitivesV7PersistedValidationData, PolkadotPrimitivesV7PvfCheckStatement, PolkadotPrimitivesV7ScrapedOnChainVotes, PolkadotPrimitivesV7SessionInfo, PolkadotPrimitivesV7SlashingDisputeProof, PolkadotPrimitivesV7SlashingPendingSlashes, PolkadotPrimitivesV7ValidatorAppPublic, PolkadotPrimitivesV7ValidatorAppSignature, RelayCommonApisInflationInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeConfiguration, SpConsensusBabeEpoch, SpConsensusBeefyDoubleVotingProof, SpConsensusBeefyEcdsaCryptoPublic, SpConsensusBeefyMmrBeefyAuthoritySet, SpConsensusBeefyValidatorSet, SpConsensusGrandpaAppPublic, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpCoreCryptoKeyTypeId, SpInherentsCheckInherentsResult, SpInherentsInherentData, SpMmrPrimitivesError, SpMmrPrimitivesLeafProof, SpRuntimeBlock, SpRuntimeDispatchError, SpRuntimeExtrinsicInclusionMode, SpRuntimeHeader, SpRuntimeTransactionValidityTransactionSource, SpRuntimeTransactionValidityTransactionValidityError, SpRuntimeTransactionValidityValidTransaction, SpVersionRuntimeVersion, SpWeightsWeightV2Weight, StagingKusamaRuntimeOriginCaller, XcmRuntimeApisConversionsError, XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError, XcmRuntimeApisDryRunXcmDryRunEffects, XcmRuntimeApisFeesError, XcmVersionedAssetId, XcmVersionedAssets, XcmVersionedLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
import type { IExtrinsic, Observable } from '@polkadot/types/types';
|
||||
|
||||
export type __AugmentedCall<ApiType extends ApiTypes> = AugmentedCall<ApiType>;
|
||||
@@ -31,290 +21,449 @@ export type __DecoratedCallBase<ApiType extends ApiTypes> = DecoratedCallBase<Ap
|
||||
|
||||
declare module '@polkadot/api-base/types/calls' {
|
||||
interface AugmentedCalls<ApiType extends ApiTypes> {
|
||||
/** 0xbc9d89904f5b923f/1 */
|
||||
/** 0xbc9d89904f5b923f/ */
|
||||
accountNonceApi: {
|
||||
/**
|
||||
* The API to query account nonce (aka transaction index)
|
||||
* Get current account nonce of given `AccountId`.
|
||||
**/
|
||||
accountNonce: AugmentedCall<ApiType, (accountId: AccountId | string | Uint8Array) => Observable<Index>>;
|
||||
accountNonce: AugmentedCall<ApiType, (account: AccountId32 | string | Uint8Array) => Observable<u32>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x687ad44ad37f03c2/1 */
|
||||
/** 0x687ad44ad37f03c2/ */
|
||||
authorityDiscoveryApi: {
|
||||
/**
|
||||
* Retrieve authority identifiers of the current and next authority set.
|
||||
**/
|
||||
authorities: AugmentedCall<ApiType, () => Observable<Vec<AuthorityId>>>;
|
||||
authorities: AugmentedCall<ApiType, () => Observable<Vec<SpAuthorityDiscoveryAppPublic>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xcbca25e39f142387/2 */
|
||||
/** 0xcbca25e39f142387/ */
|
||||
babeApi: {
|
||||
/**
|
||||
* Return the genesis configuration for BABE. The configuration is only read on genesis.
|
||||
* Return the configuration for BABE.
|
||||
**/
|
||||
configuration: AugmentedCall<ApiType, () => Observable<BabeGenesisConfiguration>>;
|
||||
configuration: AugmentedCall<ApiType, () => Observable<SpConsensusBabeBabeConfiguration>>;
|
||||
/**
|
||||
* Returns information regarding the current epoch.
|
||||
**/
|
||||
currentEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
|
||||
currentEpoch: AugmentedCall<ApiType, () => Observable<SpConsensusBabeEpoch>>;
|
||||
/**
|
||||
* Returns the slot that started the current epoch.
|
||||
**/
|
||||
currentEpochStart: AugmentedCall<ApiType, () => Observable<Slot>>;
|
||||
/**
|
||||
* Generates a proof of key ownership for the given authority in the current epoch.
|
||||
* Generates a proof of key ownership for the given authority in the, current epoch. An example usage of this module is coupled with the, session historical module to prove that a given authority key is, tied to a given staking identity during a specific session. Proofs, of key ownership are necessary for submitting equivocation reports., NOTE: even though the API takes a `slot` as parameter the current, implementations ignores this parameter and instead relies on this, method being called at the correct block height, i.e. any point at, which the epoch for the given slot is live on-chain. Future, implementations will instead use indexed data through an offchain, worker, not requiring older states to be available.
|
||||
**/
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (slot: Slot | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (slot: Slot | AnyNumber | Uint8Array, authority_id: SpConsensusBabeAppPublic | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Returns information regarding the next epoch (which was already previously announced).
|
||||
* Returns information regarding the next epoch (which was already, previously announced).
|
||||
**/
|
||||
nextEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
|
||||
nextEpoch: AugmentedCall<ApiType, () => Observable<SpConsensusBabeEpoch>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report an equivocation.
|
||||
* Submits an unsigned extrinsic to report an equivocation. The caller, must provide the equivocation proof and a key ownership proof, (should be obtained using `generate_key_ownership_proof`). The, extrinsic will be unsigned and should only be accepted for local, authorship (not to be broadcast to the network). This method returns, `None` when creation of the extrinsic fails, e.g. if equivocation, reporting is disabled for the given runtime (i.e. this method is, hardcoded to return `None`). Only useful in an offchain context.
|
||||
**/
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: BabeEquivocationProof | { offender?: any; slotNumber?: any; firstHeader?: any; secondHeader?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocation_proof: SpConsensusSlotsEquivocationProof | { offender?: any; slot?: any; firstHeader?: any; secondHeader?: any } | string | Uint8Array, key_owner_proof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x49eaaf1b548a0cb0/1 */
|
||||
/** 0x49eaaf1b548a0cb0/ */
|
||||
beefyApi: {
|
||||
/**
|
||||
* Return the block number where BEEFY consensus is enabled/started
|
||||
**/
|
||||
beefyGenesis: AugmentedCall<ApiType, () => Observable<Option<u32>>>;
|
||||
/**
|
||||
* Generates a proof of key ownership for the given authority in the, given set. An example usage of this module is coupled with the, session historical module to prove that a given authority key is, tied to a given staking identity during a specific session. Proofs, of key ownership are necessary for submitting equivocation reports., NOTE: even though the API takes a `set_id` as parameter the current, implementations ignores this parameter and instead relies on this, method being called at the correct block height, i.e. any point at, which the given set id is live on-chain. Future implementations will, instead use indexed data through an offchain worker, not requiring, older states to be available.
|
||||
**/
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (set_id: u64 | AnyNumber | Uint8Array, authority_id: SpConsensusBeefyEcdsaCryptoPublic | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report an equivocation. The caller, must provide the equivocation proof and a key ownership proof, (should be obtained using `generate_key_ownership_proof`). The, extrinsic will be unsigned and should only be accepted for local, authorship (not to be broadcast to the network). This method returns, `None` when creation of the extrinsic fails, e.g. if equivocation, reporting is disabled for the given runtime (i.e. this method is, hardcoded to return `None`). Only useful in an offchain context.
|
||||
**/
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocation_proof: SpConsensusBeefyDoubleVotingProof | { first?: any; second?: any } | string | Uint8Array, key_owner_proof: Bytes | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Return the current active BEEFY validator set
|
||||
**/
|
||||
validatorSet: AugmentedCall<ApiType, () => Observable<Option<ValidatorSet>>>;
|
||||
validatorSet: AugmentedCall<ApiType, () => Observable<Option<SpConsensusBeefyValidatorSet>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x40fe3ad401f8959a/6 */
|
||||
/** 0x2a5e924655399e60/ */
|
||||
beefyMmrApi: {
|
||||
/**
|
||||
* Return the currently active BEEFY authority set proof.
|
||||
**/
|
||||
authoritySetProof: AugmentedCall<ApiType, () => Observable<SpConsensusBeefyMmrBeefyAuthoritySet>>;
|
||||
/**
|
||||
* Return the next/queued BEEFY authority set proof.
|
||||
**/
|
||||
nextAuthoritySetProof: AugmentedCall<ApiType, () => Observable<SpConsensusBeefyMmrBeefyAuthoritySet>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x40fe3ad401f8959a/ */
|
||||
blockBuilder: {
|
||||
/**
|
||||
* Apply the given extrinsic.
|
||||
* Apply the given extrinsic.,, Returns an inclusion outcome which specifies if this extrinsic is included in, this block or not.
|
||||
**/
|
||||
applyExtrinsic: AugmentedCall<ApiType, (extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<ApplyExtrinsicResult>>;
|
||||
applyExtrinsic: AugmentedCall<ApiType, (extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<Result<Result<Null, SpRuntimeDispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>>;
|
||||
/**
|
||||
* Check that the inherents are valid.
|
||||
* Check that the inherents are valid. The inherent data will vary from chain to chain.
|
||||
**/
|
||||
checkInherents: AugmentedCall<ApiType, (block: Block | { header?: any; extrinsics?: any } | string | Uint8Array, data: InherentData | { data?: any } | string | Uint8Array) => Observable<CheckInherentsResult>>;
|
||||
checkInherents: AugmentedCall<ApiType, (block: SpRuntimeBlock | { header?: any; extrinsics?: any } | string | Uint8Array, data: SpInherentsInherentData | { data?: any } | string | Uint8Array) => Observable<SpInherentsCheckInherentsResult>>;
|
||||
/**
|
||||
* Finish the current block.
|
||||
**/
|
||||
finalizeBlock: AugmentedCall<ApiType, () => Observable<Header>>;
|
||||
finalizeBlock: AugmentedCall<ApiType, () => Observable<SpRuntimeHeader>>;
|
||||
/**
|
||||
* Generate inherent extrinsics.
|
||||
* Generate inherent extrinsics. The inherent data will vary from chain to chain.
|
||||
**/
|
||||
inherentExtrinsics: AugmentedCall<ApiType, (inherent: InherentData | { data?: any } | string | Uint8Array) => Observable<Vec<Extrinsic>>>;
|
||||
inherentExtrinsics: AugmentedCall<ApiType, (inherent: SpInherentsInherentData | { data?: any } | string | Uint8Array) => Observable<Vec<Bytes>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xdf6acb689907609b/4 */
|
||||
/** 0xdf6acb689907609b/ */
|
||||
core: {
|
||||
/**
|
||||
* Execute the given block.
|
||||
**/
|
||||
executeBlock: AugmentedCall<ApiType, (block: Block | { header?: any; extrinsics?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
executeBlock: AugmentedCall<ApiType, (block: SpRuntimeBlock | { header?: any; extrinsics?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Initialize a block with the given header.
|
||||
* Initialize a block with the given header and return the runtime executive mode.
|
||||
**/
|
||||
initializeBlock: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
initializeBlock: AugmentedCall<ApiType, (header: SpRuntimeHeader | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<SpRuntimeExtrinsicInclusionMode>>;
|
||||
/**
|
||||
* Returns the version of the runtime.
|
||||
**/
|
||||
version: AugmentedCall<ApiType, () => Observable<RuntimeVersion>>;
|
||||
version: AugmentedCall<ApiType, () => Observable<SpVersionRuntimeVersion>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xed99c5acb25eedf5/3 */
|
||||
/** 0x91b1c8b16328eb92/ */
|
||||
dryRunApi: {
|
||||
/**
|
||||
* Dry run call.
|
||||
**/
|
||||
dryRunCall: AugmentedCall<ApiType, (origin: StagingKusamaRuntimeOriginCaller | { system: any } | { Void: any } | { Origins: any } | { ParachainsOrigin: any } | { XcmPallet: any } | string | Uint8Array, call: RuntimeCall | IMethod | string | Uint8Array) => Observable<Result<XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError>>>;
|
||||
/**
|
||||
* Dry run XCM program
|
||||
**/
|
||||
dryRunXcm: AugmentedCall<ApiType, (origin_location: XcmVersionedLocation | { V2: any } | { V3: any } | { V4: any } | string | Uint8Array, xcm: XcmVersionedXcm | { V2: any } | { V3: any } | { V4: any } | string | Uint8Array) => Observable<Result<XcmRuntimeApisDryRunXcmDryRunEffects, XcmRuntimeApisDryRunError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xfbc577b9d747efd6/ */
|
||||
genesisBuilder: {
|
||||
/**
|
||||
* Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the, storage.,, In the case of a FRAME-based runtime, this function deserializes the full `RuntimeGenesisConfig` from the given JSON blob and, puts it into the storage. If the provided JSON blob is incorrect or incomplete or the, deserialization fails, an error is returned.,, Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no, defaults will be used.
|
||||
**/
|
||||
buildState: AugmentedCall<ApiType, (json: Bytes | string | Uint8Array) => Observable<Result<Null, Text>>>;
|
||||
/**
|
||||
* Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by, `id`.,, If `id` is `None` the function returns JSON blob representation of the default, `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default, `RuntimeGenesisConfig`.,, Otherwise function returns a JSON representation of the built-in, named, `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not, exists. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of, (potentially nested) key-value pairs that are intended for customizing the default, runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation, of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can, be used in `build_state` method.
|
||||
**/
|
||||
getPreset: AugmentedCall<ApiType, (id: Option<Text> | null | Uint8Array | Text | string) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Returns a list of identifiers for available builtin `RuntimeGenesisConfig` presets.,, The presets from the list can be queried with [`GenesisBuilder::get_preset`] method. If, no named presets are provided by the runtime the list is empty.
|
||||
**/
|
||||
presetNames: AugmentedCall<ApiType, () => Observable<Vec<Text>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xed99c5acb25eedf5/ */
|
||||
grandpaApi: {
|
||||
/**
|
||||
* Get current GRANDPA authority set id.
|
||||
**/
|
||||
currentSetId: AugmentedCall<ApiType, () => Observable<SetId>>;
|
||||
currentSetId: AugmentedCall<ApiType, () => Observable<u64>>;
|
||||
/**
|
||||
* Generates a proof of key ownership for the given authority in the given set.
|
||||
* Generates a proof of key ownership for the given authority in the, given set. An example usage of this module is coupled with the, session historical module to prove that a given authority key is, tied to a given staking identity during a specific session. Proofs, of key ownership are necessary for submitting equivocation reports., NOTE: even though the API takes a `set_id` as parameter the current, implementations ignore this parameter and instead rely on this, method being called at the correct block height, i.e. any point at, which the given set id is live on-chain. Future implementations will, instead use indexed data through an offchain worker, not requiring, older states to be available.
|
||||
**/
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (setId: SetId | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (set_id: u64 | AnyNumber | Uint8Array, authority_id: SpConsensusGrandpaAppPublic | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed.
|
||||
* Get the current GRANDPA authorities and weights. This should not change except, for when changes are scheduled and the corresponding delay has passed.,, When called at block B, it will return the set of authorities that should be, used to finalize descendants of this block (B+1, B+2, ...). The block B itself, is finalized by the authorities from block B-1.
|
||||
**/
|
||||
grandpaAuthorities: AugmentedCall<ApiType, () => Observable<AuthorityList>>;
|
||||
grandpaAuthorities: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[SpConsensusGrandpaAppPublic, u64]>>>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report an equivocation.
|
||||
* Submits an unsigned extrinsic to report an equivocation. The caller, must provide the equivocation proof and a key ownership proof, (should be obtained using `generate_key_ownership_proof`). The, extrinsic will be unsigned and should only be accepted for local, authorship (not to be broadcast to the network). This method returns, `None` when creation of the extrinsic fails, e.g. if equivocation, reporting is disabled for the given runtime (i.e. this method is, hardcoded to return `None`). Only useful in an offchain context.
|
||||
**/
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: GrandpaEquivocationProof | { setId?: any; equivocation?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocation_proof: SpConsensusGrandpaEquivocationProof | { setId?: any; equivocation?: any } | string | Uint8Array, key_owner_proof: Bytes | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37e397fc7c91f5e4/1 */
|
||||
/** 0xc51ff1fa3f5d0cca/ */
|
||||
inflation: {
|
||||
/**
|
||||
* Return the current estimates of the inflation amount.,, This is marked as experimental in light of RFC#89. Nonetheless, its usage is highly, recommended over trying to read-storage, or re-create the onchain logic.
|
||||
**/
|
||||
experimentalInflationPredictionInfo: AugmentedCall<ApiType, () => Observable<RelayCommonApisInflationInfo>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x9ffb505aa738d69c/ */
|
||||
locationToAccountApi: {
|
||||
/**
|
||||
* Converts `Location` to `AccountId`.
|
||||
**/
|
||||
convertLocation: AugmentedCall<ApiType, (location: XcmVersionedLocation | { V2: any } | { V3: any } | { V4: any } | string | Uint8Array) => Observable<Result<AccountId32, XcmRuntimeApisConversionsError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37e397fc7c91f5e4/ */
|
||||
metadata: {
|
||||
/**
|
||||
* Returns the metadata of a runtime
|
||||
* Returns the metadata of a runtime.
|
||||
**/
|
||||
metadata: AugmentedCall<ApiType, () => Observable<OpaqueMetadata>>;
|
||||
/**
|
||||
* Returns the metadata at a given version.,, If the given `version` isn't supported, this will return `None`., Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime.
|
||||
**/
|
||||
metadataAtVersion: AugmentedCall<ApiType, (version: u32 | AnyNumber | Uint8Array) => Observable<Option<OpaqueMetadata>>>;
|
||||
/**
|
||||
* Returns the supported metadata versions.,, This can be used to call `metadata_at_version`.
|
||||
**/
|
||||
metadataVersions: AugmentedCall<ApiType, () => Observable<Vec<u32>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x91d5df18b0d2cf58/1 */
|
||||
/** 0x91d5df18b0d2cf58/ */
|
||||
mmrApi: {
|
||||
/**
|
||||
* Generate MMR proof for a series of leaves under given indices.
|
||||
* Generate MMR proof for a series of block numbers. If `best_known_block_number = Some(n)`,, use historical MMR state at given block height `n`. Else, use current MMR state.
|
||||
**/
|
||||
generateBatchProof: AugmentedCall<ApiType, (leafIndices: Vec<MmrLeafIndex> | (MmrLeafIndex | AnyNumber | Uint8Array)[]) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
|
||||
generateProof: AugmentedCall<ApiType, (block_numbers: Vec<u32> | (u32 | AnyNumber | Uint8Array)[], best_known_block_number: Option<u32> | null | Uint8Array | u32 | AnyNumber) => Observable<Result<ITuple<[Vec<Bytes>, SpMmrPrimitivesLeafProof]>, SpMmrPrimitivesError>>>;
|
||||
/**
|
||||
* Generate MMR proof for a leaf under given index.
|
||||
* Return the number of MMR blocks in the chain.
|
||||
**/
|
||||
generateProof: AugmentedCall<ApiType, (leafIndex: MmrLeafIndex | AnyNumber | Uint8Array) => Observable<Result<ITuple<[MmrEncodableOpaqueLeaf, MmrProof]>, MmrError>>>;
|
||||
mmrLeafCount: AugmentedCall<ApiType, () => Observable<Result<u64, SpMmrPrimitivesError>>>;
|
||||
/**
|
||||
* Return the on-chain MMR root hash.
|
||||
**/
|
||||
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
|
||||
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<H256, SpMmrPrimitivesError>>>;
|
||||
/**
|
||||
* Verify MMR proof against on-chain MMR for a batch of leaves.
|
||||
* Verify MMR proof against on-chain MMR for a batch of leaves.,, Note this function will use on-chain MMR root hash and check if the proof matches the hash., Note, the leaves should be sorted such that corresponding leaves and leaf indices have the, same position in both the `leaves` vector and the `leaf_indices` vector contained in the [LeafProof]
|
||||
**/
|
||||
verifyBatchProof: AugmentedCall<ApiType, (leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
verifyProof: AugmentedCall<ApiType, (leaves: Vec<Bytes> | (Bytes | string | Uint8Array)[], proof: SpMmrPrimitivesLeafProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<Null, SpMmrPrimitivesError>>>;
|
||||
/**
|
||||
* Verify MMR proof against given root hash or a batch of leaves.
|
||||
* Verify MMR proof against given root hash for a batch of leaves.,, Note this function does not require any on-chain storage - the, proof is verified against given MMR root hash.,, Note, the leaves should be sorted such that corresponding leaves and leaf indices have the, same position in both the `leaves` vector and the `leaf_indices` vector contained in the [LeafProof]
|
||||
**/
|
||||
verifyBatchProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
/**
|
||||
* Verify MMR proof against on-chain MMR.
|
||||
**/
|
||||
verifyProof: AugmentedCall<ApiType, (leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
/**
|
||||
* Verify MMR proof against given root hash.
|
||||
**/
|
||||
verifyProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
verifyProofStateless: AugmentedCall<ApiType, (root: H256 | string | Uint8Array, leaves: Vec<Bytes> | (Bytes | string | Uint8Array)[], proof: SpMmrPrimitivesLeafProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<Null, SpMmrPrimitivesError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x17a6bc0d0062aeb3/1 */
|
||||
/** 0x17a6bc0d0062aeb3/ */
|
||||
nominationPoolsApi: {
|
||||
/**
|
||||
* Returns the pending rewards for the given member.
|
||||
* Returns the equivalent points of `new_funds` for a given pool.
|
||||
**/
|
||||
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
|
||||
balanceToPoints: AugmentedCall<ApiType, (pool_id: u32 | AnyNumber | Uint8Array, new_funds: u128 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Returns true if the delegated funds of the pool `member` needs migration.,, Once a pool has successfully migrated to the strategy, [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake), the funds of the, member can be migrated from pool account to the member's account. Use, [`migrate_delegation`](pallet_nomination_pools::Call::migrate_delegation), to migrate the funds of the pool member.
|
||||
**/
|
||||
memberNeedsDelegateMigration: AugmentedCall<ApiType, (member: AccountId32 | string | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Returns the pending slash for a given pool member.
|
||||
**/
|
||||
memberPendingSlash: AugmentedCall<ApiType, (member: AccountId32 | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Returns the pending rewards for the member that the AccountId was given for.
|
||||
**/
|
||||
pendingRewards: AugmentedCall<ApiType, (who: AccountId32 | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Returns the equivalent balance of `points` for a given pool.
|
||||
**/
|
||||
pointsToBalance: AugmentedCall<ApiType, (pool_id: u32 | AnyNumber | Uint8Array, points: u128 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Returns true if the pool with `pool_id` needs migration.,, This can happen when the `pallet-nomination-pools` has switched to using strategy, [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake) but the pool, still has funds that were staked using the older strategy, [TransferStake](pallet_nomination_pools::adapter::TransferStake). Use, [`migrate_pool_to_delegate_stake`](pallet_nomination_pools::Call::migrate_pool_to_delegate_stake), to migrate the pool.
|
||||
**/
|
||||
poolNeedsDelegateMigration: AugmentedCall<ApiType, (pool_id: u32 | AnyNumber | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Returns the pending slash for a given pool.
|
||||
**/
|
||||
poolPendingSlash: AugmentedCall<ApiType, (pool_id: u32 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xf78b278be53f454c/2 */
|
||||
/** 0xf78b278be53f454c/ */
|
||||
offchainWorkerApi: {
|
||||
/**
|
||||
* Starts the off-chain task for given block header.
|
||||
**/
|
||||
offchainWorker: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
offchainWorker: AugmentedCall<ApiType, (header: SpRuntimeHeader | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xaf2c0297a23e6d3d/2 */
|
||||
/** 0xaf2c0297a23e6d3d/ */
|
||||
parachainHost: {
|
||||
/**
|
||||
* Returns the persisted validation data for the given `ParaId` along with the corresponding validation code hash.
|
||||
* Approval voting configuration parameters
|
||||
**/
|
||||
assumedValidationData: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, hash: Hash | string | Uint8Array) => Observable<Option<ITuple<[PersistedValidationData, ValidationCodeHash]>>>>;
|
||||
approvalVotingParams: AugmentedCall<ApiType, () => Observable<PolkadotPrimitivesV7ApprovalVotingParams>>;
|
||||
/**
|
||||
* Yields information on all availability cores as relevant to the child block.
|
||||
* Returns the persisted validation data for the given `ParaId` along with the corresponding, validation code hash. Instead of accepting assumption about the para, matches the validation, data hash against an expected one and yields `None` if they're not equal.
|
||||
**/
|
||||
availabilityCores: AugmentedCall<ApiType, () => Observable<Vec<CoreState>>>;
|
||||
assumedValidationData: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, expected_persisted_validation_data_hash: H256 | string | Uint8Array) => Observable<Option<ITuple<[PolkadotPrimitivesV7PersistedValidationData, H256]>>>>;
|
||||
/**
|
||||
* Returns candidate's acceptance limitations for asynchronous backing for a relay parent.
|
||||
**/
|
||||
asyncBackingParams: AugmentedCall<ApiType, () => Observable<PolkadotPrimitivesV7AsyncBackingAsyncBackingParams>>;
|
||||
/**
|
||||
* Yields information on all availability cores as relevant to the child block., Cores are either free or occupied. Free cores can have paras assigned to them.
|
||||
**/
|
||||
availabilityCores: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV7CoreState>>>;
|
||||
/**
|
||||
* Get a vector of events concerning candidates that occurred within a block.
|
||||
**/
|
||||
candidateEvents: AugmentedCall<ApiType, () => Observable<Vec<CandidateEvent>>>;
|
||||
candidateEvents: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV7CandidateEvent>>>;
|
||||
/**
|
||||
* Get the receipt of a candidate pending availability.
|
||||
* Get the receipt of a candidate pending availability. This returns `Some` for any paras, assigned to occupied cores in `availability_cores` and `None` otherwise.
|
||||
**/
|
||||
candidatePendingAvailability: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Option<CommittedCandidateReceipt>>>;
|
||||
candidatePendingAvailability: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7CommittedCandidateReceipt>>>;
|
||||
/**
|
||||
* Elastic scaling support
|
||||
**/
|
||||
candidatesPendingAvailability: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array) => Observable<Vec<PolkadotPrimitivesV7CommittedCandidateReceipt>>>;
|
||||
/**
|
||||
* Checks if the given validation outputs pass the acceptance criteria.
|
||||
**/
|
||||
checkValidationOutputs: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, outputs: CandidateCommitments | { upwardMessages?: any; horizontalMessages?: any; newValidationCode?: any; headData?: any; processedDownwardMessages?: any; hrmpWatermark?: any } | string | Uint8Array) => Observable<bool>>;
|
||||
checkValidationOutputs: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, outputs: PolkadotPrimitivesV7CandidateCommitments | { upwardMessages?: any; horizontalMessages?: any; newValidationCode?: any; headData?: any; processedDownwardMessages?: any; hrmpWatermark?: any } | string | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Claim queue
|
||||
**/
|
||||
claimQueue: AugmentedCall<ApiType, () => Observable<BTreeMap<u32, Vec<u32>>>>;
|
||||
/**
|
||||
* Returns a list of all disabled validators at the given block.
|
||||
**/
|
||||
disabledValidators: AugmentedCall<ApiType, () => Observable<Vec<u32>>>;
|
||||
/**
|
||||
* Returns all onchain disputes.
|
||||
**/
|
||||
disputes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[u32, H256, PolkadotPrimitivesV7DisputeState]>>>>;
|
||||
/**
|
||||
* Get all the pending inbound messages in the downward message queue for a para.
|
||||
**/
|
||||
dmqContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundDownwardMessage>>>;
|
||||
dmqContents: AugmentedCall<ApiType, (recipient: ParaId | AnyNumber | Uint8Array) => Observable<Vec<PolkadotCorePrimitivesInboundDownwardMessage>>>;
|
||||
/**
|
||||
* Get the contents of all channels addressed to the given recipient.
|
||||
* Get the contents of all channels addressed to the given recipient. Channels that have no, messages in them are also included.
|
||||
**/
|
||||
inboundHrmpChannelsContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundHrmpMessage>>>;
|
||||
inboundHrmpChannelsContents: AugmentedCall<ApiType, (recipient: ParaId | AnyNumber | Uint8Array) => Observable<BTreeMap<u32, Vec<PolkadotCorePrimitivesInboundHrmpMessage>>>>;
|
||||
/**
|
||||
* Returns a merkle proof of a validator session key., NOTE: This function is only available since parachain host version 5.
|
||||
**/
|
||||
keyOwnershipProof: AugmentedCall<ApiType, (validator_id: PolkadotPrimitivesV7ValidatorAppPublic | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Get the minimum number of backing votes for a parachain candidate., This is a staging method! Do not use on production runtimes!
|
||||
**/
|
||||
minimumBackingVotes: AugmentedCall<ApiType, () => Observable<u32>>;
|
||||
/**
|
||||
* Get node features., This is a staging method! Do not use on production runtimes!
|
||||
**/
|
||||
nodeFeatures: AugmentedCall<ApiType, () => Observable<BitVec>>;
|
||||
/**
|
||||
* Scrape dispute relevant from on-chain, backing votes and resolved disputes.
|
||||
**/
|
||||
onChainVotes: AugmentedCall<ApiType, () => Observable<Option<ScrapedOnChainVotes>>>;
|
||||
onChainVotes: AugmentedCall<ApiType, () => Observable<Option<PolkadotPrimitivesV7ScrapedOnChainVotes>>>;
|
||||
/**
|
||||
* Yields the persisted validation data for the given `ParaId` along with an assumption that should be used if the para currently occupies a core.
|
||||
* Returns the state of parachain backing for a given para.
|
||||
**/
|
||||
persistedValidationData: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<PersistedValidationData>>>;
|
||||
paraBackingState: AugmentedCall<ApiType, (_: ParaId | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7AsyncBackingBackingState>>>;
|
||||
/**
|
||||
* Returns code hashes of PVFs that require pre-checking by validators in the active set.
|
||||
* Yields the persisted validation data for the given `ParaId` along with an assumption that, should be used if the para currently occupies a core.,, Returns `None` if either the para is not registered or the assumption is `Freed`, and the para already occupies a core.
|
||||
**/
|
||||
pvfsRequirePrecheck: AugmentedCall<ApiType, () => Observable<Vec<ValidationCodeHash>>>;
|
||||
persistedValidationData: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, assumption: PolkadotPrimitivesV7OccupiedCoreAssumption | 'Included' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<PolkadotPrimitivesV7PersistedValidationData>>>;
|
||||
/**
|
||||
* Returns the session index expected at a child of the block.
|
||||
* Returns code hashes of PVFs that require pre-checking by validators in the active set.,, NOTE: This function is only available since parachain host version 2.
|
||||
**/
|
||||
sessionIndexForChild: AugmentedCall<ApiType, () => Observable<SessionIndex>>;
|
||||
pvfsRequirePrecheck: AugmentedCall<ApiType, () => Observable<Vec<H256>>>;
|
||||
/**
|
||||
* Get the session info for the given session, if stored.
|
||||
* Returns execution parameters for the session.
|
||||
**/
|
||||
sessionInfo: AugmentedCall<ApiType, (index: SessionIndex | AnyNumber | Uint8Array) => Observable<Option<SessionInfo>>>;
|
||||
sessionExecutorParams: AugmentedCall<ApiType, (session_index: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7ExecutorParams>>>;
|
||||
/**
|
||||
* Submits a PVF pre-checking statement into the transaction pool.
|
||||
* Returns the session index expected at a child of the block.,, This can be used to instantiate a `SigningContext`.
|
||||
**/
|
||||
submitPvfCheckStatement: AugmentedCall<ApiType, (stmt: PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: ValidatorSignature | string | Uint8Array) => Observable<Null>>;
|
||||
sessionIndexForChild: AugmentedCall<ApiType, () => Observable<u32>>;
|
||||
/**
|
||||
* Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.
|
||||
* Get the session info for the given session, if stored.,, NOTE: This function is only available since parachain host version 2.
|
||||
**/
|
||||
validationCode: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<ValidationCode>>;
|
||||
sessionInfo: AugmentedCall<ApiType, (index: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7SessionInfo>>>;
|
||||
/**
|
||||
* Submits a PVF pre-checking statement into the transaction pool.,, NOTE: This function is only available since parachain host version 2.
|
||||
**/
|
||||
submitPvfCheckStatement: AugmentedCall<ApiType, (stmt: PolkadotPrimitivesV7PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV7ValidatorAppSignature | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Submit an unsigned extrinsic to slash validators who lost a dispute about, a candidate of a past session., NOTE: This function is only available since parachain host version 5.
|
||||
**/
|
||||
submitReportDisputeLost: AugmentedCall<ApiType, (dispute_proof: PolkadotPrimitivesV7SlashingDisputeProof | { timeSlot?: any; kind?: any; validatorIndex?: any; validatorId?: any } | string | Uint8Array, key_ownership_proof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Returns a list of validators that lost a past session dispute and need to be slashed., NOTE: This function is only available since parachain host version 5.
|
||||
**/
|
||||
unappliedSlashes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[u32, H256, PolkadotPrimitivesV7SlashingPendingSlashes]>>>>;
|
||||
/**
|
||||
* Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.,, Returns `None` if either the para is not registered or the assumption is `Freed`, and the para already occupies a core.
|
||||
**/
|
||||
validationCode: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, assumption: PolkadotPrimitivesV7OccupiedCoreAssumption | 'Included' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Get the validation code from its hash.
|
||||
**/
|
||||
validationCodeByHash: AugmentedCall<ApiType, (hash: ValidationCodeHash | string | Uint8Array) => Observable<Option<ValidationCode>>>;
|
||||
validationCodeByHash: AugmentedCall<ApiType, (hash: ValidationCodeHash | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.
|
||||
* Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.,, NOTE: This function is only available since parachain host version 2.
|
||||
**/
|
||||
validationCodeHash: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<ValidationCodeHash>>>;
|
||||
validationCodeHash: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, assumption: PolkadotPrimitivesV7OccupiedCoreAssumption | 'Included' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<H256>>>;
|
||||
/**
|
||||
* Returns the validator groups and rotation info localized based on the hypothetical child of a block whose state this is invoked on
|
||||
* Returns the validator groups and rotation info localized based on the hypothetical child, of a block whose state this is invoked on. Note that `now` in the `GroupRotationInfo`, should be the successor of the number of the block.
|
||||
**/
|
||||
validatorGroups: AugmentedCall<ApiType, () => Observable<ITuple<[Vec<Vec<ParaValidatorIndex>>, GroupRotationInfo]>>>;
|
||||
validatorGroups: AugmentedCall<ApiType, () => Observable<ITuple<[Vec<Vec<u32>>, PolkadotPrimitivesV7GroupRotationInfo]>>>;
|
||||
/**
|
||||
* Get the current validators.
|
||||
**/
|
||||
validators: AugmentedCall<ApiType, () => Observable<Vec<ValidatorId>>>;
|
||||
validators: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV7ValidatorAppPublic>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xab3c0572291feb8b/1 */
|
||||
/** 0xab3c0572291feb8b/ */
|
||||
sessionKeys: {
|
||||
/**
|
||||
* Decode the given public session keys.
|
||||
* Decode the given public session keys.,, Returns the list of public raw public keys + key type.
|
||||
**/
|
||||
decodeSessionKeys: AugmentedCall<ApiType, (encoded: Bytes | string | Uint8Array) => Observable<Option<Vec<ITuple<[Bytes, KeyTypeId]>>>>>;
|
||||
decodeSessionKeys: AugmentedCall<ApiType, (encoded: Bytes | string | Uint8Array) => Observable<Option<Vec<ITuple<[Bytes, SpCoreCryptoKeyTypeId]>>>>>;
|
||||
/**
|
||||
* Generate a set of session keys with optionally using the given seed.
|
||||
* Generate a set of session keys with optionally using the given seed., The keys should be stored within the keystore exposed via runtime, externalities.,, The seed needs to be a valid `utf8` string.,, Returns the concatenated SCALE encoded public keys.
|
||||
**/
|
||||
generateSessionKeys: AugmentedCall<ApiType, (seed: Option<Bytes> | null | Uint8Array | Bytes | string) => Observable<Bytes>>;
|
||||
/**
|
||||
@@ -322,58 +471,100 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xd2bc9897eed08f15/3 */
|
||||
/** 0x18ef58a3b67ba770/ */
|
||||
stakingApi: {
|
||||
/**
|
||||
* Returns the page count of exposures for a validator `account` in a given era.
|
||||
**/
|
||||
erasStakersPageCount: AugmentedCall<ApiType, (era: u32 | AnyNumber | Uint8Array, account: AccountId32 | string | Uint8Array) => Observable<u32>>;
|
||||
/**
|
||||
* Returns the nominations quota for a nominator with a given balance.
|
||||
**/
|
||||
nominationsQuota: AugmentedCall<ApiType, (balance: u128 | AnyNumber | Uint8Array) => Observable<u32>>;
|
||||
/**
|
||||
* Returns true if validator `account` has pages to be claimed for the given era.
|
||||
**/
|
||||
pendingRewards: AugmentedCall<ApiType, (era: u32 | AnyNumber | Uint8Array, account: AccountId32 | string | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xd2bc9897eed08f15/ */
|
||||
taggedTransactionQueue: {
|
||||
/**
|
||||
* Validate the transaction.
|
||||
* Validate the transaction.,, This method is invoked by the transaction pool to learn details about given transaction., The implementation should make sure to verify the correctness of the transaction, against current state. The given `block_hash` corresponds to the hash of the block, that is used as current state.,, Note that this call may be performed by the pool multiple times and transactions, might be verified in any possible order.
|
||||
**/
|
||||
validateTransaction: AugmentedCall<ApiType, (source: TransactionSource | 'InBlock' | 'Local' | 'External' | number | Uint8Array, tx: Extrinsic | IExtrinsic | string | Uint8Array, blockHash: BlockHash | string | Uint8Array) => Observable<TransactionValidity>>;
|
||||
validateTransaction: AugmentedCall<ApiType, (source: SpRuntimeTransactionValidityTransactionSource | 'InBlock' | 'Local' | 'External' | number | Uint8Array, tx: Extrinsic | IExtrinsic | string | Uint8Array, block_hash: H256 | string | Uint8Array) => Observable<Result<SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionValidityError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37c8bb1350a9a2a8/3 */
|
||||
/** 0x37c8bb1350a9a2a8/ */
|
||||
transactionPaymentApi: {
|
||||
/**
|
||||
* The transaction fee details
|
||||
*
|
||||
**/
|
||||
queryFeeDetails: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
|
||||
queryFeeDetails: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentFeeDetails>>;
|
||||
/**
|
||||
* The transaction info
|
||||
*
|
||||
**/
|
||||
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentRuntimeDispatchInfo>>;
|
||||
/**
|
||||
* Query the output of the current LengthToFee given some input
|
||||
*
|
||||
**/
|
||||
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>>;
|
||||
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Query the output of the current WeightToFee given some input
|
||||
*
|
||||
**/
|
||||
queryWeightToFee: AugmentedCall<ApiType, (weight: Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<Balance>>;
|
||||
queryWeightToFee: AugmentedCall<ApiType, (weight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xf3ff14d5ab527059/3 */
|
||||
/** 0xf3ff14d5ab527059/ */
|
||||
transactionPaymentCallApi: {
|
||||
/**
|
||||
* The call fee details
|
||||
* Query fee details of a given encoded `Call`.
|
||||
**/
|
||||
queryCallFeeDetails: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
|
||||
queryCallFeeDetails: AugmentedCall<ApiType, (call: RuntimeCall | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentFeeDetails>>;
|
||||
/**
|
||||
* The call info
|
||||
* Query information of a dispatch class, weight, and fee of a given encoded `Call`.
|
||||
**/
|
||||
queryCallInfo: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||
queryCallInfo: AugmentedCall<ApiType, (call: RuntimeCall | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentRuntimeDispatchInfo>>;
|
||||
/**
|
||||
* Query the output of the current LengthToFee given some input
|
||||
* Query the output of the current `LengthToFee` given some input.
|
||||
**/
|
||||
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>>;
|
||||
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Query the output of the current WeightToFee given some input
|
||||
* Query the output of the current `WeightToFee` given some input.
|
||||
**/
|
||||
queryWeightToFee: AugmentedCall<ApiType, (weight: Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<Balance>>;
|
||||
queryWeightToFee: AugmentedCall<ApiType, (weight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x6ff52ee858e6c5bd/ */
|
||||
xcmPaymentApi: {
|
||||
/**
|
||||
* Returns a list of acceptable payment assets.,, # Arguments,, * `xcm_version`: Version.
|
||||
**/
|
||||
queryAcceptablePaymentAssets: AugmentedCall<ApiType, (xcm_version: u32 | AnyNumber | Uint8Array) => Observable<Result<Vec<XcmVersionedAssetId>, XcmRuntimeApisFeesError>>>;
|
||||
/**
|
||||
* Get delivery fees for sending a specific `message` to a `destination`., These always come in a specific asset, defined by the chain.,, # Arguments, * `message`: The message that'll be sent, necessary because most delivery fees are based on the, size of the message., * `destination`: The destination to send the message to. Different destinations may use, different senders that charge different fees.
|
||||
**/
|
||||
queryDeliveryFees: AugmentedCall<ApiType, (destination: XcmVersionedLocation | { V2: any } | { V3: any } | { V4: any } | string | Uint8Array, message: XcmVersionedXcm | { V2: any } | { V3: any } | { V4: any } | string | Uint8Array) => Observable<Result<XcmVersionedAssets, XcmRuntimeApisFeesError>>>;
|
||||
/**
|
||||
* Converts a weight into a fee for the specified `AssetId`.,, # Arguments,, * `weight`: convertible `Weight`., * `asset`: `VersionedAssetId`.
|
||||
**/
|
||||
queryWeightToAssetFee: AugmentedCall<ApiType, (weight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array, asset: XcmVersionedAssetId | { V3: any } | { V4: any } | string | Uint8Array) => Observable<Result<u128, XcmRuntimeApisFeesError>>>;
|
||||
/**
|
||||
* Returns a weight needed to execute a XCM.,, # Arguments,, * `message`: `VersionedXcm`.
|
||||
**/
|
||||
queryXcmWeight: AugmentedCall<ApiType, (message: XcmVersionedXcm | { V2: any } | { V3: any } | { V4: any } | string | Uint8Array) => Observable<Result<SpWeightsWeightV2Weight, XcmRuntimeApisFeesError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
|
||||
+1295
-2000
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api-augment authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export * from './index';
|
||||
export * from './index.js';
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
// (packageInfo imports will be kept as-is, user-editable)
|
||||
|
||||
import { packageInfo as baseInfo } from '@polkadot/api-base/packageInfo';
|
||||
import { packageInfo as typesInfo } from '@polkadot/types/packageInfo';
|
||||
import { packageInfo as codecInfo } from '@polkadot/types-codec/packageInfo';
|
||||
import { detectPackage } from '@polkadot/util';
|
||||
|
||||
import { packageInfo } from './packageInfo.js';
|
||||
|
||||
detectPackage(packageInfo, null, [baseInfo, codecInfo, typesInfo]);
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright 2017-2023 @polkadot/api-augment authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '9.13.2' };
|
||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '15.0.2' };
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
import '@polkadot/api-base/types/consts';
|
||||
|
||||
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
|
||||
import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { Codec } from '@polkadot/types-codec/types';
|
||||
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
|
||||
import type { Bytes, Option, Vec, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { Codec, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { Perbill, Permill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight, StagingXcmV4Junctions } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
|
||||
|
||||
@@ -33,18 +33,6 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
authorship: {
|
||||
/**
|
||||
* The number of blocks back we should accept uncles.
|
||||
* This means that we will deal with uncle-parents that are
|
||||
* `UncleGenerations + 1` before `now`.
|
||||
**/
|
||||
uncleGenerations: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
babe: {
|
||||
/**
|
||||
* The amount of time, in slots, that each epoch should last.
|
||||
@@ -64,6 +52,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Max number of authorities allowed
|
||||
**/
|
||||
maxAuthorities: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of nominators for each validator.
|
||||
**/
|
||||
maxNominators: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -71,16 +63,31 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
};
|
||||
balances: {
|
||||
/**
|
||||
* The minimum amount required to keep an account open.
|
||||
* The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!
|
||||
*
|
||||
* If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for
|
||||
* this pallet. However, you do so at your own risk: this will open up a major DoS vector.
|
||||
* In case you have multiple sources of provider references, you may also get unexpected
|
||||
* behaviour if you set this to zero.
|
||||
*
|
||||
* Bottom line: Do yourself a favour and make it at least one!
|
||||
**/
|
||||
existentialDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of individual freeze locks that can exist on an account at any time.
|
||||
**/
|
||||
maxFreezes: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of locks that should exist on an account.
|
||||
* Not strictly enforced, but used for weight estimation.
|
||||
*
|
||||
* Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
|
||||
**/
|
||||
maxLocks: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of named reserves that can exist on an account.
|
||||
*
|
||||
* Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
|
||||
**/
|
||||
maxReserves: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -88,6 +95,29 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
beefy: {
|
||||
/**
|
||||
* The maximum number of authorities that can be added.
|
||||
**/
|
||||
maxAuthorities: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of nominators for each validator.
|
||||
**/
|
||||
maxNominators: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of entries to keep in the set id to session index mapping.
|
||||
*
|
||||
* Since the `SetIdSession` map is only used for validating equivocations this
|
||||
* value should relate to the bonding duration of whatever staking system is
|
||||
* being used (if any). If equivocation handling is not enabled then this value
|
||||
* can be zero.
|
||||
**/
|
||||
maxSetIdSessionEntries: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
bounties: {
|
||||
/**
|
||||
* The amount held on deposit for placing a bounty proposal.
|
||||
@@ -156,75 +186,14 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
crowdloan: {
|
||||
convictionVoting: {
|
||||
/**
|
||||
* The minimum amount that may be contributed into a crowdloan. Should almost certainly be at
|
||||
* least `ExistentialDeposit`.
|
||||
**/
|
||||
minContribution: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* `PalletId` for the crowdloan pallet. An appropriate value could be `PalletId(*b"py/cfund")`
|
||||
**/
|
||||
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Max number of storage keys to remove per extrinsic call.
|
||||
**/
|
||||
removeKeysLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
democracy: {
|
||||
/**
|
||||
* Period in blocks where an external proposal may not be re-submitted after being vetoed.
|
||||
**/
|
||||
cooloffPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The period between a proposal being approved and enacted.
|
||||
* The maximum number of concurrent votes an account may have.
|
||||
*
|
||||
* It should generally be a little more than the unstake period to ensure that
|
||||
* voting stakers have an opportunity to remove themselves from the system in the case
|
||||
* where they are on the losing side of a vote.
|
||||
**/
|
||||
enactmentPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Minimum voting period allowed for a fast-track referendum.
|
||||
**/
|
||||
fastTrackVotingPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Indicator for whether an emergency origin is even allowed to happen. Some chains may
|
||||
* want to set this permanently to `false`, others may want to condition it on things such
|
||||
* as an upgrade having happened recently.
|
||||
**/
|
||||
instantAllowed: bool & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* How often (in blocks) new public referenda are launched.
|
||||
**/
|
||||
launchPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of items which can be blacklisted.
|
||||
**/
|
||||
maxBlacklisted: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of deposits a public proposal may have at any time.
|
||||
**/
|
||||
maxDeposits: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of public proposals that can exist at any time.
|
||||
**/
|
||||
maxProposals: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of votes for an account.
|
||||
*
|
||||
* Also used to compute weight, an overly big value can
|
||||
* lead to extrinsic with very big weight: see `delegate` for instance.
|
||||
* Also used to compute weight, an overly large value can lead to extrinsics with large
|
||||
* weight estimation: see `delegate` for instance.
|
||||
**/
|
||||
maxVotes: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum amount to be used as a deposit for a public referendum proposal.
|
||||
**/
|
||||
minimumDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum period of vote locking.
|
||||
*
|
||||
@@ -233,9 +202,39 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
voteLockingPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* How often (in blocks) to check for new votes.
|
||||
* Generic const
|
||||
**/
|
||||
votingPeriod: u32 & AugmentedConst<ApiType>;
|
||||
[key: string]: Codec;
|
||||
};
|
||||
coretime: {
|
||||
/**
|
||||
* The ParaId of the coretime chain.
|
||||
**/
|
||||
brokerId: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The coretime chain pot location.
|
||||
**/
|
||||
brokerPotLocation: StagingXcmV4Junctions & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
crowdloan: {
|
||||
/**
|
||||
* The minimum amount that may be contributed into a crowdloan. Should almost certainly be
|
||||
* at least `ExistentialDeposit`.
|
||||
**/
|
||||
minContribution: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* `PalletId` for the crowdloan pallet. An appropriate value could be
|
||||
* `PalletId(*b"py/cfund")`
|
||||
**/
|
||||
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Max number of storage keys to remove per extrinsic call.
|
||||
**/
|
||||
removeKeysLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -247,21 +246,6 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* "better" in the Signed phase.
|
||||
**/
|
||||
betterSignedThreshold: Perbill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum amount of improvement to the solution score that defines a solution as
|
||||
* "better" in the Unsigned phase.
|
||||
**/
|
||||
betterUnsignedThreshold: Perbill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of electable targets to put in the snapshot.
|
||||
**/
|
||||
maxElectableTargets: u16 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of electing voters to put in the snapshot. At the moment, snapshots
|
||||
* are only over a single block, but once multi-block elections are introduced they will
|
||||
* take place over multiple blocks.
|
||||
**/
|
||||
maxElectingVoters: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of winners that can be elected by this `ElectionProvider`
|
||||
* implementation.
|
||||
@@ -272,6 +256,7 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
minerMaxLength: u32 & AugmentedConst<ApiType>;
|
||||
minerMaxVotesPerVoter: u32 & AugmentedConst<ApiType>;
|
||||
minerMaxWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||
minerMaxWinners: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The priority of the unsigned transaction submitted in the unsigned-phase
|
||||
**/
|
||||
@@ -283,10 +268,6 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* to submit the worker's solution.
|
||||
**/
|
||||
offchainRepeat: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Base deposit for a signed solution.
|
||||
**/
|
||||
signedDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Per-byte deposit for a signed solution.
|
||||
**/
|
||||
@@ -317,18 +298,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* this value.
|
||||
**/
|
||||
signedMaxWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Duration of the signed phase.
|
||||
**/
|
||||
signedPhase: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Base reward for a signed solution
|
||||
**/
|
||||
signedRewardBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Duration of the unsigned phase.
|
||||
**/
|
||||
unsignedPhase: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -351,52 +324,18 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
maxAuthorities: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
* The maximum number of nominators for each validator.
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
identity: {
|
||||
maxNominators: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount held on deposit for a registered identity
|
||||
**/
|
||||
basicDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount held on deposit per additional field for a registered identity.
|
||||
**/
|
||||
fieldDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O
|
||||
* required to access an identity, but can be pretty high.
|
||||
**/
|
||||
maxAdditionalFields: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maxmimum number of registrars allowed in the system. Needed to bound the complexity
|
||||
* of, e.g., updating judgements.
|
||||
**/
|
||||
maxRegistrars: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of sub-accounts allowed per identified account.
|
||||
**/
|
||||
maxSubAccounts: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount held on deposit for a registered subaccount. This should account for the fact
|
||||
* that one storage item's value will increase by the size of an account ID, and there will
|
||||
* be another trie item whose value is the size of an account ID plus 32 bytes.
|
||||
**/
|
||||
subAccountDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
imOnline: {
|
||||
/**
|
||||
* A configuration for base priority of unsigned transactions.
|
||||
* The maximum number of entries to keep in the set id to session index mapping.
|
||||
*
|
||||
* This is exposed so that it can be tuned for particular runtime, when
|
||||
* multiple pallets send unsigned transactions.
|
||||
* Since the `SetIdSession` map is only used for validating equivocations this
|
||||
* value should relate to the bonding duration of whatever staking system is
|
||||
* being used (if any). If equivocation handling is not enabled then this value
|
||||
* can be zero.
|
||||
**/
|
||||
unsignedPriority: u64 & AugmentedConst<ApiType>;
|
||||
maxSetIdSessionEntries: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -412,6 +351,43 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
messageQueue: {
|
||||
/**
|
||||
* The size of the page; this implies the maximum message size which can be sent.
|
||||
*
|
||||
* A good value depends on the expected message sizes, their weights, the weight that is
|
||||
* available for processing them and the maximal needed message size. The maximal message
|
||||
* size is slightly lower than this as defined by [`MaxMessageLenOf`].
|
||||
**/
|
||||
heapSize: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum amount of weight (if any) to be used from remaining weight `on_idle` which
|
||||
* should be provided to the message queue for servicing enqueued items `on_idle`.
|
||||
* Useful for parachains to process messages at the same block they are received.
|
||||
*
|
||||
* If `None`, it will not call `ServiceQueues::service_queues` in `on_idle`.
|
||||
**/
|
||||
idleMaxServiceWeight: Option<SpWeightsWeightV2Weight> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of stale pages (i.e. of overweight messages) allowed before culling
|
||||
* can happen. Once there are more stale pages than this, then historical pages may be
|
||||
* dropped, even if they contain unprocessed overweight messages.
|
||||
**/
|
||||
maxStale: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of weight (if any) which should be provided to the message queue for
|
||||
* servicing enqueued items `on_initialize`.
|
||||
*
|
||||
* This may be legitimately `None` in the case that you will call
|
||||
* `ServiceQueues::service_queues` manually or set [`Self::IdleMaxServiceWeight`] to have
|
||||
* it run in `on_idle`.
|
||||
**/
|
||||
serviceWeight: Option<SpWeightsWeightV2Weight> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
multisig: {
|
||||
/**
|
||||
* The base amount of currency needed to reserve for creating a multisig execution or to
|
||||
@@ -453,6 +429,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Such a scenario would also be the equivalent of the pool being 90% slashed.
|
||||
**/
|
||||
maxPointsToBalance: u8 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of simultaneous unbonding chunks that can exist per member.
|
||||
**/
|
||||
maxUnbonding: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The nomination pool's pallet id.
|
||||
**/
|
||||
@@ -462,62 +442,27 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
paras: {
|
||||
unsignedPriority: u64 & AugmentedConst<ApiType>;
|
||||
onDemand: {
|
||||
/**
|
||||
* The maximum number of blocks some historical revenue
|
||||
* information stored for.
|
||||
**/
|
||||
maxHistoricalRevenue: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Identifier for the internal revenue balance.
|
||||
**/
|
||||
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The default value for the spot traffic multiplier.
|
||||
**/
|
||||
trafficDefaultValue: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
phragmenElection: {
|
||||
/**
|
||||
* How much should be locked up in order to submit one's candidacy.
|
||||
**/
|
||||
candidacyBond: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Number of members to elect.
|
||||
**/
|
||||
desiredMembers: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Number of runners_up to keep.
|
||||
**/
|
||||
desiredRunnersUp: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of candidates in a phragmen election.
|
||||
*
|
||||
* Warning: The election happens onchain, and this value will determine
|
||||
* the size of the election. When this limit is reached no more
|
||||
* candidates are accepted in the election.
|
||||
**/
|
||||
maxCandidates: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of voters to allow in a phragmen election.
|
||||
*
|
||||
* Warning: This impacts the size of the election which is run onchain.
|
||||
* When the limit is reached the new voters are ignored.
|
||||
**/
|
||||
maxVoters: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Identifier for the elections-phragmen pallet's lock
|
||||
**/
|
||||
palletId: U8aFixed & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* How long each seat is kept. This defines the next block number at which an election
|
||||
* round will happen. If set to zero, no elections are ever triggered and the module will
|
||||
* be in passive mode.
|
||||
**/
|
||||
termDuration: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Base deposit associated with voting.
|
||||
*
|
||||
* This should be sensibly high to economically ensure the pallet cannot be attacked by
|
||||
* creating a gigantic number of votes.
|
||||
**/
|
||||
votingBondBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of bond that need to be locked for each vote (32 bytes).
|
||||
**/
|
||||
votingBondFactor: u128 & AugmentedConst<ApiType>;
|
||||
paras: {
|
||||
unsignedPriority: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -566,13 +511,42 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
referenda: {
|
||||
/**
|
||||
* Quantization level for the referendum wakeup scheduler. A higher number will result in
|
||||
* fewer storage reads/writes needed for smaller voters, but also result in delays to the
|
||||
* automatic referendum status changes. Explicit servicing instructions are unaffected.
|
||||
**/
|
||||
alarmInterval: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum size of the referendum queue for a single track.
|
||||
**/
|
||||
maxQueued: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum amount to be used as a deposit for a public referendum proposal.
|
||||
**/
|
||||
submissionDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Information concerning the different referendum tracks.
|
||||
**/
|
||||
tracks: Vec<ITuple<[u16, PalletReferendaTrackInfo]>> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The number of blocks after submission that a referendum must begin being decided by.
|
||||
* Once this passes, then anyone may cancel the referendum.
|
||||
**/
|
||||
undecidingTimeout: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
registrar: {
|
||||
/**
|
||||
* The deposit to be paid per byte stored on chain.
|
||||
**/
|
||||
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The deposit to be paid to run a parathread.
|
||||
* The deposit to be paid to run a on-demand parachain.
|
||||
* This should include the cost for storing the genesis head and validation code.
|
||||
**/
|
||||
paraDeposit: u128 & AugmentedConst<ApiType>;
|
||||
@@ -588,6 +562,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
maximumWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of scheduled calls in the queue for a single block.
|
||||
*
|
||||
* NOTE:
|
||||
* + Dependent pallets' benchmarks might require a higher limit for the setting. Set a
|
||||
* higher limit under `runtime-benchmarks` feature.
|
||||
**/
|
||||
maxScheduledPerBlock: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -620,8 +598,8 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Following information is kept for eras in `[current_era -
|
||||
* HistoryDepth, current_era]`: `ErasStakers`, `ErasStakersClipped`,
|
||||
* `ErasValidatorPrefs`, `ErasValidatorReward`, `ErasRewardPoints`,
|
||||
* `ErasTotalStake`, `ErasStartSessionIndex`,
|
||||
* `StakingLedger.claimed_rewards`.
|
||||
* `ErasTotalStake`, `ErasStartSessionIndex`, `ClaimedRewards`, `ErasStakersPaged`,
|
||||
* `ErasStakersOverview`.
|
||||
*
|
||||
* Must be more than the number of eras delayed by session.
|
||||
* I.e. active era must always be in history. I.e. `active_era >
|
||||
@@ -631,23 +609,26 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* this should be set to same value or greater as in storage.
|
||||
*
|
||||
* Note: `HistoryDepth` is used as the upper bound for the `BoundedVec`
|
||||
* item `StakingLedger.claimed_rewards`. Setting this value lower than
|
||||
* item `StakingLedger.legacy_claimed_rewards`. Setting this value lower than
|
||||
* the existing value can lead to inconsistencies in the
|
||||
* `StakingLedger` and will need to be handled properly in a migration.
|
||||
* The test `reducing_history_depth_abrupt` shows this effect.
|
||||
**/
|
||||
historyDepth: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum number of nominations per nominator.
|
||||
**/
|
||||
maxNominations: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of nominators rewarded for each validator.
|
||||
* The maximum size of each `T::ExposurePage`.
|
||||
*
|
||||
* For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can
|
||||
* claim their reward. This used to limit the i/o cost for the nominator payout.
|
||||
* An `ExposurePage` is weakly bounded to a maximum of `MaxExposurePageSize`
|
||||
* nominators.
|
||||
*
|
||||
* For older non-paged exposure, a reward payout was restricted to the top
|
||||
* `MaxExposurePageSize` nominators. This is to limit the i/o cost for the
|
||||
* nominator payout.
|
||||
*
|
||||
* Note: `MaxExposurePageSize` is used to bound `ClaimedRewards` and is unsafe to reduce
|
||||
* without handling it in a migration.
|
||||
**/
|
||||
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
|
||||
maxExposurePageSize: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of `unlocking` chunks a [`StakingLedger`] can
|
||||
* have. Effectively determines how many unique eras a staker may be
|
||||
@@ -677,6 +658,36 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
stateTrieMigration: {
|
||||
/**
|
||||
* Maximal number of bytes that a key can have.
|
||||
*
|
||||
* FRAME itself does not limit the key length.
|
||||
* The concrete value must therefore depend on your storage usage.
|
||||
* A [`frame_support::storage::StorageNMap`] for example can have an arbitrary number of
|
||||
* keys which are then hashed and concatenated, resulting in arbitrarily long keys.
|
||||
*
|
||||
* Use the *state migration RPC* to retrieve the length of the longest key in your
|
||||
* storage: <https://github.com/paritytech/substrate/issues/11642>
|
||||
*
|
||||
* The migration will halt with a `Halted` event if this value is too small.
|
||||
* Since there is no real penalty from over-estimating, it is advised to use a large
|
||||
* value. The default is 512 byte.
|
||||
*
|
||||
* Some key lengths for reference:
|
||||
* - [`frame_support::storage::StorageValue`]: 32 byte
|
||||
* - [`frame_support::storage::StorageMap`]: 64 byte
|
||||
* - [`frame_support::storage::StorageDoubleMap`]: 96 byte
|
||||
*
|
||||
* For more info see
|
||||
* <https://www.shawntabrizi.com/blog/substrate/querying-substrate-storage-via-rpc/>
|
||||
**/
|
||||
maxKeyLen: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
system: {
|
||||
/**
|
||||
* Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
||||
@@ -703,7 +714,7 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
ss58Prefix: u16 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Get the chain's current version.
|
||||
* Get the chain's in-code version.
|
||||
**/
|
||||
version: SpVersionRuntimeVersion & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -713,10 +724,12 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
};
|
||||
timestamp: {
|
||||
/**
|
||||
* The minimum period between blocks. Beware that this is different to the *expected*
|
||||
* period that the block production apparatus provides. Your chosen consensus system will
|
||||
* generally work with this to determine a sensible block time. e.g. For Aura, it will be
|
||||
* double this period on default settings.
|
||||
* The minimum period between blocks.
|
||||
*
|
||||
* Be aware that this is different to the *expected* period that the block production
|
||||
* apparatus provides. Your chosen consensus system will generally work with this to
|
||||
* determine a sensible block time. For example, in the Aura pallet it will be double this
|
||||
* period on default settings.
|
||||
**/
|
||||
minimumPeriod: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -724,40 +737,12 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
tips: {
|
||||
/**
|
||||
* The amount held on deposit per byte within the tip report reason or bounty description.
|
||||
**/
|
||||
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum acceptable reason length.
|
||||
*
|
||||
* Benchmarks depend on this value, be sure to update weights file when changing this value
|
||||
**/
|
||||
maximumReasonLength: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The period for which a tip remains open after is has achieved threshold tippers.
|
||||
**/
|
||||
tipCountdown: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The percent of the final tip which goes to the original reporter of the tip.
|
||||
**/
|
||||
tipFindersFee: Percent & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount held on deposit for placing a tip report.
|
||||
**/
|
||||
tipReportDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
transactionPayment: {
|
||||
/**
|
||||
* A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their
|
||||
* A fee multiplier for `Operational` extrinsics to compute "virtual tip" to boost their
|
||||
* `priority`
|
||||
*
|
||||
* This value is multipled by the `final_fee` to obtain a "virtual tip" that is later
|
||||
* This value is multiplied by the `final_fee` to obtain a "virtual tip" that is later
|
||||
* added to a tip component in regular `priority` calculations.
|
||||
* It means that a `Normal` transaction can front-run a similarly-sized `Operational`
|
||||
* extrinsic (with no tip), by including a tip value greater than the virtual tip.
|
||||
@@ -798,18 +783,9 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Fraction of a proposal's value that should be bonded in order to place the proposal.
|
||||
* An accepted proposal gets these back. A rejected proposal does not.
|
||||
* The period during which an approved treasury spend has to be claimed.
|
||||
**/
|
||||
proposalBond: Permill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum amount of funds that should be placed in a deposit for making a proposal.
|
||||
**/
|
||||
proposalBondMaximum: Option<u128> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Minimum amount of funds that should be placed in a deposit for making a proposal.
|
||||
**/
|
||||
proposalBondMinimum: u128 & AugmentedConst<ApiType>;
|
||||
payoutPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Period between successive spends.
|
||||
**/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
||||
// Copyright 2017-2023 @polkadot/api-augment authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '../base';
|
||||
import './consts';
|
||||
import './errors';
|
||||
import './events';
|
||||
import './query';
|
||||
import './registry';
|
||||
import './runtime';
|
||||
import './tx';
|
||||
import '../base.js';
|
||||
import './consts.js';
|
||||
import './errors.js';
|
||||
import './events.js';
|
||||
import './query.js';
|
||||
import './registry.js';
|
||||
import './runtime.js';
|
||||
import './tx.js';
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api-augment authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '@polkadot/types-augment/registry/substrate';
|
||||
|
||||
@@ -6,24 +6,14 @@
|
||||
import '@polkadot/api-base/types/calls';
|
||||
|
||||
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
|
||||
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
|
||||
import type { BTreeMap, BitVec, Bytes, Null, Option, Result, Text, Vec, bool, u128, u32, u64 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
|
||||
import type { ValidatorSet } from '@polkadot/types/interfaces/beefy';
|
||||
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
|
||||
import type { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||
import type { OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
|
||||
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
|
||||
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
|
||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
|
||||
import type { SessionIndex } from '@polkadot/types/interfaces/session';
|
||||
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
||||
import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
|
||||
import type { ParaId, ValidationCodeHash } from '@polkadot/types/interfaces/parachains';
|
||||
import type { AccountId32, H256, RuntimeCall, Slot } from '@polkadot/types/interfaces/runtime';
|
||||
import type { PalletTransactionPaymentFeeDetails, PalletTransactionPaymentRuntimeDispatchInfo, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotPrimitivesV7ApprovalVotingParams, PolkadotPrimitivesV7AsyncBackingAsyncBackingParams, PolkadotPrimitivesV7AsyncBackingBackingState, PolkadotPrimitivesV7CandidateCommitments, PolkadotPrimitivesV7CandidateEvent, PolkadotPrimitivesV7CommittedCandidateReceipt, PolkadotPrimitivesV7CoreState, PolkadotPrimitivesV7DisputeState, PolkadotPrimitivesV7ExecutorParams, PolkadotPrimitivesV7GroupRotationInfo, PolkadotPrimitivesV7OccupiedCoreAssumption, PolkadotPrimitivesV7PersistedValidationData, PolkadotPrimitivesV7PvfCheckStatement, PolkadotPrimitivesV7ScrapedOnChainVotes, PolkadotPrimitivesV7SessionInfo, PolkadotPrimitivesV7SlashingDisputeProof, PolkadotPrimitivesV7SlashingPendingSlashes, PolkadotPrimitivesV7ValidatorAppPublic, PolkadotPrimitivesV7ValidatorAppSignature, PolkadotRuntimeOriginCaller, RelayCommonApisInflationInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeConfiguration, SpConsensusBabeEpoch, SpConsensusBeefyDoubleVotingProof, SpConsensusBeefyEcdsaCryptoPublic, SpConsensusBeefyMmrBeefyAuthoritySet, SpConsensusBeefyValidatorSet, SpConsensusGrandpaAppPublic, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpCoreCryptoKeyTypeId, SpInherentsCheckInherentsResult, SpInherentsInherentData, SpMmrPrimitivesError, SpMmrPrimitivesLeafProof, SpRuntimeBlock, SpRuntimeDispatchError, SpRuntimeExtrinsicInclusionMode, SpRuntimeHeader, SpRuntimeTransactionValidityTransactionSource, SpRuntimeTransactionValidityTransactionValidityError, SpRuntimeTransactionValidityValidTransaction, SpVersionRuntimeVersion, SpWeightsWeightV2Weight, XcmRuntimeApisConversionsError, XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError, XcmRuntimeApisDryRunXcmDryRunEffects, XcmRuntimeApisFeesError, XcmVersionedAssetId, XcmVersionedAssets, XcmVersionedLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
import type { IExtrinsic, Observable } from '@polkadot/types/types';
|
||||
|
||||
export type __AugmentedCall<ApiType extends ApiTypes> = AugmentedCall<ApiType>;
|
||||
@@ -31,290 +21,449 @@ export type __DecoratedCallBase<ApiType extends ApiTypes> = DecoratedCallBase<Ap
|
||||
|
||||
declare module '@polkadot/api-base/types/calls' {
|
||||
interface AugmentedCalls<ApiType extends ApiTypes> {
|
||||
/** 0xbc9d89904f5b923f/1 */
|
||||
/** 0xbc9d89904f5b923f/ */
|
||||
accountNonceApi: {
|
||||
/**
|
||||
* The API to query account nonce (aka transaction index)
|
||||
* Get current account nonce of given `AccountId`.
|
||||
**/
|
||||
accountNonce: AugmentedCall<ApiType, (accountId: AccountId | string | Uint8Array) => Observable<Index>>;
|
||||
accountNonce: AugmentedCall<ApiType, (account: AccountId32 | string | Uint8Array) => Observable<u32>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x687ad44ad37f03c2/1 */
|
||||
/** 0x687ad44ad37f03c2/ */
|
||||
authorityDiscoveryApi: {
|
||||
/**
|
||||
* Retrieve authority identifiers of the current and next authority set.
|
||||
**/
|
||||
authorities: AugmentedCall<ApiType, () => Observable<Vec<AuthorityId>>>;
|
||||
authorities: AugmentedCall<ApiType, () => Observable<Vec<SpAuthorityDiscoveryAppPublic>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xcbca25e39f142387/2 */
|
||||
/** 0xcbca25e39f142387/ */
|
||||
babeApi: {
|
||||
/**
|
||||
* Return the genesis configuration for BABE. The configuration is only read on genesis.
|
||||
* Return the configuration for BABE.
|
||||
**/
|
||||
configuration: AugmentedCall<ApiType, () => Observable<BabeGenesisConfiguration>>;
|
||||
configuration: AugmentedCall<ApiType, () => Observable<SpConsensusBabeBabeConfiguration>>;
|
||||
/**
|
||||
* Returns information regarding the current epoch.
|
||||
**/
|
||||
currentEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
|
||||
currentEpoch: AugmentedCall<ApiType, () => Observable<SpConsensusBabeEpoch>>;
|
||||
/**
|
||||
* Returns the slot that started the current epoch.
|
||||
**/
|
||||
currentEpochStart: AugmentedCall<ApiType, () => Observable<Slot>>;
|
||||
/**
|
||||
* Generates a proof of key ownership for the given authority in the current epoch.
|
||||
* Generates a proof of key ownership for the given authority in the, current epoch. An example usage of this module is coupled with the, session historical module to prove that a given authority key is, tied to a given staking identity during a specific session. Proofs, of key ownership are necessary for submitting equivocation reports., NOTE: even though the API takes a `slot` as parameter the current, implementations ignores this parameter and instead relies on this, method being called at the correct block height, i.e. any point at, which the epoch for the given slot is live on-chain. Future, implementations will instead use indexed data through an offchain, worker, not requiring older states to be available.
|
||||
**/
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (slot: Slot | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (slot: Slot | AnyNumber | Uint8Array, authority_id: SpConsensusBabeAppPublic | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Returns information regarding the next epoch (which was already previously announced).
|
||||
* Returns information regarding the next epoch (which was already, previously announced).
|
||||
**/
|
||||
nextEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
|
||||
nextEpoch: AugmentedCall<ApiType, () => Observable<SpConsensusBabeEpoch>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report an equivocation.
|
||||
* Submits an unsigned extrinsic to report an equivocation. The caller, must provide the equivocation proof and a key ownership proof, (should be obtained using `generate_key_ownership_proof`). The, extrinsic will be unsigned and should only be accepted for local, authorship (not to be broadcast to the network). This method returns, `None` when creation of the extrinsic fails, e.g. if equivocation, reporting is disabled for the given runtime (i.e. this method is, hardcoded to return `None`). Only useful in an offchain context.
|
||||
**/
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: BabeEquivocationProof | { offender?: any; slotNumber?: any; firstHeader?: any; secondHeader?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocation_proof: SpConsensusSlotsEquivocationProof | { offender?: any; slot?: any; firstHeader?: any; secondHeader?: any } | string | Uint8Array, key_owner_proof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x49eaaf1b548a0cb0/1 */
|
||||
/** 0x49eaaf1b548a0cb0/ */
|
||||
beefyApi: {
|
||||
/**
|
||||
* Return the block number where BEEFY consensus is enabled/started
|
||||
**/
|
||||
beefyGenesis: AugmentedCall<ApiType, () => Observable<Option<u32>>>;
|
||||
/**
|
||||
* Generates a proof of key ownership for the given authority in the, given set. An example usage of this module is coupled with the, session historical module to prove that a given authority key is, tied to a given staking identity during a specific session. Proofs, of key ownership are necessary for submitting equivocation reports., NOTE: even though the API takes a `set_id` as parameter the current, implementations ignores this parameter and instead relies on this, method being called at the correct block height, i.e. any point at, which the given set id is live on-chain. Future implementations will, instead use indexed data through an offchain worker, not requiring, older states to be available.
|
||||
**/
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (set_id: u64 | AnyNumber | Uint8Array, authority_id: SpConsensusBeefyEcdsaCryptoPublic | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report an equivocation. The caller, must provide the equivocation proof and a key ownership proof, (should be obtained using `generate_key_ownership_proof`). The, extrinsic will be unsigned and should only be accepted for local, authorship (not to be broadcast to the network). This method returns, `None` when creation of the extrinsic fails, e.g. if equivocation, reporting is disabled for the given runtime (i.e. this method is, hardcoded to return `None`). Only useful in an offchain context.
|
||||
**/
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocation_proof: SpConsensusBeefyDoubleVotingProof | { first?: any; second?: any } | string | Uint8Array, key_owner_proof: Bytes | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Return the current active BEEFY validator set
|
||||
**/
|
||||
validatorSet: AugmentedCall<ApiType, () => Observable<Option<ValidatorSet>>>;
|
||||
validatorSet: AugmentedCall<ApiType, () => Observable<Option<SpConsensusBeefyValidatorSet>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x40fe3ad401f8959a/6 */
|
||||
/** 0x2a5e924655399e60/ */
|
||||
beefyMmrApi: {
|
||||
/**
|
||||
* Return the currently active BEEFY authority set proof.
|
||||
**/
|
||||
authoritySetProof: AugmentedCall<ApiType, () => Observable<SpConsensusBeefyMmrBeefyAuthoritySet>>;
|
||||
/**
|
||||
* Return the next/queued BEEFY authority set proof.
|
||||
**/
|
||||
nextAuthoritySetProof: AugmentedCall<ApiType, () => Observable<SpConsensusBeefyMmrBeefyAuthoritySet>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x40fe3ad401f8959a/ */
|
||||
blockBuilder: {
|
||||
/**
|
||||
* Apply the given extrinsic.
|
||||
* Apply the given extrinsic.,, Returns an inclusion outcome which specifies if this extrinsic is included in, this block or not.
|
||||
**/
|
||||
applyExtrinsic: AugmentedCall<ApiType, (extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<ApplyExtrinsicResult>>;
|
||||
applyExtrinsic: AugmentedCall<ApiType, (extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<Result<Result<Null, SpRuntimeDispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>>;
|
||||
/**
|
||||
* Check that the inherents are valid.
|
||||
* Check that the inherents are valid. The inherent data will vary from chain to chain.
|
||||
**/
|
||||
checkInherents: AugmentedCall<ApiType, (block: Block | { header?: any; extrinsics?: any } | string | Uint8Array, data: InherentData | { data?: any } | string | Uint8Array) => Observable<CheckInherentsResult>>;
|
||||
checkInherents: AugmentedCall<ApiType, (block: SpRuntimeBlock | { header?: any; extrinsics?: any } | string | Uint8Array, data: SpInherentsInherentData | { data?: any } | string | Uint8Array) => Observable<SpInherentsCheckInherentsResult>>;
|
||||
/**
|
||||
* Finish the current block.
|
||||
**/
|
||||
finalizeBlock: AugmentedCall<ApiType, () => Observable<Header>>;
|
||||
finalizeBlock: AugmentedCall<ApiType, () => Observable<SpRuntimeHeader>>;
|
||||
/**
|
||||
* Generate inherent extrinsics.
|
||||
* Generate inherent extrinsics. The inherent data will vary from chain to chain.
|
||||
**/
|
||||
inherentExtrinsics: AugmentedCall<ApiType, (inherent: InherentData | { data?: any } | string | Uint8Array) => Observable<Vec<Extrinsic>>>;
|
||||
inherentExtrinsics: AugmentedCall<ApiType, (inherent: SpInherentsInherentData | { data?: any } | string | Uint8Array) => Observable<Vec<Bytes>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xdf6acb689907609b/4 */
|
||||
/** 0xdf6acb689907609b/ */
|
||||
core: {
|
||||
/**
|
||||
* Execute the given block.
|
||||
**/
|
||||
executeBlock: AugmentedCall<ApiType, (block: Block | { header?: any; extrinsics?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
executeBlock: AugmentedCall<ApiType, (block: SpRuntimeBlock | { header?: any; extrinsics?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Initialize a block with the given header.
|
||||
* Initialize a block with the given header and return the runtime executive mode.
|
||||
**/
|
||||
initializeBlock: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
initializeBlock: AugmentedCall<ApiType, (header: SpRuntimeHeader | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<SpRuntimeExtrinsicInclusionMode>>;
|
||||
/**
|
||||
* Returns the version of the runtime.
|
||||
**/
|
||||
version: AugmentedCall<ApiType, () => Observable<RuntimeVersion>>;
|
||||
version: AugmentedCall<ApiType, () => Observable<SpVersionRuntimeVersion>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xed99c5acb25eedf5/3 */
|
||||
/** 0x91b1c8b16328eb92/ */
|
||||
dryRunApi: {
|
||||
/**
|
||||
* Dry run call.
|
||||
**/
|
||||
dryRunCall: AugmentedCall<ApiType, (origin: PolkadotRuntimeOriginCaller | { system: any } | { Void: any } | { Origins: any } | { ParachainsOrigin: any } | { XcmPallet: any } | string | Uint8Array, call: RuntimeCall | IMethod | string | Uint8Array) => Observable<Result<XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError>>>;
|
||||
/**
|
||||
* Dry run XCM program
|
||||
**/
|
||||
dryRunXcm: AugmentedCall<ApiType, (origin_location: XcmVersionedLocation | { V2: any } | { V3: any } | { V4: any } | string | Uint8Array, xcm: XcmVersionedXcm | { V2: any } | { V3: any } | { V4: any } | string | Uint8Array) => Observable<Result<XcmRuntimeApisDryRunXcmDryRunEffects, XcmRuntimeApisDryRunError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xfbc577b9d747efd6/ */
|
||||
genesisBuilder: {
|
||||
/**
|
||||
* Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the, storage.,, In the case of a FRAME-based runtime, this function deserializes the full `RuntimeGenesisConfig` from the given JSON blob and, puts it into the storage. If the provided JSON blob is incorrect or incomplete or the, deserialization fails, an error is returned.,, Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no, defaults will be used.
|
||||
**/
|
||||
buildState: AugmentedCall<ApiType, (json: Bytes | string | Uint8Array) => Observable<Result<Null, Text>>>;
|
||||
/**
|
||||
* Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by, `id`.,, If `id` is `None` the function returns JSON blob representation of the default, `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default, `RuntimeGenesisConfig`.,, Otherwise function returns a JSON representation of the built-in, named, `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not, exists. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of, (potentially nested) key-value pairs that are intended for customizing the default, runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation, of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can, be used in `build_state` method.
|
||||
**/
|
||||
getPreset: AugmentedCall<ApiType, (id: Option<Text> | null | Uint8Array | Text | string) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Returns a list of identifiers for available builtin `RuntimeGenesisConfig` presets.,, The presets from the list can be queried with [`GenesisBuilder::get_preset`] method. If, no named presets are provided by the runtime the list is empty.
|
||||
**/
|
||||
presetNames: AugmentedCall<ApiType, () => Observable<Vec<Text>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xed99c5acb25eedf5/ */
|
||||
grandpaApi: {
|
||||
/**
|
||||
* Get current GRANDPA authority set id.
|
||||
**/
|
||||
currentSetId: AugmentedCall<ApiType, () => Observable<SetId>>;
|
||||
currentSetId: AugmentedCall<ApiType, () => Observable<u64>>;
|
||||
/**
|
||||
* Generates a proof of key ownership for the given authority in the given set.
|
||||
* Generates a proof of key ownership for the given authority in the, given set. An example usage of this module is coupled with the, session historical module to prove that a given authority key is, tied to a given staking identity during a specific session. Proofs, of key ownership are necessary for submitting equivocation reports., NOTE: even though the API takes a `set_id` as parameter the current, implementations ignore this parameter and instead rely on this, method being called at the correct block height, i.e. any point at, which the given set id is live on-chain. Future implementations will, instead use indexed data through an offchain worker, not requiring, older states to be available.
|
||||
**/
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (setId: SetId | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (set_id: u64 | AnyNumber | Uint8Array, authority_id: SpConsensusGrandpaAppPublic | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed.
|
||||
* Get the current GRANDPA authorities and weights. This should not change except, for when changes are scheduled and the corresponding delay has passed.,, When called at block B, it will return the set of authorities that should be, used to finalize descendants of this block (B+1, B+2, ...). The block B itself, is finalized by the authorities from block B-1.
|
||||
**/
|
||||
grandpaAuthorities: AugmentedCall<ApiType, () => Observable<AuthorityList>>;
|
||||
grandpaAuthorities: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[SpConsensusGrandpaAppPublic, u64]>>>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report an equivocation.
|
||||
* Submits an unsigned extrinsic to report an equivocation. The caller, must provide the equivocation proof and a key ownership proof, (should be obtained using `generate_key_ownership_proof`). The, extrinsic will be unsigned and should only be accepted for local, authorship (not to be broadcast to the network). This method returns, `None` when creation of the extrinsic fails, e.g. if equivocation, reporting is disabled for the given runtime (i.e. this method is, hardcoded to return `None`). Only useful in an offchain context.
|
||||
**/
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: GrandpaEquivocationProof | { setId?: any; equivocation?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocation_proof: SpConsensusGrandpaEquivocationProof | { setId?: any; equivocation?: any } | string | Uint8Array, key_owner_proof: Bytes | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37e397fc7c91f5e4/1 */
|
||||
/** 0xc51ff1fa3f5d0cca/ */
|
||||
inflation: {
|
||||
/**
|
||||
* Return the current estimates of the inflation amount.,, This is marked as experimental in light of RFC#89. Nonetheless, its usage is highly, recommended over trying to read-storage, or re-create the onchain logic.
|
||||
**/
|
||||
experimentalInflationPredictionInfo: AugmentedCall<ApiType, () => Observable<RelayCommonApisInflationInfo>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x9ffb505aa738d69c/ */
|
||||
locationToAccountApi: {
|
||||
/**
|
||||
* Converts `Location` to `AccountId`.
|
||||
**/
|
||||
convertLocation: AugmentedCall<ApiType, (location: XcmVersionedLocation | { V2: any } | { V3: any } | { V4: any } | string | Uint8Array) => Observable<Result<AccountId32, XcmRuntimeApisConversionsError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37e397fc7c91f5e4/ */
|
||||
metadata: {
|
||||
/**
|
||||
* Returns the metadata of a runtime
|
||||
* Returns the metadata of a runtime.
|
||||
**/
|
||||
metadata: AugmentedCall<ApiType, () => Observable<OpaqueMetadata>>;
|
||||
/**
|
||||
* Returns the metadata at a given version.,, If the given `version` isn't supported, this will return `None`., Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime.
|
||||
**/
|
||||
metadataAtVersion: AugmentedCall<ApiType, (version: u32 | AnyNumber | Uint8Array) => Observable<Option<OpaqueMetadata>>>;
|
||||
/**
|
||||
* Returns the supported metadata versions.,, This can be used to call `metadata_at_version`.
|
||||
**/
|
||||
metadataVersions: AugmentedCall<ApiType, () => Observable<Vec<u32>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x91d5df18b0d2cf58/1 */
|
||||
/** 0x91d5df18b0d2cf58/ */
|
||||
mmrApi: {
|
||||
/**
|
||||
* Generate MMR proof for a series of leaves under given indices.
|
||||
* Generate MMR proof for a series of block numbers. If `best_known_block_number = Some(n)`,, use historical MMR state at given block height `n`. Else, use current MMR state.
|
||||
**/
|
||||
generateBatchProof: AugmentedCall<ApiType, (leafIndices: Vec<MmrLeafIndex> | (MmrLeafIndex | AnyNumber | Uint8Array)[]) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
|
||||
generateProof: AugmentedCall<ApiType, (block_numbers: Vec<u32> | (u32 | AnyNumber | Uint8Array)[], best_known_block_number: Option<u32> | null | Uint8Array | u32 | AnyNumber) => Observable<Result<ITuple<[Vec<Bytes>, SpMmrPrimitivesLeafProof]>, SpMmrPrimitivesError>>>;
|
||||
/**
|
||||
* Generate MMR proof for a leaf under given index.
|
||||
* Return the number of MMR blocks in the chain.
|
||||
**/
|
||||
generateProof: AugmentedCall<ApiType, (leafIndex: MmrLeafIndex | AnyNumber | Uint8Array) => Observable<Result<ITuple<[MmrEncodableOpaqueLeaf, MmrProof]>, MmrError>>>;
|
||||
mmrLeafCount: AugmentedCall<ApiType, () => Observable<Result<u64, SpMmrPrimitivesError>>>;
|
||||
/**
|
||||
* Return the on-chain MMR root hash.
|
||||
**/
|
||||
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
|
||||
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<H256, SpMmrPrimitivesError>>>;
|
||||
/**
|
||||
* Verify MMR proof against on-chain MMR for a batch of leaves.
|
||||
* Verify MMR proof against on-chain MMR for a batch of leaves.,, Note this function will use on-chain MMR root hash and check if the proof matches the hash., Note, the leaves should be sorted such that corresponding leaves and leaf indices have the, same position in both the `leaves` vector and the `leaf_indices` vector contained in the [LeafProof]
|
||||
**/
|
||||
verifyBatchProof: AugmentedCall<ApiType, (leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
verifyProof: AugmentedCall<ApiType, (leaves: Vec<Bytes> | (Bytes | string | Uint8Array)[], proof: SpMmrPrimitivesLeafProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<Null, SpMmrPrimitivesError>>>;
|
||||
/**
|
||||
* Verify MMR proof against given root hash or a batch of leaves.
|
||||
* Verify MMR proof against given root hash for a batch of leaves.,, Note this function does not require any on-chain storage - the, proof is verified against given MMR root hash.,, Note, the leaves should be sorted such that corresponding leaves and leaf indices have the, same position in both the `leaves` vector and the `leaf_indices` vector contained in the [LeafProof]
|
||||
**/
|
||||
verifyBatchProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
/**
|
||||
* Verify MMR proof against on-chain MMR.
|
||||
**/
|
||||
verifyProof: AugmentedCall<ApiType, (leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
/**
|
||||
* Verify MMR proof against given root hash.
|
||||
**/
|
||||
verifyProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
verifyProofStateless: AugmentedCall<ApiType, (root: H256 | string | Uint8Array, leaves: Vec<Bytes> | (Bytes | string | Uint8Array)[], proof: SpMmrPrimitivesLeafProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<Null, SpMmrPrimitivesError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x17a6bc0d0062aeb3/1 */
|
||||
/** 0x17a6bc0d0062aeb3/ */
|
||||
nominationPoolsApi: {
|
||||
/**
|
||||
* Returns the pending rewards for the given member.
|
||||
* Returns the equivalent points of `new_funds` for a given pool.
|
||||
**/
|
||||
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
|
||||
balanceToPoints: AugmentedCall<ApiType, (pool_id: u32 | AnyNumber | Uint8Array, new_funds: u128 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Returns true if the delegated funds of the pool `member` needs migration.,, Once a pool has successfully migrated to the strategy, [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake), the funds of the, member can be migrated from pool account to the member's account. Use, [`migrate_delegation`](pallet_nomination_pools::Call::migrate_delegation), to migrate the funds of the pool member.
|
||||
**/
|
||||
memberNeedsDelegateMigration: AugmentedCall<ApiType, (member: AccountId32 | string | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Returns the pending slash for a given pool member.
|
||||
**/
|
||||
memberPendingSlash: AugmentedCall<ApiType, (member: AccountId32 | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Returns the pending rewards for the member that the AccountId was given for.
|
||||
**/
|
||||
pendingRewards: AugmentedCall<ApiType, (who: AccountId32 | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Returns the equivalent balance of `points` for a given pool.
|
||||
**/
|
||||
pointsToBalance: AugmentedCall<ApiType, (pool_id: u32 | AnyNumber | Uint8Array, points: u128 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Returns true if the pool with `pool_id` needs migration.,, This can happen when the `pallet-nomination-pools` has switched to using strategy, [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake) but the pool, still has funds that were staked using the older strategy, [TransferStake](pallet_nomination_pools::adapter::TransferStake). Use, [`migrate_pool_to_delegate_stake`](pallet_nomination_pools::Call::migrate_pool_to_delegate_stake), to migrate the pool.
|
||||
**/
|
||||
poolNeedsDelegateMigration: AugmentedCall<ApiType, (pool_id: u32 | AnyNumber | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Returns the pending slash for a given pool.
|
||||
**/
|
||||
poolPendingSlash: AugmentedCall<ApiType, (pool_id: u32 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xf78b278be53f454c/2 */
|
||||
/** 0xf78b278be53f454c/ */
|
||||
offchainWorkerApi: {
|
||||
/**
|
||||
* Starts the off-chain task for given block header.
|
||||
**/
|
||||
offchainWorker: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
offchainWorker: AugmentedCall<ApiType, (header: SpRuntimeHeader | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xaf2c0297a23e6d3d/2 */
|
||||
/** 0xaf2c0297a23e6d3d/ */
|
||||
parachainHost: {
|
||||
/**
|
||||
* Returns the persisted validation data for the given `ParaId` along with the corresponding validation code hash.
|
||||
* Approval voting configuration parameters
|
||||
**/
|
||||
assumedValidationData: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, hash: Hash | string | Uint8Array) => Observable<Option<ITuple<[PersistedValidationData, ValidationCodeHash]>>>>;
|
||||
approvalVotingParams: AugmentedCall<ApiType, () => Observable<PolkadotPrimitivesV7ApprovalVotingParams>>;
|
||||
/**
|
||||
* Yields information on all availability cores as relevant to the child block.
|
||||
* Returns the persisted validation data for the given `ParaId` along with the corresponding, validation code hash. Instead of accepting assumption about the para, matches the validation, data hash against an expected one and yields `None` if they're not equal.
|
||||
**/
|
||||
availabilityCores: AugmentedCall<ApiType, () => Observable<Vec<CoreState>>>;
|
||||
assumedValidationData: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, expected_persisted_validation_data_hash: H256 | string | Uint8Array) => Observable<Option<ITuple<[PolkadotPrimitivesV7PersistedValidationData, H256]>>>>;
|
||||
/**
|
||||
* Returns candidate's acceptance limitations for asynchronous backing for a relay parent.
|
||||
**/
|
||||
asyncBackingParams: AugmentedCall<ApiType, () => Observable<PolkadotPrimitivesV7AsyncBackingAsyncBackingParams>>;
|
||||
/**
|
||||
* Yields information on all availability cores as relevant to the child block., Cores are either free or occupied. Free cores can have paras assigned to them.
|
||||
**/
|
||||
availabilityCores: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV7CoreState>>>;
|
||||
/**
|
||||
* Get a vector of events concerning candidates that occurred within a block.
|
||||
**/
|
||||
candidateEvents: AugmentedCall<ApiType, () => Observable<Vec<CandidateEvent>>>;
|
||||
candidateEvents: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV7CandidateEvent>>>;
|
||||
/**
|
||||
* Get the receipt of a candidate pending availability.
|
||||
* Get the receipt of a candidate pending availability. This returns `Some` for any paras, assigned to occupied cores in `availability_cores` and `None` otherwise.
|
||||
**/
|
||||
candidatePendingAvailability: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Option<CommittedCandidateReceipt>>>;
|
||||
candidatePendingAvailability: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7CommittedCandidateReceipt>>>;
|
||||
/**
|
||||
* Elastic scaling support
|
||||
**/
|
||||
candidatesPendingAvailability: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array) => Observable<Vec<PolkadotPrimitivesV7CommittedCandidateReceipt>>>;
|
||||
/**
|
||||
* Checks if the given validation outputs pass the acceptance criteria.
|
||||
**/
|
||||
checkValidationOutputs: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, outputs: CandidateCommitments | { upwardMessages?: any; horizontalMessages?: any; newValidationCode?: any; headData?: any; processedDownwardMessages?: any; hrmpWatermark?: any } | string | Uint8Array) => Observable<bool>>;
|
||||
checkValidationOutputs: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, outputs: PolkadotPrimitivesV7CandidateCommitments | { upwardMessages?: any; horizontalMessages?: any; newValidationCode?: any; headData?: any; processedDownwardMessages?: any; hrmpWatermark?: any } | string | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Claim queue
|
||||
**/
|
||||
claimQueue: AugmentedCall<ApiType, () => Observable<BTreeMap<u32, Vec<u32>>>>;
|
||||
/**
|
||||
* Returns a list of all disabled validators at the given block.
|
||||
**/
|
||||
disabledValidators: AugmentedCall<ApiType, () => Observable<Vec<u32>>>;
|
||||
/**
|
||||
* Returns all onchain disputes.
|
||||
**/
|
||||
disputes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[u32, H256, PolkadotPrimitivesV7DisputeState]>>>>;
|
||||
/**
|
||||
* Get all the pending inbound messages in the downward message queue for a para.
|
||||
**/
|
||||
dmqContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundDownwardMessage>>>;
|
||||
dmqContents: AugmentedCall<ApiType, (recipient: ParaId | AnyNumber | Uint8Array) => Observable<Vec<PolkadotCorePrimitivesInboundDownwardMessage>>>;
|
||||
/**
|
||||
* Get the contents of all channels addressed to the given recipient.
|
||||
* Get the contents of all channels addressed to the given recipient. Channels that have no, messages in them are also included.
|
||||
**/
|
||||
inboundHrmpChannelsContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundHrmpMessage>>>;
|
||||
inboundHrmpChannelsContents: AugmentedCall<ApiType, (recipient: ParaId | AnyNumber | Uint8Array) => Observable<BTreeMap<u32, Vec<PolkadotCorePrimitivesInboundHrmpMessage>>>>;
|
||||
/**
|
||||
* Returns a merkle proof of a validator session key., NOTE: This function is only available since parachain host version 5.
|
||||
**/
|
||||
keyOwnershipProof: AugmentedCall<ApiType, (validator_id: PolkadotPrimitivesV7ValidatorAppPublic | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Get the minimum number of backing votes for a parachain candidate., This is a staging method! Do not use on production runtimes!
|
||||
**/
|
||||
minimumBackingVotes: AugmentedCall<ApiType, () => Observable<u32>>;
|
||||
/**
|
||||
* Get node features., This is a staging method! Do not use on production runtimes!
|
||||
**/
|
||||
nodeFeatures: AugmentedCall<ApiType, () => Observable<BitVec>>;
|
||||
/**
|
||||
* Scrape dispute relevant from on-chain, backing votes and resolved disputes.
|
||||
**/
|
||||
onChainVotes: AugmentedCall<ApiType, () => Observable<Option<ScrapedOnChainVotes>>>;
|
||||
onChainVotes: AugmentedCall<ApiType, () => Observable<Option<PolkadotPrimitivesV7ScrapedOnChainVotes>>>;
|
||||
/**
|
||||
* Yields the persisted validation data for the given `ParaId` along with an assumption that should be used if the para currently occupies a core.
|
||||
* Returns the state of parachain backing for a given para.
|
||||
**/
|
||||
persistedValidationData: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<PersistedValidationData>>>;
|
||||
paraBackingState: AugmentedCall<ApiType, (_: ParaId | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7AsyncBackingBackingState>>>;
|
||||
/**
|
||||
* Returns code hashes of PVFs that require pre-checking by validators in the active set.
|
||||
* Yields the persisted validation data for the given `ParaId` along with an assumption that, should be used if the para currently occupies a core.,, Returns `None` if either the para is not registered or the assumption is `Freed`, and the para already occupies a core.
|
||||
**/
|
||||
pvfsRequirePrecheck: AugmentedCall<ApiType, () => Observable<Vec<ValidationCodeHash>>>;
|
||||
persistedValidationData: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, assumption: PolkadotPrimitivesV7OccupiedCoreAssumption | 'Included' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<PolkadotPrimitivesV7PersistedValidationData>>>;
|
||||
/**
|
||||
* Returns the session index expected at a child of the block.
|
||||
* Returns code hashes of PVFs that require pre-checking by validators in the active set.,, NOTE: This function is only available since parachain host version 2.
|
||||
**/
|
||||
sessionIndexForChild: AugmentedCall<ApiType, () => Observable<SessionIndex>>;
|
||||
pvfsRequirePrecheck: AugmentedCall<ApiType, () => Observable<Vec<H256>>>;
|
||||
/**
|
||||
* Get the session info for the given session, if stored.
|
||||
* Returns execution parameters for the session.
|
||||
**/
|
||||
sessionInfo: AugmentedCall<ApiType, (index: SessionIndex | AnyNumber | Uint8Array) => Observable<Option<SessionInfo>>>;
|
||||
sessionExecutorParams: AugmentedCall<ApiType, (session_index: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7ExecutorParams>>>;
|
||||
/**
|
||||
* Submits a PVF pre-checking statement into the transaction pool.
|
||||
* Returns the session index expected at a child of the block.,, This can be used to instantiate a `SigningContext`.
|
||||
**/
|
||||
submitPvfCheckStatement: AugmentedCall<ApiType, (stmt: PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: ValidatorSignature | string | Uint8Array) => Observable<Null>>;
|
||||
sessionIndexForChild: AugmentedCall<ApiType, () => Observable<u32>>;
|
||||
/**
|
||||
* Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.
|
||||
* Get the session info for the given session, if stored.,, NOTE: This function is only available since parachain host version 2.
|
||||
**/
|
||||
validationCode: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<ValidationCode>>;
|
||||
sessionInfo: AugmentedCall<ApiType, (index: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV7SessionInfo>>>;
|
||||
/**
|
||||
* Submits a PVF pre-checking statement into the transaction pool.,, NOTE: This function is only available since parachain host version 2.
|
||||
**/
|
||||
submitPvfCheckStatement: AugmentedCall<ApiType, (stmt: PolkadotPrimitivesV7PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV7ValidatorAppSignature | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Submit an unsigned extrinsic to slash validators who lost a dispute about, a candidate of a past session., NOTE: This function is only available since parachain host version 5.
|
||||
**/
|
||||
submitReportDisputeLost: AugmentedCall<ApiType, (dispute_proof: PolkadotPrimitivesV7SlashingDisputeProof | { timeSlot?: any; kind?: any; validatorIndex?: any; validatorId?: any } | string | Uint8Array, key_ownership_proof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Returns a list of validators that lost a past session dispute and need to be slashed., NOTE: This function is only available since parachain host version 5.
|
||||
**/
|
||||
unappliedSlashes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[u32, H256, PolkadotPrimitivesV7SlashingPendingSlashes]>>>>;
|
||||
/**
|
||||
* Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.,, Returns `None` if either the para is not registered or the assumption is `Freed`, and the para already occupies a core.
|
||||
**/
|
||||
validationCode: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, assumption: PolkadotPrimitivesV7OccupiedCoreAssumption | 'Included' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Get the validation code from its hash.
|
||||
**/
|
||||
validationCodeByHash: AugmentedCall<ApiType, (hash: ValidationCodeHash | string | Uint8Array) => Observable<Option<ValidationCode>>>;
|
||||
validationCodeByHash: AugmentedCall<ApiType, (hash: ValidationCodeHash | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.
|
||||
* Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.,, NOTE: This function is only available since parachain host version 2.
|
||||
**/
|
||||
validationCodeHash: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<ValidationCodeHash>>>;
|
||||
validationCodeHash: AugmentedCall<ApiType, (para_id: ParaId | AnyNumber | Uint8Array, assumption: PolkadotPrimitivesV7OccupiedCoreAssumption | 'Included' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<H256>>>;
|
||||
/**
|
||||
* Returns the validator groups and rotation info localized based on the hypothetical child of a block whose state this is invoked on
|
||||
* Returns the validator groups and rotation info localized based on the hypothetical child, of a block whose state this is invoked on. Note that `now` in the `GroupRotationInfo`, should be the successor of the number of the block.
|
||||
**/
|
||||
validatorGroups: AugmentedCall<ApiType, () => Observable<ITuple<[Vec<Vec<ParaValidatorIndex>>, GroupRotationInfo]>>>;
|
||||
validatorGroups: AugmentedCall<ApiType, () => Observable<ITuple<[Vec<Vec<u32>>, PolkadotPrimitivesV7GroupRotationInfo]>>>;
|
||||
/**
|
||||
* Get the current validators.
|
||||
**/
|
||||
validators: AugmentedCall<ApiType, () => Observable<Vec<ValidatorId>>>;
|
||||
validators: AugmentedCall<ApiType, () => Observable<Vec<PolkadotPrimitivesV7ValidatorAppPublic>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xab3c0572291feb8b/1 */
|
||||
/** 0xab3c0572291feb8b/ */
|
||||
sessionKeys: {
|
||||
/**
|
||||
* Decode the given public session keys.
|
||||
* Decode the given public session keys.,, Returns the list of public raw public keys + key type.
|
||||
**/
|
||||
decodeSessionKeys: AugmentedCall<ApiType, (encoded: Bytes | string | Uint8Array) => Observable<Option<Vec<ITuple<[Bytes, KeyTypeId]>>>>>;
|
||||
decodeSessionKeys: AugmentedCall<ApiType, (encoded: Bytes | string | Uint8Array) => Observable<Option<Vec<ITuple<[Bytes, SpCoreCryptoKeyTypeId]>>>>>;
|
||||
/**
|
||||
* Generate a set of session keys with optionally using the given seed.
|
||||
* Generate a set of session keys with optionally using the given seed., The keys should be stored within the keystore exposed via runtime, externalities.,, The seed needs to be a valid `utf8` string.,, Returns the concatenated SCALE encoded public keys.
|
||||
**/
|
||||
generateSessionKeys: AugmentedCall<ApiType, (seed: Option<Bytes> | null | Uint8Array | Bytes | string) => Observable<Bytes>>;
|
||||
/**
|
||||
@@ -322,58 +471,100 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xd2bc9897eed08f15/3 */
|
||||
/** 0x18ef58a3b67ba770/ */
|
||||
stakingApi: {
|
||||
/**
|
||||
* Returns the page count of exposures for a validator `account` in a given era.
|
||||
**/
|
||||
erasStakersPageCount: AugmentedCall<ApiType, (era: u32 | AnyNumber | Uint8Array, account: AccountId32 | string | Uint8Array) => Observable<u32>>;
|
||||
/**
|
||||
* Returns the nominations quota for a nominator with a given balance.
|
||||
**/
|
||||
nominationsQuota: AugmentedCall<ApiType, (balance: u128 | AnyNumber | Uint8Array) => Observable<u32>>;
|
||||
/**
|
||||
* Returns true if validator `account` has pages to be claimed for the given era.
|
||||
**/
|
||||
pendingRewards: AugmentedCall<ApiType, (era: u32 | AnyNumber | Uint8Array, account: AccountId32 | string | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xd2bc9897eed08f15/ */
|
||||
taggedTransactionQueue: {
|
||||
/**
|
||||
* Validate the transaction.
|
||||
* Validate the transaction.,, This method is invoked by the transaction pool to learn details about given transaction., The implementation should make sure to verify the correctness of the transaction, against current state. The given `block_hash` corresponds to the hash of the block, that is used as current state.,, Note that this call may be performed by the pool multiple times and transactions, might be verified in any possible order.
|
||||
**/
|
||||
validateTransaction: AugmentedCall<ApiType, (source: TransactionSource | 'InBlock' | 'Local' | 'External' | number | Uint8Array, tx: Extrinsic | IExtrinsic | string | Uint8Array, blockHash: BlockHash | string | Uint8Array) => Observable<TransactionValidity>>;
|
||||
validateTransaction: AugmentedCall<ApiType, (source: SpRuntimeTransactionValidityTransactionSource | 'InBlock' | 'Local' | 'External' | number | Uint8Array, tx: Extrinsic | IExtrinsic | string | Uint8Array, block_hash: H256 | string | Uint8Array) => Observable<Result<SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionValidityError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37c8bb1350a9a2a8/3 */
|
||||
/** 0x37c8bb1350a9a2a8/ */
|
||||
transactionPaymentApi: {
|
||||
/**
|
||||
* The transaction fee details
|
||||
*
|
||||
**/
|
||||
queryFeeDetails: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
|
||||
queryFeeDetails: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentFeeDetails>>;
|
||||
/**
|
||||
* The transaction info
|
||||
*
|
||||
**/
|
||||
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentRuntimeDispatchInfo>>;
|
||||
/**
|
||||
* Query the output of the current LengthToFee given some input
|
||||
*
|
||||
**/
|
||||
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>>;
|
||||
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Query the output of the current WeightToFee given some input
|
||||
*
|
||||
**/
|
||||
queryWeightToFee: AugmentedCall<ApiType, (weight: Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<Balance>>;
|
||||
queryWeightToFee: AugmentedCall<ApiType, (weight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xf3ff14d5ab527059/3 */
|
||||
/** 0xf3ff14d5ab527059/ */
|
||||
transactionPaymentCallApi: {
|
||||
/**
|
||||
* The call fee details
|
||||
* Query fee details of a given encoded `Call`.
|
||||
**/
|
||||
queryCallFeeDetails: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
|
||||
queryCallFeeDetails: AugmentedCall<ApiType, (call: RuntimeCall | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentFeeDetails>>;
|
||||
/**
|
||||
* The call info
|
||||
* Query information of a dispatch class, weight, and fee of a given encoded `Call`.
|
||||
**/
|
||||
queryCallInfo: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||
queryCallInfo: AugmentedCall<ApiType, (call: RuntimeCall | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentRuntimeDispatchInfo>>;
|
||||
/**
|
||||
* Query the output of the current LengthToFee given some input
|
||||
* Query the output of the current `LengthToFee` given some input.
|
||||
**/
|
||||
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>>;
|
||||
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Query the output of the current WeightToFee given some input
|
||||
* Query the output of the current `WeightToFee` given some input.
|
||||
**/
|
||||
queryWeightToFee: AugmentedCall<ApiType, (weight: Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<Balance>>;
|
||||
queryWeightToFee: AugmentedCall<ApiType, (weight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x6ff52ee858e6c5bd/ */
|
||||
xcmPaymentApi: {
|
||||
/**
|
||||
* Returns a list of acceptable payment assets.,, # Arguments,, * `xcm_version`: Version.
|
||||
**/
|
||||
queryAcceptablePaymentAssets: AugmentedCall<ApiType, (xcm_version: u32 | AnyNumber | Uint8Array) => Observable<Result<Vec<XcmVersionedAssetId>, XcmRuntimeApisFeesError>>>;
|
||||
/**
|
||||
* Get delivery fees for sending a specific `message` to a `destination`., These always come in a specific asset, defined by the chain.,, # Arguments, * `message`: The message that'll be sent, necessary because most delivery fees are based on the, size of the message., * `destination`: The destination to send the message to. Different destinations may use, different senders that charge different fees.
|
||||
**/
|
||||
queryDeliveryFees: AugmentedCall<ApiType, (destination: XcmVersionedLocation | { V2: any } | { V3: any } | { V4: any } | string | Uint8Array, message: XcmVersionedXcm | { V2: any } | { V3: any } | { V4: any } | string | Uint8Array) => Observable<Result<XcmVersionedAssets, XcmRuntimeApisFeesError>>>;
|
||||
/**
|
||||
* Converts a weight into a fee for the specified `AssetId`.,, # Arguments,, * `weight`: convertible `Weight`., * `asset`: `VersionedAssetId`.
|
||||
**/
|
||||
queryWeightToAssetFee: AugmentedCall<ApiType, (weight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array, asset: XcmVersionedAssetId | { V3: any } | { V4: any } | string | Uint8Array) => Observable<Result<u128, XcmRuntimeApisFeesError>>>;
|
||||
/**
|
||||
* Returns a weight needed to execute a XCM.,, # Arguments,, * `message`: `VersionedXcm`.
|
||||
**/
|
||||
queryXcmWeight: AugmentedCall<ApiType, (message: XcmVersionedXcm | { V2: any } | { V3: any } | { V4: any } | string | Uint8Array) => Observable<Result<SpWeightsWeightV2Weight, XcmRuntimeApisFeesError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
|
||||
+1408
-1722
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
||||
// Copyright 2017-2023 @polkadot/api-augment authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '../base';
|
||||
import './consts';
|
||||
import './errors';
|
||||
import './events';
|
||||
import './query';
|
||||
import './registry';
|
||||
import './runtime';
|
||||
import './tx';
|
||||
import '../base.js';
|
||||
import './consts.js';
|
||||
import './errors.js';
|
||||
import './events.js';
|
||||
import './query.js';
|
||||
import './registry.js';
|
||||
import './runtime.js';
|
||||
import './tx.js';
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api-augment authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '@polkadot/types-augment/registry/substrate';
|
||||
|
||||
@@ -6,22 +6,13 @@
|
||||
import '@polkadot/api-base/types/calls';
|
||||
|
||||
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
|
||||
import type { Bytes, Null, Option, Result, Vec, u32 } from '@polkadot/types-codec';
|
||||
import type { Bytes, Null, Option, Result, Struct, Text, Vec, bool, u128, u32, u64 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
|
||||
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
|
||||
import type { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||
import type { CodeSource, CodeUploadResult, ContractExecResult, ContractInstantiateResult } from '@polkadot/types/interfaces/contracts';
|
||||
import type { OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
|
||||
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
|
||||
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, Weight, WeightV2 } from '@polkadot/types/interfaces/runtime';
|
||||
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
||||
import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
|
||||
import type { AccountId32, H256, RuntimeCall, Slot } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSystemEventRecord, PalletContractsPrimitivesCode, PalletContractsPrimitivesCodeUploadReturnValue, PalletContractsPrimitivesContractAccessError, PalletContractsPrimitivesContractResult, PalletContractsPrimitivesExecReturnValue, PalletContractsPrimitivesStorageDeposit, PalletContractsWasmDeterminism, PalletRevivePrimitivesCode, PalletRevivePrimitivesCodeUploadReturnValue, PalletRevivePrimitivesContractAccessError, PalletRevivePrimitivesContractResult, PalletRevivePrimitivesExecReturnValue, PalletRevivePrimitivesStorageDeposit, PalletTransactionPaymentFeeDetails, PalletTransactionPaymentRuntimeDispatchInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeConfiguration, SpConsensusBabeEpoch, SpConsensusBeefyDoubleVotingProof, SpConsensusBeefyEcdsaCryptoPublic, SpConsensusBeefyForkVotingProofOpaqueValue, SpConsensusBeefyFutureBlockVotingProof, SpConsensusBeefyValidatorSet, SpConsensusGrandpaAppPublic, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpCoreCryptoKeyTypeId, SpInherentsCheckInherentsResult, SpInherentsInherentData, SpMixnetMixnode, SpMixnetMixnodesErr, SpMixnetSessionStatus, SpMmrPrimitivesError, SpMmrPrimitivesLeafProof, SpRuntimeBlock, SpRuntimeDispatchError, SpRuntimeExtrinsicInclusionMode, SpRuntimeHeader, SpRuntimeTransactionValidityTransactionSource, SpRuntimeTransactionValidityTransactionValidityError, SpRuntimeTransactionValidityValidTransaction, SpStatementStoreRuntimeApiInvalidStatement, SpStatementStoreRuntimeApiStatementSource, SpStatementStoreRuntimeApiValidStatement, SpStatementStoreStatement, SpVersionRuntimeVersion, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
|
||||
import type { IExtrinsic, Observable } from '@polkadot/types/types';
|
||||
|
||||
export type __AugmentedCall<ApiType extends ApiTypes> = AugmentedCall<ApiType>;
|
||||
@@ -29,223 +20,430 @@ export type __DecoratedCallBase<ApiType extends ApiTypes> = DecoratedCallBase<Ap
|
||||
|
||||
declare module '@polkadot/api-base/types/calls' {
|
||||
interface AugmentedCalls<ApiType extends ApiTypes> {
|
||||
/** 0xbc9d89904f5b923f/1 */
|
||||
/** 0xbc9d89904f5b923f/ */
|
||||
accountNonceApi: {
|
||||
/**
|
||||
* The API to query account nonce (aka transaction index)
|
||||
* Get current account nonce of given `AccountId`.
|
||||
**/
|
||||
accountNonce: AugmentedCall<ApiType, (accountId: AccountId | string | Uint8Array) => Observable<Index>>;
|
||||
accountNonce: AugmentedCall<ApiType, (account: AccountId32 | string | Uint8Array) => Observable<u32>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x687ad44ad37f03c2/1 */
|
||||
/** 0x8a8047a53a8277ec/ */
|
||||
assetConversionApi: {
|
||||
/**
|
||||
* Returns the size of the liquidity pool for the given asset pair.
|
||||
**/
|
||||
getReserves: AugmentedCall<ApiType, (asset1: FrameSupportTokensFungibleUnionOfNativeOrWithId | { Native: any } | { WithId: any } | string | Uint8Array, asset2: FrameSupportTokensFungibleUnionOfNativeOrWithId | { Native: any } | { WithId: any } | string | Uint8Array) => Observable<Option<ITuple<[u128, u128]>>>>;
|
||||
/**
|
||||
* Provides a quote for [`Pallet::swap_exact_tokens_for_tokens`].,, Note that the price may have changed by the time the transaction is executed., (Use `amount_out_min` to control slippage.)
|
||||
**/
|
||||
quotePriceExactTokensForTokens: AugmentedCall<ApiType, (asset1: FrameSupportTokensFungibleUnionOfNativeOrWithId | { Native: any } | { WithId: any } | string | Uint8Array, asset2: FrameSupportTokensFungibleUnionOfNativeOrWithId | { Native: any } | { WithId: any } | string | Uint8Array, amount: u128 | AnyNumber | Uint8Array, include_fee: bool | boolean | Uint8Array) => Observable<Option<u128>>>;
|
||||
/**
|
||||
* Provides a quote for [`Pallet::swap_tokens_for_exact_tokens`].,, Note that the price may have changed by the time the transaction is executed., (Use `amount_in_max` to control slippage.)
|
||||
**/
|
||||
quotePriceTokensForExactTokens: AugmentedCall<ApiType, (asset1: FrameSupportTokensFungibleUnionOfNativeOrWithId | { Native: any } | { WithId: any } | string | Uint8Array, asset2: FrameSupportTokensFungibleUnionOfNativeOrWithId | { Native: any } | { WithId: any } | string | Uint8Array, amount: u128 | AnyNumber | Uint8Array, include_fee: bool | boolean | Uint8Array) => Observable<Option<u128>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x8453b50b22293977/ */
|
||||
assetsApi: {
|
||||
/**
|
||||
* Returns the list of `AssetId`s and corresponding balance that an `AccountId` has.
|
||||
**/
|
||||
accountBalances: AugmentedCall<ApiType, (account: AccountId32 | string | Uint8Array) => Observable<Vec<ITuple<[u32, u128]>>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x687ad44ad37f03c2/ */
|
||||
authorityDiscoveryApi: {
|
||||
/**
|
||||
* Retrieve authority identifiers of the current and next authority set.
|
||||
**/
|
||||
authorities: AugmentedCall<ApiType, () => Observable<Vec<AuthorityId>>>;
|
||||
authorities: AugmentedCall<ApiType, () => Observable<Vec<SpAuthorityDiscoveryAppPublic>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xcbca25e39f142387/2 */
|
||||
/** 0xcbca25e39f142387/ */
|
||||
babeApi: {
|
||||
/**
|
||||
* Return the genesis configuration for BABE. The configuration is only read on genesis.
|
||||
* Return the configuration for BABE.
|
||||
**/
|
||||
configuration: AugmentedCall<ApiType, () => Observable<BabeGenesisConfiguration>>;
|
||||
configuration: AugmentedCall<ApiType, () => Observable<SpConsensusBabeBabeConfiguration>>;
|
||||
/**
|
||||
* Returns information regarding the current epoch.
|
||||
**/
|
||||
currentEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
|
||||
currentEpoch: AugmentedCall<ApiType, () => Observable<SpConsensusBabeEpoch>>;
|
||||
/**
|
||||
* Returns the slot that started the current epoch.
|
||||
**/
|
||||
currentEpochStart: AugmentedCall<ApiType, () => Observable<Slot>>;
|
||||
/**
|
||||
* Generates a proof of key ownership for the given authority in the current epoch.
|
||||
* Generates a proof of key ownership for the given authority in the, current epoch. An example usage of this module is coupled with the, session historical module to prove that a given authority key is, tied to a given staking identity during a specific session. Proofs, of key ownership are necessary for submitting equivocation reports., NOTE: even though the API takes a `slot` as parameter the current, implementations ignores this parameter and instead relies on this, method being called at the correct block height, i.e. any point at, which the epoch for the given slot is live on-chain. Future, implementations will instead use indexed data through an offchain, worker, not requiring older states to be available.
|
||||
**/
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (slot: Slot | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (slot: Slot | AnyNumber | Uint8Array, authority_id: SpConsensusBabeAppPublic | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Returns information regarding the next epoch (which was already previously announced).
|
||||
* Returns information regarding the next epoch (which was already, previously announced).
|
||||
**/
|
||||
nextEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
|
||||
nextEpoch: AugmentedCall<ApiType, () => Observable<SpConsensusBabeEpoch>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report an equivocation.
|
||||
* Submits an unsigned extrinsic to report an equivocation. The caller, must provide the equivocation proof and a key ownership proof, (should be obtained using `generate_key_ownership_proof`). The, extrinsic will be unsigned and should only be accepted for local, authorship (not to be broadcast to the network). This method returns, `None` when creation of the extrinsic fails, e.g. if equivocation, reporting is disabled for the given runtime (i.e. this method is, hardcoded to return `None`). Only useful in an offchain context.
|
||||
**/
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: BabeEquivocationProof | { offender?: any; slotNumber?: any; firstHeader?: any; secondHeader?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocation_proof: SpConsensusSlotsEquivocationProof | { offender?: any; slot?: any; firstHeader?: any; secondHeader?: any } | string | Uint8Array, key_owner_proof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x40fe3ad401f8959a/6 */
|
||||
/** 0x49eaaf1b548a0cb0/ */
|
||||
beefyApi: {
|
||||
/**
|
||||
* Return the block number where BEEFY consensus is enabled/started
|
||||
**/
|
||||
beefyGenesis: AugmentedCall<ApiType, () => Observable<Option<u32>>>;
|
||||
/**
|
||||
* Generates a proof that the `prev_block_number` is part of the canonical chain at, `best_known_block_number`.
|
||||
**/
|
||||
generateAncestryProof: AugmentedCall<ApiType, (prev_block_number: u32 | AnyNumber | Uint8Array, best_known_block_number: Option<u32> | null | Uint8Array | u32 | AnyNumber) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Generates a proof of key ownership for the given authority in the, given set. An example usage of this module is coupled with the, session historical module to prove that a given authority key is, tied to a given staking identity during a specific session. Proofs, of key ownership are necessary for submitting equivocation reports., NOTE: even though the API takes a `set_id` as parameter the current, implementations ignores this parameter and instead relies on this, method being called at the correct block height, i.e. any point at, which the given set id is live on-chain. Future implementations will, instead use indexed data through an offchain worker, not requiring, older states to be available.
|
||||
**/
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (set_id: u64 | AnyNumber | Uint8Array, authority_id: SpConsensusBeefyEcdsaCryptoPublic | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report a double voting equivocation. The caller, must provide the double voting proof and a key ownership proof, (should be obtained using `generate_key_ownership_proof`). The, extrinsic will be unsigned and should only be accepted for local, authorship (not to be broadcast to the network). This method returns, `None` when creation of the extrinsic fails, e.g. if equivocation, reporting is disabled for the given runtime (i.e. this method is, hardcoded to return `None`). Only useful in an offchain context.
|
||||
**/
|
||||
submitReportDoubleVotingUnsignedExtrinsic: AugmentedCall<ApiType, (equivocation_proof: SpConsensusBeefyDoubleVotingProof | { first?: any; second?: any } | string | Uint8Array, key_owner_proof: Bytes | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report a fork voting equivocation. The caller, must provide the fork voting proof (the ancestry proof should be obtained using, `generate_ancestry_proof`) and a key ownership proof (should be obtained using, `generate_key_ownership_proof`). The extrinsic will be unsigned and should only, be accepted for local authorship (not to be broadcast to the network). This method, returns `None` when creation of the extrinsic fails, e.g. if equivocation, reporting is disabled for the given runtime (i.e. this method is, hardcoded to return `None`). Only useful in an offchain context.
|
||||
**/
|
||||
submitReportForkVotingUnsignedExtrinsic: AugmentedCall<ApiType, (equivocation_proof: SpConsensusBeefyForkVotingProofOpaqueValue | { vote?: any; ancestryProof?: any; header?: any } | string | Uint8Array, key_owner_proof: Bytes | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report a future block voting equivocation. The caller, must provide the future block voting proof and a key ownership proof, (should be obtained using `generate_key_ownership_proof`)., The extrinsic will be unsigned and should only be accepted for local, authorship (not to be broadcast to the network). This method returns, `None` when creation of the extrinsic fails, e.g. if equivocation, reporting is disabled for the given runtime (i.e. this method is, hardcoded to return `None`). Only useful in an offchain context.
|
||||
**/
|
||||
submitReportFutureBlockVotingUnsignedExtrinsic: AugmentedCall<ApiType, (equivocation_proof: SpConsensusBeefyFutureBlockVotingProof | { vote?: any } | string | Uint8Array, key_owner_proof: Bytes | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Return the current active BEEFY validator set
|
||||
**/
|
||||
validatorSet: AugmentedCall<ApiType, () => Observable<Option<SpConsensusBeefyValidatorSet>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x40fe3ad401f8959a/ */
|
||||
blockBuilder: {
|
||||
/**
|
||||
* Apply the given extrinsic.
|
||||
* Apply the given extrinsic.,, Returns an inclusion outcome which specifies if this extrinsic is included in, this block or not.
|
||||
**/
|
||||
applyExtrinsic: AugmentedCall<ApiType, (extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<ApplyExtrinsicResult>>;
|
||||
applyExtrinsic: AugmentedCall<ApiType, (extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<Result<Result<Null, SpRuntimeDispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>>;
|
||||
/**
|
||||
* Check that the inherents are valid.
|
||||
* Check that the inherents are valid. The inherent data will vary from chain to chain.
|
||||
**/
|
||||
checkInherents: AugmentedCall<ApiType, (block: Block | { header?: any; extrinsics?: any } | string | Uint8Array, data: InherentData | { data?: any } | string | Uint8Array) => Observable<CheckInherentsResult>>;
|
||||
checkInherents: AugmentedCall<ApiType, (block: SpRuntimeBlock | { header?: any; extrinsics?: any } | string | Uint8Array, data: SpInherentsInherentData | { data?: any } | string | Uint8Array) => Observable<SpInherentsCheckInherentsResult>>;
|
||||
/**
|
||||
* Finish the current block.
|
||||
**/
|
||||
finalizeBlock: AugmentedCall<ApiType, () => Observable<Header>>;
|
||||
finalizeBlock: AugmentedCall<ApiType, () => Observable<SpRuntimeHeader>>;
|
||||
/**
|
||||
* Generate inherent extrinsics.
|
||||
* Generate inherent extrinsics. The inherent data will vary from chain to chain.
|
||||
**/
|
||||
inherentExtrinsics: AugmentedCall<ApiType, (inherent: InherentData | { data?: any } | string | Uint8Array) => Observable<Vec<Extrinsic>>>;
|
||||
inherentExtrinsics: AugmentedCall<ApiType, (inherent: SpInherentsInherentData | { data?: any } | string | Uint8Array) => Observable<Vec<Bytes>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x68b66ba122c93fa7/2 */
|
||||
/** 0x68b66ba122c93fa7/ */
|
||||
contractsApi: {
|
||||
/**
|
||||
* Perform a call from a specified account to a given contract.
|
||||
* Perform a call from a specified account to a given contract.,, See [`crate::Pallet::bare_call`].
|
||||
**/
|
||||
call: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, dest: AccountId | string | Uint8Array, value: Balance | AnyNumber | Uint8Array, gasLimit: Option<WeightV2> | null | Uint8Array | WeightV2 | { refTime?: any; proofSize?: any } | string, storageDepositLimit: Option<Balance> | null | Uint8Array | Balance | AnyNumber, inputData: Bytes | string | Uint8Array) => Observable<ContractExecResult>>;
|
||||
call: AugmentedCall<ApiType, (origin: AccountId32 | string | Uint8Array, dest: AccountId32 | string | Uint8Array, value: u128 | AnyNumber | Uint8Array, gas_limit: Option<SpWeightsWeightV2Weight> | null | Uint8Array | SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string, storage_deposit_limit: Option<u128> | null | Uint8Array | u128 | AnyNumber, input_data: Bytes | string | Uint8Array) => Observable<{
|
||||
readonly gasConsumed: SpWeightsWeightV2Weight;
|
||||
readonly gasRequired: SpWeightsWeightV2Weight;
|
||||
readonly storageDeposit: PalletContractsPrimitivesStorageDeposit;
|
||||
readonly debugMessage: Bytes;
|
||||
readonly result: Result<PalletContractsPrimitivesExecReturnValue, SpRuntimeDispatchError>;
|
||||
readonly events: Option<Vec<FrameSystemEventRecord>>;
|
||||
} & Struct>>;
|
||||
/**
|
||||
* Query a given storage key in a given contract.
|
||||
* Query a given storage key in a given contract.,, Returns `Ok(Some(Vec<u8>))` if the storage value exists under the given key in the, specified account and `Ok(None)` if it doesn't. If the account specified by the address, doesn't exist, or doesn't have a contract then `Err` is returned.
|
||||
**/
|
||||
getStorage: AugmentedCall<ApiType, (address: AccountId | string | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
getStorage: AugmentedCall<ApiType, (address: AccountId32 | string | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Result<Option<Bytes>, PalletContractsPrimitivesContractAccessError>>>;
|
||||
/**
|
||||
* Instantiate a new contract.
|
||||
* Instantiate a new contract.,, See `[crate::Pallet::bare_instantiate]`.
|
||||
**/
|
||||
instantiate: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, value: Balance | AnyNumber | Uint8Array, gasLimit: Option<WeightV2> | null | Uint8Array | WeightV2 | { refTime?: any; proofSize?: any } | string, storageDepositLimit: Option<Balance> | null | Uint8Array | Balance | AnyNumber, code: CodeSource | { Upload: any } | { Existing: any } | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => Observable<ContractInstantiateResult>>;
|
||||
instantiate: AugmentedCall<ApiType, (origin: AccountId32 | string | Uint8Array, value: u128 | AnyNumber | Uint8Array, gas_limit: Option<SpWeightsWeightV2Weight> | null | Uint8Array | SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string, storage_deposit_limit: Option<u128> | null | Uint8Array | u128 | AnyNumber, code: PalletContractsPrimitivesCode | { Upload: any } | { Existing: any } | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => Observable<PalletContractsPrimitivesContractResult>>;
|
||||
/**
|
||||
* Upload new code without instantiating a contract from it.
|
||||
* Upload new code without instantiating a contract from it.,, See [`crate::Pallet::bare_upload_code`].
|
||||
**/
|
||||
uploadCode: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, code: Bytes | string | Uint8Array, storageDepositLimit: Option<Balance> | null | Uint8Array | Balance | AnyNumber) => Observable<CodeUploadResult>>;
|
||||
uploadCode: AugmentedCall<ApiType, (origin: AccountId32 | string | Uint8Array, code: Bytes | string | Uint8Array, storage_deposit_limit: Option<u128> | null | Uint8Array | u128 | AnyNumber, determinism: PalletContractsWasmDeterminism | 'Enforced' | 'Relaxed' | number | Uint8Array) => Observable<Result<PalletContractsPrimitivesCodeUploadReturnValue, SpRuntimeDispatchError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xdf6acb689907609b/4 */
|
||||
/** 0xdf6acb689907609b/ */
|
||||
core: {
|
||||
/**
|
||||
* Execute the given block.
|
||||
**/
|
||||
executeBlock: AugmentedCall<ApiType, (block: Block | { header?: any; extrinsics?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
executeBlock: AugmentedCall<ApiType, (block: SpRuntimeBlock | { header?: any; extrinsics?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Initialize a block with the given header.
|
||||
* Initialize a block with the given header and return the runtime executive mode.
|
||||
**/
|
||||
initializeBlock: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
initializeBlock: AugmentedCall<ApiType, (header: SpRuntimeHeader | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<SpRuntimeExtrinsicInclusionMode>>;
|
||||
/**
|
||||
* Returns the version of the runtime.
|
||||
**/
|
||||
version: AugmentedCall<ApiType, () => Observable<RuntimeVersion>>;
|
||||
version: AugmentedCall<ApiType, () => Observable<SpVersionRuntimeVersion>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xed99c5acb25eedf5/3 */
|
||||
/** 0xfbc577b9d747efd6/ */
|
||||
genesisBuilder: {
|
||||
/**
|
||||
* Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the, storage.,, In the case of a FRAME-based runtime, this function deserializes the full `RuntimeGenesisConfig` from the given JSON blob and, puts it into the storage. If the provided JSON blob is incorrect or incomplete or the, deserialization fails, an error is returned.,, Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no, defaults will be used.
|
||||
**/
|
||||
buildState: AugmentedCall<ApiType, (json: Bytes | string | Uint8Array) => Observable<Result<Null, Text>>>;
|
||||
/**
|
||||
* Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by, `id`.,, If `id` is `None` the function returns JSON blob representation of the default, `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default, `RuntimeGenesisConfig`.,, Otherwise function returns a JSON representation of the built-in, named, `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not, exist. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of, (potentially nested) key-value pairs that are intended for customizing the default, runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation, of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can, be used in `build_state` method.
|
||||
**/
|
||||
getPreset: AugmentedCall<ApiType, (id: Option<Text> | null | Uint8Array | Text | string) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Returns a list of identifiers for available builtin `RuntimeGenesisConfig` presets.,, The presets from the list can be queried with [`GenesisBuilder::get_preset`] method. If, no named presets are provided by the runtime the list is empty.
|
||||
**/
|
||||
presetNames: AugmentedCall<ApiType, () => Observable<Vec<Text>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xed99c5acb25eedf5/ */
|
||||
grandpaApi: {
|
||||
/**
|
||||
* Get current GRANDPA authority set id.
|
||||
**/
|
||||
currentSetId: AugmentedCall<ApiType, () => Observable<SetId>>;
|
||||
currentSetId: AugmentedCall<ApiType, () => Observable<u64>>;
|
||||
/**
|
||||
* Generates a proof of key ownership for the given authority in the given set.
|
||||
* Generates a proof of key ownership for the given authority in the, given set. An example usage of this module is coupled with the, session historical module to prove that a given authority key is, tied to a given staking identity during a specific session. Proofs, of key ownership are necessary for submitting equivocation reports., NOTE: even though the API takes a `set_id` as parameter the current, implementations ignore this parameter and instead rely on this, method being called at the correct block height, i.e. any point at, which the given set id is live on-chain. Future implementations will, instead use indexed data through an offchain worker, not requiring, older states to be available.
|
||||
**/
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (setId: SetId | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||
generateKeyOwnershipProof: AugmentedCall<ApiType, (set_id: u64 | AnyNumber | Uint8Array, authority_id: SpConsensusGrandpaAppPublic | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed.
|
||||
* Get the current GRANDPA authorities and weights. This should not change except, for when changes are scheduled and the corresponding delay has passed.,, When called at block B, it will return the set of authorities that should be, used to finalize descendants of this block (B+1, B+2, ...). The block B itself, is finalized by the authorities from block B-1.
|
||||
**/
|
||||
grandpaAuthorities: AugmentedCall<ApiType, () => Observable<AuthorityList>>;
|
||||
grandpaAuthorities: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[SpConsensusGrandpaAppPublic, u64]>>>>;
|
||||
/**
|
||||
* Submits an unsigned extrinsic to report an equivocation.
|
||||
* Submits an unsigned extrinsic to report an equivocation. The caller, must provide the equivocation proof and a key ownership proof, (should be obtained using `generate_key_ownership_proof`). The, extrinsic will be unsigned and should only be accepted for local, authorship (not to be broadcast to the network). This method returns, `None` when creation of the extrinsic fails, e.g. if equivocation, reporting is disabled for the given runtime (i.e. this method is, hardcoded to return `None`). Only useful in an offchain context.
|
||||
**/
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: GrandpaEquivocationProof | { setId?: any; equivocation?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocation_proof: SpConsensusGrandpaEquivocationProof | { setId?: any; equivocation?: any } | string | Uint8Array, key_owner_proof: Bytes | string | Uint8Array) => Observable<Option<Null>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37e397fc7c91f5e4/1 */
|
||||
/** 0x37e397fc7c91f5e4/ */
|
||||
metadata: {
|
||||
/**
|
||||
* Returns the metadata of a runtime
|
||||
* Returns the metadata of a runtime.
|
||||
**/
|
||||
metadata: AugmentedCall<ApiType, () => Observable<OpaqueMetadata>>;
|
||||
/**
|
||||
* Returns the metadata at a given version.,, If the given `version` isn't supported, this will return `None`., Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime.
|
||||
**/
|
||||
metadataAtVersion: AugmentedCall<ApiType, (version: u32 | AnyNumber | Uint8Array) => Observable<Option<OpaqueMetadata>>>;
|
||||
/**
|
||||
* Returns the supported metadata versions.,, This can be used to call `metadata_at_version`.
|
||||
**/
|
||||
metadataVersions: AugmentedCall<ApiType, () => Observable<Vec<u32>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x91d5df18b0d2cf58/1 */
|
||||
/** 0x6fd7c327202e4a8d/ */
|
||||
mixnetApi: {
|
||||
/**
|
||||
* Get the mixnode set for the current session.
|
||||
**/
|
||||
currentMixnodes: AugmentedCall<ApiType, () => Observable<Result<Vec<SpMixnetMixnode>, SpMixnetMixnodesErr>>>;
|
||||
/**
|
||||
* Try to register a mixnode for the next session.,, If a registration extrinsic is submitted, `true` is returned. The caller should avoid, calling `maybe_register` again for a few blocks, to give the submitted extrinsic a, chance to get included.,, With the above exception, `maybe_register` is designed to be called every block. Most, of the time it will not do anything, for example:,, - If it is not an appropriate time to submit a registration extrinsic., - If the local node has already registered a mixnode for the next session., - If the local node is not permitted to register a mixnode for the next session.,, `session_index` should match `session_status().current_index`; if it does not, `false`, is returned immediately.
|
||||
**/
|
||||
maybeRegister: AugmentedCall<ApiType, (session_index: u32 | AnyNumber | Uint8Array, mixnode: SpMixnetMixnode | { kxPublic?: any; peerId?: any; externalAddresses?: any } | string | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Get the mixnode set for the previous session.
|
||||
**/
|
||||
prevMixnodes: AugmentedCall<ApiType, () => Observable<Result<Vec<SpMixnetMixnode>, SpMixnetMixnodesErr>>>;
|
||||
/**
|
||||
* Get the index and phase of the current session.
|
||||
**/
|
||||
sessionStatus: AugmentedCall<ApiType, () => Observable<SpMixnetSessionStatus>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x91d5df18b0d2cf58/ */
|
||||
mmrApi: {
|
||||
/**
|
||||
* Generate MMR proof for a series of leaves under given indices.
|
||||
* Generate MMR proof for a series of block numbers. If `best_known_block_number = Some(n)`,, use historical MMR state at given block height `n`. Else, use current MMR state.
|
||||
**/
|
||||
generateBatchProof: AugmentedCall<ApiType, (leafIndices: Vec<MmrLeafIndex> | (MmrLeafIndex | AnyNumber | Uint8Array)[]) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
|
||||
generateProof: AugmentedCall<ApiType, (block_numbers: Vec<u32> | (u32 | AnyNumber | Uint8Array)[], best_known_block_number: Option<u32> | null | Uint8Array | u32 | AnyNumber) => Observable<Result<ITuple<[Vec<Bytes>, SpMmrPrimitivesLeafProof]>, SpMmrPrimitivesError>>>;
|
||||
/**
|
||||
* Generate MMR proof for a leaf under given index.
|
||||
* Return the number of MMR blocks in the chain.
|
||||
**/
|
||||
generateProof: AugmentedCall<ApiType, (leafIndex: MmrLeafIndex | AnyNumber | Uint8Array) => Observable<Result<ITuple<[MmrEncodableOpaqueLeaf, MmrProof]>, MmrError>>>;
|
||||
mmrLeafCount: AugmentedCall<ApiType, () => Observable<Result<u64, SpMmrPrimitivesError>>>;
|
||||
/**
|
||||
* Return the on-chain MMR root hash.
|
||||
**/
|
||||
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
|
||||
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<H256, SpMmrPrimitivesError>>>;
|
||||
/**
|
||||
* Verify MMR proof against on-chain MMR for a batch of leaves.
|
||||
* Verify MMR proof against on-chain MMR for a batch of leaves.,, Note this function will use on-chain MMR root hash and check if the proof matches the hash., Note, the leaves should be sorted such that corresponding leaves and leaf indices have the, same position in both the `leaves` vector and the `leaf_indices` vector contained in the [LeafProof]
|
||||
**/
|
||||
verifyBatchProof: AugmentedCall<ApiType, (leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
verifyProof: AugmentedCall<ApiType, (leaves: Vec<Bytes> | (Bytes | string | Uint8Array)[], proof: SpMmrPrimitivesLeafProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<Null, SpMmrPrimitivesError>>>;
|
||||
/**
|
||||
* Verify MMR proof against given root hash or a batch of leaves.
|
||||
* Verify MMR proof against given root hash for a batch of leaves.,, Note this function does not require any on-chain storage - the, proof is verified against given MMR root hash.,, Note, the leaves should be sorted such that corresponding leaves and leaf indices have the, same position in both the `leaves` vector and the `leaf_indices` vector contained in the [LeafProof]
|
||||
**/
|
||||
verifyBatchProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
/**
|
||||
* Verify MMR proof against on-chain MMR.
|
||||
**/
|
||||
verifyProof: AugmentedCall<ApiType, (leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
/**
|
||||
* Verify MMR proof against given root hash.
|
||||
**/
|
||||
verifyProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||
verifyProofStateless: AugmentedCall<ApiType, (root: H256 | string | Uint8Array, leaves: Vec<Bytes> | (Bytes | string | Uint8Array)[], proof: SpMmrPrimitivesLeafProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<Null, SpMmrPrimitivesError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x17a6bc0d0062aeb3/1 */
|
||||
/** 0x899a250cbe84f250/ */
|
||||
nftsApi: {
|
||||
/**
|
||||
*
|
||||
**/
|
||||
attribute: AugmentedCall<ApiType, (collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
*
|
||||
**/
|
||||
collectionAttribute: AugmentedCall<ApiType, (collection: u32 | AnyNumber | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
*
|
||||
**/
|
||||
collectionOwner: AugmentedCall<ApiType, (collection: u32 | AnyNumber | Uint8Array) => Observable<Option<AccountId32>>>;
|
||||
/**
|
||||
*
|
||||
**/
|
||||
customAttribute: AugmentedCall<ApiType, (account: AccountId32 | string | Uint8Array, collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
*
|
||||
**/
|
||||
owner: AugmentedCall<ApiType, (collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array) => Observable<Option<AccountId32>>>;
|
||||
/**
|
||||
*
|
||||
**/
|
||||
systemAttribute: AugmentedCall<ApiType, (collection: u32 | AnyNumber | Uint8Array, item: Option<u32> | null | Uint8Array | u32 | AnyNumber, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x17a6bc0d0062aeb3/ */
|
||||
nominationPoolsApi: {
|
||||
/**
|
||||
* Returns the pending rewards for the given member.
|
||||
* Returns the equivalent points of `new_funds` for a given pool.
|
||||
**/
|
||||
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
|
||||
balanceToPoints: AugmentedCall<ApiType, (pool_id: u32 | AnyNumber | Uint8Array, new_funds: u128 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Returns true if the delegated funds of the pool `member` needs migration.,, Once a pool has successfully migrated to the strategy, [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake), the funds of the, member can be migrated from pool account to the member's account. Use, [`migrate_delegation`](pallet_nomination_pools::Call::migrate_delegation), to migrate the funds of the pool member.
|
||||
**/
|
||||
memberNeedsDelegateMigration: AugmentedCall<ApiType, (member: AccountId32 | string | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Returns the pending slash for a given pool member.
|
||||
**/
|
||||
memberPendingSlash: AugmentedCall<ApiType, (member: AccountId32 | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Returns the total contribution of a pool member including any balance that is unbonding.
|
||||
**/
|
||||
memberTotalBalance: AugmentedCall<ApiType, (who: AccountId32 | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Returns the pending rewards for the member that the AccountId was given for.
|
||||
**/
|
||||
pendingRewards: AugmentedCall<ApiType, (who: AccountId32 | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Returns the equivalent balance of `points` for a given pool.
|
||||
**/
|
||||
pointsToBalance: AugmentedCall<ApiType, (pool_id: u32 | AnyNumber | Uint8Array, points: u128 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Total balance contributed to the pool.
|
||||
**/
|
||||
poolBalance: AugmentedCall<ApiType, (pool_id: u32 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Returns true if the pool with `pool_id` needs migration.,, This can happen when the `pallet-nomination-pools` has switched to using strategy, [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake) but the pool, still has funds that were staked using the older strategy, [TransferStake](pallet_nomination_pools::adapter::TransferStake). Use, [`migrate_pool_to_delegate_stake`](pallet_nomination_pools::Call::migrate_pool_to_delegate_stake), to migrate the pool.
|
||||
**/
|
||||
poolNeedsDelegateMigration: AugmentedCall<ApiType, (pool_id: u32 | AnyNumber | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Returns the pending slash for a given pool.
|
||||
**/
|
||||
poolPendingSlash: AugmentedCall<ApiType, (pool_id: u32 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xf78b278be53f454c/2 */
|
||||
/** 0xf78b278be53f454c/ */
|
||||
offchainWorkerApi: {
|
||||
/**
|
||||
* Starts the off-chain task for given block header.
|
||||
**/
|
||||
offchainWorker: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
offchainWorker: AugmentedCall<ApiType, (header: SpRuntimeHeader | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xab3c0572291feb8b/1 */
|
||||
/** 0x8c403e5c4a9fd442/ */
|
||||
reviveApi: {
|
||||
/**
|
||||
* Perform a call from a specified account to a given contract.,, See [`crate::Pallet::bare_call`].
|
||||
**/
|
||||
call: AugmentedCall<ApiType, (origin: AccountId32 | string | Uint8Array, dest: AccountId32 | string | Uint8Array, value: u128 | AnyNumber | Uint8Array, gas_limit: Option<SpWeightsWeightV2Weight> | null | Uint8Array | SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string, storage_deposit_limit: Option<u128> | null | Uint8Array | u128 | AnyNumber, input_data: Bytes | string | Uint8Array) => Observable<{
|
||||
readonly gasConsumed: SpWeightsWeightV2Weight;
|
||||
readonly gasRequired: SpWeightsWeightV2Weight;
|
||||
readonly storageDeposit: PalletRevivePrimitivesStorageDeposit;
|
||||
readonly debugMessage: Bytes;
|
||||
readonly result: Result<PalletRevivePrimitivesExecReturnValue, SpRuntimeDispatchError>;
|
||||
readonly events: Option<Vec<FrameSystemEventRecord>>;
|
||||
} & Struct>>;
|
||||
/**
|
||||
* Query a given storage key in a given contract.,, Returns `Ok(Some(Vec<u8>))` if the storage value exists under the given key in the, specified account and `Ok(None)` if it doesn't. If the account specified by the address, doesn't exist, or doesn't have a contract then `Err` is returned.
|
||||
**/
|
||||
getStorage: AugmentedCall<ApiType, (address: AccountId32 | string | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Result<Option<Bytes>, PalletRevivePrimitivesContractAccessError>>>;
|
||||
/**
|
||||
* Instantiate a new contract.,, See `[crate::Pallet::bare_instantiate]`.
|
||||
**/
|
||||
instantiate: AugmentedCall<ApiType, (origin: AccountId32 | string | Uint8Array, value: u128 | AnyNumber | Uint8Array, gas_limit: Option<SpWeightsWeightV2Weight> | null | Uint8Array | SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string, storage_deposit_limit: Option<u128> | null | Uint8Array | u128 | AnyNumber, code: PalletRevivePrimitivesCode | { Upload: any } | { Existing: any } | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => Observable<PalletRevivePrimitivesContractResult>>;
|
||||
/**
|
||||
* Upload new code without instantiating a contract from it.,, See [`crate::Pallet::bare_upload_code`].
|
||||
**/
|
||||
uploadCode: AugmentedCall<ApiType, (origin: AccountId32 | string | Uint8Array, code: Bytes | string | Uint8Array, storage_deposit_limit: Option<u128> | null | Uint8Array | u128 | AnyNumber) => Observable<Result<PalletRevivePrimitivesCodeUploadReturnValue, SpRuntimeDispatchError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xab3c0572291feb8b/ */
|
||||
sessionKeys: {
|
||||
/**
|
||||
* Decode the given public session keys.
|
||||
* Decode the given public session keys.,, Returns the list of public raw public keys + key type.
|
||||
**/
|
||||
decodeSessionKeys: AugmentedCall<ApiType, (encoded: Bytes | string | Uint8Array) => Observable<Option<Vec<ITuple<[Bytes, KeyTypeId]>>>>>;
|
||||
decodeSessionKeys: AugmentedCall<ApiType, (encoded: Bytes | string | Uint8Array) => Observable<Option<Vec<ITuple<[Bytes, SpCoreCryptoKeyTypeId]>>>>>;
|
||||
/**
|
||||
* Generate a set of session keys with optionally using the given seed.
|
||||
* Generate a set of session keys with optionally using the given seed., The keys should be stored within the keystore exposed via runtime, externalities.,, The seed needs to be a valid `utf8` string.,, Returns the concatenated SCALE encoded public keys.
|
||||
**/
|
||||
generateSessionKeys: AugmentedCall<ApiType, (seed: Option<Bytes> | null | Uint8Array | Bytes | string) => Observable<Bytes>>;
|
||||
/**
|
||||
@@ -253,58 +451,88 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xd2bc9897eed08f15/3 */
|
||||
/** 0x18ef58a3b67ba770/ */
|
||||
stakingApi: {
|
||||
/**
|
||||
* Returns the page count of exposures for a validator `account` in a given era.
|
||||
**/
|
||||
erasStakersPageCount: AugmentedCall<ApiType, (era: u32 | AnyNumber | Uint8Array, account: AccountId32 | string | Uint8Array) => Observable<u32>>;
|
||||
/**
|
||||
* Returns the nominations quota for a nominator with a given balance.
|
||||
**/
|
||||
nominationsQuota: AugmentedCall<ApiType, (balance: u128 | AnyNumber | Uint8Array) => Observable<u32>>;
|
||||
/**
|
||||
* Returns true if validator `account` has pages to be claimed for the given era.
|
||||
**/
|
||||
pendingRewards: AugmentedCall<ApiType, (era: u32 | AnyNumber | Uint8Array, account: AccountId32 | string | Uint8Array) => Observable<bool>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xd2bc9897eed08f15/ */
|
||||
taggedTransactionQueue: {
|
||||
/**
|
||||
* Validate the transaction.
|
||||
* Validate the transaction.,, This method is invoked by the transaction pool to learn details about given transaction., The implementation should make sure to verify the correctness of the transaction, against current state. The given `block_hash` corresponds to the hash of the block, that is used as current state.,, Note that this call may be performed by the pool multiple times and transactions, might be verified in any possible order.
|
||||
**/
|
||||
validateTransaction: AugmentedCall<ApiType, (source: TransactionSource | 'InBlock' | 'Local' | 'External' | number | Uint8Array, tx: Extrinsic | IExtrinsic | string | Uint8Array, blockHash: BlockHash | string | Uint8Array) => Observable<TransactionValidity>>;
|
||||
validateTransaction: AugmentedCall<ApiType, (source: SpRuntimeTransactionValidityTransactionSource | 'InBlock' | 'Local' | 'External' | number | Uint8Array, tx: Extrinsic | IExtrinsic | string | Uint8Array, block_hash: H256 | string | Uint8Array) => Observable<Result<SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionValidityError>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37c8bb1350a9a2a8/3 */
|
||||
/** 0x37c8bb1350a9a2a8/ */
|
||||
transactionPaymentApi: {
|
||||
/**
|
||||
* The transaction fee details
|
||||
*
|
||||
**/
|
||||
queryFeeDetails: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
|
||||
queryFeeDetails: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentFeeDetails>>;
|
||||
/**
|
||||
* The transaction info
|
||||
*
|
||||
**/
|
||||
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentRuntimeDispatchInfo>>;
|
||||
/**
|
||||
* Query the output of the current LengthToFee given some input
|
||||
*
|
||||
**/
|
||||
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>>;
|
||||
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Query the output of the current WeightToFee given some input
|
||||
*
|
||||
**/
|
||||
queryWeightToFee: AugmentedCall<ApiType, (weight: Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<Balance>>;
|
||||
queryWeightToFee: AugmentedCall<ApiType, (weight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xf3ff14d5ab527059/3 */
|
||||
/** 0xf3ff14d5ab527059/ */
|
||||
transactionPaymentCallApi: {
|
||||
/**
|
||||
* The call fee details
|
||||
* Query fee details of a given encoded `Call`.
|
||||
**/
|
||||
queryCallFeeDetails: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
|
||||
queryCallFeeDetails: AugmentedCall<ApiType, (call: RuntimeCall | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentFeeDetails>>;
|
||||
/**
|
||||
* The call info
|
||||
* Query information of a dispatch class, weight, and fee of a given encoded `Call`.
|
||||
**/
|
||||
queryCallInfo: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||
queryCallInfo: AugmentedCall<ApiType, (call: RuntimeCall | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<PalletTransactionPaymentRuntimeDispatchInfo>>;
|
||||
/**
|
||||
* Query the output of the current LengthToFee given some input
|
||||
* Query the output of the current `LengthToFee` given some input.
|
||||
**/
|
||||
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<Balance>>;
|
||||
queryLengthToFee: AugmentedCall<ApiType, (length: u32 | AnyNumber | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Query the output of the current WeightToFee given some input
|
||||
* Query the output of the current `WeightToFee` given some input.
|
||||
**/
|
||||
queryWeightToFee: AugmentedCall<ApiType, (weight: Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<Balance>>;
|
||||
queryWeightToFee: AugmentedCall<ApiType, (weight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => Observable<u128>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xbe9fb0c91a8046cf/ */
|
||||
validateStatement: {
|
||||
/**
|
||||
* Validate the statement.
|
||||
**/
|
||||
validateStatement: AugmentedCall<ApiType, (source: SpStatementStoreRuntimeApiStatementSource | 'Chain' | 'Network' | 'Local' | number | Uint8Array, statement: SpStatementStoreStatement | { proof?: any; decryptionKey?: any; channel?: any; priority?: any; numTopics?: any; topics?: any; data?: any } | string | Uint8Array) => Observable<Result<SpStatementStoreRuntimeApiValidStatement, SpStatementStoreRuntimeApiInvalidStatement>>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
|
||||
+2506
-1085
File diff suppressed because it is too large
Load Diff
@@ -7,6 +7,7 @@
|
||||
},
|
||||
"exclude": [
|
||||
"**/*.spec.ts",
|
||||
"**/mod.ts",
|
||||
"**/kusama/*.ts",
|
||||
"**/polkadot/*.ts"
|
||||
],
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "..",
|
||||
"outDir": "./build",
|
||||
"rootDir": "./src",
|
||||
"emitDeclarationOnly": false,
|
||||
"noEmit": true
|
||||
},
|
||||
"include": [
|
||||
"**/kusama/*.spec.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api-augment/tsconfig.build.json" },
|
||||
{ "path": "../api-augment/tsconfig.kusama.json" },
|
||||
{ "path": "../api-base/tsconfig.build.json" },
|
||||
{ "path": "../rpc-augment/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" },
|
||||
{ "path": "../types-augment/tsconfig.build.json" },
|
||||
{ "path": "../types-support/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
@@ -1,14 +1,12 @@
|
||||
{
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"contributors": [],
|
||||
"description": "Interfaces for interacting with contracts and contract ABIs",
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
"node": ">=18"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-base#readme",
|
||||
"license": "Apache-2.0",
|
||||
"maintainers": [],
|
||||
"name": "@polkadot/api-base",
|
||||
"repository": {
|
||||
"directory": "packages/api-base",
|
||||
@@ -16,17 +14,17 @@
|
||||
"url": "https://github.com/polkadot-js/api.git"
|
||||
},
|
||||
"sideEffects": [
|
||||
"./detectPackage.js",
|
||||
"./detectPackage.cjs"
|
||||
"./packageDetect.js",
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.13.2",
|
||||
"version": "15.0.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@polkadot/rpc-core": "9.13.2",
|
||||
"@polkadot/types": "9.13.2",
|
||||
"@polkadot/util": "^10.3.1",
|
||||
"rxjs": "^7.8.0"
|
||||
"@polkadot/rpc-core": "15.0.2",
|
||||
"@polkadot/types": "15.0.2",
|
||||
"@polkadot/util": "^13.2.3",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.8.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api-base authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { packageInfo } from './packageInfo';
|
||||
export { packageInfo } from './packageInfo.js';
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
// Copyright 2017-2023 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { packageInfo as rpcInfo } from '@polkadot/rpc-core/packageInfo';
|
||||
import { packageInfo as typesInfo } from '@polkadot/types/packageInfo';
|
||||
|
||||
export default [rpcInfo, typesInfo];
|
||||
@@ -1,11 +0,0 @@
|
||||
// Copyright 2017-2023 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
import { detectPackage } from '@polkadot/util';
|
||||
|
||||
import others from './detectOther';
|
||||
import { packageInfo } from './packageInfo';
|
||||
|
||||
detectPackage(packageInfo, null, others);
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright 2017-2023 @polkadot/api-base authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import './detectPackage';
|
||||
import './packageDetect.js';
|
||||
|
||||
export * from './bundle';
|
||||
export * from './bundle.js';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api-base authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export * from './index';
|
||||
export * from './index.js';
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// Copyright 2017-2024 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
// (packageInfo imports will be kept as-is, user-editable)
|
||||
|
||||
import { packageInfo as rpcInfo } from '@polkadot/rpc-core/packageInfo';
|
||||
import { packageInfo as typesInfo } from '@polkadot/types/packageInfo';
|
||||
import { detectPackage } from '@polkadot/util';
|
||||
|
||||
import { packageInfo } from './packageInfo.js';
|
||||
|
||||
detectPackage(packageInfo, null, [rpcInfo, typesInfo]);
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright 2017-2023 @polkadot/api-base authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '9.13.2' };
|
||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '15.0.2' };
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api-base authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
@@ -13,7 +13,7 @@ export interface ApiInterfaceRx {
|
||||
call: QueryableCalls<'rxjs'>;
|
||||
consts: QueryableConsts<'rxjs'>;
|
||||
extrinsicType: number;
|
||||
genesisHash?: Hash;
|
||||
genesisHash?: Hash | undefined;
|
||||
hasSubscriptions: boolean;
|
||||
registry: Registry;
|
||||
runtimeMetadata: Metadata;
|
||||
@@ -22,7 +22,7 @@ export interface ApiInterfaceRx {
|
||||
queryMulti: QueryableStorageMulti<'rxjs'>;
|
||||
rpc: DecoratedRpc<'rxjs', RpcInterface>;
|
||||
tx: SubmittableExtrinsics<'rxjs'>;
|
||||
signer?: Signer;
|
||||
signer?: Signer | undefined;
|
||||
|
||||
callAt: (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion) => Observable<QueryableCalls<'rxjs'>>;
|
||||
queryAt: (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion) => Observable<QueryableStorage<'rxjs'>>;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api-base authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
@@ -62,12 +62,17 @@ export interface PaginationOptions<A = unknown> {
|
||||
startKey?: string;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export type DecorateMethod<ApiType extends ApiTypes, T = any> =
|
||||
export type DecorateMethod<_ApiType extends ApiTypes, T = any> =
|
||||
<M extends (...args: any[]) => Observable<any>>(method: M, options?: DecorateMethodOptions) => T;
|
||||
|
||||
type AsCodec<R extends Codec | any> = R extends Codec
|
||||
type AsCodec<R> = R extends Codec
|
||||
? R
|
||||
: Codec;
|
||||
|
||||
export type ReturnCodec<F extends AnyFunction> = AsCodec<ObsInnerType<ReturnType<F>>>;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface EmptyBase<_> {
|
||||
// this is use to allow use to have unused vars in augmented interfaces,
|
||||
// so intentionally left empty
|
||||
}
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
// Copyright 2017-2023 @polkadot/api-base authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { AnyFunction, Codec, DefinitionCallNamed } from '@polkadot/types/types';
|
||||
import type { ApiTypes, ReturnCodec } from './base';
|
||||
import type { ApiTypes, EmptyBase, ReturnCodec } from './base.js';
|
||||
|
||||
export type DecoratedCallBase<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> =
|
||||
ApiType extends 'rxjs'
|
||||
? <T extends Codec | any = ReturnCodec<F>> (...args: Parameters<F>) => Observable<T>
|
||||
: <T extends Codec | any = ReturnCodec<F>> (...args: Parameters<F>) => Promise<T>;
|
||||
? <T = ReturnCodec<F>> (...args: Parameters<F>) => Observable<T>
|
||||
: <T = ReturnCodec<F>> (...args: Parameters<F>) => Promise<T>;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export type AugmentedCall<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> = DecoratedCallBase<ApiType, F> & {
|
||||
/** The metadata/description/definition for this method */
|
||||
meta: DefinitionCallNamed
|
||||
@@ -18,16 +17,15 @@ export type AugmentedCall<ApiType extends ApiTypes, F extends AnyFunction = (...
|
||||
|
||||
// augmented interfaces
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface
|
||||
export interface AugmentedCalls<ApiType extends ApiTypes> {
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface AugmentedCalls<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
|
||||
// augmented
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
|
||||
export interface QueryableCalls<ApiType extends ApiTypes> extends AugmentedCalls<ApiType> {
|
||||
// when non-augmented, we need to at least have Codec results
|
||||
[key: string]: QueryableModuleCalls<ApiType>;
|
||||
}
|
||||
|
||||
export interface QueryableModuleCalls<ApiType extends ApiTypes> {
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
}
|
||||
export type QueryableModuleCalls<ApiType extends ApiTypes> = Record<string, DecoratedCallBase<ApiType>>;
|
||||
|
||||
@@ -1,27 +1,25 @@
|
||||
// Copyright 2017-2023 @polkadot/api-base authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { PalletConstantMetadataLatest } from '@polkadot/types/interfaces';
|
||||
import type { Codec } from '@polkadot/types/types';
|
||||
import type { ApiTypes } from './base';
|
||||
import type { ApiTypes, EmptyBase } from './base.js';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export interface AugmentedConst<ApiType extends ApiTypes> {
|
||||
export interface AugmentedConst<_ extends ApiTypes> {
|
||||
meta: PalletConstantMetadataLatest;
|
||||
}
|
||||
|
||||
// augmented interfaces
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface
|
||||
export interface AugmentedConsts<ApiType extends ApiTypes> {
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface AugmentedConsts<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
|
||||
// augmented
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
|
||||
export interface QueryableConsts<ApiType extends ApiTypes> extends AugmentedConsts<ApiType> {
|
||||
// when non-augmented, we need to at least have Codec results
|
||||
[key: string]: QueryableModuleConsts;
|
||||
}
|
||||
|
||||
export interface QueryableModuleConsts {
|
||||
[key: string]: Codec;
|
||||
}
|
||||
export type QueryableModuleConsts = Record<string, Codec>;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api-base authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
// Copyright 2017-2023 @polkadot/api-base authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { IsError } from '@polkadot/types/metadata/decorate/types';
|
||||
import type { ApiTypes } from './base';
|
||||
import type { ApiTypes, EmptyBase } from './base.js';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export type AugmentedError<ApiType extends ApiTypes> = IsError;
|
||||
export type AugmentedError<_ extends ApiTypes> = IsError;
|
||||
|
||||
// augmented interfaces
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface
|
||||
export interface AugmentedErrors<ApiType extends ApiTypes> {
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface AugmentedErrors<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
|
||||
// augmented
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
|
||||
export interface DecoratedErrors<ApiType extends ApiTypes> extends AugmentedErrors<ApiType> {
|
||||
// when non-augmented, we need to at least have Codec results
|
||||
[key: string]: ModuleErrors<ApiType>;
|
||||
}
|
||||
|
||||
export interface ModuleErrors<ApiType extends ApiTypes> {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
}
|
||||
export type ModuleErrors<ApiType extends ApiTypes> = Record<string, AugmentedError<ApiType>>;
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
// Copyright 2017-2023 @polkadot/api-base authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { IsEvent } from '@polkadot/types/metadata/decorate/types';
|
||||
import type { AnyTuple } from '@polkadot/types/types';
|
||||
import type { ApiTypes } from './base';
|
||||
import type { ApiTypes, EmptyBase } from './base.js';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export type AugmentedEvent<ApiType extends ApiTypes, T extends AnyTuple = AnyTuple, N = unknown> = IsEvent<T, N>;
|
||||
export type AugmentedEvent<_ extends ApiTypes, T extends AnyTuple = AnyTuple, N = unknown> = IsEvent<T, N>;
|
||||
|
||||
// augmented interfaces
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface
|
||||
export interface AugmentedEvents<ApiType extends ApiTypes> {
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface AugmentedEvents<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
|
||||
// augmented
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
|
||||
export interface DecoratedEvents<ApiType extends ApiTypes> extends AugmentedEvents<ApiType> {
|
||||
// when non-augmented, we need to at least have Codec results
|
||||
[key: string]: ModuleEvents<ApiType>;
|
||||
}
|
||||
|
||||
export interface ModuleEvents<ApiType extends ApiTypes> {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
}
|
||||
export type ModuleEvents<ApiType extends ApiTypes> = Record<string, AugmentedEvent<ApiType>>;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// These are augmented, do an augmentation export
|
||||
@@ -10,7 +10,7 @@ export * from '@polkadot/api-base/types/storage';
|
||||
export * from '@polkadot/api-base/types/submittable';
|
||||
|
||||
// normal exports
|
||||
export * from './api';
|
||||
export * from './base';
|
||||
export * from './derive';
|
||||
export * from './rpc';
|
||||
export * from './api.js';
|
||||
export * from './base.js';
|
||||
export * from './derive.js';
|
||||
export * from './rpc.js';
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
// Copyright 2017-2023 @polkadot/api-base authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { AnyFunction, AnyJson, Callback, DefinitionRpc } from '@polkadot/types/types';
|
||||
|
||||
import { ApiTypes, PromiseResult, Push, RxResult, UnsubscribePromise } from './base';
|
||||
import type { ApiTypes, PromiseResult, Push, RxResult, UnsubscribePromise } from './base.js';
|
||||
|
||||
export type { AugmentedRpc } from '@polkadot/rpc-core/types';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api-base authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
@@ -6,15 +6,13 @@ import type { StorageKey, u64 } from '@polkadot/types';
|
||||
import type { Hash } from '@polkadot/types/interfaces';
|
||||
import type { StorageEntry } from '@polkadot/types/primitive/types';
|
||||
import type { AnyFunction, AnyTuple, Callback, Codec, IStorageKey } from '@polkadot/types/types';
|
||||
import type { ApiTypes, DropLast, MethodResult, PaginationOptions, PromiseOrObs, ReturnCodec, UnsubscribePromise } from './base';
|
||||
import type { ApiTypes, DropLast, EmptyBase, MethodResult, PaginationOptions, PromiseOrObs, ReturnCodec, UnsubscribePromise } from './base.js';
|
||||
|
||||
interface StorageEntryObservableMulti<R extends Codec = Codec> {
|
||||
<T extends Codec = R>(args: (unknown[] | unknown)[]): Observable<T[]>;
|
||||
}
|
||||
type StorageEntryObservableMulti<R extends Codec = Codec> = <T extends Codec = R>(args: unknown[]) => Observable<T[]>;
|
||||
|
||||
interface StorageEntryPromiseMulti<R extends Codec = Codec> {
|
||||
<T extends Codec = R>(args: (unknown[] | unknown)[]): Promise<T[]>;
|
||||
<T extends Codec = R>(args: (unknown[] | unknown)[], callback: Callback<T[]>): UnsubscribePromise;
|
||||
<T extends Codec = R>(args: unknown[]): Promise<T[]>;
|
||||
<T extends Codec = R>(args: unknown[], callback: Callback<T[]>): UnsubscribePromise;
|
||||
}
|
||||
|
||||
export interface StorageEntryPromiseOverloads {
|
||||
@@ -48,12 +46,12 @@ export interface StorageEntryBase<ApiType extends ApiTypes, F extends AnyFunctio
|
||||
/**
|
||||
* @deprecated Use api.at(<blockHash>)
|
||||
*/
|
||||
at: <T extends Codec | any = ReturnCodec<F>>(hash: Hash | Uint8Array | string, ...args: Parameters<F>) => PromiseOrObs<ApiType, T>;
|
||||
at: <T = ReturnCodec<F>>(hash: Hash | Uint8Array | string, ...args: Parameters<F>) => PromiseOrObs<ApiType, T>;
|
||||
creator: StorageEntry;
|
||||
/**
|
||||
* @deprecated Use api.at(<blockHash>)
|
||||
*/
|
||||
entriesAt: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(hash: Hash | Uint8Array | string, ...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
|
||||
entriesAt: <T = ReturnCodec<F>, K extends AnyTuple = A>(hash: Hash | Uint8Array | string, ...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
|
||||
/**
|
||||
* @deprecated Use api.at(<blockHash>)
|
||||
*/
|
||||
@@ -68,8 +66,8 @@ export interface StorageEntryBase<ApiType extends ApiTypes, F extends AnyFunctio
|
||||
}
|
||||
|
||||
export interface StorageEntryBaseAt<ApiType extends ApiTypes, F extends AnyFunction, A extends AnyTuple = AnyTuple> {
|
||||
entries: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
|
||||
entriesPaged: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
|
||||
entries: <T = ReturnCodec<F>, K extends AnyTuple = A>(...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
|
||||
entriesPaged: <T = ReturnCodec<F>, K extends AnyTuple = A>(opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
|
||||
hash: (...args: Parameters<F>) => PromiseOrObs<ApiType, Hash>;
|
||||
is: (key: IStorageKey<AnyTuple>) => key is IStorageKey<A>;
|
||||
key: (...args: Parameters<F>) => string;
|
||||
@@ -79,21 +77,15 @@ export interface StorageEntryBaseAt<ApiType extends ApiTypes, F extends AnyFunct
|
||||
size: (...args: Parameters<F>) => PromiseOrObs<ApiType, u64>;
|
||||
}
|
||||
|
||||
export interface QueryableModuleStorage<ApiType extends ApiTypes> {
|
||||
[key: string]: QueryableStorageEntry<ApiType, AnyTuple>;
|
||||
}
|
||||
export type QueryableModuleStorage<ApiType extends ApiTypes> = Record<string, QueryableStorageEntry<ApiType, AnyTuple>>;
|
||||
|
||||
export interface QueryableModuleStorageAt<ApiType extends ApiTypes> {
|
||||
[key: string]: QueryableStorageEntryAt<ApiType, AnyTuple>;
|
||||
}
|
||||
export type QueryableModuleStorageAt<ApiType extends ApiTypes> = Record<string, QueryableStorageEntryAt<ApiType, AnyTuple>>;
|
||||
|
||||
export type QueryableStorageMultiArg<ApiType extends ApiTypes> =
|
||||
QueryableStorageEntry<ApiType> |
|
||||
[QueryableStorageEntry<ApiType>, ...unknown[]];
|
||||
|
||||
export interface QueryableStorageMultiBase<ApiType extends ApiTypes> {
|
||||
<T extends Codec[]>(calls: QueryableStorageMultiArg<ApiType>[]): Observable<T>;
|
||||
}
|
||||
export type QueryableStorageMultiBase<ApiType extends ApiTypes> = <T extends Codec[]>(calls: QueryableStorageMultiArg<ApiType>[]) => Observable<T>;
|
||||
|
||||
export interface QueryableStorageMultiPromise<ApiType extends ApiTypes> {
|
||||
<T extends Codec[]>(calls: QueryableStorageMultiArg<ApiType>[], callback: Callback<T>): UnsubscribePromise;
|
||||
@@ -114,16 +106,18 @@ export type AugmentedQueryDoubleMap<ApiType extends ApiTypes, F extends AnyFunct
|
||||
|
||||
// augmented interfaces
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface
|
||||
export interface AugmentedQueries<ApiType extends ApiTypes> {
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface AugmentedQueries<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
|
||||
// augmented
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
|
||||
export interface QueryableStorage<ApiType extends ApiTypes> extends AugmentedQueries<ApiType> {
|
||||
// when non-augmented, we need to at least have Codec results
|
||||
[key: string]: QueryableModuleStorage<ApiType>;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
|
||||
export interface QueryableStorageAt<ApiType extends ApiTypes> extends AugmentedQueries<ApiType> {
|
||||
[key: string]: QueryableModuleStorageAt<ApiType>;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2023 @polkadot/api-base authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { AccountId, Address, ApplyExtrinsicResult, BlockNumber, Call, DispatchError, DispatchInfo, EventRecord, Extrinsic, ExtrinsicStatus, Hash, RuntimeDispatchInfo } from '@polkadot/types/interfaces';
|
||||
import type { AnyFunction, AnyNumber, AnyTuple, Callback, CallBase, Codec, IExtrinsicEra, IKeyringPair, ISubmittableResult, Signer } from '@polkadot/types/types';
|
||||
import type { ApiTypes, PromiseOrObs } from './base';
|
||||
import type { AnyFunction, AnyNumber, AnyTuple, AnyU8a, Callback, CallBase, Codec, IExtrinsicEra, IKeyringPair, ISubmittableResult, Signer } from '@polkadot/types/types';
|
||||
import type { ApiTypes, EmptyBase, PromiseOrObs } from './base.js';
|
||||
|
||||
export type AugmentedSubmittable<T extends AnyFunction, A extends AnyTuple = AnyTuple> = T & CallBase<A>;
|
||||
|
||||
@@ -16,7 +16,10 @@ export interface SignerOptions {
|
||||
nonce: AnyNumber | Codec;
|
||||
signer?: Signer;
|
||||
tip?: AnyNumber;
|
||||
assetId?: AnyNumber;
|
||||
assetId?: AnyNumber | object;
|
||||
mode?: AnyNumber;
|
||||
metadataHash?: AnyU8a;
|
||||
withSignedTransaction?: boolean;
|
||||
}
|
||||
|
||||
export type SubmittableDryRunResult<ApiType extends ApiTypes> =
|
||||
@@ -40,13 +43,13 @@ export type SubmittablePaymentResult<ApiType extends ApiTypes> =
|
||||
: Promise<RuntimeDispatchInfo>;
|
||||
|
||||
export interface SubmittableResultValue {
|
||||
dispatchError?: DispatchError;
|
||||
dispatchInfo?: DispatchInfo;
|
||||
dispatchError?: DispatchError | undefined;
|
||||
dispatchInfo?: DispatchInfo | undefined;
|
||||
events?: EventRecord[];
|
||||
internalError?: Error;
|
||||
internalError?: Error | undefined;
|
||||
status: ExtrinsicStatus;
|
||||
txHash: Hash;
|
||||
txIndex?: number;
|
||||
txIndex?: number | undefined;
|
||||
blockNumber?: BlockNumber;
|
||||
}
|
||||
|
||||
@@ -64,8 +67,27 @@ export interface SubmittableExtrinsic<ApiType extends ApiTypes, R extends ISubmi
|
||||
|
||||
send (statusCb: Callback<R>): SubmittableResultSubscription<ApiType, R>;
|
||||
|
||||
/**
|
||||
* @description Sign and broadcast the constructued transaction.
|
||||
*
|
||||
* Note for injected signers:
|
||||
* As of v12.0.2 and up the `SignerResult` return type for `signPayload` allows for the `signedTransaction` field.
|
||||
* This allows the signer to input a signed transaction that will modify the payload. This
|
||||
* The api will ensure that the Call Data is not changed. This allows for the signer to modify the payload to add
|
||||
* things like `mode`, and `metadataHash` for signedExtensions such as `CheckMetadataHash`.
|
||||
*/
|
||||
signAsync (account: AddressOrPair, _options?: Partial<SignerOptions>): PromiseOrObs<ApiType, this>;
|
||||
|
||||
/**
|
||||
* @description Sign and broadcast the constructued transaction.
|
||||
*
|
||||
* Note for injected signers:
|
||||
* As of v12.0.1 and up the `SignerResult` return type for `signPayload` allows for the `signedTransaction` field.
|
||||
* This allows the signer to input a signed transaction that will be directly broadcasted. This
|
||||
* bypasses the api adding the signature to the payload. The api will ensure that the Call Data is not changed before it broadcasts the
|
||||
* transaction. This allows for the signer to modify the payload to add things like `mode`, and `metadataHash` for
|
||||
* signedExtensions such as `CheckMetadataHash`.
|
||||
*/
|
||||
signAndSend (account: AddressOrPair, options?: Partial<SignerOptions>): SubmittableResultResult<ApiType, R>;
|
||||
|
||||
signAndSend (account: AddressOrPair, statusCb: Callback<R>): SubmittableResultSubscription<ApiType>;
|
||||
@@ -81,8 +103,8 @@ export interface SubmittableExtrinsicFunction<ApiType extends ApiTypes, A extend
|
||||
|
||||
// augmented interfaces
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface
|
||||
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface AugmentedSubmittables<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
|
||||
// augmented
|
||||
}
|
||||
|
||||
@@ -92,7 +114,4 @@ export interface SubmittableExtrinsics<ApiType extends ApiTypes> extends Augment
|
||||
[key: string]: SubmittableModuleExtrinsics<ApiType>;
|
||||
}
|
||||
|
||||
export interface SubmittableModuleExtrinsics<ApiType extends ApiTypes> {
|
||||
// only with is<Type> augmentation
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
}
|
||||
export type SubmittableModuleExtrinsics<ApiType extends ApiTypes> = Record<string, SubmittableExtrinsicFunction<ApiType>>;
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
"outDir": "./build",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"exclude": [
|
||||
"**/mod.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../rpc-core/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" }
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
{
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"contributors": [],
|
||||
"description": "Interfaces for interacting with contracts and contract ABIs",
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
"node": ">=18"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
|
||||
"license": "Apache-2.0",
|
||||
"maintainers": [],
|
||||
"name": "@polkadot/api-contract",
|
||||
"repository": {
|
||||
"directory": "packages/api-contract",
|
||||
@@ -16,24 +14,26 @@
|
||||
"url": "https://github.com/polkadot-js/api.git"
|
||||
},
|
||||
"sideEffects": [
|
||||
"./detectPackage.js",
|
||||
"./detectPackage.cjs"
|
||||
"./packageDetect.js",
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.13.2",
|
||||
"version": "15.0.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@polkadot/api": "9.13.2",
|
||||
"@polkadot/types": "9.13.2",
|
||||
"@polkadot/types-codec": "9.13.2",
|
||||
"@polkadot/types-create": "9.13.2",
|
||||
"@polkadot/util": "^10.3.1",
|
||||
"@polkadot/util-crypto": "^10.3.1",
|
||||
"rxjs": "^7.8.0"
|
||||
"@polkadot/api": "15.0.2",
|
||||
"@polkadot/api-augment": "15.0.2",
|
||||
"@polkadot/types": "15.0.2",
|
||||
"@polkadot/types-codec": "15.0.2",
|
||||
"@polkadot/types-create": "15.0.2",
|
||||
"@polkadot/util": "^13.2.3",
|
||||
"@polkadot/util-crypto": "^13.2.3",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api-augment": "9.13.2",
|
||||
"@polkadot/keyring": "^10.3.1"
|
||||
"@polkadot/api-augment": "15.0.2",
|
||||
"@polkadot/keyring": "^13.2.3",
|
||||
"@polkadot/types-support": "15.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/// <reference types="@polkadot/dev-test/globals.d.ts" />
|
||||
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import fs from 'node:fs';
|
||||
import process from 'node:process';
|
||||
|
||||
import { TypeDefInfo } from '@polkadot/types/types';
|
||||
import rpcMetadata from '@polkadot/types-support/metadata/static-substrate-contracts-node';
|
||||
import { blake2AsHex } from '@polkadot/util-crypto';
|
||||
|
||||
import abis from '../test/contracts';
|
||||
import { Abi } from '.';
|
||||
import { Metadata, TypeRegistry } from '../../../types/src/bundle.js';
|
||||
import abis from '../test/contracts/index.js';
|
||||
import { Abi } from './index.js';
|
||||
|
||||
interface SpecDef {
|
||||
messages: {
|
||||
@@ -42,8 +46,8 @@ interface JSONAbi {
|
||||
}
|
||||
|
||||
function stringifyInfo (key: string, value: unknown): unknown {
|
||||
return key === 'info'
|
||||
? TypeDefInfo[value as number]
|
||||
return key === 'info' && typeof value === 'number'
|
||||
? TypeDefInfo[value]
|
||||
: value;
|
||||
}
|
||||
|
||||
@@ -82,31 +86,34 @@ describe('Abi', (): void => {
|
||||
});
|
||||
|
||||
describe('TypeDef', (): void => {
|
||||
Object.keys(abis).forEach((abiName) => {
|
||||
it(`initializes from a contract ABI (${abiName})`, (): void => {
|
||||
const abi = new Abi(abis[abiName]);
|
||||
const json = stringifyJson(abi.registry);
|
||||
const cmpPath = path.join(__dirname, `../test/compare/${abiName}.test.json`);
|
||||
for (const [abiName, abiJson] of Object.entries(abis)) {
|
||||
it(`initializes from a contract ABI: ${abiName}`, (): void => {
|
||||
const abi = new Abi(abiJson);
|
||||
const registryJson = stringifyJson(abi.registry);
|
||||
const cmpFile = new URL(`../test/compare/${abiName}.test.json`, import.meta.url);
|
||||
|
||||
try {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
expect(JSON.parse(json)).toEqual(require(cmpPath));
|
||||
expect(
|
||||
JSON.parse(registryJson)
|
||||
).toEqual(
|
||||
JSON.parse(fs.readFileSync(cmpFile, 'utf-8'))
|
||||
);
|
||||
} catch (error) {
|
||||
if (process.env.GITHUB_REPOSITORY) {
|
||||
console.error(json);
|
||||
if (process.env['GITHUB_REPOSITORY']) {
|
||||
console.error(registryJson);
|
||||
|
||||
throw error;
|
||||
}
|
||||
|
||||
fs.writeFileSync(cmpPath, json, { flag: 'w' });
|
||||
fs.writeFileSync(cmpFile, registryJson, { flag: 'w' });
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
it('has the correct hash for the source', (): void => {
|
||||
const abi = new Abi(abis.ink_v0_flipperBundle);
|
||||
const bundle = abis.ink_v0_flipperBundle as unknown as JSONAbi;
|
||||
const abi = new Abi(abis['ink_v0_flipperBundle']);
|
||||
const bundle = abis['ink_v0_flipperBundle'] as unknown as JSONAbi;
|
||||
|
||||
// manual
|
||||
expect(bundle.source.hash).toEqual(blake2AsHex(bundle.source.wasm));
|
||||
@@ -117,4 +124,112 @@ describe('Abi', (): void => {
|
||||
// the hash as per the actual Abi
|
||||
expect(bundle.source.hash).toEqual(abi.info.source.wasmHash.toHex());
|
||||
});
|
||||
|
||||
describe('Events', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
beforeAll((): void => {
|
||||
const metadata = new Metadata(registry, rpcMetadata);
|
||||
|
||||
registry.setMetadata(metadata);
|
||||
});
|
||||
|
||||
it('decoding <=ink!v4 event', (): void => {
|
||||
const abiJson = abis['ink_v4_erc20Metadata'];
|
||||
|
||||
expect(abiJson).toBeDefined();
|
||||
const abi = new Abi(abiJson);
|
||||
|
||||
const eventRecordHex =
|
||||
'0x0001000000080360951b8baf569bca905a279c12d6ce17db7cdce23a42563870ef585129ce5dc64d010001d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d018eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a4800505a4f7e9f4eb106000000000000000c0045726332303a3a5472616e7366657200000000000000000000000000000000da2d695d3b5a304e0039e7fc4419c34fa0c1f239189c99bb72a6484f1634782b2b00c7d40fe6d84d660f3e6bed90f218e022a0909f7e1a7ea35ada8b6e003564';
|
||||
const record = registry.createType('EventRecord', eventRecordHex);
|
||||
|
||||
const decodedEvent = abi.decodeEvent(record);
|
||||
|
||||
expect(decodedEvent.event.args.length).toEqual(3);
|
||||
expect(decodedEvent.args.length).toEqual(3);
|
||||
expect(decodedEvent.event.identifier).toEqual('Transfer');
|
||||
|
||||
const decodedEventHuman = decodedEvent.event.args.reduce((prev, cur, index) => {
|
||||
return {
|
||||
...prev,
|
||||
[cur.name]: decodedEvent.args[index].toHuman()
|
||||
};
|
||||
}, {});
|
||||
|
||||
const expectedEvent = {
|
||||
from: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY',
|
||||
to: '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty',
|
||||
value: '123.4567 MUnit'
|
||||
};
|
||||
|
||||
expect(decodedEventHuman).toEqual(expectedEvent);
|
||||
});
|
||||
|
||||
it('decoding >=ink!v5 event', (): void => {
|
||||
const abiJson = abis['ink_v5_erc20Metadata'];
|
||||
|
||||
expect(abiJson).toBeDefined();
|
||||
const abi = new Abi(abiJson);
|
||||
|
||||
const eventRecordHex =
|
||||
'0x00010000000803da17150e96b3955a4db6ad35ddeb495f722f9c1d84683113bfb096bf3faa30f2490101d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d018eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a4800505a4f7e9f4eb106000000000000000cb5b61a3e6a21a16be4f044b517c28ac692492f73c5bfd3f60178ad98c767f4cbd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48';
|
||||
const record = registry.createType('EventRecord', eventRecordHex);
|
||||
|
||||
const decodedEvent = abi.decodeEvent(record);
|
||||
|
||||
expect(decodedEvent.event.args.length).toEqual(3);
|
||||
expect(decodedEvent.args.length).toEqual(3);
|
||||
expect(decodedEvent.event.identifier).toEqual('erc20::erc20::Transfer');
|
||||
|
||||
const decodedEventHuman = decodedEvent.event.args.reduce((prev, cur, index) => {
|
||||
return {
|
||||
...prev,
|
||||
[cur.name]: decodedEvent.args[index].toHuman()
|
||||
};
|
||||
}, {});
|
||||
|
||||
const expectedEvent = {
|
||||
from: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY',
|
||||
to: '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty',
|
||||
value: '123.4567 MUnit'
|
||||
};
|
||||
|
||||
expect(decodedEventHuman).toEqual(expectedEvent);
|
||||
});
|
||||
|
||||
it('decoding >=ink!v5 anonymous event', (): void => {
|
||||
const abiJson = abis['ink_v5_erc20AnonymousTransferMetadata'];
|
||||
|
||||
expect(abiJson).toBeDefined();
|
||||
const abi = new Abi(abiJson);
|
||||
|
||||
expect(abi.events[0].identifier).toEqual('erc20::erc20::Transfer');
|
||||
expect(abi.events[0].signatureTopic).toEqual(null);
|
||||
|
||||
const eventRecordWithAnonymousEventHex = '0x00010000000803538e726248a9c155911e7d99f4f474c3408630a2f6275dd501d4471c7067ad2c490101d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d018eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a4800505a4f7e9f4eb1060000000000000008d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48';
|
||||
const record = registry.createType('EventRecord', eventRecordWithAnonymousEventHex);
|
||||
|
||||
const decodedEvent = abi.decodeEvent(record);
|
||||
|
||||
expect(decodedEvent.event.args.length).toEqual(3);
|
||||
expect(decodedEvent.args.length).toEqual(3);
|
||||
expect(decodedEvent.event.identifier).toEqual('erc20::erc20::Transfer');
|
||||
|
||||
const decodedEventHuman = decodedEvent.event.args.reduce((prev, cur, index) => {
|
||||
return {
|
||||
...prev,
|
||||
[cur.name]: decodedEvent.args[index].toHuman()
|
||||
};
|
||||
}, {});
|
||||
|
||||
const expectedEvent = {
|
||||
from: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY',
|
||||
to: '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty',
|
||||
value: '123.4567 MUnit'
|
||||
};
|
||||
|
||||
expect(decodedEventHuman).toEqual(expectedEvent);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,16 +1,26 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Bytes } from '@polkadot/types';
|
||||
import type { ChainProperties, ContractConstructorSpecLatest, ContractEventSpecLatest, ContractMessageParamSpecLatest, ContractMessageSpecLatest, ContractMetadata, ContractMetadataLatest, ContractProjectInfo } from '@polkadot/types/interfaces';
|
||||
import type { Codec, Registry } from '@polkadot/types/types';
|
||||
import type { AbiConstructor, AbiEvent, AbiMessage, AbiParam, DecodedEvent, DecodedMessage } from '../types';
|
||||
import type { Bytes, Vec } from '@polkadot/types';
|
||||
import type { ChainProperties, ContractConstructorSpecLatest, ContractEventParamSpecLatest, ContractMessageParamSpecLatest, ContractMessageSpecLatest, ContractMetadata, ContractMetadataV4, ContractMetadataV5, ContractProjectInfo, ContractTypeSpec, EventRecord } from '@polkadot/types/interfaces';
|
||||
import type { Codec, Registry, TypeDef } from '@polkadot/types/types';
|
||||
import type { AbiConstructor, AbiEvent, AbiEventParam, AbiMessage, AbiMessageParam, AbiParam, DecodedEvent, DecodedMessage } from '../types.js';
|
||||
|
||||
import { TypeRegistry } from '@polkadot/types';
|
||||
import { Option, TypeRegistry } from '@polkadot/types';
|
||||
import { TypeDefInfo } from '@polkadot/types-create';
|
||||
import { assertReturn, compactAddLength, compactStripLength, isNumber, isObject, isString, logger, stringCamelCase, stringify, u8aConcat, u8aToHex } from '@polkadot/util';
|
||||
import { assertReturn, compactAddLength, compactStripLength, isBn, isNumber, isObject, isString, isUndefined, logger, stringCamelCase, stringify, u8aConcat, u8aToHex } from '@polkadot/util';
|
||||
|
||||
import { convertVersions, enumVersions } from './toLatest';
|
||||
import { convertVersions, enumVersions } from './toLatestCompatible.js';
|
||||
|
||||
interface AbiJson {
|
||||
version?: string;
|
||||
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
type EventOf<M> = M extends {spec: { events: Vec<infer E>}} ? E : never
|
||||
export type ContractMetadataSupported = ContractMetadataV4 | ContractMetadataV5;
|
||||
type ContractEventSupported = EventOf<ContractMetadataSupported>;
|
||||
|
||||
const l = logger('Abi');
|
||||
|
||||
@@ -26,12 +36,12 @@ function findMessage <T extends AbiMessage> (list: T[], messageOrId: T | string
|
||||
return assertReturn(message, () => `Attempted to call an invalid contract interface, ${stringify(messageOrId)}`);
|
||||
}
|
||||
|
||||
function getLatestMeta (registry: Registry, json: Record<string, unknown>): ContractMetadataLatest {
|
||||
function getMetadata (registry: Registry, json: AbiJson): ContractMetadataSupported {
|
||||
// this is for V1, V2, V3
|
||||
const vx = enumVersions.find((v) => isObject(json[v]));
|
||||
|
||||
// this was added in V4
|
||||
const jsonVersion = json.version as string;
|
||||
const jsonVersion = json.version;
|
||||
|
||||
if (!vx && jsonVersion && !enumVersions.find((v) => v === `V${jsonVersion}`)) {
|
||||
throw new Error(`Unable to handle version ${jsonVersion}`);
|
||||
@@ -44,20 +54,23 @@ function getLatestMeta (registry: Registry, json: Record<string, unknown>): Cont
|
||||
? { [`V${jsonVersion}`]: json }
|
||||
: { V0: json }
|
||||
);
|
||||
|
||||
const converter = convertVersions.find(([v]) => metadata[`is${v}`]);
|
||||
|
||||
if (!converter) {
|
||||
throw new Error(`Unable to convert ABI with version ${metadata.type} to latest`);
|
||||
throw new Error(`Unable to convert ABI with version ${metadata.type} to a supported version`);
|
||||
}
|
||||
|
||||
return converter[1](registry, metadata[`as${converter[0]}`]);
|
||||
const upgradedMetadata = converter[1](registry, metadata[`as${converter[0]}`]);
|
||||
|
||||
return upgradedMetadata;
|
||||
}
|
||||
|
||||
function parseJson (json: Record<string, unknown>, chainProperties?: ChainProperties): [Record<string, unknown>, Registry, ContractMetadataLatest, ContractProjectInfo] {
|
||||
function parseJson (json: Record<string, unknown>, chainProperties?: ChainProperties): [Record<string, unknown>, Registry, ContractMetadataSupported, ContractProjectInfo] {
|
||||
const registry = new TypeRegistry();
|
||||
const info = registry.createType('ContractProjectInfo', json) as unknown as ContractProjectInfo;
|
||||
const latest = getLatestMeta(registry, json);
|
||||
const lookup = registry.createType('PortableRegistry', { types: latest.types }, true);
|
||||
const metadata = getMetadata(registry, json as unknown as AbiJson);
|
||||
const lookup = registry.createType('PortableRegistry', { types: metadata.types }, true);
|
||||
|
||||
// attach the lookup to the registry - now the types are known
|
||||
registry.setLookup(lookup);
|
||||
@@ -71,7 +84,23 @@ function parseJson (json: Record<string, unknown>, chainProperties?: ChainProper
|
||||
lookup.getTypeDef(id)
|
||||
);
|
||||
|
||||
return [json, registry, latest, info];
|
||||
return [json, registry, metadata, info];
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Determines if the given input value is a ContractTypeSpec
|
||||
*/
|
||||
function isTypeSpec (value: Codec): value is ContractTypeSpec {
|
||||
return !!value && value instanceof Map && !isUndefined((value as ContractTypeSpec).type) && !isUndefined((value as ContractTypeSpec).displayName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Determines if the given input value is an Option
|
||||
*/
|
||||
function isOption (value: Codec): value is Option<Codec> {
|
||||
return !!value && value instanceof Option;
|
||||
}
|
||||
|
||||
export class Abi {
|
||||
@@ -80,8 +109,9 @@ export class Abi {
|
||||
readonly info: ContractProjectInfo;
|
||||
readonly json: Record<string, unknown>;
|
||||
readonly messages: AbiMessage[];
|
||||
readonly metadata: ContractMetadataLatest;
|
||||
readonly metadata: ContractMetadataSupported;
|
||||
readonly registry: Registry;
|
||||
readonly environment = new Map<string, TypeDef | Codec>();
|
||||
|
||||
constructor (abiJson: Record<string, unknown> | string, chainProperties?: ChainProperties) {
|
||||
[this.json, this.registry, this.metadata, this.info] = parseJson(
|
||||
@@ -93,29 +123,105 @@ export class Abi {
|
||||
this.constructors = this.metadata.spec.constructors.map((spec: ContractConstructorSpecLatest, index) =>
|
||||
this.#createMessage(spec, index, {
|
||||
isConstructor: true,
|
||||
isPayable: spec.payable.isTrue
|
||||
isDefault: spec.default.isTrue,
|
||||
isPayable: spec.payable.isTrue,
|
||||
returnType: spec.returnType.isSome
|
||||
? this.registry.lookup.getTypeDef(spec.returnType.unwrap().type)
|
||||
: null
|
||||
})
|
||||
);
|
||||
this.events = this.metadata.spec.events.map((spec: ContractEventSpecLatest, index) =>
|
||||
this.#createEvent(spec, index)
|
||||
this.events = this.metadata.spec.events.map((_: ContractEventSupported, index: number) =>
|
||||
this.#createEvent(index)
|
||||
);
|
||||
this.messages = this.metadata.spec.messages.map((spec: ContractMessageSpecLatest, index): AbiMessage => {
|
||||
const typeSpec = spec.returnType.unwrapOr(null);
|
||||
|
||||
return this.#createMessage(spec, index, {
|
||||
this.messages = this.metadata.spec.messages.map((spec: ContractMessageSpecLatest, index): AbiMessage =>
|
||||
this.#createMessage(spec, index, {
|
||||
isDefault: spec.default.isTrue,
|
||||
isMutating: spec.mutates.isTrue,
|
||||
isPayable: spec.payable.isTrue,
|
||||
returnType: typeSpec
|
||||
? this.registry.lookup.getTypeDef(typeSpec.type)
|
||||
returnType: spec.returnType.isSome
|
||||
? this.registry.lookup.getTypeDef(spec.returnType.unwrap().type)
|
||||
: null
|
||||
});
|
||||
});
|
||||
})
|
||||
);
|
||||
|
||||
// NOTE See the rationale for having Option<...> values in the actual
|
||||
// ContractEnvironmentV4 structure definition in interfaces/contractsAbi
|
||||
// (Due to conversions, the fields may not exist)
|
||||
for (const [key, opt] of this.metadata.spec.environment.entries()) {
|
||||
if (isOption(opt)) {
|
||||
if (opt.isSome) {
|
||||
const value = opt.unwrap();
|
||||
|
||||
if (isBn(value)) {
|
||||
this.environment.set(key, value);
|
||||
} else if (isTypeSpec(value)) {
|
||||
this.environment.set(key, this.registry.lookup.getTypeDef(value.type));
|
||||
} else {
|
||||
throw new Error(`Invalid environment definition for ${key}:: Expected either Number or ContractTypeSpec`);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new Error(`Expected Option<*> definition for ${key} in ContractEnvironment`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Warning: Unstable API, bound to change
|
||||
*/
|
||||
public decodeEvent (data: Bytes | Uint8Array): DecodedEvent {
|
||||
public decodeEvent (record: EventRecord): DecodedEvent {
|
||||
switch (this.metadata.version.toString()) {
|
||||
// earlier version are hoisted to v4
|
||||
case '4':
|
||||
return this.#decodeEventV4(record);
|
||||
// Latest
|
||||
default:
|
||||
return this.#decodeEventV5(record);
|
||||
}
|
||||
}
|
||||
|
||||
#decodeEventV5 = (record: EventRecord): DecodedEvent => {
|
||||
// Find event by first topic, which potentially is the signature_topic
|
||||
const signatureTopic = record.topics[0];
|
||||
const data = record.event.data[1] as Bytes;
|
||||
|
||||
if (signatureTopic) {
|
||||
const event = this.events.find((e) => e.signatureTopic !== undefined && e.signatureTopic !== null && e.signatureTopic === signatureTopic.toHex());
|
||||
|
||||
// Early return if event found by signature topic
|
||||
if (event) {
|
||||
return event.fromU8a(data);
|
||||
}
|
||||
}
|
||||
|
||||
// If no event returned yet, it might be anonymous
|
||||
const amountOfTopics = record.topics.length;
|
||||
const potentialEvents = this.events.filter((e) => {
|
||||
// event can't have a signature topic
|
||||
if (e.signatureTopic !== null && e.signatureTopic !== undefined) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// event should have same amount of indexed fields as emitted topics
|
||||
const amountIndexed = e.args.filter((a) => a.indexed).length;
|
||||
|
||||
if (amountIndexed !== amountOfTopics) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If all conditions met, it's a potential event
|
||||
return true;
|
||||
});
|
||||
|
||||
if (potentialEvents.length === 1) {
|
||||
return potentialEvents[0].fromU8a(data);
|
||||
}
|
||||
|
||||
throw new Error('Unable to determine event');
|
||||
};
|
||||
|
||||
#decodeEventV4 = (record: EventRecord): DecodedEvent => {
|
||||
const data = record.event.data[1] as Bytes;
|
||||
const index = data[0];
|
||||
const event = this.events[index];
|
||||
|
||||
@@ -124,7 +230,7 @@ export class Abi {
|
||||
}
|
||||
|
||||
return event.fromU8a(data.subarray(1));
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Warning: Unstable API, bound to change
|
||||
@@ -148,7 +254,7 @@ export class Abi {
|
||||
return findMessage(this.messages, messageOrId);
|
||||
}
|
||||
|
||||
#createArgs = (args: ContractMessageParamSpecLatest[], spec: unknown): AbiParam[] => {
|
||||
#createArgs = (args: ContractMessageParamSpecLatest[] | ContractEventParamSpecLatest[], spec: unknown): AbiParam[] => {
|
||||
return args.map(({ label, type }, index): AbiParam => {
|
||||
try {
|
||||
if (!isObject(type)) {
|
||||
@@ -186,8 +292,47 @@ export class Abi {
|
||||
});
|
||||
};
|
||||
|
||||
#createEvent = (spec: ContractEventSpecLatest, index: number): AbiEvent => {
|
||||
const args = this.#createArgs(spec.args, spec);
|
||||
#createMessageParams = (args: ContractMessageParamSpecLatest[], spec: unknown): AbiMessageParam[] => {
|
||||
return this.#createArgs(args, spec);
|
||||
};
|
||||
|
||||
#createEventParams = (args: ContractEventParamSpecLatest[], spec: unknown): AbiEventParam[] => {
|
||||
const params = this.#createArgs(args, spec);
|
||||
|
||||
return params.map((p, index): AbiEventParam => ({ ...p, indexed: args[index].indexed.toPrimitive() }));
|
||||
};
|
||||
|
||||
#createEvent = (index: number): AbiEvent => {
|
||||
// TODO TypeScript would narrow this type to the correct version,
|
||||
// but version is `Text` so I need to call `toString()` here,
|
||||
// which breaks the type inference.
|
||||
switch (this.metadata.version.toString()) {
|
||||
case '4':
|
||||
return this.#createEventV4((this.metadata as ContractMetadataV4).spec.events[index], index);
|
||||
default:
|
||||
return this.#createEventV5((this.metadata as ContractMetadataV5).spec.events[index], index);
|
||||
}
|
||||
};
|
||||
|
||||
#createEventV5 = (spec: EventOf<ContractMetadataV5>, index: number): AbiEvent => {
|
||||
const args = this.#createEventParams(spec.args, spec);
|
||||
const event = {
|
||||
args,
|
||||
docs: spec.docs.map((d) => d.toString()),
|
||||
fromU8a: (data: Uint8Array): DecodedEvent => ({
|
||||
args: this.#decodeArgs(args, data),
|
||||
event
|
||||
}),
|
||||
identifier: [spec.module_path, spec.label].join('::'),
|
||||
index,
|
||||
signatureTopic: spec.signature_topic.isSome ? spec.signature_topic.unwrap().toHex() : null
|
||||
};
|
||||
|
||||
return event;
|
||||
};
|
||||
|
||||
#createEventV4 = (spec: EventOf<ContractMetadataV4>, index: number): AbiEvent => {
|
||||
const args = this.#createEventParams(spec.args, spec);
|
||||
const event = {
|
||||
args,
|
||||
docs: spec.docs.map((d) => d.toString()),
|
||||
@@ -203,7 +348,7 @@ export class Abi {
|
||||
};
|
||||
|
||||
#createMessage = (spec: ContractMessageSpecLatest | ContractConstructorSpecLatest, index: number, add: Partial<AbiMessage> = {}): AbiMessage => {
|
||||
const args = this.#createArgs(spec.args, spec);
|
||||
const args = this.#createMessageParams(spec.args, spec);
|
||||
const identifier = spec.label.toString();
|
||||
const message = {
|
||||
...add,
|
||||
@@ -215,11 +360,12 @@ export class Abi {
|
||||
}),
|
||||
identifier,
|
||||
index,
|
||||
isDefault: spec.default.isTrue,
|
||||
method: stringCamelCase(identifier),
|
||||
path: identifier.split('::').map((s) => stringCamelCase(s)),
|
||||
selector: spec.selector,
|
||||
toU8a: (params: unknown[]) =>
|
||||
this.#encodeArgs(spec, args, params)
|
||||
this.#encodeMessageArgs(spec, args, params)
|
||||
};
|
||||
|
||||
return message;
|
||||
@@ -251,7 +397,7 @@ export class Abi {
|
||||
return message.fromU8a(trimmed.subarray(4));
|
||||
};
|
||||
|
||||
#encodeArgs = ({ label, selector }: ContractMessageSpecLatest | ContractConstructorSpecLatest, args: AbiParam[], data: unknown[]): Uint8Array => {
|
||||
#encodeMessageArgs = ({ label, selector }: ContractMessageSpecLatest | ContractConstructorSpecLatest, args: AbiMessageParam[], data: unknown[]): Uint8Array => {
|
||||
if (data.length !== args.length) {
|
||||
throw new Error(`Expected ${args.length} arguments to contract message '${label.toString()}', found ${data.length}`);
|
||||
}
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ContractMetadataLatest, ContractMetadataV4 } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { v0ToV1 } from './toV1';
|
||||
import { v1ToV2 } from './toV2';
|
||||
import { v2ToV3 } from './toV3';
|
||||
import { v3ToV4 } from './toV4';
|
||||
|
||||
// The versions where an enum is used, aka V0 is missing
|
||||
// (Order from newest, i.e. we expect more on newest vs oldest)
|
||||
export const enumVersions = <const> ['V4', 'V3', 'V2', 'V1'];
|
||||
|
||||
type Versions = typeof enumVersions[number] | 'V0';
|
||||
|
||||
type Converter = (registry: Registry, vx: any) => ContractMetadataLatest;
|
||||
|
||||
// Helper to convert metadata from one step to the next
|
||||
function createConverter <I, O> (next: (registry: Registry, input: O) => ContractMetadataLatest, step: (registry: Registry, input: I) => O): (registry: Registry, input: I) => ContractMetadataLatest {
|
||||
return (registry: Registry, input: I): ContractMetadataLatest =>
|
||||
next(registry, step(registry, input));
|
||||
}
|
||||
|
||||
export function v4ToLatest (registry: Registry, v4: ContractMetadataV4): ContractMetadataLatest {
|
||||
return v4;
|
||||
}
|
||||
|
||||
export const v3ToLatest = createConverter(v4ToLatest, v3ToV4);
|
||||
export const v2ToLatest = createConverter(v3ToLatest, v2ToV3);
|
||||
export const v1ToLatest = createConverter(v2ToLatest, v1ToV2);
|
||||
export const v0ToLatest = createConverter(v1ToLatest, v0ToV1);
|
||||
|
||||
export const convertVersions: [Versions, Converter][] = [
|
||||
['V4', v4ToLatest],
|
||||
['V3', v3ToLatest],
|
||||
['V2', v2ToLatest],
|
||||
['V1', v1ToLatest],
|
||||
['V0', v0ToLatest]
|
||||
];
|
||||
+78
-22
@@ -1,15 +1,17 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/// <reference types="@polkadot/dev-test/globals.d.ts" />
|
||||
|
||||
import { TypeRegistry } from '@polkadot/types';
|
||||
|
||||
import abis from '../test/contracts';
|
||||
import { v0ToLatest, v1ToLatest, v2ToLatest, v3ToLatest, v4ToLatest } from './toLatest';
|
||||
import abis from '../test/contracts/index.js';
|
||||
import { v0ToLatestCompatible, v1ToLatestCompatible, v2ToLatestCompatible, v3ToLatestCompatible, v4ToLatestCompatible, v5ToLatestCompatible } from './toLatestCompatible.js';
|
||||
|
||||
describe('v0ToLatest', (): void => {
|
||||
describe('v0ToLatestCompatible', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V0: abis.ink_v0_erc20 });
|
||||
const latest = v0ToLatest(registry, contract.asV0);
|
||||
const contract = registry.createType('ContractMetadata', { V0: abis['ink_v0_erc20'] });
|
||||
const latest = v0ToLatestCompatible(registry, contract.asV0);
|
||||
|
||||
it('has the correct constructors', (): void => {
|
||||
expect(
|
||||
@@ -46,12 +48,16 @@ describe('v0ToLatest', (): void => {
|
||||
latest.spec.events[0].args.map(({ label }) => label.toString())
|
||||
).toEqual(['from', 'to', 'value']);
|
||||
});
|
||||
|
||||
it('has the latest compatible version number', (): void => {
|
||||
expect(latest.version.toString()).toEqual('4');
|
||||
});
|
||||
});
|
||||
|
||||
describe('v1ToLatest', (): void => {
|
||||
describe('v1ToLatestCompatible', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V1: abis.ink_v1_flipper.V1 });
|
||||
const latest = v1ToLatest(registry, contract.asV1);
|
||||
const contract = registry.createType('ContractMetadata', { V1: abis['ink_v1_flipper']['V1'] });
|
||||
const latest = v1ToLatestCompatible(registry, contract.asV1);
|
||||
|
||||
it('has the correct constructors', (): void => {
|
||||
expect(
|
||||
@@ -66,8 +72,8 @@ describe('v1ToLatest', (): void => {
|
||||
});
|
||||
|
||||
it('has the correct messages with namespaced method name', (): void => {
|
||||
const contract = registry.createType('ContractMetadata', { V1: abis.ink_v1_psp22.V1 });
|
||||
const latest = v1ToLatest(registry, contract.asV1);
|
||||
const contract = registry.createType('ContractMetadata', { V1: abis['ink_v1_psp22']['V1'] });
|
||||
const latest = v1ToLatestCompatible(registry, contract.asV1);
|
||||
|
||||
expect(
|
||||
latest.spec.messages.map(({ label }) => label.toString())
|
||||
@@ -81,24 +87,32 @@ describe('v1ToLatest', (): void => {
|
||||
latest.spec.constructors[0].args.map(({ label }) => label.toString())
|
||||
).toEqual(['init_value']);
|
||||
});
|
||||
|
||||
it('has the latest compatible version number', (): void => {
|
||||
expect(latest.version.toString()).toEqual('4');
|
||||
});
|
||||
});
|
||||
|
||||
describe('v2ToLatest', (): void => {
|
||||
describe('v2ToLatestCompatible', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V2: abis.ink_v2_flipper.V2 });
|
||||
const latest = v2ToLatest(registry, contract.asV2);
|
||||
const contract = registry.createType('ContractMetadata', { V2: abis['ink_v2_flipper']['V2'] });
|
||||
const latest = v2ToLatestCompatible(registry, contract.asV2);
|
||||
|
||||
it('has the correct constructor flag', (): void => {
|
||||
expect(
|
||||
latest.spec.constructors[0].payable.isTrue
|
||||
).toEqual(true);
|
||||
});
|
||||
|
||||
it('has the latest compatible version number', (): void => {
|
||||
expect(latest.version.toString()).toEqual('4');
|
||||
});
|
||||
});
|
||||
|
||||
describe('v3ToLatest', (): void => {
|
||||
describe('v3ToLatestCompatible', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V3: abis.ink_v3_flipper.V3 });
|
||||
const latest = v3ToLatest(registry, contract.asV3);
|
||||
const contract = registry.createType('ContractMetadata', { V3: abis['ink_v3_flipper']['V3'] });
|
||||
const latest = v3ToLatestCompatible(registry, contract.asV3);
|
||||
|
||||
it('has the correct constructor flags', (): void => {
|
||||
expect(
|
||||
@@ -110,8 +124,8 @@ describe('v3ToLatest', (): void => {
|
||||
});
|
||||
|
||||
it('has the correct messages', (): void => {
|
||||
const contract = registry.createType('ContractMetadata', { V3: abis.ink_v3_traitErc20.V3 });
|
||||
const latest = v3ToLatest(registry, contract.asV3);
|
||||
const contract = registry.createType('ContractMetadata', { V3: abis['ink_v3_traitErc20']['V3'] });
|
||||
const latest = v3ToLatestCompatible(registry, contract.asV3);
|
||||
|
||||
expect(
|
||||
latest.spec.messages.map(({ label }) => label.toString())
|
||||
@@ -119,12 +133,16 @@ describe('v3ToLatest', (): void => {
|
||||
'BaseErc20::total_supply', 'BaseErc20::balance_of', 'BaseErc20::allowance', 'BaseErc20::transfer', 'BaseErc20::approve', 'BaseErc20::transfer_from'
|
||||
]);
|
||||
});
|
||||
|
||||
it('has the latest compatible version number', (): void => {
|
||||
expect(latest.version.toString()).toEqual('4');
|
||||
});
|
||||
});
|
||||
|
||||
describe('v4ToLatest', (): void => {
|
||||
describe('v4ToLatestCompatible', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V4: abis.ink_v4_flipperContract });
|
||||
const latest = v4ToLatest(registry, contract.asV4);
|
||||
const contract = registry.createType('ContractMetadata', { V4: abis['ink_v4_flipperContract'] });
|
||||
const latest = v4ToLatestCompatible(registry, contract.asV4);
|
||||
|
||||
it('has the correct constructor flags', (): void => {
|
||||
expect(
|
||||
@@ -134,4 +152,42 @@ describe('v4ToLatest', (): void => {
|
||||
latest.spec.constructors[1].payable.isTrue
|
||||
).toEqual(false);
|
||||
});
|
||||
|
||||
it('has the latest compatible version number', (): void => {
|
||||
expect(latest.version.toString()).toEqual('4');
|
||||
});
|
||||
});
|
||||
|
||||
describe('v5ToLatestCompatible', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V5: abis['ink_v5_erc20Metadata'] });
|
||||
const latest = v5ToLatestCompatible(registry, contract.asV5);
|
||||
|
||||
it('has the correct messages', (): void => {
|
||||
expect(
|
||||
latest.spec.messages.map(({ label }) => label.toString())
|
||||
).toEqual(['total_supply', 'balance_of', 'allowance', 'transfer', 'approve', 'transfer_from']);
|
||||
});
|
||||
|
||||
it('has new event fields', (): void => {
|
||||
expect(
|
||||
latest.spec.events.length
|
||||
).toEqual(2);
|
||||
|
||||
expect(
|
||||
latest.spec.events.every((e) => e.has('module_path'))
|
||||
).toEqual(true);
|
||||
|
||||
expect(latest.spec.events[0].module_path.toString()).toEqual('erc20::erc20');
|
||||
|
||||
expect(
|
||||
latest.spec.events.every((e) => e.has('signature_topic'))
|
||||
).toEqual(true);
|
||||
|
||||
expect(latest.spec.events[0].signature_topic.toHex()).toEqual('0xb5b61a3e6a21a16be4f044b517c28ac692492f73c5bfd3f60178ad98c767f4cb');
|
||||
});
|
||||
|
||||
it('has the latest compatible version number', (): void => {
|
||||
expect(latest.version.toString()).toEqual('5');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,47 @@
|
||||
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ContractMetadataV4, ContractMetadataV5 } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
import type { ContractMetadataSupported } from './index.js';
|
||||
|
||||
import { v0ToV1 } from './toV1.js';
|
||||
import { v1ToV2 } from './toV2.js';
|
||||
import { v2ToV3 } from './toV3.js';
|
||||
import { v3ToV4 } from './toV4.js';
|
||||
|
||||
// The versions where an enum is used, aka V0 is missing
|
||||
// (Order from newest, i.e. we expect more on newest vs oldest)
|
||||
export const enumVersions = ['V5', 'V4', 'V3', 'V2', 'V1'] as const;
|
||||
|
||||
type Versions = typeof enumVersions[number] | 'V0';
|
||||
|
||||
type Converter = (registry: Registry, vx: any) => ContractMetadataSupported;
|
||||
|
||||
// Helper to convert metadata from one step to the next
|
||||
function createConverter <I, O> (next: (registry: Registry, input: O) => ContractMetadataSupported, step: (registry: Registry, input: I) => O): (registry: Registry, input: I) => ContractMetadataSupported {
|
||||
return (registry: Registry, input: I): ContractMetadataSupported =>
|
||||
next(registry, step(registry, input));
|
||||
}
|
||||
|
||||
export function v5ToLatestCompatible (_registry: Registry, v5: ContractMetadataV5): ContractMetadataV5 {
|
||||
return v5;
|
||||
}
|
||||
|
||||
export function v4ToLatestCompatible (_registry: Registry, v4: ContractMetadataV4): ContractMetadataV4 {
|
||||
return v4;
|
||||
}
|
||||
|
||||
export const v3ToLatestCompatible = /*#__PURE__*/ createConverter(v4ToLatestCompatible, v3ToV4);
|
||||
export const v2ToLatestCompatible = /*#__PURE__*/ createConverter(v3ToLatestCompatible, v2ToV3);
|
||||
export const v1ToLatestCompatible = /*#__PURE__*/ createConverter(v2ToLatestCompatible, v1ToV2);
|
||||
export const v0ToLatestCompatible = /*#__PURE__*/ createConverter(v1ToLatestCompatible, v0ToV1);
|
||||
|
||||
export const convertVersions: [Versions, Converter][] = [
|
||||
['V5', v5ToLatestCompatible],
|
||||
['V4', v4ToLatestCompatible],
|
||||
['V3', v3ToLatestCompatible],
|
||||
['V2', v2ToLatestCompatible],
|
||||
['V1', v1ToLatestCompatible],
|
||||
['V0', v0ToLatestCompatible]
|
||||
];
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ContractMetadataV0, ContractMetadataV1 } from '@polkadot/types/interfaces';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Text } from '@polkadot/types';
|
||||
@@ -23,11 +23,11 @@ interface ArgsEntry <T extends WithArgs> extends NamedEntry {
|
||||
args: GetArgsType<T>['args'][0][];
|
||||
}
|
||||
|
||||
const ARG_TYPES = <const> {
|
||||
const ARG_TYPES = {
|
||||
ContractConstructorSpec: 'ContractMessageParamSpecV2',
|
||||
ContractEventSpec: 'ContractEventParamSpecV2',
|
||||
ContractMessageSpec: 'ContractMessageParamSpecV2'
|
||||
};
|
||||
} as const;
|
||||
|
||||
function v1ToV2Label (entry: NamedEntry): { label: Text } {
|
||||
return objectSpread({}, entry, {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ContractMetadataV2, ContractMetadataV3 } from '@polkadot/types/interfaces';
|
||||
|
||||
@@ -1,9 +1,21 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ContractMetadataV3, ContractMetadataV4 } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { objectSpread } from '@polkadot/util';
|
||||
|
||||
export function v3ToV4 (registry: Registry, v3: ContractMetadataV3): ContractMetadataV4 {
|
||||
return v3;
|
||||
return registry.createType('ContractMetadataV4', objectSpread({}, v3, {
|
||||
spec: objectSpread({}, v3.spec, {
|
||||
constructors: v3.spec.constructors.map((c) =>
|
||||
registry.createType('ContractConstructorSpecV4', objectSpread({}, c))
|
||||
),
|
||||
messages: v3.spec.messages.map((m) =>
|
||||
registry.createType('ContractMessageSpecV3', objectSpread({}, m))
|
||||
)
|
||||
}),
|
||||
version: registry.createType('Text', '4')
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '@polkadot/api-augment';
|
||||
@@ -1,14 +1,14 @@
|
||||
// Copyright 2017-2023 @polkadot/api authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiBase } from '@polkadot/api/base';
|
||||
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
|
||||
import type { WeightV2 } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { ApiBase } from '@polkadot/api/base';
|
||||
import { isFunction } from '@polkadot/util';
|
||||
|
||||
import { Abi } from '../Abi';
|
||||
import { Abi } from '../Abi/index.js';
|
||||
|
||||
export abstract class Base<ApiType extends ApiTypes> {
|
||||
readonly abi: Abi;
|
||||
|
||||
@@ -1,29 +1,27 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiBase } from '@polkadot/api/base';
|
||||
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
||||
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
|
||||
import type { AccountId, EventRecord, Hash } from '@polkadot/types/interfaces';
|
||||
import type { ISubmittableResult } from '@polkadot/types/types';
|
||||
import type { AbiConstructor, BlueprintOptions } from '../types';
|
||||
import type { MapConstructorExec } from './types';
|
||||
import type { Abi } from '../Abi/index.js';
|
||||
import type { AbiConstructor, BlueprintOptions } from '../types.js';
|
||||
import type { MapConstructorExec } from './types.js';
|
||||
|
||||
import { SubmittableResult } from '@polkadot/api';
|
||||
import { ApiBase } from '@polkadot/api/base';
|
||||
import { BN_ZERO, isUndefined } from '@polkadot/util';
|
||||
|
||||
import { Abi } from '../Abi';
|
||||
import { applyOnEvent } from '../util';
|
||||
import { Base } from './Base';
|
||||
import { Contract } from './Contract';
|
||||
import { convertWeight, createBluePrintTx, encodeSalt } from './util';
|
||||
import { applyOnEvent } from '../util.js';
|
||||
import { Base } from './Base.js';
|
||||
import { Contract } from './Contract.js';
|
||||
import { convertWeight, createBluePrintTx, encodeSalt } from './util.js';
|
||||
|
||||
export interface BlueprintConstructor<ApiType extends ApiTypes> {
|
||||
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash | Uint8Array): Blueprint<ApiType>;
|
||||
}
|
||||
export type BlueprintConstructor<ApiType extends ApiTypes> = new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash | Uint8Array) => Blueprint<ApiType>;
|
||||
|
||||
export class BlueprintSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult {
|
||||
readonly contract?: Contract<ApiType>;
|
||||
readonly contract?: Contract<ApiType> | undefined;
|
||||
|
||||
constructor (result: ISubmittableResult, contract?: Contract<ApiType>) {
|
||||
super(result);
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
/// <reference types="@polkadot/dev-test/globals.d.ts" />
|
||||
|
||||
import fs from 'node:fs';
|
||||
|
||||
import { toPromiseMethod } from '@polkadot/api';
|
||||
|
||||
import v0contractFlipper from '../test/contracts/ink/v0/flipper.contract.json' assert { type: 'json' };
|
||||
import v0abiFlipper from '../test/contracts/ink/v0/flipper.json' assert { type: 'json' };
|
||||
import v1contractFlipper from '../test/contracts/ink/v1/flipper.contract.json' assert { type: 'json' };
|
||||
import { Code } from './Code';
|
||||
import { mockApi } from './mock';
|
||||
import { Code } from './Code.js';
|
||||
import { mockApi } from './mock.js';
|
||||
|
||||
const v0wasmFlipper = fs.readFileSync(path.join(__dirname, '../test/contracts/ink/v0/flipper.wasm'));
|
||||
const v0wasmFlipper = fs.readFileSync(new URL('../test/contracts/ink/v0/flipper.wasm', import.meta.url), 'utf-8');
|
||||
|
||||
describe('Code', (): void => {
|
||||
it('can construct with an individual ABI/WASM combo', (): void => {
|
||||
@@ -27,7 +28,7 @@ describe('Code', (): void => {
|
||||
).not.toThrow();
|
||||
});
|
||||
|
||||
it.only('can construct with an .contract ABI (v1)', (): void => {
|
||||
it('can construct with an .contract ABI (v1)', (): void => {
|
||||
expect(
|
||||
() => new Code(mockApi, v1contractFlipper as Record<string, unknown>, null, toPromiseMethod)
|
||||
).not.toThrow();
|
||||
|
||||
@@ -1,34 +1,32 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiBase } from '@polkadot/api/base';
|
||||
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
||||
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
|
||||
import type { AccountId, EventRecord } from '@polkadot/types/interfaces';
|
||||
import type { ISubmittableResult } from '@polkadot/types/types';
|
||||
import type { Codec } from '@polkadot/types-codec/types';
|
||||
import type { AbiConstructor, BlueprintOptions } from '../types';
|
||||
import type { MapConstructorExec } from './types';
|
||||
import type { Abi } from '../Abi/index.js';
|
||||
import type { AbiConstructor, BlueprintOptions } from '../types.js';
|
||||
import type { MapConstructorExec } from './types.js';
|
||||
|
||||
import { SubmittableResult } from '@polkadot/api';
|
||||
import { ApiBase } from '@polkadot/api/base';
|
||||
import { BN_ZERO, compactAddLength, isUndefined, isWasm, u8aToU8a } from '@polkadot/util';
|
||||
import { BN_ZERO, compactAddLength, isRiscV, isUndefined, isWasm, u8aToU8a } from '@polkadot/util';
|
||||
|
||||
import { Abi } from '../Abi';
|
||||
import { applyOnEvent } from '../util';
|
||||
import { Base } from './Base';
|
||||
import { Blueprint } from './Blueprint';
|
||||
import { Contract } from './Contract';
|
||||
import { convertWeight, createBluePrintTx, encodeSalt } from './util';
|
||||
import { applyOnEvent } from '../util.js';
|
||||
import { Base } from './Base.js';
|
||||
import { Blueprint } from './Blueprint.js';
|
||||
import { Contract } from './Contract.js';
|
||||
import { convertWeight, createBluePrintTx, encodeSalt } from './util.js';
|
||||
|
||||
export interface CodeConstructor<ApiType extends ApiTypes> {
|
||||
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined): Code<ApiType>;
|
||||
}
|
||||
export type CodeConstructor<ApiType extends ApiTypes> = new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined) => Code<ApiType>;
|
||||
|
||||
export class CodeSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult {
|
||||
readonly blueprint?: Blueprint<ApiType>;
|
||||
readonly contract?: Contract<ApiType>;
|
||||
readonly blueprint?: Blueprint<ApiType> | undefined;
|
||||
readonly contract?: Contract<ApiType> | undefined;
|
||||
|
||||
constructor (result: ISubmittableResult, blueprint?: Blueprint<ApiType>, contract?: Contract<ApiType>) {
|
||||
constructor (result: ISubmittableResult, blueprint?: Blueprint<ApiType> | undefined, contract?: Contract<ApiType> | undefined) {
|
||||
super(result);
|
||||
|
||||
this.blueprint = blueprint;
|
||||
@@ -36,6 +34,12 @@ export class CodeSubmittableResult<ApiType extends ApiTypes> extends Submittable
|
||||
}
|
||||
}
|
||||
|
||||
// checks to see if the code (or at least the header)
|
||||
// is a valid/supported format
|
||||
function isValidCode (code: Uint8Array): boolean {
|
||||
return isWasm(code) || isRiscV(code);
|
||||
}
|
||||
|
||||
export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
readonly code: Uint8Array;
|
||||
|
||||
@@ -44,12 +48,12 @@ export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined, decorateMethod: DecorateMethod<ApiType>) {
|
||||
super(api, abi, decorateMethod);
|
||||
|
||||
this.code = isWasm(this.abi.info.source.wasm)
|
||||
this.code = isValidCode(this.abi.info.source.wasm)
|
||||
? this.abi.info.source.wasm
|
||||
: u8aToU8a(wasm);
|
||||
|
||||
if (!isWasm(this.code)) {
|
||||
throw new Error('No WASM code provided');
|
||||
if (!isValidCode(this.code)) {
|
||||
throw new Error('Invalid code provided');
|
||||
}
|
||||
|
||||
this.abi.constructors.forEach((c): void => {
|
||||
@@ -77,14 +81,14 @@ export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
encodeSalt(salt)
|
||||
).withResultTransform((result: ISubmittableResult) =>
|
||||
new CodeSubmittableResult(result, ...(applyOnEvent(result, ['CodeStored', 'Instantiated'], (records: EventRecord[]) =>
|
||||
records.reduce<[Blueprint<ApiType>?, Contract<ApiType>?]>(([blueprint, contract], { event }) =>
|
||||
records.reduce<[Blueprint<ApiType> | undefined, Contract<ApiType> | undefined]>(([blueprint, contract], { event }) =>
|
||||
this.api.events.contracts.Instantiated.is(event)
|
||||
? [blueprint, new Contract<ApiType>(this.api, this.abi, (event as unknown as { data: [Codec, AccountId] }).data[1], this._decorateMethod)]
|
||||
: this.api.events.contracts.CodeStored.is(event)
|
||||
? [new Blueprint<ApiType>(this.api, this.abi, (event as unknown as { data: [AccountId] }).data[0], this._decorateMethod), contract]
|
||||
: [blueprint, contract],
|
||||
[])
|
||||
) || []))
|
||||
[undefined, undefined])
|
||||
) || [undefined, undefined]))
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,28 +1,25 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiBase } from '@polkadot/api/base';
|
||||
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
||||
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
|
||||
import type { Bytes } from '@polkadot/types';
|
||||
import type { AccountId, ContractExecResult, EventRecord, Weight, WeightV2 } from '@polkadot/types/interfaces';
|
||||
import type { ISubmittableResult } from '@polkadot/types/types';
|
||||
import type { AbiMessage, ContractCallOutcome, ContractOptions, DecodedEvent, WeightAll } from '../types';
|
||||
import type { ContractCallResult, ContractCallSend, ContractQuery, ContractTx, MapMessageQuery, MapMessageTx } from './types';
|
||||
import type { Abi } from '../Abi/index.js';
|
||||
import type { AbiMessage, ContractCallOutcome, ContractOptions, DecodedEvent, WeightAll } from '../types.js';
|
||||
import type { ContractCallResult, ContractCallSend, ContractQuery, ContractTx, MapMessageQuery, MapMessageTx } from './types.js';
|
||||
|
||||
import { map } from 'rxjs';
|
||||
|
||||
import { SubmittableResult } from '@polkadot/api';
|
||||
import { ApiBase } from '@polkadot/api/base';
|
||||
import { BN, BN_HUNDRED, BN_ONE, BN_ZERO, isUndefined, logger } from '@polkadot/util';
|
||||
|
||||
import { Abi } from '../Abi';
|
||||
import { applyOnEvent } from '../util';
|
||||
import { Base } from './Base';
|
||||
import { convertWeight, withMeta } from './util';
|
||||
import { applyOnEvent } from '../util.js';
|
||||
import { Base } from './Base.js';
|
||||
import { convertWeight, withMeta } from './util.js';
|
||||
|
||||
export interface ContractConstructor<ApiType extends ApiTypes> {
|
||||
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId): Contract<ApiType>;
|
||||
}
|
||||
export type ContractConstructor<ApiType extends ApiTypes> = new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId) => Contract<ApiType>;
|
||||
|
||||
// As per Rust, 5 * GAS_PER_SEC
|
||||
const MAX_CALL_GAS = new BN(5_000_000_000_000).isub(BN_ONE);
|
||||
@@ -42,7 +39,7 @@ function createTx <ApiType extends ApiTypes> (meta: AbiMessage, fn: (options: Co
|
||||
}
|
||||
|
||||
export class ContractSubmittableResult extends SubmittableResult {
|
||||
readonly contractEvents?: DecodedEvent[];
|
||||
readonly contractEvents?: DecodedEvent[] | undefined;
|
||||
|
||||
constructor (result: ISubmittableResult, contractEvents?: DecodedEvent[]) {
|
||||
super(result);
|
||||
@@ -97,7 +94,7 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
: convertWeight(
|
||||
this.api.consts.system.blockWeights
|
||||
? (this.api.consts.system.blockWeights as unknown as { maxBlock: WeightV2 }).maxBlock
|
||||
: this.api.consts.system.maximumBlockWeight as Weight
|
||||
: this.api.consts.system['maximumBlockWeight'] as Weight
|
||||
).v1Weight.muln(64).div(BN_HUNDRED)
|
||||
);
|
||||
};
|
||||
@@ -117,9 +114,9 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
// ContractEmitted is the current generation, ContractExecution is the previous generation
|
||||
new ContractSubmittableResult(result, applyOnEvent(result, ['ContractEmitted', 'ContractExecution'], (records: EventRecord[]) =>
|
||||
records
|
||||
.map(({ event: { data: [, data] } }): DecodedEvent | null => {
|
||||
.map((record): DecodedEvent | null => {
|
||||
try {
|
||||
return this.abi.decodeEvent(data as Bytes);
|
||||
return this.abi.decodeEvent(record);
|
||||
} catch (error) {
|
||||
l.error(`Unable to decode contract event: ${(error as Error).message}`);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright 2017-2023 @polkadot/api authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { Blueprint, BlueprintSubmittableResult, extendBlueprint } from './Blueprint';
|
||||
export { Code, CodeSubmittableResult, extendCode } from './Code';
|
||||
export { Contract, extendContract } from './Contract';
|
||||
export { Blueprint, BlueprintSubmittableResult, extendBlueprint } from './Blueprint.js';
|
||||
export { Code, CodeSubmittableResult, extendCode } from './Code.js';
|
||||
export { Contract, extendContract } from './Contract.js';
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { ApiBase } from '@polkadot/api/base';
|
||||
import type { ApiBase } from '@polkadot/api/base';
|
||||
|
||||
import { TypeRegistry } from '@polkadot/types';
|
||||
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
||||
import type { ApiTypes, ObsInnerType } from '@polkadot/api/types';
|
||||
import type { AccountId } from '@polkadot/types/interfaces';
|
||||
import type { AbiMessage, BlueprintOptions, ContractCallOutcome, ContractOptions } from '../types';
|
||||
import type { AbiMessage, BlueprintOptions, ContractCallOutcome, ContractOptions } from '../types.js';
|
||||
|
||||
export interface MessageMeta {
|
||||
readonly meta: AbiMessage;
|
||||
@@ -23,9 +23,7 @@ export interface ContractTx<ApiType extends ApiTypes> extends MessageMeta {
|
||||
(options: ContractOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
|
||||
}
|
||||
|
||||
export interface ContractGeneric<O, T> {
|
||||
(messageOrId: AbiMessage | string | number, options: O, ...params: unknown[]): T;
|
||||
}
|
||||
export type ContractGeneric<O, T> = (messageOrId: AbiMessage | string | number, options: O, ...params: unknown[]) => T;
|
||||
|
||||
export type ContractCallResult<ApiType extends ApiTypes, T> = ApiType extends 'rxjs'
|
||||
? Observable<T>
|
||||
@@ -35,14 +33,8 @@ export interface ContractCallSend<ApiType extends ApiTypes> {
|
||||
send (account: string | AccountId | Uint8Array): ContractCallResult<ApiType, ContractCallOutcome>;
|
||||
}
|
||||
|
||||
export interface MapConstructorExec<ApiType extends ApiTypes> {
|
||||
[message: string]: BlueprintDeploy<ApiType>;
|
||||
}
|
||||
export type MapConstructorExec<ApiType extends ApiTypes> = Record<string, BlueprintDeploy<ApiType>>;
|
||||
|
||||
export interface MapMessageTx<ApiType extends ApiTypes> {
|
||||
[message: string]: ContractTx<ApiType>;
|
||||
}
|
||||
export type MapMessageTx<ApiType extends ApiTypes> = Record<string, ContractTx<ApiType>>;
|
||||
|
||||
export interface MapMessageQuery<ApiType extends ApiTypes> {
|
||||
[message: string]: ContractQuery<ApiType>;
|
||||
}
|
||||
export type MapMessageQuery<ApiType extends ApiTypes> = Record<string, ContractQuery<ApiType>>;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { SubmittableResult } from '@polkadot/api';
|
||||
@@ -6,8 +6,8 @@ import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
||||
import type { ApiTypes } from '@polkadot/api/types';
|
||||
import type { WeightV1, WeightV2 } from '@polkadot/types/interfaces';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { AbiConstructor, AbiMessage, BlueprintOptions, WeightAll } from '../types';
|
||||
import type { BlueprintDeploy, ContractGeneric } from './types';
|
||||
import type { AbiConstructor, AbiMessage, BlueprintOptions, WeightAll } from '../types.js';
|
||||
import type { BlueprintDeploy, ContractGeneric } from './types.js';
|
||||
|
||||
import { Bytes } from '@polkadot/types';
|
||||
import { bnToBn, compactAddLength, u8aToU8a } from '@polkadot/util';
|
||||
@@ -35,7 +35,7 @@ export function createBluePrintWithId <T> (fn: (constructorOrId: AbiConstructor
|
||||
export function encodeSalt (salt: Uint8Array | string | null = randomAsU8a()): Uint8Array {
|
||||
return salt instanceof Bytes
|
||||
? salt
|
||||
: salt && salt.length
|
||||
: salt?.length
|
||||
? compactAddLength(u8aToU8a(salt))
|
||||
: EMPTY_SALT;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
|
||||
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { Abi } from './Abi';
|
||||
export { packageInfo } from './packageInfo';
|
||||
// all named
|
||||
export { Abi } from './Abi/index.js';
|
||||
export { packageInfo } from './packageInfo.js';
|
||||
|
||||
export * from './promise';
|
||||
export * from './rx';
|
||||
// all starred
|
||||
export * from './promise/index.js';
|
||||
export * from './rx/index.js';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user