Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6192e60668 | ||
|
|
c5eb40a98d | ||
|
|
ab9b47ba51 | ||
|
|
dc0a5f3dec | ||
|
|
3628a1bf86 | ||
|
|
a51fed491b | ||
|
|
4616865333 | ||
|
|
e840d43463 | ||
|
|
c384311570 | ||
|
|
521d44bb73 | ||
|
|
865fb63002 | ||
|
|
63c58538dc | ||
|
|
4166cb7fa5 | ||
|
|
8810f31eae | ||
|
|
3038edec72 | ||
|
|
9e09c11b0b | ||
|
|
c6d1e00b09 | ||
|
|
c5f467dce1 | ||
|
|
c8ce65f079 | ||
|
|
71a8ff55d6 | ||
|
|
4825d5466d | ||
|
|
c6a0f3b8d5 | ||
|
|
100f008ffa | ||
|
|
02b9136d56 | ||
|
|
8379783835 | ||
|
|
5730005eba | ||
|
|
f701c398c3 | ||
|
|
5a90d02f1f | ||
|
|
4dad961106 | ||
|
|
d41491e859 | ||
|
|
1fbfbac062 | ||
|
|
a7d826f839 | ||
|
|
8649c17dd7 | ||
|
|
9b794e963d | ||
|
|
ad9a162b01 | ||
|
|
82c16e2aed | ||
|
|
e6a432049c | ||
|
|
84c70a850b | ||
|
|
937efb631b | ||
|
|
99898e3310 | ||
|
|
d540355729 | ||
|
|
5fac4d9398 | ||
|
|
baa2caae68 | ||
|
|
62d9889737 | ||
|
|
7c0e9831c3 | ||
|
|
c601e4163a | ||
|
|
1404994792 | ||
|
|
a95d36d67a | ||
|
|
48b43b9129 | ||
|
|
c60c1efd46 | ||
|
|
ef54cfb29b | ||
|
|
23c23a81b3 | ||
|
|
3d8ba0f1bf | ||
|
|
b39efbeaf2 | ||
|
|
b305caee6e | ||
|
|
143a149628 | ||
|
|
8f80c0391d | ||
|
|
1364cb8264 | ||
|
|
0e12ebad1d | ||
|
|
8dc0f0486d | ||
|
|
6159270465 | ||
|
|
40b3c54916 | ||
|
|
85e7e3c11c | ||
|
|
3ad01d27b2 | ||
|
|
05b0ff2aba | ||
|
|
84c9da8374 | ||
|
|
6222672faa | ||
|
|
96f2f83cd5 | ||
|
|
f444d9ed75 | ||
|
|
d93a127d88 | ||
|
|
3a9a35a392 | ||
|
|
5c655ca029 | ||
|
|
1808cb0a9d | ||
|
|
54e94ec6bc | ||
|
|
22db4f1c3d | ||
|
|
e514a59e63 | ||
|
|
3318a7566f | ||
|
|
fd568c0341 | ||
|
|
2edcef6ff5 | ||
|
|
264cc9365e | ||
|
|
6e23a27ce1 | ||
|
|
38d39a4d13 | ||
|
|
6954ec794c | ||
|
|
3ee6eb5a13 | ||
|
|
9d1c848f28 | ||
|
|
1d3258f537 | ||
|
|
e8d7013172 | ||
|
|
55ccdd2fbc | ||
|
|
0449dd7b51 | ||
|
|
4d44c1187b | ||
|
|
f2eff6628b | ||
|
|
4923bc3e35 | ||
|
|
47da005bee | ||
|
|
7e82ab3d43 | ||
|
|
8df9642e04 | ||
|
|
6f76e1c4cc | ||
|
|
1d65cc5642 | ||
|
|
722bb5222e | ||
|
|
49e2daf8f2 | ||
|
|
88e3c900b7 | ||
|
|
a127dea5e4 | ||
|
|
d29660dc4e | ||
|
|
1870ad26d5 | ||
|
|
558a42c6ed | ||
|
|
6708264688 | ||
|
|
abac14f983 | ||
|
|
3cf9040115 | ||
|
|
37dcd78c4a | ||
|
|
6b3e4cc90e | ||
|
|
79ab347cbe | ||
|
|
bc302c5cb7 | ||
|
|
9972776afb | ||
|
|
0b2a3c4e74 | ||
|
|
ccac72fece | ||
|
|
8d5209d7dc | ||
|
|
5c2bd9dfa7 | ||
|
|
b2e71be983 | ||
|
|
d2f3672f2c | ||
|
|
6fb7849091 | ||
|
|
983c77fe61 | ||
|
|
256e35386a | ||
|
|
8beb03b177 | ||
|
|
967f5e980a | ||
|
|
00a27efaee | ||
|
|
a7163fb1ba | ||
|
|
4c6dd53c3b | ||
|
|
61199ffb2b | ||
|
|
dbfb03760c | ||
|
|
c9b1fcdb0a | ||
|
|
29953edd24 | ||
|
|
96a23bda50 | ||
|
|
09a8d80144 | ||
|
|
5637579879 | ||
|
|
448ce0a76e | ||
|
|
a6a062378d | ||
|
|
40c78f95d2 | ||
|
|
b0e135c5ca | ||
|
|
22218bd9b0 | ||
|
|
149b7d9ee6 | ||
|
|
9a7b91a6f5 | ||
|
|
80b165ba34 | ||
|
|
95a4512530 | ||
|
|
15a315dede | ||
|
|
32548a34a4 | ||
|
|
50142d7e63 | ||
|
|
1ed6117e3f | ||
|
|
a392025a15 | ||
|
|
fbeb478602 | ||
|
|
2cdd24445c | ||
|
|
e545f6f2b3 | ||
|
|
1aa2b7e1ff | ||
|
|
677d0c9969 | ||
|
|
775fff5333 | ||
|
|
9345a18de0 | ||
|
|
a4256396ee | ||
|
|
776600ef00 | ||
|
|
1a31043cc4 | ||
|
|
66159955ac | ||
|
|
03c725f637 | ||
|
|
e5708a7e7e | ||
|
|
fb5ce83f74 | ||
|
|
6c3bd2f408 | ||
|
|
66e01afe26 | ||
|
|
71f9bdf368 | ||
|
|
7af9330026 | ||
|
|
d5aff171e4 | ||
|
|
543de63af8 | ||
|
|
cdcdf589dd | ||
|
|
1330b58afd | ||
|
|
0b2ec65e88 | ||
|
|
8840e29063 | ||
|
|
b9925b569d | ||
|
|
2640b65be9 | ||
|
|
d64a0ca295 | ||
|
|
79eeed3f9a | ||
|
|
d154b535e6 | ||
|
|
87c2690fc2 | ||
|
|
8f0ca37c60 | ||
|
|
f7dd4a3552 | ||
|
|
abcad05a91 | ||
|
|
ba188dcc0d | ||
|
|
ae2422f350 | ||
|
|
576efc0239 | ||
|
|
111540177f | ||
|
|
43ee566669 | ||
|
|
39299188b0 | ||
|
|
5d13bfb925 | ||
|
|
c759ff0c12 | ||
|
|
0cc34dff85 | ||
|
|
1682a8f096 | ||
|
|
be572aabf0 | ||
|
|
7a6d19d241 | ||
|
|
f4a590d7f8 | ||
|
|
771e5f3bcf | ||
|
|
1ba427356d | ||
|
|
aad497e9d2 | ||
|
|
95fc2b2c99 | ||
|
|
b7b707249b | ||
|
|
ce95e305f3 | ||
|
|
4ea793f55e | ||
|
|
bb0b365dfe | ||
|
|
756f817d93 | ||
|
|
df4bda1fc8 | ||
|
|
a98e9543b8 | ||
|
|
84abaff414 | ||
|
|
29d5460cdd | ||
|
|
e2d0de4f6c | ||
|
|
8e32777efa | ||
|
|
39b1de326c | ||
|
|
6fb6c40c7d | ||
|
|
badb10bdd9 | ||
|
|
235a7b1aa9 | ||
|
|
b7d65fb506 | ||
|
|
8eb0524fed | ||
|
|
bab50b2d74 | ||
|
|
bb75b42273 | ||
|
|
949e429d04 |
@@ -48,3 +48,9 @@
|
|||||||
6.10.3
|
6.10.3
|
||||||
|
|
||||||
7.0.2
|
7.0.2
|
||||||
|
|
||||||
|
7.14.2
|
||||||
|
7.14.3
|
||||||
|
8.0.2
|
||||||
|
8.3.2
|
||||||
|
8.4.2
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
_book/
|
_book/
|
||||||
build/
|
build/
|
||||||
|
build-cjs/
|
||||||
|
build-esm/
|
||||||
build-docs/
|
build-docs/
|
||||||
coverage/
|
coverage/
|
||||||
docs/.vuepress/dist/
|
docs/.vuepress/dist/
|
||||||
|
|||||||
+166
@@ -1,5 +1,171 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## 8.6.1 May 29, 2022
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Add codec support for specialized `Option<bool>`
|
||||||
|
- Optimization for `createClass` with shortcut typeDef creation
|
||||||
|
- Optimization of `registry.getOrUnknown` with lookup cache
|
||||||
|
- Optimization of Array allocations in decoding
|
||||||
|
- Use `compactFromU8aLim` & `u8aConcatStrict` variants
|
||||||
|
- Adjust `.inspect()` for `ExtrinsicPayload`
|
||||||
|
- Adjust Kusama `StakingLedger` for runtime 1051
|
||||||
|
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 8.5.1 May 22, 2022
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Bump `@substrate/connect` to 0.7.5 (Thanks to https://github.com/wirednkod)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Adjust extrinsic inspect for signed/unsigned
|
||||||
|
- Add support for `mmr_generateBatchProof` RPC
|
||||||
|
- Add additional `isCodec` checks to error/event `.is`
|
||||||
|
- Add support for `Vec<Option<X>>` in typegen
|
||||||
|
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 8.4.2 May 15, 2022
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Expand/fix TS typings for `MortalEra.{birth, death}(...)`
|
||||||
|
|
||||||
|
|
||||||
|
## 8.4.1 May 14, 2022
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Added support for typegen over `Range/RangeInclusive` types
|
||||||
|
- Add explicit support for `Call` typegen (inclusive of non-defaults)
|
||||||
|
- Deupe `wss://` handling in `polkadot-types-from-{chain, defs}`
|
||||||
|
- Allow for optional `definitions.ts` in typegen (only use chain)
|
||||||
|
- Optimize `Compact<*>` decoding in Uint8Array streams
|
||||||
|
- Use `I*` interfaces for extrinsic payload getters
|
||||||
|
- Re-add support for historic linked-map queries
|
||||||
|
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||||
|
- Add latest upgrade blocks for Polkadot, Kusama & Westend
|
||||||
|
|
||||||
|
|
||||||
|
## 8.3.2 May 8, 2022
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Bump `@substrate/connect` to 0.7.4 (Thanks to https://github.com/wirednkod)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Adjust `BTreeSet` in typegen top-level generation
|
||||||
|
|
||||||
|
|
||||||
|
## 8.3.1 May 1, 2022
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Fetch metadata via WS for `types-from-defs` (Thanks to https://github.com/alex-nax)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Extract metadata v14 `BTreeSet` types into correct type
|
||||||
|
- Assert to ensure that `[u8; <size>]` has exact sizes (non-u8a inputs)
|
||||||
|
- Adjust `tx.paymentInfo` signing process for existing signature
|
||||||
|
- Add Kusama 9190 upgrade block
|
||||||
|
- Add Westend 9200 upgrade block
|
||||||
|
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 8.2.1 Apr 24, 2022
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Make WS timeout check configurable (Thanks to https://github.com/isSerge)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Don't fake signature for `paymentInfo` if already signed
|
||||||
|
- Remove `api.derive.balances.fees` (use direct constants as applicable)
|
||||||
|
- Add Westend 9190 upgrade block
|
||||||
|
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 8.1.1 Apr 17, 2022
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Adjust typegen for `Vec<{ struct: <type> }>` (Thanks to https://github.com/zannis)
|
||||||
|
- Adjust typegen __dirname for ESM (Thanks to https://github.com/drewstone)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Fix `entriesPaged` where no `at?: BlockHash` is specified
|
||||||
|
- Apply windcard matches for `democracy::vote::Vote` and `identity::type::Data`
|
||||||
|
- Adjust default "no RPC response" timeout to 60s
|
||||||
|
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 8.0.2 Apr 11, 2022
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Detect typegen template location for commonjs execution
|
||||||
|
|
||||||
|
|
||||||
|
## 8.0.1 Apr 10, 2022
|
||||||
|
|
||||||
|
- **Breaking change** In this major version the commonjs outputs are moved to a sub-folder. Since the export map and main field in package.json does reflect this change, there should be no usage changes. However the packages here will all need to be on the same version for internal linkage.
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Improve `rpc-provider` README (Thanks to https://github.com/josepot)
|
||||||
|
- Add handling for `Vec<[<Type>;<length>]>` in typegen (Thanks to https://github.com/zannis)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Add support for `apiAt.tx(...)` to construct at a specific point
|
||||||
|
- Add basic `api.derive.bagsList.*` support
|
||||||
|
- Return sorted names for `api.registry.lookup.names`
|
||||||
|
- Optimize JSONRPC requests/response handling
|
||||||
|
- Output commonjs files under the `cjs/**` root
|
||||||
|
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||||
|
- Add latest Polkadot 9180 upgrade block
|
||||||
|
- Update to `@polkadot/util` 9.0.1
|
||||||
|
|
||||||
|
|
||||||
|
## 7.15.1 Apr 3, 2022
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Export `WellKnownChain` for `substrate-connect` (Thanks to https://github.com/josepot)
|
||||||
|
- Add support for `{entries, keys}Paged` in `.at` (Thanks to https://github.com/xlc)
|
||||||
|
- Align `WeightsPerClass` interface on `maxExtrinsic` (Thanks to https://github.com/HackFisher)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Cater for `DispatchError` with `error` as `[u8; 4]`
|
||||||
|
- Add in-flight cache for parallel same-version metadata queries
|
||||||
|
- Cater for lazy `@polkadot/util-crypto` init (adjustment for React Native)
|
||||||
|
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||||
|
- Update latest Westend & Kusama (up to 9180) upgrade blocks
|
||||||
|
|
||||||
|
|
||||||
|
## 7.14.3 Mar 28, 2022
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Ensure `BitVec` with MSB does not fail (used in Polkadot `DeliveredMessages`)
|
||||||
|
|
||||||
|
|
||||||
|
## 7.14.2 Mar 28, 2022
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Don't export `ScProvider` top-level in `@polkadot/rpc-provider`
|
||||||
|
|
||||||
|
|
||||||
## 7.14.1 Mar 27, 2022
|
## 7.14.1 Mar 27, 2022
|
||||||
|
|
||||||
Contributed:
|
Contributed:
|
||||||
|
|||||||
+8
-5
@@ -1,27 +1,29 @@
|
|||||||
2884 Jaco Correct release to 7.14.1 (#4691)
|
2982 Jaco 8.6.1 (#4870)
|
||||||
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
|
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
|
||||||
37 Keith Ingram Update contract types and rpc (#4541)
|
37 Keith Ingram Update contract types and rpc (#4541)
|
||||||
35 Stefanie Doll Updated child storage parameters (#1709)
|
35 Stefanie Doll Updated child storage parameters (#1709)
|
||||||
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
|
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
|
||||||
|
16 Xiliang Chen implement entriesPaged and keysPages for query at (#4701)
|
||||||
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
|
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
|
||||||
15 Xiliang Chen add Authority origin (#3645)
|
|
||||||
11 Ian He HttpProvider support clone() (#3949)
|
11 Ian He HttpProvider support clone() (#3949)
|
||||||
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
|
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
|
||||||
5 Chevdor Fix metadata package link (#3458)
|
5 Chevdor Fix metadata package link (#3458)
|
||||||
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
|
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
|
||||||
|
4 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
|
||||||
4 Alex Wang fix issue that creates duplicate providers (#983)
|
4 Alex Wang fix issue that creates duplicate providers (#983)
|
||||||
4 Alexander Popiak Add asset id in signing (#4009)
|
4 Alexander Popiak Add asset id in signing (#4009)
|
||||||
4 Joshy Orndorff spelling; efect -> effect (#2295)
|
4 Joshy Orndorff spelling; efect -> effect (#2295)
|
||||||
4 Nantian fix bigint type (#3869)
|
4 Nantian fix bigint type (#3869)
|
||||||
|
4 Nikos Kontakis Update substrate connect to 0.7.5 (#4835)
|
||||||
4 Scott Twiname Add support for historical BlockNumber rpc methods (#4574)
|
4 Scott Twiname Add support for historical BlockNumber rpc methods (#4574)
|
||||||
4 Thibaut Sardan no subscription for http (#3127)
|
4 Thibaut Sardan no subscription for http (#3127)
|
||||||
3 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
|
|
||||||
3 André Silva add support for ValidationCodeHash (#3640)
|
3 André Silva add support for ValidationCodeHash (#3640)
|
||||||
3 Antoine Estienne Adapted to display moonbeam author (#3108)
|
3 Antoine Estienne Adapted to display moonbeam author (#3108)
|
||||||
3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707)
|
3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707)
|
||||||
3 Ewa Kowalska Handle no council for bounties proposals (#3062)
|
3 Ewa Kowalska Handle no council for bounties proposals (#3062)
|
||||||
3 hamidra add support for n key entries for NMaps (#3886)
|
3 hamidra add support for n key entries for NMaps (#3886)
|
||||||
3 Hamza Tokuchi more typos (#2532)
|
3 Hamza Tokuchi more typos (#2532)
|
||||||
|
3 Josep M Sobrepere docs: improve rpc-provider README (#4719)
|
||||||
3 Julien Eluard Fixed typos about module balances (#1402)
|
3 Julien Eluard Fixed typos about module balances (#1402)
|
||||||
3 KarishmaBothara Backward compatibility thing (#3511)
|
3 KarishmaBothara Backward compatibility thing (#3511)
|
||||||
3 Miguel Hervas Adding RT4 Types (#3007)
|
3 Miguel Hervas Adding RT4 Types (#3007)
|
||||||
@@ -30,15 +32,16 @@
|
|||||||
2 Alexander Krupenkin Add [u8; 33] type width for U8aFixed type (#2391)
|
2 Alexander Krupenkin Add [u8; 33] type width for U8aFixed type (#2391)
|
||||||
2 Branan Riley Add proxy type for Centrifuge (#3940)
|
2 Branan Riley Add proxy type for Centrifuge (#3940)
|
||||||
2 Caio Add `Range` and `RangeInclusive` types (#3791)
|
2 Caio Add `Range` and `RangeInclusive` types (#3791)
|
||||||
|
2 HackFisher Update maxExtrinsic definition (#4703)
|
||||||
2 Jakub Pánik All heads subscription (#1899)
|
2 Jakub Pánik All heads subscription (#1899)
|
||||||
2 James Lefrère Add `.eq()` usage to docs and fix docs typos (#1405)
|
2 James Lefrère Add `.eq()` usage to docs and fix docs typos (#1405)
|
||||||
2 Keith Yeung Allow keyPrefix to accept an additional argument for double maps (#2230)
|
2 Keith Yeung Allow keyPrefix to accept an additional argument for double maps (#2230)
|
||||||
2 MOZGIII Follow-up fix after #4665 (#4666)
|
2 MOZGIII Follow-up fix after #4665 (#4666)
|
||||||
2 Nikos Kontakis Add auction in shared types (#4085)
|
|
||||||
2 Paweł Nguyen Fix a minor typo in cookbook blocks docs (#2294)
|
2 Paweł Nguyen Fix a minor typo in cookbook blocks docs (#2294)
|
||||||
2 sung wu Update tx.md (#2485)
|
2 sung wu Update tx.md (#2485)
|
||||||
2 Veliko Abi constructor takes different parameters (#3347)
|
2 Veliko Abi constructor takes different parameters (#3347)
|
||||||
2 Wei Tang Use /usr/bin/env bash instead of /bin/bash (#2053)
|
2 Wei Tang Use /usr/bin/env bash instead of /bin/bash (#2053)
|
||||||
|
2 Zannis Kalampoukis fix: Typegen handles structs and vectors of structs without erroring (#4743)
|
||||||
2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594)
|
2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594)
|
||||||
1 Andreea Eftene Add storage deposit support (#4304)
|
1 Andreea Eftene Add storage deposit support (#4304)
|
||||||
1 Brad Larson [NEW] Support for custom headers with providers (#2423)
|
1 Brad Larson [NEW] Support for custom headers with providers (#2423)
|
||||||
@@ -65,7 +68,6 @@
|
|||||||
1 JesseAbram added 07 Example showing how to make a transfer with allowed block permissions folder in docs (#1062)
|
1 JesseAbram added 07 Example showing how to make a transfer with allowed block permissions folder in docs (#1062)
|
||||||
1 Joey don't throw error at `onSocketClose` (#4363)
|
1 Joey don't throw error at `onSocketClose` (#4363)
|
||||||
1 Jordan Allow typegen for custom RPCs (#2876)
|
1 Jordan Allow typegen for custom RPCs (#2876)
|
||||||
1 Josep M Sobrepere Add smoldot rpc provider (#4672)
|
|
||||||
1 JQQQ Allow rpc expose definition/ metadata (#3488)
|
1 JQQQ Allow rpc expose definition/ metadata (#3488)
|
||||||
1 Kian Paimani Update definitions.ts (#2514)
|
1 Kian Paimani Update definitions.ts (#2514)
|
||||||
1 Krzysztof Jelski Derive for bounties and descriptions (#2925)
|
1 Krzysztof Jelski Derive for bounties and descriptions (#2925)
|
||||||
@@ -91,6 +93,7 @@
|
|||||||
1 satellitex Add traits replace rules. for invalid cases `::<type>` and `<type>::`. (#885)
|
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 Satyam Agrawal update as per the 0.97.0-beta.38 release (#1617)
|
||||||
1 Sean Young Solang requires u256 and i256 types (#2752)
|
1 Sean Young Solang requires u256 and i256 types (#2752)
|
||||||
|
1 serge make WS provider timeout configurable (#4758)
|
||||||
1 Sergei Pepyakin INK! -> ink! (#1347)
|
1 Sergei Pepyakin INK! -> ink! (#1347)
|
||||||
1 WoeOm adapt Darwinia, Crab Network types (#3498)
|
1 WoeOm adapt Darwinia, Crab Network types (#3498)
|
||||||
1 Xat_MassacrE Fix packages/types/src/codec/utils/encodeTypes.ts encodeSubTypes bug (#1544)
|
1 Xat_MassacrE Fix packages/types/src/codec/utils/encodeTypes.ts encodeSubTypes bug (#1544)
|
||||||
|
|||||||
@@ -15,8 +15,5 @@ module.exports = {
|
|||||||
// eslint-disable-next-line sort-keys
|
// eslint-disable-next-line sort-keys
|
||||||
'@polkadot/types(.*)$': '<rootDir>/packages/types/src/$1'
|
'@polkadot/types(.*)$': '<rootDir>/packages/types/src/$1'
|
||||||
},
|
},
|
||||||
"transformIgnorePatterns": [
|
|
||||||
'/node_modules/(?!@polkadot|@substrate/connect|@babel/runtime/helpers/esm/)'
|
|
||||||
],
|
|
||||||
testTimeout: 30000
|
testTimeout: 30000
|
||||||
};
|
};
|
||||||
|
|||||||
+6
-6
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"version": "7.14.1",
|
"version": "8.6.1",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
],
|
],
|
||||||
@@ -31,15 +31,15 @@
|
|||||||
"test:watch": "polkadot-dev-run-test --watch"
|
"test:watch": "polkadot-dev-run-test --watch"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.17.8",
|
"@babel/core": "^7.18.2",
|
||||||
"@babel/register": "^7.17.7",
|
"@babel/register": "^7.17.7",
|
||||||
"@babel/runtime": "^7.17.8",
|
"@babel/runtime": "^7.18.3",
|
||||||
"@polkadot/dev": "^0.65.101",
|
"@polkadot/dev": "^0.66.30",
|
||||||
"@polkadot/typegen": "workspace:packages/typegen",
|
"@polkadot/typegen": "workspace:packages/typegen",
|
||||||
"@types/jest": "^27.4.1",
|
"@types/jest": "^27.5.1",
|
||||||
"copyfiles": "^2.4.1"
|
"copyfiles": "^2.4.1"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"typescript": "^4.6.3"
|
"typescript": "^4.6.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,18 +20,18 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.14.1",
|
"version": "8.6.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.17.8",
|
"@babel/runtime": "^7.18.3",
|
||||||
"@polkadot/api-base": "7.14.1",
|
"@polkadot/api-base": "8.6.1",
|
||||||
"@polkadot/rpc-augment": "7.14.1",
|
"@polkadot/rpc-augment": "8.6.1",
|
||||||
"@polkadot/types": "7.14.1",
|
"@polkadot/types": "8.6.1",
|
||||||
"@polkadot/types-augment": "7.14.1",
|
"@polkadot/types-augment": "8.6.1",
|
||||||
"@polkadot/types-codec": "7.14.1",
|
"@polkadot/types-codec": "8.6.1",
|
||||||
"@polkadot/util": "^8.7.1"
|
"@polkadot/util": "^9.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/types-support": "7.14.1"
|
"@polkadot/types-support": "8.6.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type { ApiTypes } 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, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { Codec } from '@polkadot/types-codec/types';
|
import type { Codec } from '@polkadot/types-codec/types';
|
||||||
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
|
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
|
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/consts' {
|
declare module '@polkadot/api-base/types/consts' {
|
||||||
export interface AugmentedConsts<ApiType extends ApiTypes> {
|
export interface AugmentedConsts<ApiType extends ApiTypes> {
|
||||||
@@ -63,58 +63,6 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
bagsList: {
|
|
||||||
/**
|
|
||||||
* The list of thresholds separating the various bags.
|
|
||||||
*
|
|
||||||
* Ids are separated into unsorted bags according to their score. This specifies the
|
|
||||||
* thresholds separating the bags. An id's bag is the largest bag for which the id's score
|
|
||||||
* is less than or equal to its upper threshold.
|
|
||||||
*
|
|
||||||
* When ids are iterated, higher bags are iterated completely before lower bags. This means
|
|
||||||
* that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower
|
|
||||||
* score, but peer ids within a particular bag are sorted in insertion order.
|
|
||||||
*
|
|
||||||
* # Expressing the constant
|
|
||||||
*
|
|
||||||
* This constant must be sorted in strictly increasing order. Duplicate items are not
|
|
||||||
* permitted.
|
|
||||||
*
|
|
||||||
* There is an implied upper limit of `Score::MAX`; that value does not need to be
|
|
||||||
* specified within the bag. For any two threshold lists, if one ends with
|
|
||||||
* `Score::MAX`, the other one does not, and they are otherwise equal, the two
|
|
||||||
* lists will behave identically.
|
|
||||||
*
|
|
||||||
* # Calculation
|
|
||||||
*
|
|
||||||
* It is recommended to generate the set of thresholds in a geometric series, such that
|
|
||||||
* there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *
|
|
||||||
* constant_ratio).max(threshold[k] + 1)` for all `k`.
|
|
||||||
*
|
|
||||||
* The helpers in the `/utils/frame/generate-bags` module can simplify this calculation.
|
|
||||||
*
|
|
||||||
* # Examples
|
|
||||||
*
|
|
||||||
* - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and
|
|
||||||
* iteration is strictly in insertion order.
|
|
||||||
* - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to
|
|
||||||
* the procedure given above, then the constant ratio is equal to 2.
|
|
||||||
* - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to
|
|
||||||
* the procedure given above, then the constant ratio is approximately equal to 1.248.
|
|
||||||
* - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall
|
|
||||||
* into bag 0, an id with score 2 will fall into bag 1, etc.
|
|
||||||
*
|
|
||||||
* # Migration
|
|
||||||
*
|
|
||||||
* In the event that this list ever changes, a copy of the old bags list must be retained.
|
|
||||||
* With that `List::migrate` can be called, which will perform the appropriate migration.
|
|
||||||
**/
|
|
||||||
bagThresholds: Vec<u64> & AugmentedConst<ApiType>;
|
|
||||||
/**
|
|
||||||
* Generic const
|
|
||||||
**/
|
|
||||||
[key: string]: Codec;
|
|
||||||
};
|
|
||||||
balances: {
|
balances: {
|
||||||
/**
|
/**
|
||||||
* The minimum amount required to keep an account open.
|
* The minimum amount required to keep an account open.
|
||||||
@@ -135,11 +83,6 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
bounties: {
|
bounties: {
|
||||||
/**
|
|
||||||
* Percentage of the curator fee that will be reserved upfront as deposit for bounty
|
|
||||||
* curator.
|
|
||||||
**/
|
|
||||||
bountyCuratorDeposit: Permill & AugmentedConst<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* The amount held on deposit for placing a bounty proposal.
|
* The amount held on deposit for placing a bounty proposal.
|
||||||
**/
|
**/
|
||||||
@@ -156,6 +99,21 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* Minimum value for a bounty.
|
* Minimum value for a bounty.
|
||||||
**/
|
**/
|
||||||
bountyValueMinimum: u128 & AugmentedConst<ApiType>;
|
bountyValueMinimum: u128 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Maximum amount of funds that should be placed in a deposit for making a proposal.
|
||||||
|
**/
|
||||||
|
curatorDepositMax: Option<u128> & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Minimum amount of funds that should be placed in a deposit for making a proposal.
|
||||||
|
**/
|
||||||
|
curatorDepositMin: Option<u128> & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The curator deposit is calculated as a percentage of the curator fee.
|
||||||
|
*
|
||||||
|
* This deposit has optional upper and lower bounds with `CuratorDepositMax` and
|
||||||
|
* `CuratorDepositMin`.
|
||||||
|
**/
|
||||||
|
curatorDepositMultiplier: Permill & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The amount held on deposit per byte within the tip report reason or bounty description.
|
* The amount held on deposit per byte within the tip report reason or bounty description.
|
||||||
**/
|
**/
|
||||||
@@ -172,17 +130,12 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
childBounties: {
|
childBounties: {
|
||||||
/**
|
|
||||||
* Percentage of child-bounty value to be reserved as curator deposit
|
|
||||||
* when curator fee is zero.
|
|
||||||
**/
|
|
||||||
childBountyCuratorDepositBase: Permill & AugmentedConst<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Minimum value for a child-bounty.
|
* Minimum value for a child-bounty.
|
||||||
**/
|
**/
|
||||||
childBountyValueMinimum: u128 & AugmentedConst<ApiType>;
|
childBountyValueMinimum: u128 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Maximum number of child-bounties that can be added to a parent bounty.
|
* Maximum number of child bounties that can be added to a parent bounty.
|
||||||
**/
|
**/
|
||||||
maxActiveChildBountyCount: u32 & AugmentedConst<ApiType>;
|
maxActiveChildBountyCount: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -280,19 +233,25 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
};
|
};
|
||||||
electionProviderMultiPhase: {
|
electionProviderMultiPhase: {
|
||||||
/**
|
/**
|
||||||
* Maximum length (bytes) that the mined solution should consume.
|
* The minimum amount of improvement to the solution score that defines a solution as
|
||||||
*
|
* "better" in the Signed phase.
|
||||||
* The miner will ensure that the total length of the unsigned solution will not exceed
|
|
||||||
* this value.
|
|
||||||
**/
|
**/
|
||||||
minerMaxLength: u32 & AugmentedConst<ApiType>;
|
betterSignedThreshold: Perbill & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Maximum weight that the miner should consume.
|
* The minimum amount of improvement to the solution score that defines a solution as
|
||||||
*
|
* "better" in the Unsigned phase.
|
||||||
* The miner will ensure that the total weight of the unsigned solution will not exceed
|
|
||||||
* this value, based on [`WeightInfo::submit_unsigned`].
|
|
||||||
**/
|
**/
|
||||||
minerMaxWeight: u64 & AugmentedConst<ApiType>;
|
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 priority of the unsigned transaction submitted in the unsigned-phase
|
* The priority of the unsigned transaction submitted in the unsigned-phase
|
||||||
**/
|
**/
|
||||||
@@ -316,6 +275,10 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* Per-weight deposit for a signed solution.
|
* Per-weight deposit for a signed solution.
|
||||||
**/
|
**/
|
||||||
signedDepositWeight: u128 & AugmentedConst<ApiType>;
|
signedDepositWeight: u128 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The maximum amount of unchecked solutions to refund the call fee for.
|
||||||
|
**/
|
||||||
|
signedMaxRefunds: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Maximum number of signed submissions that can be queued.
|
* Maximum number of signed submissions that can be queued.
|
||||||
*
|
*
|
||||||
@@ -329,7 +292,9 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
/**
|
/**
|
||||||
* Maximum weight of a signed solution.
|
* Maximum weight of a signed solution.
|
||||||
*
|
*
|
||||||
* This should probably be similar to [`Config::MinerMaxWeight`].
|
* If [`Config::MinerConfig`] is being implemented to submit signed solutions (outside of
|
||||||
|
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
|
||||||
|
* this value.
|
||||||
**/
|
**/
|
||||||
signedMaxWeight: u64 & AugmentedConst<ApiType>;
|
signedMaxWeight: u64 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -340,24 +305,10 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* Base reward for a signed solution
|
* Base reward for a signed solution
|
||||||
**/
|
**/
|
||||||
signedRewardBase: u128 & AugmentedConst<ApiType>;
|
signedRewardBase: u128 & AugmentedConst<ApiType>;
|
||||||
/**
|
|
||||||
* The minimum amount of improvement to the solution score that defines a solution as
|
|
||||||
* "better" (in any phase).
|
|
||||||
**/
|
|
||||||
solutionImprovementThreshold: Perbill & AugmentedConst<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Duration of the unsigned phase.
|
* Duration of the unsigned phase.
|
||||||
**/
|
**/
|
||||||
unsignedPhase: u32 & AugmentedConst<ApiType>;
|
unsignedPhase: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
|
||||||
* The maximum number of 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.
|
|
||||||
*
|
|
||||||
* Also, note the data type: If the voters are represented by a `u32` in `type
|
|
||||||
* CompactSolution`, the same `u32` is used here to ensure bounds are respected.
|
|
||||||
**/
|
|
||||||
voterSnapshotPerBlock: u32 & AugmentedConst<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Generic const
|
* Generic const
|
||||||
**/
|
**/
|
||||||
@@ -504,6 +455,24 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
|
nominationPools: {
|
||||||
|
/**
|
||||||
|
* The minimum pool points-to-balance ratio that must be maintained for it to be `open`.
|
||||||
|
* This is important in the event slashing takes place and the pool's points-to-balance
|
||||||
|
* ratio becomes disproportional.
|
||||||
|
* For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1.
|
||||||
|
* Such a scenario would also be the equivalent of the pool being 90% slashed.
|
||||||
|
**/
|
||||||
|
minPointsToBalance: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The nomination pool's pallet id.
|
||||||
|
**/
|
||||||
|
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic const
|
||||||
|
**/
|
||||||
|
[key: string]: Codec;
|
||||||
|
};
|
||||||
paras: {
|
paras: {
|
||||||
unsignedPriority: u64 & AugmentedConst<ApiType>;
|
unsignedPriority: u64 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -859,14 +828,6 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* transactions.
|
* transactions.
|
||||||
**/
|
**/
|
||||||
operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
|
operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
|
||||||
/**
|
|
||||||
* The fee to be paid for making a transaction; the per-byte portion.
|
|
||||||
**/
|
|
||||||
transactionByteFee: u128 & AugmentedConst<ApiType>;
|
|
||||||
/**
|
|
||||||
* The polynomial that is applied in order to derive fee from weight.
|
|
||||||
**/
|
|
||||||
weightToFee: Vec<FrameSupportWeightsWeightToFeeCoefficient> & AugmentedConst<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Generic const
|
* Generic const
|
||||||
**/
|
**/
|
||||||
@@ -930,5 +891,57 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
|
voterList: {
|
||||||
|
/**
|
||||||
|
* The list of thresholds separating the various bags.
|
||||||
|
*
|
||||||
|
* Ids are separated into unsorted bags according to their score. This specifies the
|
||||||
|
* thresholds separating the bags. An id's bag is the largest bag for which the id's score
|
||||||
|
* is less than or equal to its upper threshold.
|
||||||
|
*
|
||||||
|
* When ids are iterated, higher bags are iterated completely before lower bags. This means
|
||||||
|
* that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower
|
||||||
|
* score, but peer ids within a particular bag are sorted in insertion order.
|
||||||
|
*
|
||||||
|
* # Expressing the constant
|
||||||
|
*
|
||||||
|
* This constant must be sorted in strictly increasing order. Duplicate items are not
|
||||||
|
* permitted.
|
||||||
|
*
|
||||||
|
* There is an implied upper limit of `Score::MAX`; that value does not need to be
|
||||||
|
* specified within the bag. For any two threshold lists, if one ends with
|
||||||
|
* `Score::MAX`, the other one does not, and they are otherwise equal, the two
|
||||||
|
* lists will behave identically.
|
||||||
|
*
|
||||||
|
* # Calculation
|
||||||
|
*
|
||||||
|
* It is recommended to generate the set of thresholds in a geometric series, such that
|
||||||
|
* there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *
|
||||||
|
* constant_ratio).max(threshold[k] + 1)` for all `k`.
|
||||||
|
*
|
||||||
|
* The helpers in the `/utils/frame/generate-bags` module can simplify this calculation.
|
||||||
|
*
|
||||||
|
* # Examples
|
||||||
|
*
|
||||||
|
* - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and
|
||||||
|
* iteration is strictly in insertion order.
|
||||||
|
* - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to
|
||||||
|
* the procedure given above, then the constant ratio is equal to 2.
|
||||||
|
* - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to
|
||||||
|
* the procedure given above, then the constant ratio is approximately equal to 1.248.
|
||||||
|
* - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall
|
||||||
|
* into bag 0, an id with score 2 will fall into bag 1, etc.
|
||||||
|
*
|
||||||
|
* # Migration
|
||||||
|
*
|
||||||
|
* In the event that this list ever changes, a copy of the old bags list must be retained.
|
||||||
|
* With that `List::migrate` can be called, which will perform the appropriate migration.
|
||||||
|
**/
|
||||||
|
bagThresholds: Vec<u64> & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic const
|
||||||
|
**/
|
||||||
|
[key: string]: Codec;
|
||||||
|
};
|
||||||
} // AugmentedConsts
|
} // AugmentedConsts
|
||||||
} // declare module
|
} // declare module
|
||||||
|
|||||||
@@ -78,6 +78,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* A given equivocation report is valid but already previously reported.
|
* A given equivocation report is valid but already previously reported.
|
||||||
**/
|
**/
|
||||||
DuplicateOffenceReport: AugmentedError<ApiType>;
|
DuplicateOffenceReport: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Submitted configuration is invalid.
|
||||||
|
**/
|
||||||
|
InvalidConfiguration: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* An equivocation proof provided as part of an equivocation report is invalid.
|
* An equivocation proof provided as part of an equivocation report is invalid.
|
||||||
**/
|
**/
|
||||||
@@ -91,24 +95,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
bagsList: {
|
|
||||||
/**
|
|
||||||
* Id not found in list.
|
|
||||||
**/
|
|
||||||
IdNotFound: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* An Id does not have a greater score than another Id.
|
|
||||||
**/
|
|
||||||
NotHeavier: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* Attempted to place node in front of a node in another bag.
|
|
||||||
**/
|
|
||||||
NotInSameBag: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* Generic error
|
|
||||||
**/
|
|
||||||
[key: string]: AugmentedError<ApiType>;
|
|
||||||
};
|
|
||||||
balances: {
|
balances: {
|
||||||
/**
|
/**
|
||||||
* Beneficiary account must pre-exist
|
* Beneficiary account must pre-exist
|
||||||
@@ -149,7 +135,7 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
};
|
};
|
||||||
bounties: {
|
bounties: {
|
||||||
/**
|
/**
|
||||||
* The bounty cannot be closed because it has active child-bounties.
|
* The bounty cannot be closed because it has active child bounties.
|
||||||
**/
|
**/
|
||||||
HasActiveChildBounty: AugmentedError<ApiType>;
|
HasActiveChildBounty: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -208,7 +194,7 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
ParentBountyNotActive: AugmentedError<ApiType>;
|
ParentBountyNotActive: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Number of child-bounties exceeds limit `MaxActiveChildBountyCount`.
|
* Number of child bounties exceeds limit `MaxActiveChildBountyCount`.
|
||||||
**/
|
**/
|
||||||
TooManyChildBounties: AugmentedError<ApiType>;
|
TooManyChildBounties: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -903,6 +889,117 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
|
nominationPools: {
|
||||||
|
/**
|
||||||
|
* An account is already delegating in another pool. An account may only belong to one
|
||||||
|
* pool at a time.
|
||||||
|
**/
|
||||||
|
AccountBelongsToOtherPool: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The member is already unbonding in this era.
|
||||||
|
**/
|
||||||
|
AlreadyUnbonding: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The pools state cannot be changed.
|
||||||
|
**/
|
||||||
|
CanNotChangeState: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* None of the funds can be withdrawn yet because the bonding duration has not passed.
|
||||||
|
**/
|
||||||
|
CannotWithdrawAny: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Some error occurred that should never happen. This should be reported to the
|
||||||
|
* maintainers.
|
||||||
|
**/
|
||||||
|
DefensiveError: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The caller does not have adequate permissions.
|
||||||
|
**/
|
||||||
|
DoesNotHavePermission: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The member is fully unbonded (and thus cannot access the bonded and reward pool
|
||||||
|
* anymore to, for example, collect rewards).
|
||||||
|
**/
|
||||||
|
FullyUnbonding: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The pool has insufficient balance to bond as a nominator.
|
||||||
|
**/
|
||||||
|
InsufficientBond: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Too many members in the pool or system.
|
||||||
|
**/
|
||||||
|
MaxPoolMembers: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The system is maxed out on pools.
|
||||||
|
**/
|
||||||
|
MaxPools: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The member cannot unbond further chunks due to reaching the limit.
|
||||||
|
**/
|
||||||
|
MaxUnbondingLimit: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Metadata exceeds [`Config::MaxMetadataLen`]
|
||||||
|
**/
|
||||||
|
MetadataExceedsMaxLen: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The amount does not meet the minimum bond to either join or create a pool.
|
||||||
|
**/
|
||||||
|
MinimumBondNotMet: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* A pool must be in [`PoolState::Destroying`] in order for the depositor to unbond or for
|
||||||
|
* other members to be permissionlessly unbonded.
|
||||||
|
**/
|
||||||
|
NotDestroying: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Not enough points. Ty unbonding less.
|
||||||
|
**/
|
||||||
|
NotEnoughPointsToUnbond: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Either a) the caller cannot make a valid kick or b) the pool is not destroying.
|
||||||
|
**/
|
||||||
|
NotKickerOrDestroying: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The caller does not have nominating permissions for the pool.
|
||||||
|
**/
|
||||||
|
NotNominator: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The depositor must be the only member in the bonded pool in order to unbond. And the
|
||||||
|
* depositor must be the only member in the sub pools in order to withdraw unbonded.
|
||||||
|
**/
|
||||||
|
NotOnlyPoolMember: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The pool is not open to join
|
||||||
|
**/
|
||||||
|
NotOpen: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The transaction could not be executed due to overflow risk for the pool.
|
||||||
|
**/
|
||||||
|
OverflowRisk: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Partial unbonding now allowed permissionlessly.
|
||||||
|
**/
|
||||||
|
PartialUnbondNotAllowedPermissionlessly: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* An account is not a member.
|
||||||
|
**/
|
||||||
|
PoolMemberNotFound: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* A (bonded) pool id does not exist.
|
||||||
|
**/
|
||||||
|
PoolNotFound: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* A reward pool does not exist. In all cases this is a system logic error.
|
||||||
|
**/
|
||||||
|
RewardPoolNotFound: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* A sub pool does not exist.
|
||||||
|
**/
|
||||||
|
SubPoolsNotFound: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic error
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedError<ApiType>;
|
||||||
|
};
|
||||||
paraInclusion: {
|
paraInclusion: {
|
||||||
/**
|
/**
|
||||||
* Bitfield consists of zeros only.
|
* Bitfield consists of zeros only.
|
||||||
@@ -1802,6 +1899,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* No proposal or bounty at that index.
|
* No proposal or bounty at that index.
|
||||||
**/
|
**/
|
||||||
InvalidIndex: AugmentedError<ApiType>;
|
InvalidIndex: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Proposal has not been approved.
|
||||||
|
**/
|
||||||
|
ProposalNotApproved: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Too many approvals in the queue.
|
* Too many approvals in the queue.
|
||||||
**/
|
**/
|
||||||
@@ -1862,6 +1963,16 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
|
voterList: {
|
||||||
|
/**
|
||||||
|
* A error in the list interface implementation.
|
||||||
|
**/
|
||||||
|
List: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic error
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedError<ApiType>;
|
||||||
|
};
|
||||||
xcmPallet: {
|
xcmPallet: {
|
||||||
/**
|
/**
|
||||||
* The location is invalid since it already has a subscription from us.
|
* The location is invalid since it already has a subscription from us.
|
||||||
|
|||||||
@@ -6,35 +6,32 @@ import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32,
|
|||||||
import type { ITuple } from '@polkadot/types-codec/types';
|
import type { ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, KusamaRuntimeProxyType, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, KusamaRuntimeProxyType, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/events' {
|
declare module '@polkadot/api-base/types/events' {
|
||||||
export interface AugmentedEvents<ApiType extends ApiTypes> {
|
export interface AugmentedEvents<ApiType extends ApiTypes> {
|
||||||
auctions: {
|
auctions: {
|
||||||
/**
|
/**
|
||||||
* An auction ended. All funds become unreserved. `[auction_index]`
|
* An auction ended. All funds become unreserved.
|
||||||
**/
|
**/
|
||||||
AuctionClosed: AugmentedEvent<ApiType, [u32]>;
|
AuctionClosed: AugmentedEvent<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* An auction started. Provides its index and the block number where it will begin to
|
* An auction started. Provides its index and the block number where it will begin to
|
||||||
* close and the first lease period of the quadruplet that is auctioned.
|
* close and the first lease period of the quadruplet that is auctioned.
|
||||||
* `[auction_index, lease_period, ending]`
|
|
||||||
**/
|
**/
|
||||||
AuctionStarted: AugmentedEvent<ApiType, [u32, u32, u32]>;
|
AuctionStarted: AugmentedEvent<ApiType, [u32, u32, u32]>;
|
||||||
/**
|
/**
|
||||||
* A new bid has been accepted as the current winner.
|
* A new bid has been accepted as the current winner.
|
||||||
* `[who, para_id, amount, first_slot, last_slot]`
|
|
||||||
**/
|
**/
|
||||||
BidAccepted: AugmentedEvent<ApiType, [AccountId32, u32, u128, u32, u32]>;
|
BidAccepted: AugmentedEvent<ApiType, [AccountId32, u32, u128, u32, u32]>;
|
||||||
/**
|
/**
|
||||||
* Someone attempted to lease the same slot twice for a parachain. The amount is held in reserve
|
* Someone attempted to lease the same slot twice for a parachain. The amount is held in reserve
|
||||||
* but no parachain slot has been leased.
|
* but no parachain slot has been leased.
|
||||||
* `[parachain_id, leaser, amount]`
|
|
||||||
**/
|
**/
|
||||||
ReserveConfiscated: AugmentedEvent<ApiType, [u32, AccountId32, u128]>;
|
ReserveConfiscated: AugmentedEvent<ApiType, [u32, AccountId32, u128]>;
|
||||||
/**
|
/**
|
||||||
* Funds were reserved for a winning bid. First balance is the extra amount reserved.
|
* Funds were reserved for a winning bid. First balance is the extra amount reserved.
|
||||||
* Second is the total. `[bidder, extra_reserved, total_amount]`
|
* Second is the total.
|
||||||
**/
|
**/
|
||||||
Reserved: AugmentedEvent<ApiType, [AccountId32, u128, u128]>;
|
Reserved: AugmentedEvent<ApiType, [AccountId32, u128, u128]>;
|
||||||
/**
|
/**
|
||||||
@@ -43,7 +40,6 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
Unreserved: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Unreserved: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||||
/**
|
/**
|
||||||
* The winning offset was chosen for an auction. This will map into the `Winning` storage map.
|
* The winning offset was chosen for an auction. This will map into the `Winning` storage map.
|
||||||
* `[auction_index, block_number]`
|
|
||||||
**/
|
**/
|
||||||
WinningOffset: AugmentedEvent<ApiType, [u32, u32]>;
|
WinningOffset: AugmentedEvent<ApiType, [u32, u32]>;
|
||||||
/**
|
/**
|
||||||
@@ -51,16 +47,6 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
bagsList: {
|
|
||||||
/**
|
|
||||||
* Moved an account from one bag to another.
|
|
||||||
**/
|
|
||||||
Rebagged: AugmentedEvent<ApiType, [AccountId32, u64, u64]>;
|
|
||||||
/**
|
|
||||||
* Generic event
|
|
||||||
**/
|
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
|
||||||
};
|
|
||||||
balances: {
|
balances: {
|
||||||
/**
|
/**
|
||||||
* A balance was set by root.
|
* A balance was set by root.
|
||||||
@@ -167,7 +153,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
};
|
};
|
||||||
claims: {
|
claims: {
|
||||||
/**
|
/**
|
||||||
* Someone claimed some DOTs. `[who, ethereum_address, amount]`
|
* Someone claimed some DOTs.
|
||||||
**/
|
**/
|
||||||
Claimed: AugmentedEvent<ApiType, [AccountId32, EthereumAddress, u128]>;
|
Claimed: AugmentedEvent<ApiType, [AccountId32, EthereumAddress, u128]>;
|
||||||
/**
|
/**
|
||||||
@@ -217,23 +203,23 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
AddedToNewRaise: AugmentedEvent<ApiType, [u32]>;
|
AddedToNewRaise: AugmentedEvent<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* All loans in a fund have been refunded. `[fund_index]`
|
* All loans in a fund have been refunded.
|
||||||
**/
|
**/
|
||||||
AllRefunded: AugmentedEvent<ApiType, [u32]>;
|
AllRefunded: AugmentedEvent<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* Contributed to a crowd sale. `[who, fund_index, amount]`
|
* Contributed to a crowd sale.
|
||||||
**/
|
**/
|
||||||
Contributed: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
|
Contributed: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
|
||||||
/**
|
/**
|
||||||
* Create a new crowdloaning campaign. `[fund_index]`
|
* Create a new crowdloaning campaign.
|
||||||
**/
|
**/
|
||||||
Created: AugmentedEvent<ApiType, [u32]>;
|
Created: AugmentedEvent<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* Fund is dissolved. `[fund_index]`
|
* Fund is dissolved.
|
||||||
**/
|
**/
|
||||||
Dissolved: AugmentedEvent<ApiType, [u32]>;
|
Dissolved: AugmentedEvent<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* The configuration to a crowdloan has been edited. `[fund_index]`
|
* The configuration to a crowdloan has been edited.
|
||||||
**/
|
**/
|
||||||
Edited: AugmentedEvent<ApiType, [u32]>;
|
Edited: AugmentedEvent<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
@@ -241,16 +227,16 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
HandleBidResult: AugmentedEvent<ApiType, [u32, Result<Null, SpRuntimeDispatchError>]>;
|
HandleBidResult: AugmentedEvent<ApiType, [u32, Result<Null, SpRuntimeDispatchError>]>;
|
||||||
/**
|
/**
|
||||||
* A memo has been updated. `[who, fund_index, memo]`
|
* A memo has been updated.
|
||||||
**/
|
**/
|
||||||
MemoUpdated: AugmentedEvent<ApiType, [AccountId32, u32, Bytes]>;
|
MemoUpdated: AugmentedEvent<ApiType, [AccountId32, u32, Bytes]>;
|
||||||
/**
|
/**
|
||||||
* The loans in a fund have been partially dissolved, i.e. there are some left
|
* The loans in a fund have been partially dissolved, i.e. there are some left
|
||||||
* over child keys that still need to be killed. `[fund_index]`
|
* over child keys that still need to be killed.
|
||||||
**/
|
**/
|
||||||
PartiallyRefunded: AugmentedEvent<ApiType, [u32]>;
|
PartiallyRefunded: AugmentedEvent<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* Withdrew full balance of a contributor. `[who, fund_index, amount]`
|
* Withdrew full balance of a contributor.
|
||||||
**/
|
**/
|
||||||
Withdrew: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
|
Withdrew: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
|
||||||
/**
|
/**
|
||||||
@@ -545,6 +531,51 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
|
nominationPools: {
|
||||||
|
/**
|
||||||
|
* A member has became bonded in a pool.
|
||||||
|
**/
|
||||||
|
Bonded: AugmentedEvent<ApiType, [AccountId32, u32, u128, bool]>;
|
||||||
|
/**
|
||||||
|
* A pool has been created.
|
||||||
|
**/
|
||||||
|
Created: AugmentedEvent<ApiType, [AccountId32, u32]>;
|
||||||
|
/**
|
||||||
|
* A pool has been destroyed.
|
||||||
|
**/
|
||||||
|
Destroyed: AugmentedEvent<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* A member has been removed from a pool.
|
||||||
|
*
|
||||||
|
* The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked).
|
||||||
|
**/
|
||||||
|
MemberRemoved: AugmentedEvent<ApiType, [u32, AccountId32]>;
|
||||||
|
/**
|
||||||
|
* A payout has been made to a member.
|
||||||
|
**/
|
||||||
|
PaidOut: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
|
||||||
|
/**
|
||||||
|
* The roles of a pool have been updated to the given new roles. Note that the depositor
|
||||||
|
* can never change.
|
||||||
|
**/
|
||||||
|
RolesUpdated: AugmentedEvent<ApiType, [Option<AccountId32>, Option<AccountId32>, Option<AccountId32>]>;
|
||||||
|
/**
|
||||||
|
* The state of a pool has changed
|
||||||
|
**/
|
||||||
|
StateChanged: AugmentedEvent<ApiType, [u32, PalletNominationPoolsPoolState]>;
|
||||||
|
/**
|
||||||
|
* A member has unbonded from their pool.
|
||||||
|
**/
|
||||||
|
Unbonded: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
|
||||||
|
/**
|
||||||
|
* A member has withdrawn from their pool.
|
||||||
|
**/
|
||||||
|
Withdrawn: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
|
||||||
|
/**
|
||||||
|
* Generic event
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
|
};
|
||||||
offences: {
|
offences: {
|
||||||
/**
|
/**
|
||||||
* There is an offence reported of the given `kind` happened at the `session_index` and
|
* There is an offence reported of the given `kind` happened at the `session_index` and
|
||||||
@@ -722,6 +753,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A proxy was executed correctly, with the given.
|
* A proxy was executed correctly, with the given.
|
||||||
**/
|
**/
|
||||||
ProxyExecuted: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;
|
ProxyExecuted: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;
|
||||||
|
/**
|
||||||
|
* A proxy was removed.
|
||||||
|
**/
|
||||||
|
ProxyRemoved: AugmentedEvent<ApiType, [AccountId32, AccountId32, KusamaRuntimeProxyType, u32]>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -804,7 +839,6 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A para has won the right to a continuous set of lease periods as a parachain.
|
* A para has won the right to a continuous set of lease periods as a parachain.
|
||||||
* First balance is any extra amount reserved on top of the para's existing deposit.
|
* First balance is any extra amount reserved on top of the para's existing deposit.
|
||||||
* Second balance is the total amount reserved.
|
* Second balance is the total amount reserved.
|
||||||
* `[parachain_id, leaser, period_begin, period_count, extra_reserved, total_amount]`
|
|
||||||
**/
|
**/
|
||||||
Leased: AugmentedEvent<ApiType, [u32, AccountId32, u32, u32, u128, u128]>;
|
Leased: AugmentedEvent<ApiType, [u32, AccountId32, u32, u32, u128, u128]>;
|
||||||
/**
|
/**
|
||||||
@@ -942,6 +976,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* An account has unbonded this amount. \[stash, amount\]
|
* An account has unbonded this amount. \[stash, amount\]
|
||||||
**/
|
**/
|
||||||
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||||
|
/**
|
||||||
|
* A validator has set their preferences.
|
||||||
|
**/
|
||||||
|
ValidatorPrefsSet: AugmentedEvent<ApiType, [AccountId32, PalletStakingValidatorPrefs]>;
|
||||||
/**
|
/**
|
||||||
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
||||||
* from the unlocking queue. \[stash, amount\]
|
* from the unlocking queue. \[stash, amount\]
|
||||||
@@ -1160,6 +1198,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* Batch of dispatches completed fully with no error.
|
* Batch of dispatches completed fully with no error.
|
||||||
**/
|
**/
|
||||||
BatchCompleted: AugmentedEvent<ApiType, []>;
|
BatchCompleted: AugmentedEvent<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Batch of dispatches completed but has errors.
|
||||||
|
**/
|
||||||
|
BatchCompletedWithErrors: AugmentedEvent<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Batch of dispatches did not complete fully. Index of first failing dispatch given, as
|
* Batch of dispatches did not complete fully. Index of first failing dispatch given, as
|
||||||
* well as the error.
|
* well as the error.
|
||||||
@@ -1173,6 +1215,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A single item within a Batch of dispatches has completed with no error.
|
* A single item within a Batch of dispatches has completed with no error.
|
||||||
**/
|
**/
|
||||||
ItemCompleted: AugmentedEvent<ApiType, []>;
|
ItemCompleted: AugmentedEvent<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* A single item within a Batch of dispatches has completed with error.
|
||||||
|
**/
|
||||||
|
ItemFailed: AugmentedEvent<ApiType, [SpRuntimeDispatchError]>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -1193,6 +1239,20 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
|
voterList: {
|
||||||
|
/**
|
||||||
|
* Moved an account from one bag to another.
|
||||||
|
**/
|
||||||
|
Rebagged: AugmentedEvent<ApiType, [AccountId32, u64, u64]>;
|
||||||
|
/**
|
||||||
|
* Updated the score of some account to the given amount.
|
||||||
|
**/
|
||||||
|
ScoreUpdated: AugmentedEvent<ApiType, [AccountId32, u64]>;
|
||||||
|
/**
|
||||||
|
* Generic event
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
|
};
|
||||||
xcmPallet: {
|
xcmPallet: {
|
||||||
/**
|
/**
|
||||||
* Some assets have been placed in an asset trap.
|
* Some assets have been placed in an asset trap.
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, W
|
|||||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||||
import type { Observable } from '@polkadot/types/types';
|
import type { Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/storage' {
|
declare module '@polkadot/api-base/types/storage' {
|
||||||
@@ -68,7 +68,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* This field should always be populated during block processing unless
|
* This field should always be populated during block processing unless
|
||||||
* secondary plain slots are enabled (which don't contain a VRF output).
|
* secondary plain slots are enabled (which don't contain a VRF output).
|
||||||
*
|
*
|
||||||
* It is set in `on_initialize`, before it will contain the value from the last block.
|
* It is set in `on_finalize`, before it will contain the value from the last block.
|
||||||
**/
|
**/
|
||||||
authorVrfRandomness: AugmentedQuery<ApiType, () => Observable<Option<U8aFixed>>, []> & QueryableStorageEntry<ApiType, []>;
|
authorVrfRandomness: AugmentedQuery<ApiType, () => Observable<Option<U8aFixed>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
@@ -101,7 +101,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* Temporary value (cleared at block finalization) which is `Some`
|
* Temporary value (cleared at block finalization) which is `Some`
|
||||||
* if per-block initialization has already been called for current block.
|
* if per-block initialization has already been called for current block.
|
||||||
**/
|
**/
|
||||||
initialized: AugmentedQuery<ApiType, () => Observable<Option<Option<U8aFixed>>>, []> & QueryableStorageEntry<ApiType, []>;
|
initialized: AugmentedQuery<ApiType, () => Observable<Option<Option<SpConsensusBabeDigestsPreDigest>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* How late the current block is compared to its parent.
|
* How late the current block is compared to its parent.
|
||||||
*
|
*
|
||||||
@@ -161,28 +161,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
bagsList: {
|
|
||||||
/**
|
|
||||||
* Counter for the related counted storage map
|
|
||||||
**/
|
|
||||||
counterForListNodes: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
|
||||||
/**
|
|
||||||
* A bag stored in storage.
|
|
||||||
*
|
|
||||||
* Stores a `Bag` struct, which stores head and tail pointers to itself.
|
|
||||||
**/
|
|
||||||
listBags: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletBagsListListBag>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
|
|
||||||
/**
|
|
||||||
* A single node, within some bag.
|
|
||||||
*
|
|
||||||
* Nodes store links forward and back within their respective bags.
|
|
||||||
**/
|
|
||||||
listNodes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletBagsListListNode>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
|
||||||
/**
|
|
||||||
* Generic query
|
|
||||||
**/
|
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
|
||||||
};
|
|
||||||
balances: {
|
balances: {
|
||||||
/**
|
/**
|
||||||
* The Balances pallet example of storing the balance of an account.
|
* The Balances pallet example of storing the balance of an account.
|
||||||
@@ -259,7 +237,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
};
|
};
|
||||||
childBounties: {
|
childBounties: {
|
||||||
/**
|
/**
|
||||||
* Child-bounties that have been added.
|
* Child bounties that have been added.
|
||||||
**/
|
**/
|
||||||
childBounties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletChildBountiesChildBounty>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
childBounties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletChildBountiesChildBounty>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||||
/**
|
/**
|
||||||
@@ -275,7 +253,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
childrenCuratorFees: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
childrenCuratorFees: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* Number of child-bounties per parent bounty.
|
* Number of child bounties per parent bounty.
|
||||||
* Map of parent bounty index to number of child bounties.
|
* Map of parent bounty index to number of child bounties.
|
||||||
**/
|
**/
|
||||||
parentChildBounties: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
parentChildBounties: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
@@ -317,12 +295,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* is meant to be used only as the last resort.
|
* is meant to be used only as the last resort.
|
||||||
**/
|
**/
|
||||||
bypassConsistencyCheck: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
bypassConsistencyCheck: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
|
||||||
* Pending configuration (if any) for the next session.
|
|
||||||
*
|
|
||||||
* DEPRECATED: This is no longer used, and will be removed in the future.
|
|
||||||
**/
|
|
||||||
pendingConfig: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
|
||||||
/**
|
/**
|
||||||
* Pending configuration changes.
|
* Pending configuration changes.
|
||||||
*
|
*
|
||||||
@@ -820,6 +792,95 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
|
nominationPools: {
|
||||||
|
/**
|
||||||
|
* Storage for bonded pools.
|
||||||
|
**/
|
||||||
|
bondedPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsBondedPoolInner>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForBondedPools: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForMetadata: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForPoolMembers: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForReversePoolIdLookup: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForRewardPools: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForSubPoolsStorage: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Ever increasing number of all pools created so far.
|
||||||
|
**/
|
||||||
|
lastPoolId: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Maximum number of members that can exist in the system. If `None`, then the count
|
||||||
|
* members are not bound on a system wide basis.
|
||||||
|
**/
|
||||||
|
maxPoolMembers: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Maximum number of members that may belong to pool. If `None`, then the count of
|
||||||
|
* members is not bound on a per pool basis.
|
||||||
|
**/
|
||||||
|
maxPoolMembersPerPool: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Maximum number of nomination pools that can exist. If `None`, then an unbounded number of
|
||||||
|
* pools can exist.
|
||||||
|
**/
|
||||||
|
maxPools: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Metadata for the pool.
|
||||||
|
**/
|
||||||
|
metadata: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* Minimum bond required to create a pool.
|
||||||
|
*
|
||||||
|
* This is the amount that the depositor must put as their initial stake in the pool, as an
|
||||||
|
* indication of "skin in the game".
|
||||||
|
**/
|
||||||
|
minCreateBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Minimum amount to bond to join a pool.
|
||||||
|
**/
|
||||||
|
minJoinBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Active members.
|
||||||
|
**/
|
||||||
|
poolMembers: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletNominationPoolsPoolMember>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* A reverse lookup from the pool's account id to its id.
|
||||||
|
*
|
||||||
|
* This is only used for slashing. In all other instances, the pool id is used, and the
|
||||||
|
* accounts are deterministically derived from it.
|
||||||
|
**/
|
||||||
|
reversePoolIdLookup: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Reward pools. This is where there rewards for each pool accumulate. When a members payout
|
||||||
|
* is claimed, the balance comes out fo the reward pool. Keyed by the bonded pools account.
|
||||||
|
**/
|
||||||
|
rewardPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsRewardPool>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* Groups of unbonding pools. Each group of unbonding pools belongs to a bonded pool,
|
||||||
|
* hence the name sub-pools. Keyed by the bonded pools account.
|
||||||
|
**/
|
||||||
|
subPoolsStorage: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsSubPools>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
offences: {
|
offences: {
|
||||||
/**
|
/**
|
||||||
* A vector of reports of the same kind that happened at the same time slot.
|
* A vector of reports of the same kind that happened at the same time slot.
|
||||||
@@ -1104,6 +1165,10 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
paraSessionInfo: {
|
paraSessionInfo: {
|
||||||
|
/**
|
||||||
|
* The validator account keys of the validators actively participating in parachain consensus.
|
||||||
|
**/
|
||||||
|
accountKeys: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Vec<AccountId32>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* Assignment keys for the current session.
|
* Assignment keys for the current session.
|
||||||
* Note that this API is private due to it being prone to 'off-by-one' at session boundaries.
|
* Note that this API is private due to it being prone to 'off-by-one' at session boundaries.
|
||||||
@@ -1680,8 +1745,11 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* Events deposited for the current block.
|
* Events deposited for the current block.
|
||||||
*
|
*
|
||||||
* NOTE: This storage item is explicitly unbounded since it is never intended to be read
|
* NOTE: The item is unbound and should therefore never be read on chain.
|
||||||
* from within the runtime.
|
* It could otherwise inflate the PoV size of a block.
|
||||||
|
*
|
||||||
|
* Events have a large in-memory size. Box the events to not go out-of-memory
|
||||||
|
* just in case someone still reads them from within the runtime.
|
||||||
**/
|
**/
|
||||||
events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;
|
events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
@@ -1908,6 +1976,28 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
|
voterList: {
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForListNodes: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* A bag stored in storage.
|
||||||
|
*
|
||||||
|
* Stores a `Bag` struct, which stores head and tail pointers to itself.
|
||||||
|
**/
|
||||||
|
listBags: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletBagsListListBag>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
|
||||||
|
/**
|
||||||
|
* A single node, within some bag.
|
||||||
|
*
|
||||||
|
* Nodes store links forward and back within their respective bags.
|
||||||
|
**/
|
||||||
|
listNodes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletBagsListListNode>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
xcmPallet: {
|
xcmPallet: {
|
||||||
/**
|
/**
|
||||||
* The existing asset traps.
|
* The existing asset traps.
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
import type { ApiTypes } from '@polkadot/api-base/types';
|
import type { ApiTypes } from '@polkadot/api-base/types';
|
||||||
import type { Data } from '@polkadot/types';
|
import type { Data } from '@polkadot/types';
|
||||||
import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportScheduleMaybeHashed, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV2ValidatorAppSignature, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
import type { FrameSupportScheduleMaybeHashed, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV2ValidatorAppSignature, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/submittable' {
|
declare module '@polkadot/api-base/types/submittable' {
|
||||||
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
|
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
|
||||||
@@ -91,34 +91,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
bagsList: {
|
|
||||||
/**
|
|
||||||
* Move the caller's Id directly in front of `lighter`.
|
|
||||||
*
|
|
||||||
* The dispatch origin for this call must be _Signed_ and can only be called by the Id of
|
|
||||||
* the account going in front of `lighter`.
|
|
||||||
*
|
|
||||||
* Only works if
|
|
||||||
* - both nodes are within the same bag,
|
|
||||||
* - and `origin` has a greater `Score` than `lighter`.
|
|
||||||
**/
|
|
||||||
putInFrontOf: AugmentedSubmittable<(lighter: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
|
||||||
/**
|
|
||||||
* Declare that some `dislocated` account has, through rewards or penalties, sufficiently
|
|
||||||
* changed its score that it should properly fall into a different bag than its current
|
|
||||||
* one.
|
|
||||||
*
|
|
||||||
* Anyone can call this function about any potentially dislocated account.
|
|
||||||
*
|
|
||||||
* Will never return an error; if `dislocated` does not exist or doesn't need a rebag, then
|
|
||||||
* it is a noop and fees are still collected from `origin`.
|
|
||||||
**/
|
|
||||||
rebag: AugmentedSubmittable<(dislocated: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
|
||||||
/**
|
|
||||||
* Generic tx
|
|
||||||
**/
|
|
||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
||||||
};
|
|
||||||
balances: {
|
balances: {
|
||||||
/**
|
/**
|
||||||
* Exactly as `transfer`, except the origin must be root and the source account may be
|
* Exactly as `transfer`, except the origin must be root and the source account may be
|
||||||
@@ -367,7 +339,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* parent bounty to child-bounty account, if parent bounty has enough
|
* parent bounty to child-bounty account, if parent bounty has enough
|
||||||
* funds, else the call fails.
|
* funds, else the call fails.
|
||||||
*
|
*
|
||||||
* Upper bound to maximum number of active child-bounties that can be
|
* Upper bound to maximum number of active child bounties that can be
|
||||||
* added are managed via runtime trait config
|
* added are managed via runtime trait config
|
||||||
* [`Config::MaxActiveChildBountyCount`].
|
* [`Config::MaxActiveChildBountyCount`].
|
||||||
*
|
*
|
||||||
@@ -384,7 +356,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* The beneficiary will be able to claim the funds after a delay.
|
* The beneficiary will be able to claim the funds after a delay.
|
||||||
*
|
*
|
||||||
* The dispatch origin for this call must be the master curator or
|
* The dispatch origin for this call must be the parent curator or
|
||||||
* curator of this child-bounty.
|
* curator of this child-bounty.
|
||||||
*
|
*
|
||||||
* Parent bounty must be in active state, for this child-bounty call to
|
* Parent bounty must be in active state, for this child-bounty call to
|
||||||
@@ -468,12 +440,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* the curator of the parent bounty, or any signed origin.
|
* the curator of the parent bounty, or any signed origin.
|
||||||
*
|
*
|
||||||
* For the origin other than T::RejectOrigin and the child-bounty
|
* For the origin other than T::RejectOrigin and the child-bounty
|
||||||
* curator, parent-bounty must be in active state, for this call to
|
* curator, parent bounty must be in active state, for this call to
|
||||||
* work. We allow child-bounty curator and T::RejectOrigin to execute
|
* work. We allow child-bounty curator and T::RejectOrigin to execute
|
||||||
* this call irrespective of the parent-bounty state.
|
* this call irrespective of the parent bounty state.
|
||||||
*
|
*
|
||||||
* If this function is called by the `RejectOrigin` or the
|
* If this function is called by the `RejectOrigin` or the
|
||||||
* parent-bounty curator, we assume that the child-bounty curator is
|
* parent bounty curator, we assume that the child-bounty curator is
|
||||||
* malicious or inactive. As a result, child-bounty curator deposit is
|
* malicious or inactive. As a result, child-bounty curator deposit is
|
||||||
* slashed.
|
* slashed.
|
||||||
*
|
*
|
||||||
@@ -862,7 +834,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - 1 event
|
* - 1 event
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
execute: AugmentedSubmittable<(proposal: Call | { callIndex?: any; args?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Compact<u32>]>;
|
execute: AugmentedSubmittable<(proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Add a new proposal to either be voted on or executed directly.
|
* Add a new proposal to either be voted on or executed directly.
|
||||||
*
|
*
|
||||||
@@ -892,7 +864,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - 1 event
|
* - 1 event
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | { callIndex?: any; args?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>;
|
propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Set the collective's membership.
|
* Set the collective's membership.
|
||||||
*
|
*
|
||||||
@@ -2102,7 +2074,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - Plus Call Weight
|
* - Plus Call Weight
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
asMultiThreshold1: AugmentedSubmittable<(otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, Call]>;
|
asMultiThreshold1: AugmentedSubmittable<(otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, Call]>;
|
||||||
/**
|
/**
|
||||||
* Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously
|
* Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously
|
||||||
* for this operation will be unreserved on success.
|
* for this operation will be unreserved on success.
|
||||||
@@ -2137,6 +2109,149 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
|
nominationPools: {
|
||||||
|
/**
|
||||||
|
* Bond `extra` more funds from `origin` into the pool to which they already belong.
|
||||||
|
*
|
||||||
|
* Additional funds can come from either the free balance of the account, of from the
|
||||||
|
* accumulated rewards, see [`BondExtra`].
|
||||||
|
**/
|
||||||
|
bondExtra: AugmentedSubmittable<(extra: PalletNominationPoolsBondExtra | { FreeBalance: any } | { Rewards: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsBondExtra]>;
|
||||||
|
/**
|
||||||
|
* A bonded member can use this to claim their payout based on the rewards that the pool
|
||||||
|
* has accumulated since their last claimed payout (OR since joining if this is there first
|
||||||
|
* time claiming rewards). The payout will be transferred to the member's account.
|
||||||
|
*
|
||||||
|
* The member will earn rewards pro rata based on the members stake vs the sum of the
|
||||||
|
* members in the pools stake. Rewards do not "expire".
|
||||||
|
**/
|
||||||
|
claimPayout: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||||
|
/**
|
||||||
|
* Create a new delegation pool.
|
||||||
|
*
|
||||||
|
* # Arguments
|
||||||
|
*
|
||||||
|
* * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of
|
||||||
|
* deposit since the pools creator cannot fully unbond funds until the pool is being
|
||||||
|
* destroyed.
|
||||||
|
* * `index` - A disambiguation index for creating the account. Likely only useful when
|
||||||
|
* creating multiple pools in the same extrinsic.
|
||||||
|
* * `root` - The account to set as [`PoolRoles::root`].
|
||||||
|
* * `nominator` - The account to set as the [`PoolRoles::nominator`].
|
||||||
|
* * `state_toggler` - The account to set as the [`PoolRoles::state_toggler`].
|
||||||
|
*
|
||||||
|
* # Note
|
||||||
|
*
|
||||||
|
* In addition to `amount`, the caller will transfer the existential deposit; so the caller
|
||||||
|
* needs at have at least `amount + existential_deposit` transferrable.
|
||||||
|
**/
|
||||||
|
create: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: AccountId32 | string | Uint8Array, nominator: AccountId32 | string | Uint8Array, stateToggler: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, AccountId32, AccountId32, AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Stake funds with a pool. The amount to bond is transferred from the member to the
|
||||||
|
* pools account and immediately increases the pools bond.
|
||||||
|
*
|
||||||
|
* # Note
|
||||||
|
*
|
||||||
|
* * An account can only be a member of a single pool.
|
||||||
|
* * An account cannot join the same pool multiple times.
|
||||||
|
* * This call will *not* dust the member account, so the member must have at least
|
||||||
|
* `existential deposit + amount` in their account.
|
||||||
|
* * Only a pool with [`PoolState::Open`] can be joined
|
||||||
|
**/
|
||||||
|
join: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, poolId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, u32]>;
|
||||||
|
nominate: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, validators: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<AccountId32>]>;
|
||||||
|
/**
|
||||||
|
* Call `withdraw_unbonded` for the pools account. This call can be made by any account.
|
||||||
|
*
|
||||||
|
* This is useful if their are too many unlocking chunks to call `unbond`, and some
|
||||||
|
* can be cleared by withdrawing. In the case there are too many unlocking chunks, the user
|
||||||
|
* would probably see an error like `NoMoreChunks` emitted from the staking system when
|
||||||
|
* they attempt to unbond.
|
||||||
|
**/
|
||||||
|
poolWithdrawUnbonded: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
|
||||||
|
/**
|
||||||
|
* Update configurations for the nomination pools. The origin for this call must be
|
||||||
|
* Root.
|
||||||
|
*
|
||||||
|
* # Arguments
|
||||||
|
*
|
||||||
|
* * `min_join_bond` - Set [`MinJoinBond`].
|
||||||
|
* * `min_create_bond` - Set [`MinCreateBond`].
|
||||||
|
* * `max_pools` - Set [`MaxPools`].
|
||||||
|
* * `max_members` - Set [`MaxPoolMembers`].
|
||||||
|
* * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`].
|
||||||
|
**/
|
||||||
|
setConfigs: AugmentedSubmittable<(minJoinBond: PalletNominationPoolsConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minCreateBond: PalletNominationPoolsConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxPools: PalletNominationPoolsConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxMembers: PalletNominationPoolsConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxMembersPerPool: PalletNominationPoolsConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsConfigOpU32, PalletNominationPoolsConfigOpU32]>;
|
||||||
|
setMetadata: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, metadata: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
|
||||||
|
setState: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, state: PalletNominationPoolsPoolState | 'Open' | 'Blocked' | 'Destroying' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsPoolState]>;
|
||||||
|
/**
|
||||||
|
* Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It
|
||||||
|
* implicitly collects the rewards one last time, since not doing so would mean some
|
||||||
|
* rewards would go forfeited.
|
||||||
|
*
|
||||||
|
* Under certain conditions, this call can be dispatched permissionlessly (i.e. by any
|
||||||
|
* account).
|
||||||
|
*
|
||||||
|
* # Conditions for a permissionless dispatch.
|
||||||
|
*
|
||||||
|
* * The pool is blocked and the caller is either the root or state-toggler. This is
|
||||||
|
* refereed to as a kick.
|
||||||
|
* * The pool is destroying and the member is not the depositor.
|
||||||
|
* * The pool is destroying, the member is the depositor and no other members are in the
|
||||||
|
* pool.
|
||||||
|
*
|
||||||
|
* ## Conditions for permissioned dispatch (i.e. the caller is also the
|
||||||
|
* `member_account`):
|
||||||
|
*
|
||||||
|
* * The caller is not the depositor.
|
||||||
|
* * The caller is the depositor, the pool is destroying and no other members are in the
|
||||||
|
* pool.
|
||||||
|
*
|
||||||
|
* # Note
|
||||||
|
*
|
||||||
|
* If there are too many unlocking chunks to unbond with the pool account,
|
||||||
|
* [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. If
|
||||||
|
* there are too many unlocking chunks, the result of this call will likely be the
|
||||||
|
* `NoMoreChunks` error from the staking system.
|
||||||
|
**/
|
||||||
|
unbond: AugmentedSubmittable<(memberAccount: AccountId32 | string | Uint8Array, unbondingPoints: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Compact<u128>]>;
|
||||||
|
/**
|
||||||
|
* Update the roles of the pool.
|
||||||
|
*
|
||||||
|
* The root is the only entity that can change any of the roles, including itself,
|
||||||
|
* excluding the depositor, who can never change.
|
||||||
|
*
|
||||||
|
* It emits an event, notifying UIs of the role change. This event is quite relevant to
|
||||||
|
* most pool members and they should be informed of changes to pool roles.
|
||||||
|
**/
|
||||||
|
updateRoles: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, newRoot: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, newNominator: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, newStateToggler: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpAccountId32]>;
|
||||||
|
/**
|
||||||
|
* Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an
|
||||||
|
* error is returned.
|
||||||
|
*
|
||||||
|
* Under certain conditions, this call can be dispatched permissionlessly (i.e. by any
|
||||||
|
* account).
|
||||||
|
*
|
||||||
|
* # Conditions for a permissionless dispatch
|
||||||
|
*
|
||||||
|
* * The pool is in destroy mode and the target is not the depositor.
|
||||||
|
* * The target is the depositor and they are the only member in the sub pools.
|
||||||
|
* * The pool is blocked and the caller is either the root or state-toggler.
|
||||||
|
*
|
||||||
|
* # Conditions for permissioned dispatch
|
||||||
|
*
|
||||||
|
* * The caller is the target and they are not the depositor.
|
||||||
|
*
|
||||||
|
* # Note
|
||||||
|
*
|
||||||
|
* If the target is the depositor, the pool will be destroyed.
|
||||||
|
**/
|
||||||
|
withdrawUnbonded: AugmentedSubmittable<(memberAccount: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
|
||||||
|
/**
|
||||||
|
* Generic tx
|
||||||
|
**/
|
||||||
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
|
};
|
||||||
paraInclusion: {
|
paraInclusion: {
|
||||||
/**
|
/**
|
||||||
* Generic tx
|
* Generic tx
|
||||||
@@ -2469,7 +2584,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Weight is a function of the number of proxies the user has (P).
|
* Weight is a function of the number of proxies the user has (P).
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
proxy: AugmentedSubmittable<(real: AccountId32 | string | Uint8Array, forceProxyType: Option<KusamaRuntimeProxyType> | null | object | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Option<KusamaRuntimeProxyType>, Call]>;
|
proxy: AugmentedSubmittable<(real: AccountId32 | string | Uint8Array, forceProxyType: Option<KusamaRuntimeProxyType> | null | object | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Option<KusamaRuntimeProxyType>, Call]>;
|
||||||
/**
|
/**
|
||||||
* Dispatch the given `call` from an account that the sender is authorized for through
|
* Dispatch the given `call` from an account that the sender is authorized for through
|
||||||
* `add_proxy`.
|
* `add_proxy`.
|
||||||
@@ -2489,7 +2604,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - P: the number of proxies the user has.
|
* - P: the number of proxies the user has.
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
proxyAnnounced: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, real: AccountId32 | string | Uint8Array, forceProxyType: Option<KusamaRuntimeProxyType> | null | object | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32, Option<KusamaRuntimeProxyType>, Call]>;
|
proxyAnnounced: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, real: AccountId32 | string | Uint8Array, forceProxyType: Option<KusamaRuntimeProxyType> | null | object | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32, Option<KusamaRuntimeProxyType>, Call]>;
|
||||||
/**
|
/**
|
||||||
* Remove the given announcement of a delegate.
|
* Remove the given announcement of a delegate.
|
||||||
*
|
*
|
||||||
@@ -2570,13 +2685,8 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* - `account`: The recovered account you want to make a call on-behalf-of.
|
* - `account`: The recovered account you want to make a call on-behalf-of.
|
||||||
* - `call`: The call you want to make with the recovered account.
|
* - `call`: The call you want to make with the recovered account.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* - The weight of the `call` + 10,000.
|
|
||||||
* - One storage lookup to check account is recovered by `who`. O(1)
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
asRecovered: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Call]>;
|
asRecovered: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Call]>;
|
||||||
/**
|
/**
|
||||||
* Cancel the ability to use `as_recovered` for `account`.
|
* Cancel the ability to use `as_recovered` for `account`.
|
||||||
*
|
*
|
||||||
@@ -2585,10 +2695,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* - `account`: The recovered account you are able to call on-behalf-of.
|
* - `account`: The recovered account you are able to call on-behalf-of.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* - One storage mutation to check account is recovered by `who`. O(1)
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
cancelRecovered: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
cancelRecovered: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
@@ -2601,17 +2707,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* - `account`: The lost account that you want to claim has been successfully recovered by
|
* - `account`: The lost account that you want to claim has been successfully recovered by
|
||||||
* you.
|
* you.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Key: F (len of friends in config), V (len of vouching friends)
|
|
||||||
* - One storage read to get the recovery configuration. O(1), Codec O(F)
|
|
||||||
* - One storage read to get the active recovery process. O(1), Codec O(V)
|
|
||||||
* - One storage read to get the current block number. O(1)
|
|
||||||
* - One storage write. O(1), Codec O(V).
|
|
||||||
* - One event.
|
|
||||||
*
|
|
||||||
* Total Complexity: O(F + V)
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
claimRecovery: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
claimRecovery: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
@@ -2626,15 +2721,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* - `rescuer`: The account trying to rescue this recoverable account.
|
* - `rescuer`: The account trying to rescue this recoverable account.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Key: V (len of vouching friends)
|
|
||||||
* - One storage read/remove to get the active recovery process. O(1), Codec O(V)
|
|
||||||
* - One balance call to repatriate reserved. O(X)
|
|
||||||
* - One event.
|
|
||||||
*
|
|
||||||
* Total Complexity: O(V + X)
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
closeRecovery: AugmentedSubmittable<(rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
closeRecovery: AugmentedSubmittable<(rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
@@ -2654,17 +2740,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* friends.
|
* friends.
|
||||||
* - `delay_period`: The number of blocks after a recovery attempt is initialized that
|
* - `delay_period`: The number of blocks after a recovery attempt is initialized that
|
||||||
* needs to pass before the account can be recovered.
|
* needs to pass before the account can be recovered.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* - Key: F (len of friends)
|
|
||||||
* - One storage read to check that account is not already recoverable. O(1).
|
|
||||||
* - A check that the friends list is sorted and unique. O(F)
|
|
||||||
* - One currency reserve operation. O(X)
|
|
||||||
* - One storage write. O(1). Codec O(F).
|
|
||||||
* - One event.
|
|
||||||
*
|
|
||||||
* Total Complexity: O(F + X)
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
createRecovery: AugmentedSubmittable<(friends: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], threshold: u16 | AnyNumber | Uint8Array, delayPeriod: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, u16, u32]>;
|
createRecovery: AugmentedSubmittable<(friends: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], threshold: u16 | AnyNumber | Uint8Array, delayPeriod: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, u16, u32]>;
|
||||||
/**
|
/**
|
||||||
@@ -2679,17 +2754,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* - `account`: The lost account that you want to recover. This account needs to be
|
* - `account`: The lost account that you want to recover. This account needs to be
|
||||||
* recoverable (i.e. have a recovery configuration).
|
* recoverable (i.e. have a recovery configuration).
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* - One storage read to check that account is recoverable. O(F)
|
|
||||||
* - One storage read to check that this recovery process hasn't already started. O(1)
|
|
||||||
* - One currency reserve operation. O(X)
|
|
||||||
* - One storage read to get the current block number. O(1)
|
|
||||||
* - One storage write. O(1).
|
|
||||||
* - One event.
|
|
||||||
*
|
|
||||||
* Total Complexity: O(F + X)
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
initiateRecovery: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
initiateRecovery: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
@@ -2704,16 +2768,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* The dispatch origin for this call must be _Signed_ and must be a
|
* The dispatch origin for this call must be _Signed_ and must be a
|
||||||
* recoverable account (i.e. has a recovery configuration).
|
* recoverable account (i.e. has a recovery configuration).
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Key: F (len of friends)
|
|
||||||
* - One storage read to get the prefix iterator for active recoveries. O(1)
|
|
||||||
* - One storage read/remove to get the recovery configuration. O(1), Codec O(F)
|
|
||||||
* - One balance call to unreserved. O(X)
|
|
||||||
* - One event.
|
|
||||||
*
|
|
||||||
* Total Complexity: O(F + X)
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
removeRecovery: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
removeRecovery: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||||
/**
|
/**
|
||||||
@@ -2725,11 +2779,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* - `lost`: The "lost account" to be recovered.
|
* - `lost`: The "lost account" to be recovered.
|
||||||
* - `rescuer`: The "rescuer account" which can call as the lost account.
|
* - `rescuer`: The "rescuer account" which can call as the lost account.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* - One storage write O(1)
|
|
||||||
* - One event
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
setRecovered: AugmentedSubmittable<(lost: AccountId32 | string | Uint8Array, rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32]>;
|
setRecovered: AugmentedSubmittable<(lost: AccountId32 | string | Uint8Array, rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32]>;
|
||||||
/**
|
/**
|
||||||
@@ -2745,18 +2794,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* The combination of these two parameters must point to an active recovery
|
* The combination of these two parameters must point to an active recovery
|
||||||
* process.
|
* process.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Key: F (len of friends in config), V (len of vouching friends)
|
|
||||||
* - One storage read to get the recovery configuration. O(1), Codec O(F)
|
|
||||||
* - One storage read to get the active recovery process. O(1), Codec O(V)
|
|
||||||
* - One binary search to confirm caller is a friend. O(logF)
|
|
||||||
* - One binary search to confirm caller has not already vouched. O(logV)
|
|
||||||
* - One storage write. O(1), Codec O(V).
|
|
||||||
* - One event.
|
|
||||||
*
|
|
||||||
* Total Complexity: O(F + logF + V + logV)
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
vouchRecovery: AugmentedSubmittable<(lost: AccountId32 | string | Uint8Array, rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32]>;
|
vouchRecovery: AugmentedSubmittable<(lost: AccountId32 | string | Uint8Array, rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32]>;
|
||||||
/**
|
/**
|
||||||
@@ -3529,7 +3566,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* (Re-)set the controller of a stash.
|
* (Re-)set the controller of a stash.
|
||||||
*
|
*
|
||||||
* Effects will be felt at the beginning of the next era.
|
* Effects will be felt instantly (as soon as this function is completed successfully).
|
||||||
*
|
*
|
||||||
* The dispatch origin for this call must be _Signed_ by the stash, not the controller.
|
* The dispatch origin for this call must be _Signed_ by the stash, not the controller.
|
||||||
*
|
*
|
||||||
@@ -3579,7 +3616,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* (Re-)set the payment target for a controller.
|
* (Re-)set the payment target for a controller.
|
||||||
*
|
*
|
||||||
* Effects will be felt at the beginning of the next era.
|
* Effects will be felt instantly (as soon as this function is completed successfully).
|
||||||
*
|
*
|
||||||
* The dispatch origin for this call must be _Signed_ by the controller, not the stash.
|
* The dispatch origin for this call must be _Signed_ by the controller, not the stash.
|
||||||
*
|
*
|
||||||
@@ -3813,7 +3850,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - 1 event
|
* - 1 event
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
execute: AugmentedSubmittable<(proposal: Call | { callIndex?: any; args?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Compact<u32>]>;
|
execute: AugmentedSubmittable<(proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Add a new proposal to either be voted on or executed directly.
|
* Add a new proposal to either be voted on or executed directly.
|
||||||
*
|
*
|
||||||
@@ -3843,7 +3880,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - 1 event
|
* - 1 event
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | { callIndex?: any; args?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>;
|
propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Set the collective's membership.
|
* Set the collective's membership.
|
||||||
*
|
*
|
||||||
@@ -4154,6 +4191,24 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
rejectProposal: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
|
rejectProposal: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
|
||||||
|
/**
|
||||||
|
* Force a previously approved proposal to be removed from the approval queue.
|
||||||
|
* The original deposit will no longer be returned.
|
||||||
|
*
|
||||||
|
* May only be called from `T::RejectOrigin`.
|
||||||
|
* - `proposal_id`: The index of a proposal
|
||||||
|
*
|
||||||
|
* # <weight>
|
||||||
|
* - Complexity: O(A) where `A` is the number of approvals
|
||||||
|
* - Db reads and writes: `Approvals`
|
||||||
|
* # </weight>
|
||||||
|
*
|
||||||
|
* Errors:
|
||||||
|
* - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue,
|
||||||
|
* i.e., the proposal has not been approved. This could also mean the proposal does not
|
||||||
|
* exist altogether, thus there is no way it would have been approved in the first place.
|
||||||
|
**/
|
||||||
|
removeApproval: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Generic tx
|
* Generic tx
|
||||||
**/
|
**/
|
||||||
@@ -4196,7 +4251,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* The dispatch origin for this call must be _Signed_.
|
* The dispatch origin for this call must be _Signed_.
|
||||||
**/
|
**/
|
||||||
asDerivative: AugmentedSubmittable<(index: u16 | AnyNumber | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Call]>;
|
asDerivative: AugmentedSubmittable<(index: u16 | AnyNumber | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Call]>;
|
||||||
/**
|
/**
|
||||||
* Send a batch of dispatch calls.
|
* Send a batch of dispatch calls.
|
||||||
*
|
*
|
||||||
@@ -4218,7 +4273,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* and the error of the failed call. If all were successful, then the `BatchCompleted`
|
* and the error of the failed call. If all were successful, then the `BatchCompleted`
|
||||||
* event is deposited.
|
* event is deposited.
|
||||||
**/
|
**/
|
||||||
batch: AugmentedSubmittable<(calls: Vec<Call> | (Call | { callIndex?: any; args?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
|
batch: AugmentedSubmittable<(calls: Vec<Call> | (Call | IMethod | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
|
||||||
/**
|
/**
|
||||||
* Send a batch of dispatch calls and atomically execute them.
|
* Send a batch of dispatch calls and atomically execute them.
|
||||||
* The whole transaction will rollback and fail if any of the calls failed.
|
* The whole transaction will rollback and fail if any of the calls failed.
|
||||||
@@ -4235,7 +4290,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - Complexity: O(C) where C is the number of calls to be batched.
|
* - Complexity: O(C) where C is the number of calls to be batched.
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
batchAll: AugmentedSubmittable<(calls: Vec<Call> | (Call | { callIndex?: any; args?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
|
batchAll: AugmentedSubmittable<(calls: Vec<Call> | (Call | IMethod | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
|
||||||
/**
|
/**
|
||||||
* Dispatches a function call with a provided origin.
|
* Dispatches a function call with a provided origin.
|
||||||
*
|
*
|
||||||
@@ -4248,7 +4303,24 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - Weight of derivative `call` execution + T::WeightInfo::dispatch_as().
|
* - Weight of derivative `call` execution + T::WeightInfo::dispatch_as().
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
dispatchAs: AugmentedSubmittable<(asOrigin: KusamaRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { ParachainsOrigin: any } | { XcmPallet: any } | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [KusamaRuntimeOriginCaller, Call]>;
|
dispatchAs: AugmentedSubmittable<(asOrigin: KusamaRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { ParachainsOrigin: any } | { XcmPallet: any } | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [KusamaRuntimeOriginCaller, Call]>;
|
||||||
|
/**
|
||||||
|
* Send a batch of dispatch calls.
|
||||||
|
* Unlike `batch`, it allows errors and won't interrupt.
|
||||||
|
*
|
||||||
|
* May be called from any origin.
|
||||||
|
*
|
||||||
|
* - `calls`: The calls to be dispatched from the same origin. The number of call must not
|
||||||
|
* exceed the constant: `batched_calls_limit` (available in constant metadata).
|
||||||
|
*
|
||||||
|
* If origin is root then call are dispatch without checking origin filter. (This includes
|
||||||
|
* bypassing `frame_system::Config::BaseCallFilter`).
|
||||||
|
*
|
||||||
|
* # <weight>
|
||||||
|
* - Complexity: O(C) where C is the number of calls to be batched.
|
||||||
|
* # </weight>
|
||||||
|
**/
|
||||||
|
forceBatch: AugmentedSubmittable<(calls: Vec<Call> | (Call | IMethod | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
|
||||||
/**
|
/**
|
||||||
* Generic tx
|
* Generic tx
|
||||||
**/
|
**/
|
||||||
@@ -4359,6 +4431,36 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
|
voterList: {
|
||||||
|
/**
|
||||||
|
* Move the caller's Id directly in front of `lighter`.
|
||||||
|
*
|
||||||
|
* The dispatch origin for this call must be _Signed_ and can only be called by the Id of
|
||||||
|
* the account going in front of `lighter`.
|
||||||
|
*
|
||||||
|
* Only works if
|
||||||
|
* - both nodes are within the same bag,
|
||||||
|
* - and `origin` has a greater `Score` than `lighter`.
|
||||||
|
**/
|
||||||
|
putInFrontOf: AugmentedSubmittable<(lighter: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Declare that some `dislocated` account has, through rewards or penalties, sufficiently
|
||||||
|
* changed its score that it should properly fall into a different bag than its current
|
||||||
|
* one.
|
||||||
|
*
|
||||||
|
* Anyone can call this function about any potentially dislocated account.
|
||||||
|
*
|
||||||
|
* Will always update the stored score of `dislocated` to the correct score, based on
|
||||||
|
* `ScoreProvider`.
|
||||||
|
*
|
||||||
|
* If `dislocated` does not exists, it returns an error.
|
||||||
|
**/
|
||||||
|
rebag: AugmentedSubmittable<(dislocated: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Generic tx
|
||||||
|
**/
|
||||||
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
|
};
|
||||||
xcmPallet: {
|
xcmPallet: {
|
||||||
/**
|
/**
|
||||||
* Execute an XCM message from a local, signed, origin.
|
* Execute an XCM message from a local, signed, origin.
|
||||||
@@ -4408,10 +4510,13 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
forceXcmVersion: AugmentedSubmittable<(location: XcmV1MultiLocation | { parents?: any; interior?: any } | string | Uint8Array, xcmVersion: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmV1MultiLocation, u32]>;
|
forceXcmVersion: AugmentedSubmittable<(location: XcmV1MultiLocation | { parents?: any; interior?: any } | string | Uint8Array, xcmVersion: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmV1MultiLocation, u32]>;
|
||||||
/**
|
/**
|
||||||
* Transfer some assets from the local chain to the sovereign account of a destination chain and forward
|
* Transfer some assets from the local chain to the sovereign account of a destination
|
||||||
* a notification XCM.
|
* chain and forward a notification XCM.
|
||||||
*
|
*
|
||||||
* Fee payment on the destination side is made from the first asset listed in the `assets` vector.
|
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
||||||
|
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
|
||||||
|
* is needed than `weight_limit`, then the operation will fail and the assets send may be
|
||||||
|
* at risk.
|
||||||
*
|
*
|
||||||
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
||||||
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
||||||
@@ -4428,7 +4533,10 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* Teleport some assets from the local chain to some destination chain.
|
* Teleport some assets from the local chain to some destination chain.
|
||||||
*
|
*
|
||||||
* Fee payment on the destination side is made from the first asset listed in the `assets` vector.
|
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
||||||
|
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
|
||||||
|
* is needed than `weight_limit`, then the operation will fail and the assets send may be
|
||||||
|
* at risk.
|
||||||
*
|
*
|
||||||
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
||||||
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
||||||
@@ -4443,12 +4551,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
limitedTeleportAssets: AugmentedSubmittable<(dest: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, beneficiary: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, assets: XcmVersionedMultiAssets | { V0: any } | { V1: any } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array, weightLimit: XcmV2WeightLimit | { Unlimited: any } | { Limited: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedMultiLocation, XcmVersionedMultiLocation, XcmVersionedMultiAssets, u32, XcmV2WeightLimit]>;
|
limitedTeleportAssets: AugmentedSubmittable<(dest: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, beneficiary: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, assets: XcmVersionedMultiAssets | { V0: any } | { V1: any } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array, weightLimit: XcmV2WeightLimit | { Unlimited: any } | { Limited: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedMultiLocation, XcmVersionedMultiLocation, XcmVersionedMultiAssets, u32, XcmV2WeightLimit]>;
|
||||||
/**
|
/**
|
||||||
* Transfer some assets from the local chain to the sovereign account of a destination chain and forward
|
* Transfer some assets from the local chain to the sovereign account of a destination
|
||||||
* a notification XCM.
|
* chain and forward a notification XCM.
|
||||||
*
|
*
|
||||||
* Fee payment on the destination side is made from the first asset listed in the `assets` vector and
|
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
||||||
* fee-weight is calculated locally and thus remote weights are assumed to be equal to
|
* index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,
|
||||||
* local weights.
|
* with all fees taken as needed from the asset.
|
||||||
*
|
*
|
||||||
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
||||||
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
||||||
@@ -4465,9 +4573,9 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* Teleport some assets from the local chain to some destination chain.
|
* Teleport some assets from the local chain to some destination chain.
|
||||||
*
|
*
|
||||||
* Fee payment on the destination side is made from the first asset listed in the `assets` vector and
|
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
||||||
* fee-weight is calculated locally and thus remote weights are assumed to be equal to
|
* index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,
|
||||||
* local weights.
|
* with all fees taken as needed from the asset.
|
||||||
*
|
*
|
||||||
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
||||||
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '7.14.1' };
|
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '8.6.1' };
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type { ApiTypes } 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, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { Codec } from '@polkadot/types-codec/types';
|
import type { Codec } from '@polkadot/types-codec/types';
|
||||||
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
|
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
|
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/consts' {
|
declare module '@polkadot/api-base/types/consts' {
|
||||||
export interface AugmentedConsts<ApiType extends ApiTypes> {
|
export interface AugmentedConsts<ApiType extends ApiTypes> {
|
||||||
@@ -63,58 +63,6 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
bagsList: {
|
|
||||||
/**
|
|
||||||
* The list of thresholds separating the various bags.
|
|
||||||
*
|
|
||||||
* Ids are separated into unsorted bags according to their score. This specifies the
|
|
||||||
* thresholds separating the bags. An id's bag is the largest bag for which the id's score
|
|
||||||
* is less than or equal to its upper threshold.
|
|
||||||
*
|
|
||||||
* When ids are iterated, higher bags are iterated completely before lower bags. This means
|
|
||||||
* that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower
|
|
||||||
* score, but peer ids within a particular bag are sorted in insertion order.
|
|
||||||
*
|
|
||||||
* # Expressing the constant
|
|
||||||
*
|
|
||||||
* This constant must be sorted in strictly increasing order. Duplicate items are not
|
|
||||||
* permitted.
|
|
||||||
*
|
|
||||||
* There is an implied upper limit of `Score::MAX`; that value does not need to be
|
|
||||||
* specified within the bag. For any two threshold lists, if one ends with
|
|
||||||
* `Score::MAX`, the other one does not, and they are otherwise equal, the two
|
|
||||||
* lists will behave identically.
|
|
||||||
*
|
|
||||||
* # Calculation
|
|
||||||
*
|
|
||||||
* It is recommended to generate the set of thresholds in a geometric series, such that
|
|
||||||
* there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *
|
|
||||||
* constant_ratio).max(threshold[k] + 1)` for all `k`.
|
|
||||||
*
|
|
||||||
* The helpers in the `/utils/frame/generate-bags` module can simplify this calculation.
|
|
||||||
*
|
|
||||||
* # Examples
|
|
||||||
*
|
|
||||||
* - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and
|
|
||||||
* iteration is strictly in insertion order.
|
|
||||||
* - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to
|
|
||||||
* the procedure given above, then the constant ratio is equal to 2.
|
|
||||||
* - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to
|
|
||||||
* the procedure given above, then the constant ratio is approximately equal to 1.248.
|
|
||||||
* - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall
|
|
||||||
* into bag 0, an id with score 2 will fall into bag 1, etc.
|
|
||||||
*
|
|
||||||
* # Migration
|
|
||||||
*
|
|
||||||
* In the event that this list ever changes, a copy of the old bags list must be retained.
|
|
||||||
* With that `List::migrate` can be called, which will perform the appropriate migration.
|
|
||||||
**/
|
|
||||||
bagThresholds: Vec<u64> & AugmentedConst<ApiType>;
|
|
||||||
/**
|
|
||||||
* Generic const
|
|
||||||
**/
|
|
||||||
[key: string]: Codec;
|
|
||||||
};
|
|
||||||
balances: {
|
balances: {
|
||||||
/**
|
/**
|
||||||
* The minimum amount required to keep an account open.
|
* The minimum amount required to keep an account open.
|
||||||
@@ -135,11 +83,6 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
bounties: {
|
bounties: {
|
||||||
/**
|
|
||||||
* Percentage of the curator fee that will be reserved upfront as deposit for bounty
|
|
||||||
* curator.
|
|
||||||
**/
|
|
||||||
bountyCuratorDeposit: Permill & AugmentedConst<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* The amount held on deposit for placing a bounty proposal.
|
* The amount held on deposit for placing a bounty proposal.
|
||||||
**/
|
**/
|
||||||
@@ -156,6 +99,21 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* Minimum value for a bounty.
|
* Minimum value for a bounty.
|
||||||
**/
|
**/
|
||||||
bountyValueMinimum: u128 & AugmentedConst<ApiType>;
|
bountyValueMinimum: u128 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Maximum amount of funds that should be placed in a deposit for making a proposal.
|
||||||
|
**/
|
||||||
|
curatorDepositMax: Option<u128> & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Minimum amount of funds that should be placed in a deposit for making a proposal.
|
||||||
|
**/
|
||||||
|
curatorDepositMin: Option<u128> & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The curator deposit is calculated as a percentage of the curator fee.
|
||||||
|
*
|
||||||
|
* This deposit has optional upper and lower bounds with `CuratorDepositMax` and
|
||||||
|
* `CuratorDepositMin`.
|
||||||
|
**/
|
||||||
|
curatorDepositMultiplier: Permill & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The amount held on deposit per byte within the tip report reason or bounty description.
|
* The amount held on deposit per byte within the tip report reason or bounty description.
|
||||||
**/
|
**/
|
||||||
@@ -172,17 +130,12 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
childBounties: {
|
childBounties: {
|
||||||
/**
|
|
||||||
* Percentage of child-bounty value to be reserved as curator deposit
|
|
||||||
* when curator fee is zero.
|
|
||||||
**/
|
|
||||||
childBountyCuratorDepositBase: Permill & AugmentedConst<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Minimum value for a child-bounty.
|
* Minimum value for a child-bounty.
|
||||||
**/
|
**/
|
||||||
childBountyValueMinimum: u128 & AugmentedConst<ApiType>;
|
childBountyValueMinimum: u128 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Maximum number of child-bounties that can be added to a parent bounty.
|
* Maximum number of child bounties that can be added to a parent bounty.
|
||||||
**/
|
**/
|
||||||
maxActiveChildBountyCount: u32 & AugmentedConst<ApiType>;
|
maxActiveChildBountyCount: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -280,19 +233,25 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
};
|
};
|
||||||
electionProviderMultiPhase: {
|
electionProviderMultiPhase: {
|
||||||
/**
|
/**
|
||||||
* Maximum length (bytes) that the mined solution should consume.
|
* The minimum amount of improvement to the solution score that defines a solution as
|
||||||
*
|
* "better" in the Signed phase.
|
||||||
* The miner will ensure that the total length of the unsigned solution will not exceed
|
|
||||||
* this value.
|
|
||||||
**/
|
**/
|
||||||
minerMaxLength: u32 & AugmentedConst<ApiType>;
|
betterSignedThreshold: Perbill & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Maximum weight that the miner should consume.
|
* The minimum amount of improvement to the solution score that defines a solution as
|
||||||
*
|
* "better" in the Unsigned phase.
|
||||||
* The miner will ensure that the total weight of the unsigned solution will not exceed
|
|
||||||
* this value, based on [`WeightInfo::submit_unsigned`].
|
|
||||||
**/
|
**/
|
||||||
minerMaxWeight: u64 & AugmentedConst<ApiType>;
|
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 priority of the unsigned transaction submitted in the unsigned-phase
|
* The priority of the unsigned transaction submitted in the unsigned-phase
|
||||||
**/
|
**/
|
||||||
@@ -316,6 +275,10 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* Per-weight deposit for a signed solution.
|
* Per-weight deposit for a signed solution.
|
||||||
**/
|
**/
|
||||||
signedDepositWeight: u128 & AugmentedConst<ApiType>;
|
signedDepositWeight: u128 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The maximum amount of unchecked solutions to refund the call fee for.
|
||||||
|
**/
|
||||||
|
signedMaxRefunds: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Maximum number of signed submissions that can be queued.
|
* Maximum number of signed submissions that can be queued.
|
||||||
*
|
*
|
||||||
@@ -329,7 +292,9 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
/**
|
/**
|
||||||
* Maximum weight of a signed solution.
|
* Maximum weight of a signed solution.
|
||||||
*
|
*
|
||||||
* This should probably be similar to [`Config::MinerMaxWeight`].
|
* If [`Config::MinerConfig`] is being implemented to submit signed solutions (outside of
|
||||||
|
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
|
||||||
|
* this value.
|
||||||
**/
|
**/
|
||||||
signedMaxWeight: u64 & AugmentedConst<ApiType>;
|
signedMaxWeight: u64 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -340,24 +305,10 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* Base reward for a signed solution
|
* Base reward for a signed solution
|
||||||
**/
|
**/
|
||||||
signedRewardBase: u128 & AugmentedConst<ApiType>;
|
signedRewardBase: u128 & AugmentedConst<ApiType>;
|
||||||
/**
|
|
||||||
* The minimum amount of improvement to the solution score that defines a solution as
|
|
||||||
* "better" (in any phase).
|
|
||||||
**/
|
|
||||||
solutionImprovementThreshold: Perbill & AugmentedConst<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Duration of the unsigned phase.
|
* Duration of the unsigned phase.
|
||||||
**/
|
**/
|
||||||
unsignedPhase: u32 & AugmentedConst<ApiType>;
|
unsignedPhase: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
|
||||||
* The maximum number of 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.
|
|
||||||
*
|
|
||||||
* Also, note the data type: If the voters are represented by a `u32` in `type
|
|
||||||
* CompactSolution`, the same `u32` is used here to ensure bounds are respected.
|
|
||||||
**/
|
|
||||||
voterSnapshotPerBlock: u32 & AugmentedConst<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Generic const
|
* Generic const
|
||||||
**/
|
**/
|
||||||
@@ -726,14 +677,6 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* transactions.
|
* transactions.
|
||||||
**/
|
**/
|
||||||
operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
|
operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
|
||||||
/**
|
|
||||||
* The fee to be paid for making a transaction; the per-byte portion.
|
|
||||||
**/
|
|
||||||
transactionByteFee: u128 & AugmentedConst<ApiType>;
|
|
||||||
/**
|
|
||||||
* The polynomial that is applied in order to derive fee from weight.
|
|
||||||
**/
|
|
||||||
weightToFee: Vec<FrameSupportWeightsWeightToFeeCoefficient> & AugmentedConst<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Generic const
|
* Generic const
|
||||||
**/
|
**/
|
||||||
@@ -797,5 +740,57 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
|
voterList: {
|
||||||
|
/**
|
||||||
|
* The list of thresholds separating the various bags.
|
||||||
|
*
|
||||||
|
* Ids are separated into unsorted bags according to their score. This specifies the
|
||||||
|
* thresholds separating the bags. An id's bag is the largest bag for which the id's score
|
||||||
|
* is less than or equal to its upper threshold.
|
||||||
|
*
|
||||||
|
* When ids are iterated, higher bags are iterated completely before lower bags. This means
|
||||||
|
* that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower
|
||||||
|
* score, but peer ids within a particular bag are sorted in insertion order.
|
||||||
|
*
|
||||||
|
* # Expressing the constant
|
||||||
|
*
|
||||||
|
* This constant must be sorted in strictly increasing order. Duplicate items are not
|
||||||
|
* permitted.
|
||||||
|
*
|
||||||
|
* There is an implied upper limit of `Score::MAX`; that value does not need to be
|
||||||
|
* specified within the bag. For any two threshold lists, if one ends with
|
||||||
|
* `Score::MAX`, the other one does not, and they are otherwise equal, the two
|
||||||
|
* lists will behave identically.
|
||||||
|
*
|
||||||
|
* # Calculation
|
||||||
|
*
|
||||||
|
* It is recommended to generate the set of thresholds in a geometric series, such that
|
||||||
|
* there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *
|
||||||
|
* constant_ratio).max(threshold[k] + 1)` for all `k`.
|
||||||
|
*
|
||||||
|
* The helpers in the `/utils/frame/generate-bags` module can simplify this calculation.
|
||||||
|
*
|
||||||
|
* # Examples
|
||||||
|
*
|
||||||
|
* - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and
|
||||||
|
* iteration is strictly in insertion order.
|
||||||
|
* - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to
|
||||||
|
* the procedure given above, then the constant ratio is equal to 2.
|
||||||
|
* - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to
|
||||||
|
* the procedure given above, then the constant ratio is approximately equal to 1.248.
|
||||||
|
* - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall
|
||||||
|
* into bag 0, an id with score 2 will fall into bag 1, etc.
|
||||||
|
*
|
||||||
|
* # Migration
|
||||||
|
*
|
||||||
|
* In the event that this list ever changes, a copy of the old bags list must be retained.
|
||||||
|
* With that `List::migrate` can be called, which will perform the appropriate migration.
|
||||||
|
**/
|
||||||
|
bagThresholds: Vec<u64> & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic const
|
||||||
|
**/
|
||||||
|
[key: string]: Codec;
|
||||||
|
};
|
||||||
} // AugmentedConsts
|
} // AugmentedConsts
|
||||||
} // declare module
|
} // declare module
|
||||||
|
|||||||
@@ -78,6 +78,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* A given equivocation report is valid but already previously reported.
|
* A given equivocation report is valid but already previously reported.
|
||||||
**/
|
**/
|
||||||
DuplicateOffenceReport: AugmentedError<ApiType>;
|
DuplicateOffenceReport: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Submitted configuration is invalid.
|
||||||
|
**/
|
||||||
|
InvalidConfiguration: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* An equivocation proof provided as part of an equivocation report is invalid.
|
* An equivocation proof provided as part of an equivocation report is invalid.
|
||||||
**/
|
**/
|
||||||
@@ -91,24 +95,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
bagsList: {
|
|
||||||
/**
|
|
||||||
* Id not found in list.
|
|
||||||
**/
|
|
||||||
IdNotFound: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* An Id does not have a greater score than another Id.
|
|
||||||
**/
|
|
||||||
NotHeavier: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* Attempted to place node in front of a node in another bag.
|
|
||||||
**/
|
|
||||||
NotInSameBag: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* Generic error
|
|
||||||
**/
|
|
||||||
[key: string]: AugmentedError<ApiType>;
|
|
||||||
};
|
|
||||||
balances: {
|
balances: {
|
||||||
/**
|
/**
|
||||||
* Beneficiary account must pre-exist
|
* Beneficiary account must pre-exist
|
||||||
@@ -149,7 +135,7 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
};
|
};
|
||||||
bounties: {
|
bounties: {
|
||||||
/**
|
/**
|
||||||
* The bounty cannot be closed because it has active child-bounties.
|
* The bounty cannot be closed because it has active child bounties.
|
||||||
**/
|
**/
|
||||||
HasActiveChildBounty: AugmentedError<ApiType>;
|
HasActiveChildBounty: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -208,7 +194,7 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
ParentBountyNotActive: AugmentedError<ApiType>;
|
ParentBountyNotActive: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Number of child-bounties exceeds limit `MaxActiveChildBountyCount`.
|
* Number of child bounties exceeds limit `MaxActiveChildBountyCount`.
|
||||||
**/
|
**/
|
||||||
TooManyChildBounties: AugmentedError<ApiType>;
|
TooManyChildBounties: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -1615,6 +1601,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* No proposal or bounty at that index.
|
* No proposal or bounty at that index.
|
||||||
**/
|
**/
|
||||||
InvalidIndex: AugmentedError<ApiType>;
|
InvalidIndex: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Proposal has not been approved.
|
||||||
|
**/
|
||||||
|
ProposalNotApproved: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Too many approvals in the queue.
|
* Too many approvals in the queue.
|
||||||
**/
|
**/
|
||||||
@@ -1675,6 +1665,16 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
|
voterList: {
|
||||||
|
/**
|
||||||
|
* A error in the list interface implementation.
|
||||||
|
**/
|
||||||
|
List: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic error
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedError<ApiType>;
|
||||||
|
};
|
||||||
xcmPallet: {
|
xcmPallet: {
|
||||||
/**
|
/**
|
||||||
* The location is invalid since it already has a subscription from us.
|
* The location is invalid since it already has a subscription from us.
|
||||||
|
|||||||
@@ -6,35 +6,32 @@ import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32,
|
|||||||
import type { ITuple } from '@polkadot/types-codec/types';
|
import type { ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeProxyType, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeProxyType, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/events' {
|
declare module '@polkadot/api-base/types/events' {
|
||||||
export interface AugmentedEvents<ApiType extends ApiTypes> {
|
export interface AugmentedEvents<ApiType extends ApiTypes> {
|
||||||
auctions: {
|
auctions: {
|
||||||
/**
|
/**
|
||||||
* An auction ended. All funds become unreserved. `[auction_index]`
|
* An auction ended. All funds become unreserved.
|
||||||
**/
|
**/
|
||||||
AuctionClosed: AugmentedEvent<ApiType, [u32]>;
|
AuctionClosed: AugmentedEvent<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* An auction started. Provides its index and the block number where it will begin to
|
* An auction started. Provides its index and the block number where it will begin to
|
||||||
* close and the first lease period of the quadruplet that is auctioned.
|
* close and the first lease period of the quadruplet that is auctioned.
|
||||||
* `[auction_index, lease_period, ending]`
|
|
||||||
**/
|
**/
|
||||||
AuctionStarted: AugmentedEvent<ApiType, [u32, u32, u32]>;
|
AuctionStarted: AugmentedEvent<ApiType, [u32, u32, u32]>;
|
||||||
/**
|
/**
|
||||||
* A new bid has been accepted as the current winner.
|
* A new bid has been accepted as the current winner.
|
||||||
* `[who, para_id, amount, first_slot, last_slot]`
|
|
||||||
**/
|
**/
|
||||||
BidAccepted: AugmentedEvent<ApiType, [AccountId32, u32, u128, u32, u32]>;
|
BidAccepted: AugmentedEvent<ApiType, [AccountId32, u32, u128, u32, u32]>;
|
||||||
/**
|
/**
|
||||||
* Someone attempted to lease the same slot twice for a parachain. The amount is held in reserve
|
* Someone attempted to lease the same slot twice for a parachain. The amount is held in reserve
|
||||||
* but no parachain slot has been leased.
|
* but no parachain slot has been leased.
|
||||||
* `[parachain_id, leaser, amount]`
|
|
||||||
**/
|
**/
|
||||||
ReserveConfiscated: AugmentedEvent<ApiType, [u32, AccountId32, u128]>;
|
ReserveConfiscated: AugmentedEvent<ApiType, [u32, AccountId32, u128]>;
|
||||||
/**
|
/**
|
||||||
* Funds were reserved for a winning bid. First balance is the extra amount reserved.
|
* Funds were reserved for a winning bid. First balance is the extra amount reserved.
|
||||||
* Second is the total. `[bidder, extra_reserved, total_amount]`
|
* Second is the total.
|
||||||
**/
|
**/
|
||||||
Reserved: AugmentedEvent<ApiType, [AccountId32, u128, u128]>;
|
Reserved: AugmentedEvent<ApiType, [AccountId32, u128, u128]>;
|
||||||
/**
|
/**
|
||||||
@@ -43,7 +40,6 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
Unreserved: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Unreserved: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||||
/**
|
/**
|
||||||
* The winning offset was chosen for an auction. This will map into the `Winning` storage map.
|
* The winning offset was chosen for an auction. This will map into the `Winning` storage map.
|
||||||
* `[auction_index, block_number]`
|
|
||||||
**/
|
**/
|
||||||
WinningOffset: AugmentedEvent<ApiType, [u32, u32]>;
|
WinningOffset: AugmentedEvent<ApiType, [u32, u32]>;
|
||||||
/**
|
/**
|
||||||
@@ -51,16 +47,6 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
bagsList: {
|
|
||||||
/**
|
|
||||||
* Moved an account from one bag to another.
|
|
||||||
**/
|
|
||||||
Rebagged: AugmentedEvent<ApiType, [AccountId32, u64, u64]>;
|
|
||||||
/**
|
|
||||||
* Generic event
|
|
||||||
**/
|
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
|
||||||
};
|
|
||||||
balances: {
|
balances: {
|
||||||
/**
|
/**
|
||||||
* A balance was set by root.
|
* A balance was set by root.
|
||||||
@@ -167,7 +153,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
};
|
};
|
||||||
claims: {
|
claims: {
|
||||||
/**
|
/**
|
||||||
* Someone claimed some DOTs. `[who, ethereum_address, amount]`
|
* Someone claimed some DOTs.
|
||||||
**/
|
**/
|
||||||
Claimed: AugmentedEvent<ApiType, [AccountId32, EthereumAddress, u128]>;
|
Claimed: AugmentedEvent<ApiType, [AccountId32, EthereumAddress, u128]>;
|
||||||
/**
|
/**
|
||||||
@@ -217,23 +203,23 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
AddedToNewRaise: AugmentedEvent<ApiType, [u32]>;
|
AddedToNewRaise: AugmentedEvent<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* All loans in a fund have been refunded. `[fund_index]`
|
* All loans in a fund have been refunded.
|
||||||
**/
|
**/
|
||||||
AllRefunded: AugmentedEvent<ApiType, [u32]>;
|
AllRefunded: AugmentedEvent<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* Contributed to a crowd sale. `[who, fund_index, amount]`
|
* Contributed to a crowd sale.
|
||||||
**/
|
**/
|
||||||
Contributed: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
|
Contributed: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
|
||||||
/**
|
/**
|
||||||
* Create a new crowdloaning campaign. `[fund_index]`
|
* Create a new crowdloaning campaign.
|
||||||
**/
|
**/
|
||||||
Created: AugmentedEvent<ApiType, [u32]>;
|
Created: AugmentedEvent<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* Fund is dissolved. `[fund_index]`
|
* Fund is dissolved.
|
||||||
**/
|
**/
|
||||||
Dissolved: AugmentedEvent<ApiType, [u32]>;
|
Dissolved: AugmentedEvent<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* The configuration to a crowdloan has been edited. `[fund_index]`
|
* The configuration to a crowdloan has been edited.
|
||||||
**/
|
**/
|
||||||
Edited: AugmentedEvent<ApiType, [u32]>;
|
Edited: AugmentedEvent<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
@@ -241,16 +227,16 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
HandleBidResult: AugmentedEvent<ApiType, [u32, Result<Null, SpRuntimeDispatchError>]>;
|
HandleBidResult: AugmentedEvent<ApiType, [u32, Result<Null, SpRuntimeDispatchError>]>;
|
||||||
/**
|
/**
|
||||||
* A memo has been updated. `[who, fund_index, memo]`
|
* A memo has been updated.
|
||||||
**/
|
**/
|
||||||
MemoUpdated: AugmentedEvent<ApiType, [AccountId32, u32, Bytes]>;
|
MemoUpdated: AugmentedEvent<ApiType, [AccountId32, u32, Bytes]>;
|
||||||
/**
|
/**
|
||||||
* The loans in a fund have been partially dissolved, i.e. there are some left
|
* The loans in a fund have been partially dissolved, i.e. there are some left
|
||||||
* over child keys that still need to be killed. `[fund_index]`
|
* over child keys that still need to be killed.
|
||||||
**/
|
**/
|
||||||
PartiallyRefunded: AugmentedEvent<ApiType, [u32]>;
|
PartiallyRefunded: AugmentedEvent<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* Withdrew full balance of a contributor. `[who, fund_index, amount]`
|
* Withdrew full balance of a contributor.
|
||||||
**/
|
**/
|
||||||
Withdrew: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
|
Withdrew: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
|
||||||
/**
|
/**
|
||||||
@@ -700,6 +686,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A proxy was executed correctly, with the given.
|
* A proxy was executed correctly, with the given.
|
||||||
**/
|
**/
|
||||||
ProxyExecuted: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;
|
ProxyExecuted: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;
|
||||||
|
/**
|
||||||
|
* A proxy was removed.
|
||||||
|
**/
|
||||||
|
ProxyRemoved: AugmentedEvent<ApiType, [AccountId32, AccountId32, PolkadotRuntimeProxyType, u32]>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -752,7 +742,6 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A para has won the right to a continuous set of lease periods as a parachain.
|
* A para has won the right to a continuous set of lease periods as a parachain.
|
||||||
* First balance is any extra amount reserved on top of the para's existing deposit.
|
* First balance is any extra amount reserved on top of the para's existing deposit.
|
||||||
* Second balance is the total amount reserved.
|
* Second balance is the total amount reserved.
|
||||||
* `[parachain_id, leaser, period_begin, period_count, extra_reserved, total_amount]`
|
|
||||||
**/
|
**/
|
||||||
Leased: AugmentedEvent<ApiType, [u32, AccountId32, u32, u32, u128, u128]>;
|
Leased: AugmentedEvent<ApiType, [u32, AccountId32, u32, u32, u128, u128]>;
|
||||||
/**
|
/**
|
||||||
@@ -817,6 +806,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* An account has unbonded this amount. \[stash, amount\]
|
* An account has unbonded this amount. \[stash, amount\]
|
||||||
**/
|
**/
|
||||||
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||||
|
/**
|
||||||
|
* A validator has set their preferences.
|
||||||
|
**/
|
||||||
|
ValidatorPrefsSet: AugmentedEvent<ApiType, [AccountId32, PalletStakingValidatorPrefs]>;
|
||||||
/**
|
/**
|
||||||
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
||||||
* from the unlocking queue. \[stash, amount\]
|
* from the unlocking queue. \[stash, amount\]
|
||||||
@@ -1035,6 +1028,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* Batch of dispatches completed fully with no error.
|
* Batch of dispatches completed fully with no error.
|
||||||
**/
|
**/
|
||||||
BatchCompleted: AugmentedEvent<ApiType, []>;
|
BatchCompleted: AugmentedEvent<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Batch of dispatches completed but has errors.
|
||||||
|
**/
|
||||||
|
BatchCompletedWithErrors: AugmentedEvent<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Batch of dispatches did not complete fully. Index of first failing dispatch given, as
|
* Batch of dispatches did not complete fully. Index of first failing dispatch given, as
|
||||||
* well as the error.
|
* well as the error.
|
||||||
@@ -1048,6 +1045,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A single item within a Batch of dispatches has completed with no error.
|
* A single item within a Batch of dispatches has completed with no error.
|
||||||
**/
|
**/
|
||||||
ItemCompleted: AugmentedEvent<ApiType, []>;
|
ItemCompleted: AugmentedEvent<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* A single item within a Batch of dispatches has completed with error.
|
||||||
|
**/
|
||||||
|
ItemFailed: AugmentedEvent<ApiType, [SpRuntimeDispatchError]>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -1068,6 +1069,20 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
|
voterList: {
|
||||||
|
/**
|
||||||
|
* Moved an account from one bag to another.
|
||||||
|
**/
|
||||||
|
Rebagged: AugmentedEvent<ApiType, [AccountId32, u64, u64]>;
|
||||||
|
/**
|
||||||
|
* Updated the score of some account to the given amount.
|
||||||
|
**/
|
||||||
|
ScoreUpdated: AugmentedEvent<ApiType, [AccountId32, u64]>;
|
||||||
|
/**
|
||||||
|
* Generic event
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
|
};
|
||||||
xcmPallet: {
|
xcmPallet: {
|
||||||
/**
|
/**
|
||||||
* Some assets have been placed in an asset trap.
|
* Some assets have been placed in an asset trap.
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, W
|
|||||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerScheduledV3, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerScheduledV3, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||||
import type { Observable } from '@polkadot/types/types';
|
import type { Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/storage' {
|
declare module '@polkadot/api-base/types/storage' {
|
||||||
@@ -68,7 +68,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* This field should always be populated during block processing unless
|
* This field should always be populated during block processing unless
|
||||||
* secondary plain slots are enabled (which don't contain a VRF output).
|
* secondary plain slots are enabled (which don't contain a VRF output).
|
||||||
*
|
*
|
||||||
* It is set in `on_initialize`, before it will contain the value from the last block.
|
* It is set in `on_finalize`, before it will contain the value from the last block.
|
||||||
**/
|
**/
|
||||||
authorVrfRandomness: AugmentedQuery<ApiType, () => Observable<Option<U8aFixed>>, []> & QueryableStorageEntry<ApiType, []>;
|
authorVrfRandomness: AugmentedQuery<ApiType, () => Observable<Option<U8aFixed>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
@@ -101,7 +101,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* Temporary value (cleared at block finalization) which is `Some`
|
* Temporary value (cleared at block finalization) which is `Some`
|
||||||
* if per-block initialization has already been called for current block.
|
* if per-block initialization has already been called for current block.
|
||||||
**/
|
**/
|
||||||
initialized: AugmentedQuery<ApiType, () => Observable<Option<Option<U8aFixed>>>, []> & QueryableStorageEntry<ApiType, []>;
|
initialized: AugmentedQuery<ApiType, () => Observable<Option<Option<SpConsensusBabeDigestsPreDigest>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* How late the current block is compared to its parent.
|
* How late the current block is compared to its parent.
|
||||||
*
|
*
|
||||||
@@ -161,28 +161,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
bagsList: {
|
|
||||||
/**
|
|
||||||
* Counter for the related counted storage map
|
|
||||||
**/
|
|
||||||
counterForListNodes: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
|
||||||
/**
|
|
||||||
* A bag stored in storage.
|
|
||||||
*
|
|
||||||
* Stores a `Bag` struct, which stores head and tail pointers to itself.
|
|
||||||
**/
|
|
||||||
listBags: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletBagsListListBag>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
|
|
||||||
/**
|
|
||||||
* A single node, within some bag.
|
|
||||||
*
|
|
||||||
* Nodes store links forward and back within their respective bags.
|
|
||||||
**/
|
|
||||||
listNodes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletBagsListListNode>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
|
||||||
/**
|
|
||||||
* Generic query
|
|
||||||
**/
|
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
|
||||||
};
|
|
||||||
balances: {
|
balances: {
|
||||||
/**
|
/**
|
||||||
* The Balances pallet example of storing the balance of an account.
|
* The Balances pallet example of storing the balance of an account.
|
||||||
@@ -259,7 +237,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
};
|
};
|
||||||
childBounties: {
|
childBounties: {
|
||||||
/**
|
/**
|
||||||
* Child-bounties that have been added.
|
* Child bounties that have been added.
|
||||||
**/
|
**/
|
||||||
childBounties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletChildBountiesChildBounty>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
childBounties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletChildBountiesChildBounty>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||||
/**
|
/**
|
||||||
@@ -275,7 +253,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
childrenCuratorFees: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
childrenCuratorFees: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* Number of child-bounties per parent bounty.
|
* Number of child bounties per parent bounty.
|
||||||
* Map of parent bounty index to number of child bounties.
|
* Map of parent bounty index to number of child bounties.
|
||||||
**/
|
**/
|
||||||
parentChildBounties: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
parentChildBounties: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
@@ -317,12 +295,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* is meant to be used only as the last resort.
|
* is meant to be used only as the last resort.
|
||||||
**/
|
**/
|
||||||
bypassConsistencyCheck: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
bypassConsistencyCheck: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
|
||||||
* Pending configuration (if any) for the next session.
|
|
||||||
*
|
|
||||||
* DEPRECATED: This is no longer used, and will be removed in the future.
|
|
||||||
**/
|
|
||||||
pendingConfig: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
|
||||||
/**
|
/**
|
||||||
* Pending configuration changes.
|
* Pending configuration changes.
|
||||||
*
|
*
|
||||||
@@ -1078,6 +1050,10 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
paraSessionInfo: {
|
paraSessionInfo: {
|
||||||
|
/**
|
||||||
|
* The validator account keys of the validators actively participating in parachain consensus.
|
||||||
|
**/
|
||||||
|
accountKeys: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Vec<AccountId32>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* Assignment keys for the current session.
|
* Assignment keys for the current session.
|
||||||
* Note that this API is private due to it being prone to 'off-by-one' at session boundaries.
|
* Note that this API is private due to it being prone to 'off-by-one' at session boundaries.
|
||||||
@@ -1560,8 +1536,11 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* Events deposited for the current block.
|
* Events deposited for the current block.
|
||||||
*
|
*
|
||||||
* NOTE: This storage item is explicitly unbounded since it is never intended to be read
|
* NOTE: The item is unbound and should therefore never be read on chain.
|
||||||
* from within the runtime.
|
* It could otherwise inflate the PoV size of a block.
|
||||||
|
*
|
||||||
|
* Events have a large in-memory size. Box the events to not go out-of-memory
|
||||||
|
* just in case someone still reads them from within the runtime.
|
||||||
**/
|
**/
|
||||||
events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;
|
events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
@@ -1788,6 +1767,28 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
|
voterList: {
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForListNodes: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* A bag stored in storage.
|
||||||
|
*
|
||||||
|
* Stores a `Bag` struct, which stores head and tail pointers to itself.
|
||||||
|
**/
|
||||||
|
listBags: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletBagsListListBag>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
|
||||||
|
/**
|
||||||
|
* A single node, within some bag.
|
||||||
|
*
|
||||||
|
* Nodes store links forward and back within their respective bags.
|
||||||
|
**/
|
||||||
|
listNodes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletBagsListListNode>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
xcmPallet: {
|
xcmPallet: {
|
||||||
/**
|
/**
|
||||||
* The existing asset traps.
|
* The existing asset traps.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import type { ApiTypes } from '@polkadot/api-base/types';
|
import type { ApiTypes } from '@polkadot/api-base/types';
|
||||||
import type { Data } from '@polkadot/types';
|
import type { Data } from '@polkadot/types';
|
||||||
import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportScheduleMaybeHashed, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV2ValidatorAppSignature, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeOriginCaller, PolkadotRuntimeProxyType, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
import type { FrameSupportScheduleMaybeHashed, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV2ValidatorAppSignature, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeOriginCaller, PolkadotRuntimeProxyType, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||||
@@ -91,34 +91,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
bagsList: {
|
|
||||||
/**
|
|
||||||
* Move the caller's Id directly in front of `lighter`.
|
|
||||||
*
|
|
||||||
* The dispatch origin for this call must be _Signed_ and can only be called by the Id of
|
|
||||||
* the account going in front of `lighter`.
|
|
||||||
*
|
|
||||||
* Only works if
|
|
||||||
* - both nodes are within the same bag,
|
|
||||||
* - and `origin` has a greater `Score` than `lighter`.
|
|
||||||
**/
|
|
||||||
putInFrontOf: AugmentedSubmittable<(lighter: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
|
||||||
/**
|
|
||||||
* Declare that some `dislocated` account has, through rewards or penalties, sufficiently
|
|
||||||
* changed its score that it should properly fall into a different bag than its current
|
|
||||||
* one.
|
|
||||||
*
|
|
||||||
* Anyone can call this function about any potentially dislocated account.
|
|
||||||
*
|
|
||||||
* Will never return an error; if `dislocated` does not exist or doesn't need a rebag, then
|
|
||||||
* it is a noop and fees are still collected from `origin`.
|
|
||||||
**/
|
|
||||||
rebag: AugmentedSubmittable<(dislocated: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
|
||||||
/**
|
|
||||||
* Generic tx
|
|
||||||
**/
|
|
||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
||||||
};
|
|
||||||
balances: {
|
balances: {
|
||||||
/**
|
/**
|
||||||
* Exactly as `transfer`, except the origin must be root and the source account may be
|
* Exactly as `transfer`, except the origin must be root and the source account may be
|
||||||
@@ -367,7 +339,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* parent bounty to child-bounty account, if parent bounty has enough
|
* parent bounty to child-bounty account, if parent bounty has enough
|
||||||
* funds, else the call fails.
|
* funds, else the call fails.
|
||||||
*
|
*
|
||||||
* Upper bound to maximum number of active child-bounties that can be
|
* Upper bound to maximum number of active child bounties that can be
|
||||||
* added are managed via runtime trait config
|
* added are managed via runtime trait config
|
||||||
* [`Config::MaxActiveChildBountyCount`].
|
* [`Config::MaxActiveChildBountyCount`].
|
||||||
*
|
*
|
||||||
@@ -384,7 +356,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* The beneficiary will be able to claim the funds after a delay.
|
* The beneficiary will be able to claim the funds after a delay.
|
||||||
*
|
*
|
||||||
* The dispatch origin for this call must be the master curator or
|
* The dispatch origin for this call must be the parent curator or
|
||||||
* curator of this child-bounty.
|
* curator of this child-bounty.
|
||||||
*
|
*
|
||||||
* Parent bounty must be in active state, for this child-bounty call to
|
* Parent bounty must be in active state, for this child-bounty call to
|
||||||
@@ -468,12 +440,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* the curator of the parent bounty, or any signed origin.
|
* the curator of the parent bounty, or any signed origin.
|
||||||
*
|
*
|
||||||
* For the origin other than T::RejectOrigin and the child-bounty
|
* For the origin other than T::RejectOrigin and the child-bounty
|
||||||
* curator, parent-bounty must be in active state, for this call to
|
* curator, parent bounty must be in active state, for this call to
|
||||||
* work. We allow child-bounty curator and T::RejectOrigin to execute
|
* work. We allow child-bounty curator and T::RejectOrigin to execute
|
||||||
* this call irrespective of the parent-bounty state.
|
* this call irrespective of the parent bounty state.
|
||||||
*
|
*
|
||||||
* If this function is called by the `RejectOrigin` or the
|
* If this function is called by the `RejectOrigin` or the
|
||||||
* parent-bounty curator, we assume that the child-bounty curator is
|
* parent bounty curator, we assume that the child-bounty curator is
|
||||||
* malicious or inactive. As a result, child-bounty curator deposit is
|
* malicious or inactive. As a result, child-bounty curator deposit is
|
||||||
* slashed.
|
* slashed.
|
||||||
*
|
*
|
||||||
@@ -862,7 +834,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - 1 event
|
* - 1 event
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
execute: AugmentedSubmittable<(proposal: Call | { callIndex?: any; args?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Compact<u32>]>;
|
execute: AugmentedSubmittable<(proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Add a new proposal to either be voted on or executed directly.
|
* Add a new proposal to either be voted on or executed directly.
|
||||||
*
|
*
|
||||||
@@ -892,7 +864,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - 1 event
|
* - 1 event
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | { callIndex?: any; args?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>;
|
propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Set the collective's membership.
|
* Set the collective's membership.
|
||||||
*
|
*
|
||||||
@@ -2051,7 +2023,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - Plus Call Weight
|
* - Plus Call Weight
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
asMultiThreshold1: AugmentedSubmittable<(otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, Call]>;
|
asMultiThreshold1: AugmentedSubmittable<(otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, Call]>;
|
||||||
/**
|
/**
|
||||||
* Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously
|
* Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously
|
||||||
* for this operation will be unreserved on success.
|
* for this operation will be unreserved on success.
|
||||||
@@ -2418,7 +2390,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Weight is a function of the number of proxies the user has (P).
|
* Weight is a function of the number of proxies the user has (P).
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
proxy: AugmentedSubmittable<(real: AccountId32 | string | Uint8Array, forceProxyType: Option<PolkadotRuntimeProxyType> | null | object | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Option<PolkadotRuntimeProxyType>, Call]>;
|
proxy: AugmentedSubmittable<(real: AccountId32 | string | Uint8Array, forceProxyType: Option<PolkadotRuntimeProxyType> | null | object | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Option<PolkadotRuntimeProxyType>, Call]>;
|
||||||
/**
|
/**
|
||||||
* Dispatch the given `call` from an account that the sender is authorized for through
|
* Dispatch the given `call` from an account that the sender is authorized for through
|
||||||
* `add_proxy`.
|
* `add_proxy`.
|
||||||
@@ -2438,7 +2410,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - P: the number of proxies the user has.
|
* - P: the number of proxies the user has.
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
proxyAnnounced: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, real: AccountId32 | string | Uint8Array, forceProxyType: Option<PolkadotRuntimeProxyType> | null | object | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32, Option<PolkadotRuntimeProxyType>, Call]>;
|
proxyAnnounced: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, real: AccountId32 | string | Uint8Array, forceProxyType: Option<PolkadotRuntimeProxyType> | null | object | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32, Option<PolkadotRuntimeProxyType>, Call]>;
|
||||||
/**
|
/**
|
||||||
* Remove the given announcement of a delegate.
|
* Remove the given announcement of a delegate.
|
||||||
*
|
*
|
||||||
@@ -2947,7 +2919,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* (Re-)set the controller of a stash.
|
* (Re-)set the controller of a stash.
|
||||||
*
|
*
|
||||||
* Effects will be felt at the beginning of the next era.
|
* Effects will be felt instantly (as soon as this function is completed successfully).
|
||||||
*
|
*
|
||||||
* The dispatch origin for this call must be _Signed_ by the stash, not the controller.
|
* The dispatch origin for this call must be _Signed_ by the stash, not the controller.
|
||||||
*
|
*
|
||||||
@@ -2997,7 +2969,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* (Re-)set the payment target for a controller.
|
* (Re-)set the payment target for a controller.
|
||||||
*
|
*
|
||||||
* Effects will be felt at the beginning of the next era.
|
* Effects will be felt instantly (as soon as this function is completed successfully).
|
||||||
*
|
*
|
||||||
* The dispatch origin for this call must be _Signed_ by the controller, not the stash.
|
* The dispatch origin for this call must be _Signed_ by the controller, not the stash.
|
||||||
*
|
*
|
||||||
@@ -3231,7 +3203,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - 1 event
|
* - 1 event
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
execute: AugmentedSubmittable<(proposal: Call | { callIndex?: any; args?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Compact<u32>]>;
|
execute: AugmentedSubmittable<(proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Add a new proposal to either be voted on or executed directly.
|
* Add a new proposal to either be voted on or executed directly.
|
||||||
*
|
*
|
||||||
@@ -3261,7 +3233,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - 1 event
|
* - 1 event
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | { callIndex?: any; args?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>;
|
propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Set the collective's membership.
|
* Set the collective's membership.
|
||||||
*
|
*
|
||||||
@@ -3572,6 +3544,24 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
rejectProposal: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
|
rejectProposal: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
|
||||||
|
/**
|
||||||
|
* Force a previously approved proposal to be removed from the approval queue.
|
||||||
|
* The original deposit will no longer be returned.
|
||||||
|
*
|
||||||
|
* May only be called from `T::RejectOrigin`.
|
||||||
|
* - `proposal_id`: The index of a proposal
|
||||||
|
*
|
||||||
|
* # <weight>
|
||||||
|
* - Complexity: O(A) where `A` is the number of approvals
|
||||||
|
* - Db reads and writes: `Approvals`
|
||||||
|
* # </weight>
|
||||||
|
*
|
||||||
|
* Errors:
|
||||||
|
* - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue,
|
||||||
|
* i.e., the proposal has not been approved. This could also mean the proposal does not
|
||||||
|
* exist altogether, thus there is no way it would have been approved in the first place.
|
||||||
|
**/
|
||||||
|
removeApproval: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Generic tx
|
* Generic tx
|
||||||
**/
|
**/
|
||||||
@@ -3614,7 +3604,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* The dispatch origin for this call must be _Signed_.
|
* The dispatch origin for this call must be _Signed_.
|
||||||
**/
|
**/
|
||||||
asDerivative: AugmentedSubmittable<(index: u16 | AnyNumber | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Call]>;
|
asDerivative: AugmentedSubmittable<(index: u16 | AnyNumber | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Call]>;
|
||||||
/**
|
/**
|
||||||
* Send a batch of dispatch calls.
|
* Send a batch of dispatch calls.
|
||||||
*
|
*
|
||||||
@@ -3636,7 +3626,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* and the error of the failed call. If all were successful, then the `BatchCompleted`
|
* and the error of the failed call. If all were successful, then the `BatchCompleted`
|
||||||
* event is deposited.
|
* event is deposited.
|
||||||
**/
|
**/
|
||||||
batch: AugmentedSubmittable<(calls: Vec<Call> | (Call | { callIndex?: any; args?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
|
batch: AugmentedSubmittable<(calls: Vec<Call> | (Call | IMethod | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
|
||||||
/**
|
/**
|
||||||
* Send a batch of dispatch calls and atomically execute them.
|
* Send a batch of dispatch calls and atomically execute them.
|
||||||
* The whole transaction will rollback and fail if any of the calls failed.
|
* The whole transaction will rollback and fail if any of the calls failed.
|
||||||
@@ -3653,7 +3643,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - Complexity: O(C) where C is the number of calls to be batched.
|
* - Complexity: O(C) where C is the number of calls to be batched.
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
batchAll: AugmentedSubmittable<(calls: Vec<Call> | (Call | { callIndex?: any; args?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
|
batchAll: AugmentedSubmittable<(calls: Vec<Call> | (Call | IMethod | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
|
||||||
/**
|
/**
|
||||||
* Dispatches a function call with a provided origin.
|
* Dispatches a function call with a provided origin.
|
||||||
*
|
*
|
||||||
@@ -3666,7 +3656,24 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - Weight of derivative `call` execution + T::WeightInfo::dispatch_as().
|
* - Weight of derivative `call` execution + T::WeightInfo::dispatch_as().
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
dispatchAs: AugmentedSubmittable<(asOrigin: PolkadotRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { ParachainsOrigin: any } | { XcmPallet: any } | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotRuntimeOriginCaller, Call]>;
|
dispatchAs: AugmentedSubmittable<(asOrigin: PolkadotRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { ParachainsOrigin: any } | { XcmPallet: any } | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotRuntimeOriginCaller, Call]>;
|
||||||
|
/**
|
||||||
|
* Send a batch of dispatch calls.
|
||||||
|
* Unlike `batch`, it allows errors and won't interrupt.
|
||||||
|
*
|
||||||
|
* May be called from any origin.
|
||||||
|
*
|
||||||
|
* - `calls`: The calls to be dispatched from the same origin. The number of call must not
|
||||||
|
* exceed the constant: `batched_calls_limit` (available in constant metadata).
|
||||||
|
*
|
||||||
|
* If origin is root then call are dispatch without checking origin filter. (This includes
|
||||||
|
* bypassing `frame_system::Config::BaseCallFilter`).
|
||||||
|
*
|
||||||
|
* # <weight>
|
||||||
|
* - Complexity: O(C) where C is the number of calls to be batched.
|
||||||
|
* # </weight>
|
||||||
|
**/
|
||||||
|
forceBatch: AugmentedSubmittable<(calls: Vec<Call> | (Call | IMethod | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
|
||||||
/**
|
/**
|
||||||
* Generic tx
|
* Generic tx
|
||||||
**/
|
**/
|
||||||
@@ -3777,6 +3784,36 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
|
voterList: {
|
||||||
|
/**
|
||||||
|
* Move the caller's Id directly in front of `lighter`.
|
||||||
|
*
|
||||||
|
* The dispatch origin for this call must be _Signed_ and can only be called by the Id of
|
||||||
|
* the account going in front of `lighter`.
|
||||||
|
*
|
||||||
|
* Only works if
|
||||||
|
* - both nodes are within the same bag,
|
||||||
|
* - and `origin` has a greater `Score` than `lighter`.
|
||||||
|
**/
|
||||||
|
putInFrontOf: AugmentedSubmittable<(lighter: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Declare that some `dislocated` account has, through rewards or penalties, sufficiently
|
||||||
|
* changed its score that it should properly fall into a different bag than its current
|
||||||
|
* one.
|
||||||
|
*
|
||||||
|
* Anyone can call this function about any potentially dislocated account.
|
||||||
|
*
|
||||||
|
* Will always update the stored score of `dislocated` to the correct score, based on
|
||||||
|
* `ScoreProvider`.
|
||||||
|
*
|
||||||
|
* If `dislocated` does not exists, it returns an error.
|
||||||
|
**/
|
||||||
|
rebag: AugmentedSubmittable<(dislocated: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Generic tx
|
||||||
|
**/
|
||||||
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
|
};
|
||||||
xcmPallet: {
|
xcmPallet: {
|
||||||
/**
|
/**
|
||||||
* Execute an XCM message from a local, signed, origin.
|
* Execute an XCM message from a local, signed, origin.
|
||||||
@@ -3826,10 +3863,13 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
forceXcmVersion: AugmentedSubmittable<(location: XcmV1MultiLocation | { parents?: any; interior?: any } | string | Uint8Array, xcmVersion: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmV1MultiLocation, u32]>;
|
forceXcmVersion: AugmentedSubmittable<(location: XcmV1MultiLocation | { parents?: any; interior?: any } | string | Uint8Array, xcmVersion: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmV1MultiLocation, u32]>;
|
||||||
/**
|
/**
|
||||||
* Transfer some assets from the local chain to the sovereign account of a destination chain and forward
|
* Transfer some assets from the local chain to the sovereign account of a destination
|
||||||
* a notification XCM.
|
* chain and forward a notification XCM.
|
||||||
*
|
*
|
||||||
* Fee payment on the destination side is made from the first asset listed in the `assets` vector.
|
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
||||||
|
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
|
||||||
|
* is needed than `weight_limit`, then the operation will fail and the assets send may be
|
||||||
|
* at risk.
|
||||||
*
|
*
|
||||||
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
||||||
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
||||||
@@ -3846,7 +3886,10 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* Teleport some assets from the local chain to some destination chain.
|
* Teleport some assets from the local chain to some destination chain.
|
||||||
*
|
*
|
||||||
* Fee payment on the destination side is made from the first asset listed in the `assets` vector.
|
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
||||||
|
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
|
||||||
|
* is needed than `weight_limit`, then the operation will fail and the assets send may be
|
||||||
|
* at risk.
|
||||||
*
|
*
|
||||||
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
||||||
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
||||||
@@ -3861,12 +3904,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
limitedTeleportAssets: AugmentedSubmittable<(dest: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, beneficiary: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, assets: XcmVersionedMultiAssets | { V0: any } | { V1: any } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array, weightLimit: XcmV2WeightLimit | { Unlimited: any } | { Limited: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedMultiLocation, XcmVersionedMultiLocation, XcmVersionedMultiAssets, u32, XcmV2WeightLimit]>;
|
limitedTeleportAssets: AugmentedSubmittable<(dest: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, beneficiary: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, assets: XcmVersionedMultiAssets | { V0: any } | { V1: any } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array, weightLimit: XcmV2WeightLimit | { Unlimited: any } | { Limited: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedMultiLocation, XcmVersionedMultiLocation, XcmVersionedMultiAssets, u32, XcmV2WeightLimit]>;
|
||||||
/**
|
/**
|
||||||
* Transfer some assets from the local chain to the sovereign account of a destination chain and forward
|
* Transfer some assets from the local chain to the sovereign account of a destination
|
||||||
* a notification XCM.
|
* chain and forward a notification XCM.
|
||||||
*
|
*
|
||||||
* Fee payment on the destination side is made from the first asset listed in the `assets` vector and
|
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
||||||
* fee-weight is calculated locally and thus remote weights are assumed to be equal to
|
* index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,
|
||||||
* local weights.
|
* with all fees taken as needed from the asset.
|
||||||
*
|
*
|
||||||
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
||||||
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
||||||
@@ -3883,9 +3926,9 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* Teleport some assets from the local chain to some destination chain.
|
* Teleport some assets from the local chain to some destination chain.
|
||||||
*
|
*
|
||||||
* Fee payment on the destination side is made from the first asset listed in the `assets` vector and
|
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
||||||
* fee-weight is calculated locally and thus remote weights are assumed to be equal to
|
* index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,
|
||||||
* local weights.
|
* with all fees taken as needed from the asset.
|
||||||
*
|
*
|
||||||
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
||||||
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type { ApiTypes } from '@polkadot/api-base/types';
|
|||||||
import type { Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
import type { Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { Codec } from '@polkadot/types-codec/types';
|
import type { Codec } from '@polkadot/types-codec/types';
|
||||||
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
|
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsSchedule, PalletStateTrieMigrationMigrationLimits, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
|
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsSchedule, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/consts' {
|
declare module '@polkadot/api-base/types/consts' {
|
||||||
export interface AugmentedConsts<ApiType extends ApiTypes> {
|
export interface AugmentedConsts<ApiType extends ApiTypes> {
|
||||||
@@ -149,11 +149,6 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
bounties: {
|
bounties: {
|
||||||
/**
|
|
||||||
* Percentage of the curator fee that will be reserved upfront as deposit for bounty
|
|
||||||
* curator.
|
|
||||||
**/
|
|
||||||
bountyCuratorDeposit: Permill & AugmentedConst<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* The amount held on deposit for placing a bounty proposal.
|
* The amount held on deposit for placing a bounty proposal.
|
||||||
**/
|
**/
|
||||||
@@ -170,6 +165,21 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* Minimum value for a bounty.
|
* Minimum value for a bounty.
|
||||||
**/
|
**/
|
||||||
bountyValueMinimum: u128 & AugmentedConst<ApiType>;
|
bountyValueMinimum: u128 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Maximum amount of funds that should be placed in a deposit for making a proposal.
|
||||||
|
**/
|
||||||
|
curatorDepositMax: Option<u128> & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Minimum amount of funds that should be placed in a deposit for making a proposal.
|
||||||
|
**/
|
||||||
|
curatorDepositMin: Option<u128> & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The curator deposit is calculated as a percentage of the curator fee.
|
||||||
|
*
|
||||||
|
* This deposit has optional upper and lower bounds with `CuratorDepositMax` and
|
||||||
|
* `CuratorDepositMin`.
|
||||||
|
**/
|
||||||
|
curatorDepositMultiplier: Permill & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The amount held on deposit per byte within the tip report reason or bounty description.
|
* The amount held on deposit per byte within the tip report reason or bounty description.
|
||||||
**/
|
**/
|
||||||
@@ -186,17 +196,12 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
childBounties: {
|
childBounties: {
|
||||||
/**
|
|
||||||
* Percentage of child-bounty value to be reserved as curator deposit
|
|
||||||
* when curator fee is zero.
|
|
||||||
**/
|
|
||||||
childBountyCuratorDepositBase: Permill & AugmentedConst<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Minimum value for a child-bounty.
|
* Minimum value for a child-bounty.
|
||||||
**/
|
**/
|
||||||
childBountyValueMinimum: u128 & AugmentedConst<ApiType>;
|
childBountyValueMinimum: u128 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Maximum number of child-bounties that can be added to a parent bounty.
|
* Maximum number of child bounties that can be added to a parent bounty.
|
||||||
**/
|
**/
|
||||||
maxActiveChildBountyCount: u32 & AugmentedConst<ApiType>;
|
maxActiveChildBountyCount: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -205,6 +210,27 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
contracts: {
|
contracts: {
|
||||||
|
/**
|
||||||
|
* The weight per byte of code that is charged when loading a contract from storage.
|
||||||
|
*
|
||||||
|
* Currently, FRAME only charges fees for computation incurred but not for PoV
|
||||||
|
* consumption caused for storage access. This is usually not exploitable because
|
||||||
|
* accessing storage carries some substantial weight costs, too. However in case
|
||||||
|
* of contract code very much PoV consumption can be caused while consuming very little
|
||||||
|
* computation. This could be used to keep the chain busy without paying the
|
||||||
|
* proper fee for it. Until this is resolved we charge from the weight meter for
|
||||||
|
* contract access.
|
||||||
|
*
|
||||||
|
* For more information check out: <https://github.com/paritytech/substrate/issues/10301>
|
||||||
|
*
|
||||||
|
* [`DefaultContractAccessWeight`] is a safe default to be used for polkadot or kusama
|
||||||
|
* parachains.
|
||||||
|
*
|
||||||
|
* # Note
|
||||||
|
*
|
||||||
|
* This is only relevant for parachains. Set to zero in case of a standalone chain.
|
||||||
|
**/
|
||||||
|
contractAccessWeight: u64 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum number of contracts that can be pending for deletion.
|
* The maximum number of contracts that can be pending for deletion.
|
||||||
*
|
*
|
||||||
@@ -341,19 +367,25 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
};
|
};
|
||||||
electionProviderMultiPhase: {
|
electionProviderMultiPhase: {
|
||||||
/**
|
/**
|
||||||
* Maximum length (bytes) that the mined solution should consume.
|
* The minimum amount of improvement to the solution score that defines a solution as
|
||||||
*
|
* "better" in the Signed phase.
|
||||||
* The miner will ensure that the total length of the unsigned solution will not exceed
|
|
||||||
* this value.
|
|
||||||
**/
|
**/
|
||||||
minerMaxLength: u32 & AugmentedConst<ApiType>;
|
betterSignedThreshold: Perbill & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Maximum weight that the miner should consume.
|
* The minimum amount of improvement to the solution score that defines a solution as
|
||||||
*
|
* "better" in the Unsigned phase.
|
||||||
* The miner will ensure that the total weight of the unsigned solution will not exceed
|
|
||||||
* this value, based on [`WeightInfo::submit_unsigned`].
|
|
||||||
**/
|
**/
|
||||||
minerMaxWeight: u64 & AugmentedConst<ApiType>;
|
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 priority of the unsigned transaction submitted in the unsigned-phase
|
* The priority of the unsigned transaction submitted in the unsigned-phase
|
||||||
**/
|
**/
|
||||||
@@ -377,6 +409,10 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* Per-weight deposit for a signed solution.
|
* Per-weight deposit for a signed solution.
|
||||||
**/
|
**/
|
||||||
signedDepositWeight: u128 & AugmentedConst<ApiType>;
|
signedDepositWeight: u128 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The maximum amount of unchecked solutions to refund the call fee for.
|
||||||
|
**/
|
||||||
|
signedMaxRefunds: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Maximum number of signed submissions that can be queued.
|
* Maximum number of signed submissions that can be queued.
|
||||||
*
|
*
|
||||||
@@ -390,7 +426,9 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
/**
|
/**
|
||||||
* Maximum weight of a signed solution.
|
* Maximum weight of a signed solution.
|
||||||
*
|
*
|
||||||
* This should probably be similar to [`Config::MinerMaxWeight`].
|
* If [`Config::MinerConfig`] is being implemented to submit signed solutions (outside of
|
||||||
|
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
|
||||||
|
* this value.
|
||||||
**/
|
**/
|
||||||
signedMaxWeight: u64 & AugmentedConst<ApiType>;
|
signedMaxWeight: u64 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -401,24 +439,10 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* Base reward for a signed solution
|
* Base reward for a signed solution
|
||||||
**/
|
**/
|
||||||
signedRewardBase: u128 & AugmentedConst<ApiType>;
|
signedRewardBase: u128 & AugmentedConst<ApiType>;
|
||||||
/**
|
|
||||||
* The minimum amount of improvement to the solution score that defines a solution as
|
|
||||||
* "better" (in any phase).
|
|
||||||
**/
|
|
||||||
solutionImprovementThreshold: Perbill & AugmentedConst<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Duration of the unsigned phase.
|
* Duration of the unsigned phase.
|
||||||
**/
|
**/
|
||||||
unsignedPhase: u32 & AugmentedConst<ApiType>;
|
unsignedPhase: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
|
||||||
* The maximum number of 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.
|
|
||||||
*
|
|
||||||
* Also, note the data type: If the voters are represented by a `u32` in `type
|
|
||||||
* CompactSolution`, the same `u32` is used here to ensure bounds are respected.
|
|
||||||
**/
|
|
||||||
voterSnapshotPerBlock: u32 & AugmentedConst<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Generic const
|
* Generic const
|
||||||
**/
|
**/
|
||||||
@@ -624,6 +648,24 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
|
nominationPools: {
|
||||||
|
/**
|
||||||
|
* The minimum pool points-to-balance ratio that must be maintained for it to be `open`.
|
||||||
|
* This is important in the event slashing takes place and the pool's points-to-balance
|
||||||
|
* ratio becomes disproportional.
|
||||||
|
* For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1.
|
||||||
|
* Such a scenario would also be the equivalent of the pool being 90% slashed.
|
||||||
|
**/
|
||||||
|
minPointsToBalance: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The nomination pool's pallet id.
|
||||||
|
**/
|
||||||
|
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic const
|
||||||
|
**/
|
||||||
|
[key: string]: Codec;
|
||||||
|
};
|
||||||
proxy: {
|
proxy: {
|
||||||
/**
|
/**
|
||||||
* The base amount of currency needed to reserve for creating an announcement.
|
* The base amount of currency needed to reserve for creating an announcement.
|
||||||
@@ -829,16 +871,6 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
stateTrieMigration: {
|
|
||||||
/**
|
|
||||||
* The maximum limits that the signed migration could use.
|
|
||||||
**/
|
|
||||||
signedMigrationMaxLimits: PalletStateTrieMigrationMigrationLimits & AugmentedConst<ApiType>;
|
|
||||||
/**
|
|
||||||
* Generic const
|
|
||||||
**/
|
|
||||||
[key: string]: Codec;
|
|
||||||
};
|
|
||||||
system: {
|
system: {
|
||||||
/**
|
/**
|
||||||
* Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
* Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
||||||
@@ -939,14 +971,6 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* transactions.
|
* transactions.
|
||||||
**/
|
**/
|
||||||
operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
|
operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
|
||||||
/**
|
|
||||||
* The fee to be paid for making a transaction; the per-byte portion.
|
|
||||||
**/
|
|
||||||
transactionByteFee: u128 & AugmentedConst<ApiType>;
|
|
||||||
/**
|
|
||||||
* The polynomial that is applied in order to derive fee from weight.
|
|
||||||
**/
|
|
||||||
weightToFee: Vec<FrameSupportWeightsWeightToFeeCoefficient> & AugmentedConst<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Generic const
|
* Generic const
|
||||||
**/
|
**/
|
||||||
@@ -991,28 +1015,28 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
};
|
};
|
||||||
uniques: {
|
uniques: {
|
||||||
/**
|
/**
|
||||||
* The basic amount of funds that must be reserved when adding an attribute to an asset.
|
* The basic amount of funds that must be reserved when adding an attribute to an item.
|
||||||
**/
|
**/
|
||||||
attributeDepositBase: u128 & AugmentedConst<ApiType>;
|
attributeDepositBase: u128 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The basic amount of funds that must be reserved for an asset class.
|
* The basic amount of funds that must be reserved for collection.
|
||||||
**/
|
**/
|
||||||
classDeposit: u128 & AugmentedConst<ApiType>;
|
collectionDeposit: u128 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The additional funds that must be reserved for the number of bytes store in metadata,
|
* The additional funds that must be reserved for the number of bytes store in metadata,
|
||||||
* either "normal" metadata or attribute metadata.
|
* either "normal" metadata or attribute metadata.
|
||||||
**/
|
**/
|
||||||
depositPerByte: u128 & AugmentedConst<ApiType>;
|
depositPerByte: u128 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The basic amount of funds that must be reserved for an asset instance.
|
* The basic amount of funds that must be reserved for an item.
|
||||||
**/
|
**/
|
||||||
instanceDeposit: u128 & AugmentedConst<ApiType>;
|
itemDeposit: u128 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum length of an attribute key.
|
* The maximum length of an attribute key.
|
||||||
**/
|
**/
|
||||||
keyLimit: u32 & AugmentedConst<ApiType>;
|
keyLimit: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The basic amount of funds that must be reserved when adding metadata to your asset.
|
* The basic amount of funds that must be reserved when adding metadata to your item.
|
||||||
**/
|
**/
|
||||||
metadataDepositBase: u128 & AugmentedConst<ApiType>;
|
metadataDepositBase: u128 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -112,6 +112,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* A given equivocation report is valid but already previously reported.
|
* A given equivocation report is valid but already previously reported.
|
||||||
**/
|
**/
|
||||||
DuplicateOffenceReport: AugmentedError<ApiType>;
|
DuplicateOffenceReport: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Submitted configuration is invalid.
|
||||||
|
**/
|
||||||
|
InvalidConfiguration: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* An equivocation proof provided as part of an equivocation report is invalid.
|
* An equivocation proof provided as part of an equivocation report is invalid.
|
||||||
**/
|
**/
|
||||||
@@ -127,17 +131,9 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
};
|
};
|
||||||
bagsList: {
|
bagsList: {
|
||||||
/**
|
/**
|
||||||
* Id not found in list.
|
* A error in the list interface implementation.
|
||||||
**/
|
**/
|
||||||
IdNotFound: AugmentedError<ApiType>;
|
List: AugmentedError<ApiType>;
|
||||||
/**
|
|
||||||
* An Id does not have a greater score than another Id.
|
|
||||||
**/
|
|
||||||
NotHeavier: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* Attempted to place node in front of a node in another bag.
|
|
||||||
**/
|
|
||||||
NotInSameBag: AugmentedError<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Generic error
|
* Generic error
|
||||||
**/
|
**/
|
||||||
@@ -183,7 +179,7 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
};
|
};
|
||||||
bounties: {
|
bounties: {
|
||||||
/**
|
/**
|
||||||
* The bounty cannot be closed because it has active child-bounties.
|
* The bounty cannot be closed because it has active child bounties.
|
||||||
**/
|
**/
|
||||||
HasActiveChildBounty: AugmentedError<ApiType>;
|
HasActiveChildBounty: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -242,7 +238,7 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
ParentBountyNotActive: AugmentedError<ApiType>;
|
ParentBountyNotActive: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Number of child-bounties exceeds limit `MaxActiveChildBountyCount`.
|
* Number of child bounties exceeds limit `MaxActiveChildBountyCount`.
|
||||||
**/
|
**/
|
||||||
TooManyChildBounties: AugmentedError<ApiType>;
|
TooManyChildBounties: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -1018,6 +1014,117 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
|
nominationPools: {
|
||||||
|
/**
|
||||||
|
* An account is already delegating in another pool. An account may only belong to one
|
||||||
|
* pool at a time.
|
||||||
|
**/
|
||||||
|
AccountBelongsToOtherPool: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The member is already unbonding in this era.
|
||||||
|
**/
|
||||||
|
AlreadyUnbonding: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The pools state cannot be changed.
|
||||||
|
**/
|
||||||
|
CanNotChangeState: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* None of the funds can be withdrawn yet because the bonding duration has not passed.
|
||||||
|
**/
|
||||||
|
CannotWithdrawAny: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Some error occurred that should never happen. This should be reported to the
|
||||||
|
* maintainers.
|
||||||
|
**/
|
||||||
|
DefensiveError: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The caller does not have adequate permissions.
|
||||||
|
**/
|
||||||
|
DoesNotHavePermission: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The member is fully unbonded (and thus cannot access the bonded and reward pool
|
||||||
|
* anymore to, for example, collect rewards).
|
||||||
|
**/
|
||||||
|
FullyUnbonding: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The pool has insufficient balance to bond as a nominator.
|
||||||
|
**/
|
||||||
|
InsufficientBond: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Too many members in the pool or system.
|
||||||
|
**/
|
||||||
|
MaxPoolMembers: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The system is maxed out on pools.
|
||||||
|
**/
|
||||||
|
MaxPools: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The member cannot unbond further chunks due to reaching the limit.
|
||||||
|
**/
|
||||||
|
MaxUnbondingLimit: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Metadata exceeds [`Config::MaxMetadataLen`]
|
||||||
|
**/
|
||||||
|
MetadataExceedsMaxLen: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The amount does not meet the minimum bond to either join or create a pool.
|
||||||
|
**/
|
||||||
|
MinimumBondNotMet: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* A pool must be in [`PoolState::Destroying`] in order for the depositor to unbond or for
|
||||||
|
* other members to be permissionlessly unbonded.
|
||||||
|
**/
|
||||||
|
NotDestroying: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Not enough points. Ty unbonding less.
|
||||||
|
**/
|
||||||
|
NotEnoughPointsToUnbond: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Either a) the caller cannot make a valid kick or b) the pool is not destroying.
|
||||||
|
**/
|
||||||
|
NotKickerOrDestroying: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The caller does not have nominating permissions for the pool.
|
||||||
|
**/
|
||||||
|
NotNominator: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The depositor must be the only member in the bonded pool in order to unbond. And the
|
||||||
|
* depositor must be the only member in the sub pools in order to withdraw unbonded.
|
||||||
|
**/
|
||||||
|
NotOnlyPoolMember: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The pool is not open to join
|
||||||
|
**/
|
||||||
|
NotOpen: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The transaction could not be executed due to overflow risk for the pool.
|
||||||
|
**/
|
||||||
|
OverflowRisk: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Partial unbonding now allowed permissionlessly.
|
||||||
|
**/
|
||||||
|
PartialUnbondNotAllowedPermissionlessly: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* An account is not a member.
|
||||||
|
**/
|
||||||
|
PoolMemberNotFound: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* A (bonded) pool id does not exist.
|
||||||
|
**/
|
||||||
|
PoolNotFound: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* A reward pool does not exist. In all cases this is a system logic error.
|
||||||
|
**/
|
||||||
|
RewardPoolNotFound: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* A sub pool does not exist.
|
||||||
|
**/
|
||||||
|
SubPoolsNotFound: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic error
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedError<ApiType>;
|
||||||
|
};
|
||||||
preimage: {
|
preimage: {
|
||||||
/**
|
/**
|
||||||
* Preimage has already been noted on-chain.
|
* Preimage has already been noted on-chain.
|
||||||
@@ -1206,6 +1313,20 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
|
remark: {
|
||||||
|
/**
|
||||||
|
* Attempted to call `store` outside of block execution.
|
||||||
|
**/
|
||||||
|
BadContext: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Attempting to store empty data.
|
||||||
|
**/
|
||||||
|
Empty: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic error
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedError<ApiType>;
|
||||||
|
};
|
||||||
scheduler: {
|
scheduler: {
|
||||||
/**
|
/**
|
||||||
* Failed to schedule a call
|
* Failed to schedule a call
|
||||||
@@ -1451,6 +1572,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* submitter does not have enough funds.
|
* submitter does not have enough funds.
|
||||||
**/
|
**/
|
||||||
NotEnoughFunds: AugmentedError<ApiType>;
|
NotEnoughFunds: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Signed migration is not allowed because the maximum limit is not set yet.
|
||||||
|
**/
|
||||||
|
SignedMigrationNotAllowed: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* upper bound of size is exceeded,
|
* upper bound of size is exceeded,
|
||||||
**/
|
**/
|
||||||
@@ -1661,6 +1786,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* No proposal or bounty at that index.
|
* No proposal or bounty at that index.
|
||||||
**/
|
**/
|
||||||
InvalidIndex: AugmentedError<ApiType>;
|
InvalidIndex: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Proposal has not been approved.
|
||||||
|
**/
|
||||||
|
ProposalNotApproved: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Too many approvals in the queue.
|
* Too many approvals in the queue.
|
||||||
**/
|
**/
|
||||||
@@ -1672,7 +1801,7 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
};
|
};
|
||||||
uniques: {
|
uniques: {
|
||||||
/**
|
/**
|
||||||
* The asset instance ID has already been used for an asset.
|
* The item ID has already been used for an item.
|
||||||
**/
|
**/
|
||||||
AlreadyExists: AugmentedError<ApiType>;
|
AlreadyExists: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -1680,13 +1809,29 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
BadWitness: AugmentedError<ApiType>;
|
BadWitness: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The asset instance or class is frozen.
|
* The item or collection is frozen.
|
||||||
**/
|
**/
|
||||||
Frozen: AugmentedError<ApiType>;
|
Frozen: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The asset ID is already taken.
|
* The item ID is already taken.
|
||||||
**/
|
**/
|
||||||
InUse: AugmentedError<ApiType>;
|
InUse: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The item is locked.
|
||||||
|
**/
|
||||||
|
Locked: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The max supply has already been set.
|
||||||
|
**/
|
||||||
|
MaxSupplyAlreadySet: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* All items have been minted.
|
||||||
|
**/
|
||||||
|
MaxSupplyReached: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The provided max supply is less to the amount of items a collection already has.
|
||||||
|
**/
|
||||||
|
MaxSupplyTooSmall: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* There is no delegate approved.
|
* There is no delegate approved.
|
||||||
**/
|
**/
|
||||||
@@ -1696,7 +1841,7 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
NoPermission: AugmentedError<ApiType>;
|
NoPermission: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The named owner has not signed ownership of the class is acceptable.
|
* The named owner has not signed ownership of the collection is acceptable.
|
||||||
**/
|
**/
|
||||||
Unaccepted: AugmentedError<ApiType>;
|
Unaccepted: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -1704,9 +1849,9 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
Unapproved: AugmentedError<ApiType>;
|
Unapproved: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The given asset ID is unknown.
|
* The given item ID is unknown.
|
||||||
**/
|
**/
|
||||||
UnknownClass: AugmentedError<ApiType>;
|
UnknownCollection: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The delegate turned out to be different to what was expected.
|
* The delegate turned out to be different to what was expected.
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type { ApiTypes } from '@polkadot/api-base/types';
|
|||||||
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { ITuple } from '@polkadot/types-codec/types';
|
import type { ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPostDispatchInfo, NodeRuntimeProxyType, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, PalletStateTrieMigrationMigrationCompute, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo } from '@polkadot/types/lookup';
|
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPostDispatchInfo, NodeRuntimeProxyType, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationCompute, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/events' {
|
declare module '@polkadot/api-base/types/events' {
|
||||||
export interface AugmentedEvents<ApiType extends ApiTypes> {
|
export interface AugmentedEvents<ApiType extends ApiTypes> {
|
||||||
@@ -93,6 +93,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* Moved an account from one bag to another.
|
* Moved an account from one bag to another.
|
||||||
**/
|
**/
|
||||||
Rebagged: AugmentedEvent<ApiType, [AccountId32, u64, u64]>;
|
Rebagged: AugmentedEvent<ApiType, [AccountId32, u64, u64]>;
|
||||||
|
/**
|
||||||
|
* Updated the score of some account to the given amount.
|
||||||
|
**/
|
||||||
|
ScoreUpdated: AugmentedEvent<ApiType, [AccountId32, u64]>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -615,6 +619,51 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
|
nominationPools: {
|
||||||
|
/**
|
||||||
|
* A member has became bonded in a pool.
|
||||||
|
**/
|
||||||
|
Bonded: AugmentedEvent<ApiType, [AccountId32, u32, u128, bool]>;
|
||||||
|
/**
|
||||||
|
* A pool has been created.
|
||||||
|
**/
|
||||||
|
Created: AugmentedEvent<ApiType, [AccountId32, u32]>;
|
||||||
|
/**
|
||||||
|
* A pool has been destroyed.
|
||||||
|
**/
|
||||||
|
Destroyed: AugmentedEvent<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* A member has been removed from a pool.
|
||||||
|
*
|
||||||
|
* The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked).
|
||||||
|
**/
|
||||||
|
MemberRemoved: AugmentedEvent<ApiType, [u32, AccountId32]>;
|
||||||
|
/**
|
||||||
|
* A payout has been made to a member.
|
||||||
|
**/
|
||||||
|
PaidOut: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
|
||||||
|
/**
|
||||||
|
* The roles of a pool have been updated to the given new roles. Note that the depositor
|
||||||
|
* can never change.
|
||||||
|
**/
|
||||||
|
RolesUpdated: AugmentedEvent<ApiType, [Option<AccountId32>, Option<AccountId32>, Option<AccountId32>]>;
|
||||||
|
/**
|
||||||
|
* The state of a pool has changed
|
||||||
|
**/
|
||||||
|
StateChanged: AugmentedEvent<ApiType, [u32, PalletNominationPoolsPoolState]>;
|
||||||
|
/**
|
||||||
|
* A member has unbonded from their pool.
|
||||||
|
**/
|
||||||
|
Unbonded: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
|
||||||
|
/**
|
||||||
|
* A member has withdrawn from their pool.
|
||||||
|
**/
|
||||||
|
Withdrawn: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
|
||||||
|
/**
|
||||||
|
* Generic event
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
|
};
|
||||||
offences: {
|
offences: {
|
||||||
/**
|
/**
|
||||||
* There is an offence reported of the given `kind` happened at the `session_index` and
|
* There is an offence reported of the given `kind` happened at the `session_index` and
|
||||||
@@ -663,6 +712,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A proxy was executed correctly, with the given.
|
* A proxy was executed correctly, with the given.
|
||||||
**/
|
**/
|
||||||
ProxyExecuted: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;
|
ProxyExecuted: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;
|
||||||
|
/**
|
||||||
|
* A proxy was removed.
|
||||||
|
**/
|
||||||
|
ProxyRemoved: AugmentedEvent<ApiType, [AccountId32, AccountId32, NodeRuntimeProxyType, u32]>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -750,6 +803,16 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
|
remark: {
|
||||||
|
/**
|
||||||
|
* Stored data off chain.
|
||||||
|
**/
|
||||||
|
Stored: AugmentedEvent<ApiType, [AccountId32, H256]>;
|
||||||
|
/**
|
||||||
|
* Generic event
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
|
};
|
||||||
scheduler: {
|
scheduler: {
|
||||||
/**
|
/**
|
||||||
* The call for the provided hash was not found so the task has been aborted.
|
* The call for the provided hash was not found so the task has been aborted.
|
||||||
@@ -909,6 +972,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* An account has unbonded this amount. \[stash, amount\]
|
* An account has unbonded this amount. \[stash, amount\]
|
||||||
**/
|
**/
|
||||||
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||||
|
/**
|
||||||
|
* A validator has set their preferences.
|
||||||
|
**/
|
||||||
|
ValidatorPrefsSet: AugmentedEvent<ApiType, [AccountId32, PalletStakingValidatorPrefs]>;
|
||||||
/**
|
/**
|
||||||
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
||||||
* from the unlocking queue. \[stash, amount\]
|
* from the unlocking queue. \[stash, amount\]
|
||||||
@@ -1136,73 +1203,77 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
};
|
};
|
||||||
uniques: {
|
uniques: {
|
||||||
/**
|
/**
|
||||||
* An approval for a `delegate` account to transfer the `instance` of an asset `class` was
|
* An approval for a `delegate` account to transfer the `item` of an item
|
||||||
* cancelled by its `owner`.
|
* `collection` was cancelled by its `owner`.
|
||||||
**/
|
**/
|
||||||
ApprovalCancelled: AugmentedEvent<ApiType, [u32, u32, AccountId32, AccountId32]>;
|
ApprovalCancelled: AugmentedEvent<ApiType, [u32, u32, AccountId32, AccountId32]>;
|
||||||
/**
|
/**
|
||||||
* An `instance` of an asset `class` has been approved by the `owner` for transfer by a
|
* An `item` of a `collection` has been approved by the `owner` for transfer by
|
||||||
* `delegate`.
|
* a `delegate`.
|
||||||
**/
|
**/
|
||||||
ApprovedTransfer: AugmentedEvent<ApiType, [u32, u32, AccountId32, AccountId32]>;
|
ApprovedTransfer: AugmentedEvent<ApiType, [u32, u32, AccountId32, AccountId32]>;
|
||||||
/**
|
/**
|
||||||
* An asset `class` has had its attributes changed by the `Force` origin.
|
* Attribute metadata has been cleared for a `collection` or `item`.
|
||||||
**/
|
|
||||||
AssetStatusChanged: AugmentedEvent<ApiType, [u32]>;
|
|
||||||
/**
|
|
||||||
* Attribute metadata has been cleared for an asset class or instance.
|
|
||||||
**/
|
**/
|
||||||
AttributeCleared: AugmentedEvent<ApiType, [u32, Option<u32>, Bytes]>;
|
AttributeCleared: AugmentedEvent<ApiType, [u32, Option<u32>, Bytes]>;
|
||||||
/**
|
/**
|
||||||
* New attribute metadata has been set for an asset class or instance.
|
* New attribute metadata has been set for a `collection` or `item`.
|
||||||
**/
|
**/
|
||||||
AttributeSet: AugmentedEvent<ApiType, [u32, Option<u32>, Bytes, Bytes]>;
|
AttributeSet: AugmentedEvent<ApiType, [u32, Option<u32>, Bytes, Bytes]>;
|
||||||
/**
|
/**
|
||||||
* An asset `instance` was destroyed.
|
* An `item` was destroyed.
|
||||||
**/
|
**/
|
||||||
Burned: AugmentedEvent<ApiType, [u32, u32, AccountId32]>;
|
Burned: AugmentedEvent<ApiType, [u32, u32, AccountId32]>;
|
||||||
/**
|
/**
|
||||||
* Some asset `class` was frozen.
|
* Some `collection` was frozen.
|
||||||
**/
|
**/
|
||||||
ClassFrozen: AugmentedEvent<ApiType, [u32]>;
|
CollectionFrozen: AugmentedEvent<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* Metadata has been cleared for an asset class.
|
* Max supply has been set for a collection.
|
||||||
**/
|
**/
|
||||||
ClassMetadataCleared: AugmentedEvent<ApiType, [u32]>;
|
CollectionMaxSupplySet: AugmentedEvent<ApiType, [u32, u32]>;
|
||||||
/**
|
/**
|
||||||
* New metadata has been set for an asset class.
|
* Metadata has been cleared for a `collection`.
|
||||||
**/
|
**/
|
||||||
ClassMetadataSet: AugmentedEvent<ApiType, [u32, Bytes, bool]>;
|
CollectionMetadataCleared: AugmentedEvent<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* Some asset `class` was thawed.
|
* New metadata has been set for a `collection`.
|
||||||
**/
|
**/
|
||||||
ClassThawed: AugmentedEvent<ApiType, [u32]>;
|
CollectionMetadataSet: AugmentedEvent<ApiType, [u32, Bytes, bool]>;
|
||||||
/**
|
/**
|
||||||
* An asset class was created.
|
* Some `collection` was thawed.
|
||||||
|
**/
|
||||||
|
CollectionThawed: AugmentedEvent<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* A `collection` was created.
|
||||||
**/
|
**/
|
||||||
Created: AugmentedEvent<ApiType, [u32, AccountId32, AccountId32]>;
|
Created: AugmentedEvent<ApiType, [u32, AccountId32, AccountId32]>;
|
||||||
/**
|
/**
|
||||||
* An asset `class` was destroyed.
|
* A `collection` was destroyed.
|
||||||
**/
|
**/
|
||||||
Destroyed: AugmentedEvent<ApiType, [u32]>;
|
Destroyed: AugmentedEvent<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* An asset class was force-created.
|
* A `collection` was force-created.
|
||||||
**/
|
**/
|
||||||
ForceCreated: AugmentedEvent<ApiType, [u32, AccountId32]>;
|
ForceCreated: AugmentedEvent<ApiType, [u32, AccountId32]>;
|
||||||
/**
|
/**
|
||||||
* Some asset `instance` was frozen.
|
* Some `item` was frozen.
|
||||||
**/
|
**/
|
||||||
Frozen: AugmentedEvent<ApiType, [u32, u32]>;
|
Frozen: AugmentedEvent<ApiType, [u32, u32]>;
|
||||||
/**
|
/**
|
||||||
* An asset `instance` was issued.
|
* An `item` was issued.
|
||||||
**/
|
**/
|
||||||
Issued: AugmentedEvent<ApiType, [u32, u32, AccountId32]>;
|
Issued: AugmentedEvent<ApiType, [u32, u32, AccountId32]>;
|
||||||
/**
|
/**
|
||||||
* Metadata has been cleared for an asset instance.
|
* A `collection` has had its attributes changed by the `Force` origin.
|
||||||
|
**/
|
||||||
|
ItemStatusChanged: AugmentedEvent<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* Metadata has been cleared for an item.
|
||||||
**/
|
**/
|
||||||
MetadataCleared: AugmentedEvent<ApiType, [u32, u32]>;
|
MetadataCleared: AugmentedEvent<ApiType, [u32, u32]>;
|
||||||
/**
|
/**
|
||||||
* New metadata has been set for an asset instance.
|
* New metadata has been set for an item.
|
||||||
**/
|
**/
|
||||||
MetadataSet: AugmentedEvent<ApiType, [u32, u32, Bytes, bool]>;
|
MetadataSet: AugmentedEvent<ApiType, [u32, u32, Bytes, bool]>;
|
||||||
/**
|
/**
|
||||||
@@ -1214,7 +1285,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
OwnershipAcceptanceChanged: AugmentedEvent<ApiType, [AccountId32, Option<u32>]>;
|
OwnershipAcceptanceChanged: AugmentedEvent<ApiType, [AccountId32, Option<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Metadata has been cleared for an asset instance.
|
* Metadata has been cleared for an item.
|
||||||
**/
|
**/
|
||||||
Redeposited: AugmentedEvent<ApiType, [u32, Vec<u32>]>;
|
Redeposited: AugmentedEvent<ApiType, [u32, Vec<u32>]>;
|
||||||
/**
|
/**
|
||||||
@@ -1222,11 +1293,11 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
TeamChanged: AugmentedEvent<ApiType, [u32, AccountId32, AccountId32, AccountId32]>;
|
TeamChanged: AugmentedEvent<ApiType, [u32, AccountId32, AccountId32, AccountId32]>;
|
||||||
/**
|
/**
|
||||||
* Some asset `instance` was thawed.
|
* Some `item` was thawed.
|
||||||
**/
|
**/
|
||||||
Thawed: AugmentedEvent<ApiType, [u32, u32]>;
|
Thawed: AugmentedEvent<ApiType, [u32, u32]>;
|
||||||
/**
|
/**
|
||||||
* An asset `instance` was transferred.
|
* An `item` was transferred.
|
||||||
**/
|
**/
|
||||||
Transferred: AugmentedEvent<ApiType, [u32, u32, AccountId32, AccountId32]>;
|
Transferred: AugmentedEvent<ApiType, [u32, u32, AccountId32, AccountId32]>;
|
||||||
/**
|
/**
|
||||||
@@ -1239,6 +1310,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* Batch of dispatches completed fully with no error.
|
* Batch of dispatches completed fully with no error.
|
||||||
**/
|
**/
|
||||||
BatchCompleted: AugmentedEvent<ApiType, []>;
|
BatchCompleted: AugmentedEvent<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Batch of dispatches completed but has errors.
|
||||||
|
**/
|
||||||
|
BatchCompletedWithErrors: AugmentedEvent<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Batch of dispatches did not complete fully. Index of first failing dispatch given, as
|
* Batch of dispatches did not complete fully. Index of first failing dispatch given, as
|
||||||
* well as the error.
|
* well as the error.
|
||||||
@@ -1252,6 +1327,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A single item within a Batch of dispatches has completed with no error.
|
* A single item within a Batch of dispatches has completed with no error.
|
||||||
**/
|
**/
|
||||||
ItemCompleted: AugmentedEvent<ApiType, []>;
|
ItemCompleted: AugmentedEvent<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* A single item within a Batch of dispatches has completed with error.
|
||||||
|
**/
|
||||||
|
ItemFailed: AugmentedEvent<ApiType, [SpRuntimeDispatchError]>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import type { Data } from '@polkadot/types';
|
|||||||
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, u32, u64, u8 } from '@polkadot/types-codec';
|
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfo, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesClassDetails, PalletUniquesClassMetadata, PalletUniquesInstanceDetails, PalletUniquesInstanceMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
|
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfo, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
|
||||||
import type { Observable } from '@polkadot/types/types';
|
import type { Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/storage' {
|
declare module '@polkadot/api-base/types/storage' {
|
||||||
@@ -76,7 +76,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* This field should always be populated during block processing unless
|
* This field should always be populated during block processing unless
|
||||||
* secondary plain slots are enabled (which don't contain a VRF output).
|
* secondary plain slots are enabled (which don't contain a VRF output).
|
||||||
*
|
*
|
||||||
* It is set in `on_initialize`, before it will contain the value from the last block.
|
* It is set in `on_finalize`, before it will contain the value from the last block.
|
||||||
**/
|
**/
|
||||||
authorVrfRandomness: AugmentedQuery<ApiType, () => Observable<Option<U8aFixed>>, []> & QueryableStorageEntry<ApiType, []>;
|
authorVrfRandomness: AugmentedQuery<ApiType, () => Observable<Option<U8aFixed>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
@@ -109,7 +109,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* Temporary value (cleared at block finalization) which is `Some`
|
* Temporary value (cleared at block finalization) which is `Some`
|
||||||
* if per-block initialization has already been called for current block.
|
* if per-block initialization has already been called for current block.
|
||||||
**/
|
**/
|
||||||
initialized: AugmentedQuery<ApiType, () => Observable<Option<Option<U8aFixed>>>, []> & QueryableStorageEntry<ApiType, []>;
|
initialized: AugmentedQuery<ApiType, () => Observable<Option<Option<SpConsensusBabeDigestsPreDigest>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* How late the current block is compared to its parent.
|
* How late the current block is compared to its parent.
|
||||||
*
|
*
|
||||||
@@ -267,7 +267,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
};
|
};
|
||||||
childBounties: {
|
childBounties: {
|
||||||
/**
|
/**
|
||||||
* Child-bounties that have been added.
|
* Child bounties that have been added.
|
||||||
**/
|
**/
|
||||||
childBounties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletChildBountiesChildBounty>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
childBounties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletChildBountiesChildBounty>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||||
/**
|
/**
|
||||||
@@ -283,7 +283,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
childrenCuratorFees: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
childrenCuratorFees: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* Number of child-bounties per parent bounty.
|
* Number of child bounties per parent bounty.
|
||||||
* Map of parent bounty index to number of child bounties.
|
* Map of parent bounty index to number of child bounties.
|
||||||
**/
|
**/
|
||||||
parentChildBounties: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
parentChildBounties: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
@@ -785,6 +785,95 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
|
nominationPools: {
|
||||||
|
/**
|
||||||
|
* Storage for bonded pools.
|
||||||
|
**/
|
||||||
|
bondedPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsBondedPoolInner>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForBondedPools: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForMetadata: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForPoolMembers: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForReversePoolIdLookup: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForRewardPools: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForSubPoolsStorage: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Ever increasing number of all pools created so far.
|
||||||
|
**/
|
||||||
|
lastPoolId: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Maximum number of members that can exist in the system. If `None`, then the count
|
||||||
|
* members are not bound on a system wide basis.
|
||||||
|
**/
|
||||||
|
maxPoolMembers: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Maximum number of members that may belong to pool. If `None`, then the count of
|
||||||
|
* members is not bound on a per pool basis.
|
||||||
|
**/
|
||||||
|
maxPoolMembersPerPool: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Maximum number of nomination pools that can exist. If `None`, then an unbounded number of
|
||||||
|
* pools can exist.
|
||||||
|
**/
|
||||||
|
maxPools: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Metadata for the pool.
|
||||||
|
**/
|
||||||
|
metadata: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* Minimum bond required to create a pool.
|
||||||
|
*
|
||||||
|
* This is the amount that the depositor must put as their initial stake in the pool, as an
|
||||||
|
* indication of "skin in the game".
|
||||||
|
**/
|
||||||
|
minCreateBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Minimum amount to bond to join a pool.
|
||||||
|
**/
|
||||||
|
minJoinBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Active members.
|
||||||
|
**/
|
||||||
|
poolMembers: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletNominationPoolsPoolMember>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* A reverse lookup from the pool's account id to its id.
|
||||||
|
*
|
||||||
|
* This is only used for slashing. In all other instances, the pool id is used, and the
|
||||||
|
* accounts are deterministically derived from it.
|
||||||
|
**/
|
||||||
|
reversePoolIdLookup: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Reward pools. This is where there rewards for each pool accumulate. When a members payout
|
||||||
|
* is claimed, the balance comes out fo the reward pool. Keyed by the bonded pools account.
|
||||||
|
**/
|
||||||
|
rewardPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsRewardPool>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* Groups of unbonding pools. Each group of unbonding pools belongs to a bonded pool,
|
||||||
|
* hence the name sub-pools. Keyed by the bonded pools account.
|
||||||
|
**/
|
||||||
|
subPoolsStorage: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsSubPools>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
offences: {
|
offences: {
|
||||||
/**
|
/**
|
||||||
* A vector of reports of the same kind that happened at the same time slot.
|
* A vector of reports of the same kind that happened at the same time slot.
|
||||||
@@ -1282,6 +1371,12 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* forward by any of the means provided by this pallet.
|
* forward by any of the means provided by this pallet.
|
||||||
**/
|
**/
|
||||||
migrationProcess: AugmentedQuery<ApiType, () => Observable<PalletStateTrieMigrationMigrationTask>, []> & QueryableStorageEntry<ApiType, []>;
|
migrationProcess: AugmentedQuery<ApiType, () => Observable<PalletStateTrieMigrationMigrationTask>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* The maximum limits that the signed migration could use.
|
||||||
|
*
|
||||||
|
* If not set, no signed submission is allowed.
|
||||||
|
**/
|
||||||
|
signedMigrationMaxLimits: AugmentedQuery<ApiType, () => Observable<Option<PalletStateTrieMigrationMigrationLimits>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Generic query
|
* Generic query
|
||||||
**/
|
**/
|
||||||
@@ -1325,8 +1420,11 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* Events deposited for the current block.
|
* Events deposited for the current block.
|
||||||
*
|
*
|
||||||
* NOTE: This storage item is explicitly unbounded since it is never intended to be read
|
* NOTE: The item is unbound and should therefore never be read on chain.
|
||||||
* from within the runtime.
|
* It could otherwise inflate the PoV size of a block.
|
||||||
|
*
|
||||||
|
* Events have a large in-memory size. Box the events to not go out-of-memory
|
||||||
|
* just in case someone still reads them from within the runtime.
|
||||||
**/
|
**/
|
||||||
events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;
|
events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
@@ -1523,37 +1621,41 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
};
|
};
|
||||||
uniques: {
|
uniques: {
|
||||||
/**
|
/**
|
||||||
* The assets held by any given account; set out this way so that assets owned by a single
|
* The items held by any given account; set out this way so that items owned by a single
|
||||||
* account can be enumerated.
|
* account can be enumerated.
|
||||||
**/
|
**/
|
||||||
account: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<Option<Null>>, [AccountId32, u32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32, u32]>;
|
account: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<Option<Null>>, [AccountId32, u32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32, u32]>;
|
||||||
/**
|
/**
|
||||||
* The assets in existence and their ownership details.
|
* The items in existence and their ownership details.
|
||||||
**/
|
**/
|
||||||
asset: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesInstanceDetails>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
asset: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesItemDetails>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||||
/**
|
/**
|
||||||
* Metadata of an asset class.
|
* Attributes of a collection.
|
||||||
**/
|
**/
|
||||||
attribute: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: Option<u32> | null | object | string | Uint8Array, arg3: Bytes | string | Uint8Array) => Observable<Option<ITuple<[Bytes, u128]>>>, [u32, Option<u32>, Bytes]> & QueryableStorageEntry<ApiType, [u32, Option<u32>, Bytes]>;
|
attribute: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: Option<u32> | null | object | string | Uint8Array, arg3: Bytes | string | Uint8Array) => Observable<Option<ITuple<[Bytes, u128]>>>, [u32, Option<u32>, Bytes]> & QueryableStorageEntry<ApiType, [u32, Option<u32>, Bytes]>;
|
||||||
/**
|
/**
|
||||||
* Details of an asset class.
|
* Details of a collection.
|
||||||
**/
|
**/
|
||||||
class: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesClassDetails>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
class: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesCollectionDetails>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* The classes owned by any given account; set out this way so that classes owned by a single
|
* The collections owned by any given account; set out this way so that collections owned by
|
||||||
* account can be enumerated.
|
* a single account can be enumerated.
|
||||||
**/
|
**/
|
||||||
classAccount: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<Null>>, [AccountId32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32]>;
|
classAccount: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<Null>>, [AccountId32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32]>;
|
||||||
/**
|
/**
|
||||||
* Metadata of an asset class.
|
* Metadata of a collection.
|
||||||
**/
|
**/
|
||||||
classMetadataOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesClassMetadata>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
classMetadataOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesCollectionMetadata>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* Metadata of an asset instance.
|
* Keeps track of the number of items a collection might have.
|
||||||
**/
|
**/
|
||||||
instanceMetadataOf: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesInstanceMetadata>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
collectionMaxSupply: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* The class, if any, of which an account is willing to take ownership.
|
* Metadata of an item.
|
||||||
|
**/
|
||||||
|
instanceMetadataOf: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesItemMetadata>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||||
|
/**
|
||||||
|
* The collection, if any, of which an account is willing to take ownership.
|
||||||
**/
|
**/
|
||||||
ownershipAcceptance: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
ownershipAcceptance: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -20,13 +20,13 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.14.1",
|
"version": "8.6.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.17.8",
|
"@babel/runtime": "^7.18.3",
|
||||||
"@polkadot/rpc-core": "7.14.1",
|
"@polkadot/rpc-core": "8.6.1",
|
||||||
"@polkadot/types": "7.14.1",
|
"@polkadot/types": "8.6.1",
|
||||||
"@polkadot/util": "^8.7.1",
|
"@polkadot/util": "^9.3.1",
|
||||||
"rxjs": "^7.5.5"
|
"rxjs": "^7.5.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '7.14.1' };
|
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '8.6.1' };
|
||||||
|
|||||||
@@ -74,12 +74,10 @@ export interface StorageEntryBase<ApiType extends ApiTypes, F extends AnyFunctio
|
|||||||
* @deprecated Use api.at(<blockHash>)
|
* @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 extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(hash: Hash | Uint8Array | string, ...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][]>;
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use api.at(<blockHash>)
|
* @deprecated Use api.at(<blockHash>)
|
||||||
*/
|
*/
|
||||||
keysAt: <K extends AnyTuple = A> (hash: Hash | Uint8Array | string, ...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
|
keysAt: <K extends AnyTuple = A> (hash: Hash | Uint8Array | string, ...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
|
||||||
keysPaged: <K extends AnyTuple = A> (opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
|
|
||||||
/**
|
/**
|
||||||
* @deprecated The underlying RPC this been marked unsafe and is generally not exposed
|
* @deprecated The underlying RPC this been marked unsafe and is generally not exposed
|
||||||
*/
|
*/
|
||||||
@@ -95,11 +93,13 @@ export interface StorageEntryBase<ApiType extends ApiTypes, F extends AnyFunctio
|
|||||||
|
|
||||||
export interface StorageEntryBaseAt<ApiType extends ApiTypes, F extends AnyFunction, A extends AnyTuple = AnyTuple> {
|
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][]>;
|
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][]>;
|
||||||
hash: (...args: Parameters<F>) => PromiseOrObs<ApiType, Hash>;
|
hash: (...args: Parameters<F>) => PromiseOrObs<ApiType, Hash>;
|
||||||
is: (key: IStorageKey<AnyTuple>) => key is IStorageKey<A>;
|
is: (key: IStorageKey<AnyTuple>) => key is IStorageKey<A>;
|
||||||
key: (...args: Parameters<F>) => string;
|
key: (...args: Parameters<F>) => string;
|
||||||
keyPrefix: (...args: DropLast<Parameters<F>>) => string;
|
keyPrefix: (...args: DropLast<Parameters<F>>) => string;
|
||||||
keys: <K extends AnyTuple = A> (...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
|
keys: <K extends AnyTuple = A> (...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
|
||||||
|
keysPaged: <K extends AnyTuple = A> (opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
|
||||||
size: (...args: Parameters<F>) => PromiseOrObs<ApiType, u64>;
|
size: (...args: Parameters<F>) => PromiseOrObs<ApiType, u64>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,3 @@
|
|||||||
# @polkadot/api-contract
|
# @polkadot/api-contract
|
||||||
|
|
||||||
Interfaces to allow for the encoding and decoding of Substrate contract ABIs.
|
Interfaces to allow for the encoding and decoding of Substrate contract ABIs.
|
||||||
|
|
||||||
```js
|
|
||||||
import {ApiPromise, WsProvider } from '@polkadot/api';
|
|
||||||
import { Abi } from '@polkadot/api-contract';
|
|
||||||
|
|
||||||
const wsProvider = new WsProvider(<...Node Url...>);
|
|
||||||
const api = await ApiPromise.create({ provider: wsProvider });
|
|
||||||
const abi = new Abi(<...JSON ABI...>, api.registry.getChainProperties());
|
|
||||||
|
|
||||||
api.tx.contracts
|
|
||||||
.call(<contract addr>, <value>, <max gas>, abi.messages.<method name>(<...params...>))
|
|
||||||
.signAndSend(<keyring pair>, (result: SubmittableResult) => { ... });
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -20,20 +20,20 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.14.1",
|
"version": "8.6.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.17.8",
|
"@babel/runtime": "^7.18.3",
|
||||||
"@polkadot/api": "7.14.1",
|
"@polkadot/api": "8.6.1",
|
||||||
"@polkadot/types": "7.14.1",
|
"@polkadot/types": "8.6.1",
|
||||||
"@polkadot/types-codec": "7.14.1",
|
"@polkadot/types-codec": "8.6.1",
|
||||||
"@polkadot/types-create": "7.14.1",
|
"@polkadot/types-create": "8.6.1",
|
||||||
"@polkadot/util": "^8.7.1",
|
"@polkadot/util": "^9.3.1",
|
||||||
"@polkadot/util-crypto": "^8.7.1",
|
"@polkadot/util-crypto": "^9.3.1",
|
||||||
"rxjs": "^7.5.5"
|
"rxjs": "^7.5.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/api-augment": "7.14.1",
|
"@polkadot/api-augment": "8.6.1",
|
||||||
"@polkadot/keyring": "^8.7.1"
|
"@polkadot/keyring": "^9.3.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '7.14.1' };
|
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '8.6.1' };
|
||||||
|
|||||||
@@ -20,25 +20,25 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.14.1",
|
"version": "8.6.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.17.8",
|
"@babel/runtime": "^7.18.3",
|
||||||
"@polkadot/api": "7.14.1",
|
"@polkadot/api": "8.6.1",
|
||||||
"@polkadot/api-augment": "7.14.1",
|
"@polkadot/api-augment": "8.6.1",
|
||||||
"@polkadot/api-base": "7.14.1",
|
"@polkadot/api-base": "8.6.1",
|
||||||
"@polkadot/rpc-core": "7.14.1",
|
"@polkadot/rpc-core": "8.6.1",
|
||||||
"@polkadot/types": "7.14.1",
|
"@polkadot/types": "8.6.1",
|
||||||
"@polkadot/types-codec": "7.14.1",
|
"@polkadot/types-codec": "8.6.1",
|
||||||
"@polkadot/util": "^8.7.1",
|
"@polkadot/util": "^9.3.1",
|
||||||
"@polkadot/util-crypto": "^8.7.1",
|
"@polkadot/util-crypto": "^9.3.1",
|
||||||
"rxjs": "^7.5.5"
|
"rxjs": "^7.5.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/api": "7.14.1",
|
"@polkadot/api": "8.6.1",
|
||||||
"@polkadot/api-augment": "7.14.1",
|
"@polkadot/api-augment": "8.6.1",
|
||||||
"@polkadot/rpc-augment": "7.14.1",
|
"@polkadot/rpc-augment": "8.6.1",
|
||||||
"@polkadot/rpc-provider": "7.14.1",
|
"@polkadot/rpc-provider": "8.6.1",
|
||||||
"@polkadot/types-support": "7.14.1"
|
"@polkadot/types-support": "8.6.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ function retrieveNick (api: DeriveApi, accountId?: AccountId): Observable<string
|
|||||||
) as Observable<Option<ITuple<[Bytes, Balance]>> | undefined>).pipe(
|
) as Observable<Option<ITuple<[Bytes, Balance]>> | undefined>).pipe(
|
||||||
map((nameOf): string | undefined =>
|
map((nameOf): string | undefined =>
|
||||||
nameOf?.isSome
|
nameOf?.isSome
|
||||||
? u8aToString(nameOf.unwrap()[0]).substr(0, (api.consts.nicks.maxLength as u32).toNumber())
|
? u8aToString(nameOf.unwrap()[0]).substring(0, (api.consts.nicks.maxLength as u32).toNumber())
|
||||||
: undefined
|
: undefined
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import type { Observable } from 'rxjs';
|
||||||
|
import type { Option } from '@polkadot/types';
|
||||||
|
import type { PalletBagsListListBag } from '@polkadot/types/lookup';
|
||||||
|
import type { BN } from '@polkadot/util';
|
||||||
|
import type { DeriveApi } from '../types';
|
||||||
|
import type { Bag } from './types';
|
||||||
|
|
||||||
|
import { map, of, switchMap } from 'rxjs';
|
||||||
|
|
||||||
|
import { BN_ZERO, bnToBn } from '@polkadot/util';
|
||||||
|
|
||||||
|
import { memo } from '../util';
|
||||||
|
|
||||||
|
function orderBags (ids: BN[], bags: Option<PalletBagsListListBag>[]): Bag[] {
|
||||||
|
const sorted = ids
|
||||||
|
.map((id, index) => ({
|
||||||
|
bag: bags[index].unwrapOr(null),
|
||||||
|
id,
|
||||||
|
key: id.toString()
|
||||||
|
}))
|
||||||
|
.sort((a, b) => b.id.cmp(a.id))
|
||||||
|
.map((base, index): Bag => ({
|
||||||
|
...base,
|
||||||
|
bagLower: BN_ZERO,
|
||||||
|
bagUpper: base.id,
|
||||||
|
index
|
||||||
|
}));
|
||||||
|
const max = sorted.length - 1;
|
||||||
|
|
||||||
|
return sorted.map((entry, index) =>
|
||||||
|
index === max
|
||||||
|
? entry
|
||||||
|
// We could probably use a .add(BN_ONE) here
|
||||||
|
: { ...entry, bagLower: sorted[index + 1].bagUpper }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function _getIds (instanceId: string, api: DeriveApi): (ids: (BN | number)[]) => Observable<Bag[]> {
|
||||||
|
return memo(instanceId, (_ids: (BN | number)[]): Observable<Bag[]> => {
|
||||||
|
const ids = _ids.map((id) => bnToBn(id));
|
||||||
|
|
||||||
|
return ids.length
|
||||||
|
? api.query.listBags.multi<Option<PalletBagsListListBag>[]>(ids).pipe(
|
||||||
|
map((bags) => orderBags(ids, bags))
|
||||||
|
)
|
||||||
|
: of([]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function all (instanceId: string, api: DeriveApi): () => Observable<Bag[]> {
|
||||||
|
return memo(instanceId, (): Observable<Bag[]> =>
|
||||||
|
api.query.bagsList.listBags.keys().pipe(
|
||||||
|
switchMap((keys) =>
|
||||||
|
api.derive.bagsList._getIds(keys.map(({ args: [id] }) => id))
|
||||||
|
),
|
||||||
|
map((list) =>
|
||||||
|
list.filter(({ bag }) => bag)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function get (instanceId: string, api: DeriveApi): (id: BN | number) => Observable<Bag> {
|
||||||
|
return memo(instanceId, (id: BN | number): Observable<Bag> =>
|
||||||
|
api.derive.bagsList._getIds([bnToBn(id)]).pipe(
|
||||||
|
map((bags) => bags[0])
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import type { Observable } from 'rxjs';
|
||||||
|
import type { BN } from '@polkadot/util';
|
||||||
|
import type { DeriveApi } from '../types';
|
||||||
|
import type { Bag, BagExpanded } from './types';
|
||||||
|
|
||||||
|
import { map, switchMap } from 'rxjs';
|
||||||
|
|
||||||
|
import { memo } from '../util';
|
||||||
|
|
||||||
|
export function expand (instanceId: string, api: DeriveApi): (bag: Bag) => Observable<BagExpanded> {
|
||||||
|
return memo(instanceId, (bag: Bag): Observable<BagExpanded> =>
|
||||||
|
api.derive.bagsList.listNodes(bag.bag).pipe(
|
||||||
|
map((nodes) => ({ ...bag, nodes }))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getExpanded (instanceId: string, api: DeriveApi): (id: BN | number) => Observable<BagExpanded> {
|
||||||
|
return memo(instanceId, (id: BN | number): Observable<BagExpanded> =>
|
||||||
|
api.derive.bagsList.get(id).pipe(
|
||||||
|
switchMap((bag) =>
|
||||||
|
api.derive.bagsList.expand(bag)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
export * from './get';
|
||||||
|
export * from './getExpanded';
|
||||||
|
export * from './listNodes';
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import type { Observable } from 'rxjs';
|
||||||
|
import type { Option } from '@polkadot/types';
|
||||||
|
import type { AccountId32 } from '@polkadot/types/interfaces';
|
||||||
|
import type { PalletBagsListListBag, PalletBagsListListNode } from '@polkadot/types/lookup';
|
||||||
|
import type { DeriveApi } from '../types';
|
||||||
|
|
||||||
|
import { BehaviorSubject, map, of, switchMap, tap, toArray } from 'rxjs';
|
||||||
|
|
||||||
|
import { memo } from '../util';
|
||||||
|
|
||||||
|
function traverseLinks (api: DeriveApi, head: AccountId32 | string): Observable<PalletBagsListListNode[]> {
|
||||||
|
const subject = new BehaviorSubject<AccountId32 | string>(head);
|
||||||
|
|
||||||
|
return subject.pipe(
|
||||||
|
switchMap((account) =>
|
||||||
|
api.query.bagsList.listNodes(account)
|
||||||
|
),
|
||||||
|
tap((node: Option<PalletBagsListListNode>): void => {
|
||||||
|
setTimeout((): void => {
|
||||||
|
node.isSome && node.value.next.isSome
|
||||||
|
? subject.next(node.unwrap().next.unwrap())
|
||||||
|
: subject.complete();
|
||||||
|
}, 0);
|
||||||
|
}),
|
||||||
|
toArray(), // toArray since we want to startSubject to be completed
|
||||||
|
map((all: Option<PalletBagsListListNode>[]) =>
|
||||||
|
all.map((o) => o.unwrap())
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function listNodes (instanceId: string, api: DeriveApi): (bag: PalletBagsListListBag | null) => Observable<PalletBagsListListNode[]> {
|
||||||
|
return memo(instanceId, (bag: PalletBagsListListBag | null): Observable<PalletBagsListListNode[]> =>
|
||||||
|
bag && bag.head.isSome
|
||||||
|
? traverseLinks(api, bag.head.unwrap())
|
||||||
|
: of([])
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import type { PalletBagsListListBag, PalletBagsListListNode } from '@polkadot/types/lookup';
|
||||||
|
import type { BN } from '@polkadot/util';
|
||||||
|
|
||||||
|
export interface Bag {
|
||||||
|
bag: PalletBagsListListBag | null;
|
||||||
|
bagUpper: BN;
|
||||||
|
bagLower: BN;
|
||||||
|
id: BN;
|
||||||
|
index: number;
|
||||||
|
key: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface BagExpanded extends Bag {
|
||||||
|
nodes: PalletBagsListListNode[];
|
||||||
|
}
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
import type { Observable } from 'rxjs';
|
|
||||||
import type { Balance } from '@polkadot/types/interfaces';
|
|
||||||
import type { DeriveApi, DeriveFees } from '../types';
|
|
||||||
|
|
||||||
import { map, of } from 'rxjs';
|
|
||||||
|
|
||||||
import { memo } from '../util';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @name fees
|
|
||||||
* @returns An object containing the combined results of the storage queries for
|
|
||||||
* all relevant fees as declared in the substrate chain spec.
|
|
||||||
* @example
|
|
||||||
* <BR>
|
|
||||||
*
|
|
||||||
* ```javascript
|
|
||||||
* api.derive.balances.fees(({ creationFee, transferFee }) => {
|
|
||||||
* console.log(`The fee for creating a new account on this chain is ${creationFee} units. The fee required for making a transfer is ${transferFee} units.`);
|
|
||||||
* });
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
export function fees (instanceId: string, api: DeriveApi): () => Observable<DeriveFees> {
|
|
||||||
return memo(instanceId, (): Observable<DeriveFees> =>
|
|
||||||
of([
|
|
||||||
// deprecated - remove
|
|
||||||
(api.consts.balances?.creationFee as unknown as Balance) || api.registry.createType('Balance'),
|
|
||||||
(api.consts.balances?.transferFee as unknown as Balance) || api.registry.createType('Balance'),
|
|
||||||
|
|
||||||
// current
|
|
||||||
(api.consts.balances?.existentialDeposit as Balance) || api.registry.createType('Balance'),
|
|
||||||
(api.consts.transactionPayment?.transactionBaseFee as unknown as Balance) || api.registry.createType('Balance'),
|
|
||||||
(api.consts.transactionPayment?.transactionByteFee as Balance) || api.registry.createType('Balance')
|
|
||||||
]).pipe(
|
|
||||||
map(([creationFee, transferFee, existentialDeposit, transactionBaseFee, transactionByteFee]): DeriveFees => ({
|
|
||||||
creationFee,
|
|
||||||
existentialDeposit,
|
|
||||||
transactionBaseFee,
|
|
||||||
transactionByteFee,
|
|
||||||
transferFee
|
|
||||||
}))
|
|
||||||
));
|
|
||||||
}
|
|
||||||
@@ -4,7 +4,6 @@
|
|||||||
import { all } from './all';
|
import { all } from './all';
|
||||||
|
|
||||||
export * from './account';
|
export * from './account';
|
||||||
export * from './fees';
|
|
||||||
export * from './votingBalances';
|
export * from './votingBalances';
|
||||||
|
|
||||||
const votingBalance = all;
|
const votingBalance = all;
|
||||||
|
|||||||
@@ -22,6 +22,10 @@ export { lazyDeriveSection };
|
|||||||
|
|
||||||
// Enable derive only if some of these modules are available
|
// Enable derive only if some of these modules are available
|
||||||
const checks: Record<string, Avail> = {
|
const checks: Record<string, Avail> = {
|
||||||
|
bagsList: {
|
||||||
|
instances: ['bagsList'],
|
||||||
|
methods: []
|
||||||
|
},
|
||||||
contracts: {
|
contracts: {
|
||||||
instances: ['contracts'],
|
instances: ['contracts'],
|
||||||
methods: []
|
methods: []
|
||||||
|
|||||||
@@ -60,17 +60,17 @@ function _eventTriggerAll (api: DeriveApi, paraId: string | number | BN): Observ
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _getKeysPaged (api: DeriveApi, childKey: string): Observable<StorageKey[]> {
|
function _getKeysPaged (api: DeriveApi, childKey: string): Observable<StorageKey[]> {
|
||||||
const startSubject = new BehaviorSubject<string | undefined>(undefined);
|
const subject = new BehaviorSubject<string | undefined>(undefined);
|
||||||
|
|
||||||
return startSubject.pipe(
|
return subject.pipe(
|
||||||
switchMap((startKey) =>
|
switchMap((startKey) =>
|
||||||
api.rpc.childstate.getKeysPaged(childKey, '0x', PAGE_SIZE_K, startKey)
|
api.rpc.childstate.getKeysPaged(childKey, '0x', PAGE_SIZE_K, startKey)
|
||||||
),
|
),
|
||||||
tap((keys): void => {
|
tap((keys): void => {
|
||||||
setTimeout((): void => {
|
setTimeout((): void => {
|
||||||
keys.length === PAGE_SIZE_K
|
keys.length === PAGE_SIZE_K
|
||||||
? startSubject.next(keys[PAGE_SIZE_K - 1].toHex())
|
? subject.next(keys[PAGE_SIZE_K - 1].toHex())
|
||||||
: startSubject.complete();
|
: subject.complete();
|
||||||
}, 0);
|
}, 0);
|
||||||
}),
|
}),
|
||||||
toArray(), // toArray since we want to startSubject to be completed
|
toArray(), // toArray since we want to startSubject to be completed
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
import type { AnyFunction } from '@polkadot/types/types';
|
import type { AnyFunction } from '@polkadot/types/types';
|
||||||
|
|
||||||
import * as accounts from './accounts';
|
import * as accounts from './accounts';
|
||||||
|
import * as bagsList from './bagsList';
|
||||||
import * as balances from './balances';
|
import * as balances from './balances';
|
||||||
import * as bounties from './bounties';
|
import * as bounties from './bounties';
|
||||||
import * as chain from './chain';
|
import * as chain from './chain';
|
||||||
@@ -22,7 +23,7 @@ import * as technicalCommittee from './technicalCommittee';
|
|||||||
import * as treasury from './treasury';
|
import * as treasury from './treasury';
|
||||||
import * as tx from './tx';
|
import * as tx from './tx';
|
||||||
|
|
||||||
export const derive = { accounts, balances, bounties, chain, contracts, council, crowdloan, democracy, elections, imOnline, membership, parachains, session, society, staking, technicalCommittee, treasury, tx };
|
export const derive = { accounts, bagsList, balances, bounties, chain, contracts, council, crowdloan, democracy, elections, imOnline, membership, parachains, session, society, staking, technicalCommittee, treasury, tx };
|
||||||
|
|
||||||
type DeriveSection<Section> = {
|
type DeriveSection<Section> = {
|
||||||
[M in keyof Section]: Section[M] extends AnyFunction
|
[M in keyof Section]: Section[M] extends AnyFunction
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ describe('derive', (): void => {
|
|||||||
testFunction(api)('accounts', 'indexToId', []);
|
testFunction(api)('accounts', 'indexToId', []);
|
||||||
|
|
||||||
testFunction(api)('balances', 'all', []);
|
testFunction(api)('balances', 'all', []);
|
||||||
testFunction(api)('balances', 'fees', []);
|
|
||||||
testFunction(api)('balances', 'votingBalance', []);
|
testFunction(api)('balances', 'votingBalance', []);
|
||||||
testFunction(api)('balances', 'votingBalances', []);
|
testFunction(api)('balances', 'votingBalances', []);
|
||||||
|
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '7.14.1' };
|
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '8.6.1' };
|
||||||
|
|||||||
@@ -2,10 +2,9 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { Observable } from 'rxjs';
|
import type { Observable } from 'rxjs';
|
||||||
import type { Option, Vec } from '@polkadot/types';
|
import type { Option } from '@polkadot/types';
|
||||||
import type { AccountId } from '@polkadot/types/interfaces';
|
import type { AccountId } from '@polkadot/types/interfaces';
|
||||||
import type { NodeRuntimeSessionKeys } from '@polkadot/types/lookup';
|
import type { NodeRuntimeSessionKeys } from '@polkadot/types/lookup';
|
||||||
import type { ITuple } from '@polkadot/types/types';
|
|
||||||
import type { DeriveApi } from '../types';
|
import type { DeriveApi } from '../types';
|
||||||
import type { DeriveStakingKeys } from './types';
|
import type { DeriveStakingKeys } from './types';
|
||||||
|
|
||||||
@@ -36,7 +35,7 @@ export function keysMulti (instanceId: string, api: DeriveApi): (stashIds: (Uint
|
|||||||
return memo(instanceId, (stashIds: (Uint8Array | string)[]): Observable<DeriveStakingKeys[]> =>
|
return memo(instanceId, (stashIds: (Uint8Array | string)[]): Observable<DeriveStakingKeys[]> =>
|
||||||
stashIds.length
|
stashIds.length
|
||||||
? api.query.session.queuedKeys().pipe(
|
? api.query.session.queuedKeys().pipe(
|
||||||
switchMap((queuedKeys): Observable<[Vec<ITuple<[AccountId, NodeRuntimeSessionKeys]>>, Option<NodeRuntimeSessionKeys>[]]> =>
|
switchMap((queuedKeys) =>
|
||||||
combineLatest([
|
combineLatest([
|
||||||
of(queuedKeys),
|
of(queuedKeys),
|
||||||
api.consts.session?.dedupKeyPrefix
|
api.consts.session?.dedupKeyPrefix
|
||||||
|
|||||||
@@ -23,17 +23,17 @@ const ERA_CHUNK_SIZE = 14;
|
|||||||
function chunkEras <T> (eras: EraIndex[], fn: (eras: EraIndex[]) => Observable<T[]>): Observable<T[]> {
|
function chunkEras <T> (eras: EraIndex[], fn: (eras: EraIndex[]) => Observable<T[]>): Observable<T[]> {
|
||||||
const chunked = arrayChunk(eras, ERA_CHUNK_SIZE);
|
const chunked = arrayChunk(eras, ERA_CHUNK_SIZE);
|
||||||
let index = 0;
|
let index = 0;
|
||||||
const startSubject = new BehaviorSubject<EraIndex[]>(chunked[index]);
|
const subject = new BehaviorSubject<EraIndex[]>(chunked[index]);
|
||||||
|
|
||||||
return startSubject.pipe(
|
return subject.pipe(
|
||||||
switchMap(fn),
|
switchMap(fn),
|
||||||
tap((): void => {
|
tap((): void => {
|
||||||
setTimeout((): void => {
|
setTimeout((): void => {
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
index === chunked.length
|
index === chunked.length
|
||||||
? startSubject.complete()
|
? subject.complete()
|
||||||
: startSubject.next(chunked[index]);
|
: subject.next(chunked[index]);
|
||||||
}, 0);
|
}, 0);
|
||||||
}),
|
}),
|
||||||
toArray(),
|
toArray(),
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import type { ExactDerive } from './derive';
|
|||||||
|
|
||||||
export * from './accounts/types';
|
export * from './accounts/types';
|
||||||
export * from './balances/types';
|
export * from './balances/types';
|
||||||
|
export * from './bagsList/types';
|
||||||
export * from './council/types';
|
export * from './council/types';
|
||||||
export * from './crowdloan/types';
|
export * from './crowdloan/types';
|
||||||
export * from './democracy/types';
|
export * from './democracy/types';
|
||||||
|
|||||||
+18
-18
@@ -20,29 +20,29 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.14.1",
|
"version": "8.6.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.17.8",
|
"@babel/runtime": "^7.18.3",
|
||||||
"@polkadot/api-augment": "7.14.1",
|
"@polkadot/api-augment": "8.6.1",
|
||||||
"@polkadot/api-base": "7.14.1",
|
"@polkadot/api-base": "8.6.1",
|
||||||
"@polkadot/api-derive": "7.14.1",
|
"@polkadot/api-derive": "8.6.1",
|
||||||
"@polkadot/keyring": "^8.7.1",
|
"@polkadot/keyring": "^9.3.1",
|
||||||
"@polkadot/rpc-augment": "7.14.1",
|
"@polkadot/rpc-augment": "8.6.1",
|
||||||
"@polkadot/rpc-core": "7.14.1",
|
"@polkadot/rpc-core": "8.6.1",
|
||||||
"@polkadot/rpc-provider": "7.14.1",
|
"@polkadot/rpc-provider": "8.6.1",
|
||||||
"@polkadot/types": "7.14.1",
|
"@polkadot/types": "8.6.1",
|
||||||
"@polkadot/types-augment": "7.14.1",
|
"@polkadot/types-augment": "8.6.1",
|
||||||
"@polkadot/types-codec": "7.14.1",
|
"@polkadot/types-codec": "8.6.1",
|
||||||
"@polkadot/types-create": "7.14.1",
|
"@polkadot/types-create": "8.6.1",
|
||||||
"@polkadot/types-known": "7.14.1",
|
"@polkadot/types-known": "8.6.1",
|
||||||
"@polkadot/util": "^8.7.1",
|
"@polkadot/util": "^9.3.1",
|
||||||
"@polkadot/util-crypto": "^8.7.1",
|
"@polkadot/util-crypto": "^9.3.1",
|
||||||
"eventemitter3": "^4.0.7",
|
"eventemitter3": "^4.0.7",
|
||||||
"rxjs": "^7.5.5"
|
"rxjs": "^7.5.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/api-augment": "7.14.1",
|
"@polkadot/api-augment": "8.6.1",
|
||||||
"@polkadot/types-support": "7.14.1"
|
"@polkadot/types-support": "8.6.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -199,18 +199,23 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
return this._rpcCore.provider.hasSubscriptions || !!this._rpcCore.state.queryStorageAt;
|
return this._rpcCore.provider.hasSubscriptions || !!this._rpcCore.state.queryStorageAt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected _emptyDecorated (registry: Registry, blockHash?: Uint8Array): ApiDecoration<ApiType> {
|
||||||
|
return {
|
||||||
|
consts: {},
|
||||||
|
errors: {},
|
||||||
|
events: {},
|
||||||
|
query: {},
|
||||||
|
registry,
|
||||||
|
rx: {
|
||||||
|
query: {}
|
||||||
|
},
|
||||||
|
tx: createSubmittable(this._type, this._rx, this._decorateMethod, registry, blockHash)
|
||||||
|
} as ApiDecoration<ApiType>;
|
||||||
|
}
|
||||||
|
|
||||||
protected _createDecorated (registry: VersionedRegistry<ApiType>, fromEmpty: boolean, decoratedApi: ApiDecoration<ApiType> | null, blockHash?: Uint8Array): FullDecoration<ApiType> {
|
protected _createDecorated (registry: VersionedRegistry<ApiType>, fromEmpty: boolean, decoratedApi: ApiDecoration<ApiType> | null, blockHash?: Uint8Array): FullDecoration<ApiType> {
|
||||||
if (!decoratedApi) {
|
if (!decoratedApi) {
|
||||||
decoratedApi = {
|
decoratedApi = this._emptyDecorated(registry.registry, blockHash);
|
||||||
consts: {},
|
|
||||||
errors: {},
|
|
||||||
events: {},
|
|
||||||
query: {},
|
|
||||||
registry: registry.registry,
|
|
||||||
rx: {
|
|
||||||
query: {}
|
|
||||||
}
|
|
||||||
} as ApiDecoration<ApiType>;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fromEmpty || !registry.decoratedMeta) {
|
if (fromEmpty || !registry.decoratedMeta) {
|
||||||
@@ -243,16 +248,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
protected _injectMetadata (registry: VersionedRegistry<ApiType>, fromEmpty = false): void {
|
protected _injectMetadata (registry: VersionedRegistry<ApiType>, fromEmpty = false): void {
|
||||||
// clear the decoration, we are redoing it here
|
// clear the decoration, we are redoing it here
|
||||||
if (fromEmpty || !registry.decoratedApi) {
|
if (fromEmpty || !registry.decoratedApi) {
|
||||||
registry.decoratedApi = {
|
registry.decoratedApi = this._emptyDecorated(registry.registry);
|
||||||
consts: {},
|
|
||||||
errors: {},
|
|
||||||
events: {},
|
|
||||||
query: {},
|
|
||||||
registry: registry.registry,
|
|
||||||
rx: {
|
|
||||||
query: {}
|
|
||||||
}
|
|
||||||
} as ApiDecoration<ApiType>;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const { decoratedApi, decoratedMeta } = this._createDecorated(registry, fromEmpty, registry.decoratedApi);
|
const { decoratedApi, decoratedMeta } = this._createDecorated(registry, fromEmpty, registry.decoratedApi);
|
||||||
@@ -543,7 +539,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
|
|
||||||
decorated.entriesPaged = decorateMethod(
|
decorated.entriesPaged = decorateMethod(
|
||||||
memo(this.#instanceId, (opts: PaginationOptions): Observable<[StorageKey, Codec][]> =>
|
memo(this.#instanceId, (opts: PaginationOptions): Observable<[StorageKey, Codec][]> =>
|
||||||
this._retrieveMapEntriesPaged(creator, opts)));
|
this._retrieveMapEntriesPaged(creator, undefined, opts)));
|
||||||
|
|
||||||
decorated.keys = decorateMethod(
|
decorated.keys = decorateMethod(
|
||||||
memo(this.#instanceId, (...args: unknown[]): Observable<StorageKey[]> =>
|
memo(this.#instanceId, (...args: unknown[]): Observable<StorageKey[]> =>
|
||||||
@@ -556,7 +552,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
|
|
||||||
decorated.keysPaged = decorateMethod(
|
decorated.keysPaged = decorateMethod(
|
||||||
memo(this.#instanceId, (opts: PaginationOptions): Observable<StorageKey[]> =>
|
memo(this.#instanceId, (opts: PaginationOptions): Observable<StorageKey[]> =>
|
||||||
this._retrieveMapKeysPaged(creator, opts)));
|
this._retrieveMapKeysPaged(creator, undefined, opts)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.supportMulti && creator.meta.type.isMap) {
|
if (this.supportMulti && creator.meta.type.isMap) {
|
||||||
@@ -610,9 +606,17 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
memo(this.#instanceId, (...args: unknown[]): Observable<[StorageKey, Codec][]> =>
|
memo(this.#instanceId, (...args: unknown[]): Observable<[StorageKey, Codec][]> =>
|
||||||
this._retrieveMapEntries(creator, blockHash, args)));
|
this._retrieveMapEntries(creator, blockHash, args)));
|
||||||
|
|
||||||
|
decorated.entriesPaged = decorateMethod(
|
||||||
|
memo(this.#instanceId, (opts: PaginationOptions): Observable<[StorageKey, Codec][]> =>
|
||||||
|
this._retrieveMapEntriesPaged(creator, blockHash, opts)));
|
||||||
|
|
||||||
decorated.keys = decorateMethod(
|
decorated.keys = decorateMethod(
|
||||||
memo(this.#instanceId, (...args: unknown[]): Observable<StorageKey[]> =>
|
memo(this.#instanceId, (...args: unknown[]): Observable<StorageKey[]> =>
|
||||||
this._retrieveMapKeys(creator, blockHash, args)));
|
this._retrieveMapKeys(creator, blockHash, args)));
|
||||||
|
|
||||||
|
decorated.keysPaged = decorateMethod(
|
||||||
|
memo(this.#instanceId, (opts: PaginationOptions): Observable<StorageKey[]> =>
|
||||||
|
this._retrieveMapKeysPaged(creator, blockHash, opts)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.supportMulti && creator.meta.type.isMap) {
|
if (this.supportMulti && creator.meta.type.isMap) {
|
||||||
@@ -683,13 +687,13 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
|
|
||||||
const headKey = iterKey(...args).toHex();
|
const headKey = iterKey(...args).toHex();
|
||||||
const startSubject = new BehaviorSubject<string>(headKey);
|
const startSubject = new BehaviorSubject<string>(headKey);
|
||||||
const queryCall = at
|
const getKeysPaged = at
|
||||||
? (startKey: string) => this._rpcCore.state.getKeysPaged(headKey, PAGE_SIZE_K, startKey, at)
|
? (startKey: string) => this._rpcCore.state.getKeysPaged(headKey, PAGE_SIZE_K, startKey, at)
|
||||||
: (startKey: string) => this._rpcCore.state.getKeysPaged(headKey, PAGE_SIZE_K, startKey);
|
: (startKey: string) => this._rpcCore.state.getKeysPaged(headKey, PAGE_SIZE_K, startKey);
|
||||||
const setMeta = (key: StorageKey) => key.setMeta(meta, section, method);
|
const setMeta = (key: StorageKey) => key.setMeta(meta, section, method);
|
||||||
|
|
||||||
return startSubject.pipe(
|
return startSubject.pipe(
|
||||||
switchMap(queryCall),
|
switchMap(getKeysPaged),
|
||||||
map((keys) => keys.map(setMeta)),
|
map((keys) => keys.map(setMeta)),
|
||||||
tap((keys): void => {
|
tap((keys): void => {
|
||||||
setTimeout((): void => {
|
setTimeout((): void => {
|
||||||
@@ -703,26 +707,28 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private _retrieveMapKeysPaged ({ iterKey, meta, method, section }: StorageEntry, opts: PaginationOptions): Observable<StorageKey[]> {
|
private _retrieveMapKeysPaged ({ iterKey, meta, method, section }: StorageEntry, at: Hash | Uint8Array | string | undefined, opts: PaginationOptions): Observable<StorageKey[]> {
|
||||||
assert(iterKey && meta.type.isMap, 'keys can only be retrieved on maps');
|
assert(iterKey && meta.type.isMap, 'keys can only be retrieved on maps');
|
||||||
|
|
||||||
const headKey = iterKey(...opts.args).toHex();
|
|
||||||
const setMeta = (key: StorageKey) => key.setMeta(meta, section, method);
|
const setMeta = (key: StorageKey) => key.setMeta(meta, section, method);
|
||||||
|
const getKeysPaged = at
|
||||||
|
? (headKey: string) => this._rpcCore.state.getKeysPaged(headKey, opts.pageSize, opts.startKey || headKey, at)
|
||||||
|
: (headKey: string) => this._rpcCore.state.getKeysPaged(headKey, opts.pageSize, opts.startKey || headKey);
|
||||||
|
|
||||||
return this._rpcCore.state.getKeysPaged(headKey, opts.pageSize, opts.startKey || headKey).pipe(
|
return getKeysPaged(iterKey(...opts.args).toHex()).pipe(
|
||||||
map((keys) => keys.map(setMeta))
|
map((keys) => keys.map(setMeta))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private _retrieveMapEntries (entry: StorageEntry, at: Hash | Uint8Array | string | null, args: unknown[]): Observable<[StorageKey, Codec][]> {
|
private _retrieveMapEntries (entry: StorageEntry, at: Hash | Uint8Array | string | null, args: unknown[]): Observable<[StorageKey, Codec][]> {
|
||||||
const query = at
|
const queryStorageAt = at
|
||||||
? (keyset: StorageKey[]) => this._rpcCore.state.queryStorageAt(keyset, at)
|
? (keys: StorageKey[]) => this._rpcCore.state.queryStorageAt(keys, at)
|
||||||
: (keyset: StorageKey[]) => this._rpcCore.state.queryStorageAt(keyset);
|
: (keys: StorageKey[]) => this._rpcCore.state.queryStorageAt(keys);
|
||||||
|
|
||||||
return this._retrieveMapKeys(entry, at, args).pipe(
|
return this._retrieveMapKeys(entry, at, args).pipe(
|
||||||
switchMap((keys) =>
|
switchMap((keys) =>
|
||||||
keys.length
|
keys.length
|
||||||
? combineLatest(arrayChunk(keys, PAGE_SIZE_V).map(query)).pipe(
|
? combineLatest(arrayChunk(keys, PAGE_SIZE_V).map(queryStorageAt)).pipe(
|
||||||
map((valsArr) =>
|
map((valsArr) =>
|
||||||
arrayFlatten(valsArr).map((value, index): [StorageKey, Codec] => [keys[index], value])
|
arrayFlatten(valsArr).map((value, index): [StorageKey, Codec] => [keys[index], value])
|
||||||
)
|
)
|
||||||
@@ -732,11 +738,15 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private _retrieveMapEntriesPaged (entry: StorageEntry, opts: PaginationOptions): Observable<[StorageKey, Codec][]> {
|
private _retrieveMapEntriesPaged (entry: StorageEntry, at: Hash | Uint8Array | string | undefined, opts: PaginationOptions): Observable<[StorageKey, Codec][]> {
|
||||||
return this._retrieveMapKeysPaged(entry, opts).pipe(
|
const queryStorageAt = at
|
||||||
|
? (keys: StorageKey[]) => this._rpcCore.state.queryStorageAt(keys, at)
|
||||||
|
: (keys: StorageKey[]) => this._rpcCore.state.queryStorageAt(keys);
|
||||||
|
|
||||||
|
return this._retrieveMapKeysPaged(entry, at, opts).pipe(
|
||||||
switchMap((keys) =>
|
switchMap((keys) =>
|
||||||
keys.length
|
keys.length
|
||||||
? this._rpcCore.state.queryStorageAt(keys).pipe(
|
? queryStorageAt(keys).pipe(
|
||||||
map((valsArr) =>
|
map((valsArr) =>
|
||||||
valsArr.map((value, index): [StorageKey, Codec] => [keys[index], value])
|
valsArr.map((value, index): [StorageKey, Codec] => [keys[index], value])
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import type { Observable, Subscription } from 'rxjs';
|
import type { Observable, Subscription } from 'rxjs';
|
||||||
import type { Text } from '@polkadot/types';
|
import type { Text } from '@polkadot/types';
|
||||||
import type { ExtDef } from '@polkadot/types/extrinsic/signedExtensions/types';
|
import type { ExtDef } from '@polkadot/types/extrinsic/signedExtensions/types';
|
||||||
import type { ChainProperties, Hash, RuntimeVersion, RuntimeVersionPartial } from '@polkadot/types/interfaces';
|
import type { ChainProperties, Hash, HeaderPartial, RuntimeVersion, RuntimeVersionPartial } from '@polkadot/types/interfaces';
|
||||||
import type { Registry } from '@polkadot/types/types';
|
import type { Registry } from '@polkadot/types/types';
|
||||||
import type { BN } from '@polkadot/util';
|
import type { BN } from '@polkadot/util';
|
||||||
import type { HexString } from '@polkadot/util/types';
|
import type { HexString } from '@polkadot/util/types';
|
||||||
@@ -35,7 +35,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
|||||||
|
|
||||||
#updateSub?: Subscription | null = null;
|
#updateSub?: Subscription | null = null;
|
||||||
|
|
||||||
#waitingRegistries: Record<string, Promise<VersionedRegistry<ApiType>>> = {};
|
#waitingRegistries: Record<HexString, Promise<VersionedRegistry<ApiType>>> = {};
|
||||||
|
|
||||||
constructor (options: ApiOptions, type: ApiTypes, decorateMethod: DecorateMethod<ApiType>) {
|
constructor (options: ApiOptions, type: ApiTypes, decorateMethod: DecorateMethod<ApiType>) {
|
||||||
super(options, type, decorateMethod);
|
super(options, type, decorateMethod);
|
||||||
@@ -120,6 +120,44 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
|||||||
return this._createDecorated(registry, true, null, u8aHash).decoratedApi;
|
return this._createDecorated(registry, true, null, u8aHash).decoratedApi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async _createBlockRegistry (blockHash: Uint8Array, header: HeaderPartial, version: RuntimeVersionPartial): Promise<VersionedRegistry<ApiType>> {
|
||||||
|
const registry = new TypeRegistry(blockHash);
|
||||||
|
const metadata = new Metadata(registry,
|
||||||
|
await firstValueFrom(this._rpcCore.state.getMetadata.raw<HexString>(header.parentHash))
|
||||||
|
);
|
||||||
|
|
||||||
|
this._initRegistry(registry, this._runtimeChain as Text, version, metadata);
|
||||||
|
|
||||||
|
// add our new registry
|
||||||
|
const result = { lastBlockHash: blockHash, metadata, registry, specName: version.specName, specVersion: version.specVersion };
|
||||||
|
|
||||||
|
this.#registries.push(result);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private _cacheBlockRegistryProgress (key: HexString, creator: () => Promise<VersionedRegistry<ApiType>>): Promise<VersionedRegistry<ApiType>> {
|
||||||
|
// look for waiting resolves
|
||||||
|
let waiting = this.#waitingRegistries[key];
|
||||||
|
|
||||||
|
if (isUndefined(waiting)) {
|
||||||
|
// nothing waiting, construct new
|
||||||
|
waiting = this.#waitingRegistries[key] = new Promise<VersionedRegistry<ApiType>>((resolve, reject): void => {
|
||||||
|
creator()
|
||||||
|
.then((registry): void => {
|
||||||
|
delete this.#waitingRegistries[key];
|
||||||
|
resolve(registry);
|
||||||
|
})
|
||||||
|
.catch((error): void => {
|
||||||
|
delete this.#waitingRegistries[key];
|
||||||
|
reject(error);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return waiting;
|
||||||
|
}
|
||||||
|
|
||||||
private _getBlockRegistryViaVersion (blockHash: Uint8Array, version?: RuntimeVersionPartial): VersionedRegistry<ApiType> | null {
|
private _getBlockRegistryViaVersion (blockHash: Uint8Array, version?: RuntimeVersionPartial): VersionedRegistry<ApiType> | null {
|
||||||
if (version) {
|
if (version) {
|
||||||
// check for pre-existing registries. We also check specName, e.g. it
|
// check for pre-existing registries. We also check specName, e.g. it
|
||||||
@@ -139,7 +177,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _getBlockRegistry (blockHash: Uint8Array): Promise<VersionedRegistry<ApiType>> {
|
private async _getBlockRegistryViaHash (blockHash: Uint8Array): Promise<VersionedRegistry<ApiType>> {
|
||||||
// ensure we have everything required
|
// ensure we have everything required
|
||||||
assert(this._genesisHash && this._runtimeVersion, 'Cannot retrieve data on an uninitialized chain');
|
assert(this._genesisHash && this._runtimeVersion, 'Cannot retrieve data on an uninitialized chain');
|
||||||
|
|
||||||
@@ -161,62 +199,28 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
|||||||
: await firstValueFrom(this._rpcCore.state.getRuntimeVersion.raw(header.parentHash))
|
: await firstValueFrom(this._rpcCore.state.getRuntimeVersion.raw(header.parentHash))
|
||||||
);
|
);
|
||||||
|
|
||||||
const existingViaVersion = this._getBlockRegistryViaVersion(blockHash, version);
|
return (
|
||||||
|
// try to find via version
|
||||||
if (existingViaVersion) {
|
this._getBlockRegistryViaVersion(blockHash, version) ||
|
||||||
return existingViaVersion;
|
// return new or in-flight result
|
||||||
}
|
await this._cacheBlockRegistryProgress(version.toHex(), () => this._createBlockRegistry(blockHash, header, version))
|
||||||
|
|
||||||
// nothing has been found, construct new
|
|
||||||
const registry = new TypeRegistry(blockHash);
|
|
||||||
const metadata = new Metadata(registry,
|
|
||||||
await firstValueFrom(this._rpcCore.state.getMetadata.raw<HexString>(header.parentHash))
|
|
||||||
);
|
);
|
||||||
|
|
||||||
this._initRegistry(registry, this._runtimeChain as Text, version, metadata);
|
|
||||||
|
|
||||||
// add our new registry
|
|
||||||
const result = { lastBlockHash: blockHash, metadata, registry, specName: version.specName, specVersion: version.specVersion };
|
|
||||||
|
|
||||||
this.#registries.push(result);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Sets up a registry based on the block hash defined
|
* @description Sets up a registry based on the block hash defined
|
||||||
*/
|
*/
|
||||||
public async getBlockRegistry (blockHash: Uint8Array, knownVersion?: RuntimeVersion): Promise<VersionedRegistry<ApiType>> {
|
public async getBlockRegistry (blockHash: Uint8Array, knownVersion?: RuntimeVersion): Promise<VersionedRegistry<ApiType>> {
|
||||||
const existingViaHash = this.#registries.find(({ lastBlockHash }) =>
|
return (
|
||||||
lastBlockHash && u8aEq(lastBlockHash, blockHash)
|
// try to find via blockHash
|
||||||
|
this.#registries.find(({ lastBlockHash }) =>
|
||||||
|
lastBlockHash && u8aEq(lastBlockHash, blockHash)
|
||||||
|
) ||
|
||||||
|
// try to find via version
|
||||||
|
this._getBlockRegistryViaVersion(blockHash, knownVersion) ||
|
||||||
|
// return new or in-flight result
|
||||||
|
await this._cacheBlockRegistryProgress(u8aToHex(blockHash), () => this._getBlockRegistryViaHash(blockHash))
|
||||||
);
|
);
|
||||||
|
|
||||||
if (existingViaHash) {
|
|
||||||
return existingViaHash;
|
|
||||||
}
|
|
||||||
|
|
||||||
const existingViaVersion = this._getBlockRegistryViaVersion(blockHash, knownVersion);
|
|
||||||
|
|
||||||
if (existingViaVersion) {
|
|
||||||
return existingViaVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
const blockHashHex = u8aToHex(blockHash);
|
|
||||||
let waiting = this.#waitingRegistries[blockHashHex];
|
|
||||||
|
|
||||||
if (isUndefined(waiting)) {
|
|
||||||
waiting = this._getBlockRegistry(blockHash);
|
|
||||||
this.#waitingRegistries[blockHashHex] = waiting;
|
|
||||||
|
|
||||||
// when we have resolved, remove this from the waiting list
|
|
||||||
waiting
|
|
||||||
.then((): void => {
|
|
||||||
delete this.#waitingRegistries[blockHashHex];
|
|
||||||
})
|
|
||||||
.catch(() => undefined);
|
|
||||||
}
|
|
||||||
|
|
||||||
return waiting;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async _loadMeta (): Promise<boolean> {
|
protected async _loadMeta (): Promise<boolean> {
|
||||||
@@ -387,12 +391,10 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
|||||||
this.emit('connected');
|
this.emit('connected');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const [hasMeta, cryptoReady] = await Promise.all([
|
const cryptoReady = this._options.initWasm === false
|
||||||
this._loadMeta(),
|
? true
|
||||||
this._options.initWasm === false
|
: await cryptoWaitReady();
|
||||||
? Promise.resolve(true)
|
const hasMeta = await this._loadMeta();
|
||||||
: cryptoWaitReady()
|
|
||||||
]);
|
|
||||||
|
|
||||||
this._subscribeHealth();
|
this._subscribeHealth();
|
||||||
|
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ async function derive (api: ApiPromise): Promise<void> {
|
|||||||
console.log('current author:', header.author);
|
console.log('current author:', header.author);
|
||||||
});
|
});
|
||||||
|
|
||||||
const fees = await api.derive.balances.fees();
|
const info = await api.derive.balances.account('0x1234');
|
||||||
|
|
||||||
console.log('fees', fees);
|
console.log('info', info);
|
||||||
}
|
}
|
||||||
|
|
||||||
function errors (api: ApiPromise): void {
|
function errors (api: ApiPromise): void {
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '7.14.1' };
|
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '8.6.1' };
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import { SubmittableResult } from './Result';
|
|||||||
interface SubmittableOptions<ApiType extends ApiTypes> {
|
interface SubmittableOptions<ApiType extends ApiTypes> {
|
||||||
api: ApiInterfaceRx;
|
api: ApiInterfaceRx;
|
||||||
apiType: ApiTypes;
|
apiType: ApiTypes;
|
||||||
|
blockHash?: Uint8Array;
|
||||||
decorateMethod: ApiBase<ApiType>['_decorateMethod'];
|
decorateMethod: ApiBase<ApiType>['_decorateMethod'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +81,7 @@ function optionsOrNonce (partialOptions: Partial<SignerOptions> = {}): Partial<S
|
|||||||
: partialOptions;
|
: partialOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorateMethod }: SubmittableOptions<ApiType>): Constructor<SubmittableExtrinsic<ApiType>> {
|
export function createClass <ApiType extends ApiTypes> ({ api, apiType, blockHash, decorateMethod }: SubmittableOptions<ApiType>): Constructor<SubmittableExtrinsic<ApiType>> {
|
||||||
// an instance of the base extrinsic for us to extend
|
// an instance of the base extrinsic for us to extend
|
||||||
const ExtrinsicBase = api.registry.createClass('Extrinsic');
|
const ExtrinsicBase = api.registry.createClass('Extrinsic');
|
||||||
|
|
||||||
@@ -97,10 +98,10 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
|||||||
|
|
||||||
// dry run an extrinsic
|
// dry run an extrinsic
|
||||||
public dryRun (account: AddressOrPair, optionsOrHash?: Partial<SignerOptions> | Uint8Array | string): SubmittableDryRunResult<ApiType> {
|
public dryRun (account: AddressOrPair, optionsOrHash?: Partial<SignerOptions> | Uint8Array | string): SubmittableDryRunResult<ApiType> {
|
||||||
if (isString(optionsOrHash) || isU8a(optionsOrHash)) {
|
if (blockHash || isString(optionsOrHash) || isU8a(optionsOrHash)) {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||||
return decorateMethod(
|
return decorateMethod(
|
||||||
() => api.rpc.system.dryRun(this.toHex(), optionsOrHash)
|
() => api.rpc.system.dryRun(this.toHex(), blockHash || optionsOrHash as string)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,10 +116,11 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
|||||||
|
|
||||||
// calculate the payment info for this transaction (if signed and submitted)
|
// calculate the payment info for this transaction (if signed and submitted)
|
||||||
public paymentInfo (account: AddressOrPair, optionsOrHash?: Partial<SignerOptions> | Uint8Array | string): SubmittablePaymentResult<ApiType> {
|
public paymentInfo (account: AddressOrPair, optionsOrHash?: Partial<SignerOptions> | Uint8Array | string): SubmittablePaymentResult<ApiType> {
|
||||||
if (isString(optionsOrHash) || isU8a(optionsOrHash)) {
|
if (blockHash || isString(optionsOrHash) || isU8a(optionsOrHash)) {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||||
return decorateMethod(
|
return decorateMethod(
|
||||||
(): Observable<RuntimeDispatchInfo> => api.rpc.payment.queryInfo(this.toHex(), optionsOrHash)
|
(): Observable<RuntimeDispatchInfo> =>
|
||||||
|
api.rpc.payment.queryInfo(this.toHex(), blockHash || optionsOrHash as string)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,9 +137,11 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
|||||||
const eraOptions = makeEraOptions(api, this.registry, allOptions, signingInfo);
|
const eraOptions = makeEraOptions(api, this.registry, allOptions, signingInfo);
|
||||||
const signOptions = makeSignOptions(api, eraOptions, {});
|
const signOptions = makeSignOptions(api, eraOptions, {});
|
||||||
|
|
||||||
this.signFake(address, signOptions);
|
return api.rpc.payment.queryInfo(
|
||||||
|
this.isSigned
|
||||||
return api.rpc.payment.queryInfo(this.toHex());
|
? api.tx(this).signFake(address, signOptions).toHex()
|
||||||
|
: this.signFake(address, signOptions).toHex()
|
||||||
|
);
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
)();
|
)();
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { Call, Extrinsic } from '@polkadot/types/interfaces';
|
import type { Call, Extrinsic } from '@polkadot/types/interfaces';
|
||||||
|
import type { Registry } from '@polkadot/types-codec/types';
|
||||||
import type { ApiInterfaceRx, ApiTypes } from '../types';
|
import type { ApiInterfaceRx, ApiTypes } from '../types';
|
||||||
import type { SubmittableExtrinsic } from './types';
|
import type { SubmittableExtrinsic } from './types';
|
||||||
|
|
||||||
@@ -10,9 +11,9 @@ import { createClass } from './createClass';
|
|||||||
|
|
||||||
type Creator<ApiType extends ApiTypes> = (extrinsic: Call | Uint8Array | string) => SubmittableExtrinsic<ApiType>;
|
type Creator<ApiType extends ApiTypes> = (extrinsic: Call | Uint8Array | string) => SubmittableExtrinsic<ApiType>;
|
||||||
|
|
||||||
export function createSubmittable<ApiType extends ApiTypes> (apiType: ApiTypes, api: ApiInterfaceRx, decorateMethod: ApiBase<ApiType>['_decorateMethod']): Creator<ApiType> {
|
export function createSubmittable<ApiType extends ApiTypes> (apiType: ApiTypes, api: ApiInterfaceRx, decorateMethod: ApiBase<ApiType>['_decorateMethod'], registry?: Registry, blockHash?: Uint8Array): Creator<ApiType> {
|
||||||
const Submittable = createClass<ApiType>({ api, apiType, decorateMethod });
|
const Submittable = createClass<ApiType>({ api, apiType, blockHash, decorateMethod });
|
||||||
|
|
||||||
return (extrinsic: Call | Extrinsic | Uint8Array | string): SubmittableExtrinsic<ApiType> =>
|
return (extrinsic: Call | Extrinsic | Uint8Array | string): SubmittableExtrinsic<ApiType> =>
|
||||||
new Submittable(api.registry, extrinsic);
|
new Submittable(registry || api.registry, extrinsic);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,11 +9,12 @@ import type { DecoratedEvents } from '@polkadot/api-base/types/events';
|
|||||||
import type { QueryableStorage } from '@polkadot/api-base/types/storage';
|
import type { QueryableStorage } from '@polkadot/api-base/types/storage';
|
||||||
import type { ProviderInterface, ProviderInterfaceEmitted } from '@polkadot/rpc-provider/types';
|
import type { ProviderInterface, ProviderInterfaceEmitted } from '@polkadot/rpc-provider/types';
|
||||||
import type { ExtDef } from '@polkadot/types/extrinsic/signedExtensions/types';
|
import type { ExtDef } from '@polkadot/types/extrinsic/signedExtensions/types';
|
||||||
import type { Hash } from '@polkadot/types/interfaces';
|
import type { Call, Extrinsic, Hash } from '@polkadot/types/interfaces';
|
||||||
import type { CallFunction, DefinitionRpc, DefinitionRpcSub, RegisteredTypes, Registry, RegistryError, SignatureOptions, Signer } from '@polkadot/types/types';
|
import type { CallFunction, DefinitionRpc, DefinitionRpcSub, RegisteredTypes, Registry, RegistryError, SignatureOptions, Signer } from '@polkadot/types/types';
|
||||||
import type { BN } from '@polkadot/util';
|
import type { BN } from '@polkadot/util';
|
||||||
import type { HexString } from '@polkadot/util/types';
|
import type { HexString } from '@polkadot/util/types';
|
||||||
import type { ApiBase } from '../base';
|
import type { ApiBase } from '../base';
|
||||||
|
import type { SubmittableExtrinsic } from '../types/submittable';
|
||||||
import type { AllDerives } from '../util/decorate';
|
import type { AllDerives } from '../util/decorate';
|
||||||
|
|
||||||
export * from '@polkadot/api-base/types';
|
export * from '@polkadot/api-base/types';
|
||||||
@@ -96,7 +97,8 @@ export interface ApiDecoration<ApiType extends ApiTypes> {
|
|||||||
registry: Registry;
|
registry: Registry;
|
||||||
rx: {
|
rx: {
|
||||||
query: QueryableStorage<'rxjs'>;
|
query: QueryableStorage<'rxjs'>;
|
||||||
}
|
};
|
||||||
|
tx: (extrinsic: Call | Extrinsic | Uint8Array | string) => SubmittableExtrinsic<ApiType>;
|
||||||
|
|
||||||
findCall (callIndex: Uint8Array | string): CallFunction;
|
findCall (callIndex: Uint8Array | string): CallFunction;
|
||||||
findError (errorIndex: Uint8Array | string): RegistryError;
|
findError (errorIndex: Uint8Array | string): RegistryError;
|
||||||
|
|||||||
@@ -20,13 +20,13 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.14.1",
|
"version": "8.6.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.17.8",
|
"@babel/runtime": "^7.18.3",
|
||||||
"@polkadot/rpc-core": "7.14.1",
|
"@polkadot/rpc-core": "8.6.1",
|
||||||
"@polkadot/types": "7.14.1",
|
"@polkadot/types": "8.6.1",
|
||||||
"@polkadot/types-codec": "7.14.1",
|
"@polkadot/types-codec": "8.6.1",
|
||||||
"@polkadot/util": "^8.7.1"
|
"@polkadot/util": "^9.3.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import type { CreatedBlock } from '@polkadot/types/interfaces/engine';
|
|||||||
import type { EthAccount, EthCallRequest, EthFilter, EthFilterChanges, EthLog, EthReceipt, EthRichBlock, EthSubKind, EthSubParams, EthSyncStatus, EthTransaction, EthTransactionRequest, EthWork } from '@polkadot/types/interfaces/eth';
|
import type { EthAccount, EthCallRequest, EthFilter, EthFilterChanges, EthLog, EthReceipt, EthRichBlock, EthSubKind, EthSubParams, EthSyncStatus, EthTransaction, EthTransactionRequest, EthWork } from '@polkadot/types/interfaces/eth';
|
||||||
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||||
import type { EncodedFinalityProofs, JustificationNotification, ReportedRoundStates } from '@polkadot/types/interfaces/grandpa';
|
import type { EncodedFinalityProofs, JustificationNotification, ReportedRoundStates } from '@polkadot/types/interfaces/grandpa';
|
||||||
import type { MmrLeafProof } from '@polkadot/types/interfaces/mmr';
|
import type { MmrLeafBatchProof, MmrLeafProof } from '@polkadot/types/interfaces/mmr';
|
||||||
import type { StorageKind } from '@polkadot/types/interfaces/offchain';
|
import type { StorageKind } from '@polkadot/types/interfaces/offchain';
|
||||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||||
import type { RpcMethods } from '@polkadot/types/interfaces/rpc';
|
import type { RpcMethods } from '@polkadot/types/interfaces/rpc';
|
||||||
@@ -353,10 +353,14 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
|
|||||||
subscribeJustifications: AugmentedRpc<() => Observable<JustificationNotification>>;
|
subscribeJustifications: AugmentedRpc<() => Observable<JustificationNotification>>;
|
||||||
};
|
};
|
||||||
mmr: {
|
mmr: {
|
||||||
|
/**
|
||||||
|
* Generate MMR proof for the given leaf indices.
|
||||||
|
**/
|
||||||
|
generateBatchProof: AugmentedRpc<(leafIndices: Vec<u64> | (u64 | AnyNumber | Uint8Array)[], at?: BlockHash | string | Uint8Array) => Observable<MmrLeafProof>>;
|
||||||
/**
|
/**
|
||||||
* Generate MMR proof for given leaf index.
|
* Generate MMR proof for given leaf index.
|
||||||
**/
|
**/
|
||||||
generateProof: AugmentedRpc<(leafIndex: u64 | AnyNumber | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<MmrLeafProof>>;
|
generateProof: AugmentedRpc<(leafIndex: u64 | AnyNumber | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<MmrLeafBatchProof>>;
|
||||||
};
|
};
|
||||||
net: {
|
net: {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '7.14.1' };
|
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '8.6.1' };
|
||||||
|
|||||||
@@ -20,18 +20,18 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.14.1",
|
"version": "8.6.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.17.8",
|
"@babel/runtime": "^7.18.3",
|
||||||
"@polkadot/rpc-augment": "7.14.1",
|
"@polkadot/rpc-augment": "8.6.1",
|
||||||
"@polkadot/rpc-provider": "7.14.1",
|
"@polkadot/rpc-provider": "8.6.1",
|
||||||
"@polkadot/types": "7.14.1",
|
"@polkadot/types": "8.6.1",
|
||||||
"@polkadot/util": "^8.7.1",
|
"@polkadot/util": "^9.3.1",
|
||||||
"rxjs": "^7.5.5"
|
"rxjs": "^7.5.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/keyring": "^8.7.1",
|
"@polkadot/keyring": "^9.3.1",
|
||||||
"@polkadot/rpc-augment": "7.14.1"
|
"@polkadot/rpc-augment": "8.6.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import type { RpcInterfaceMethod } from './types';
|
|||||||
import { Observable, publishReplay, refCount } from 'rxjs';
|
import { Observable, publishReplay, refCount } from 'rxjs';
|
||||||
|
|
||||||
import { rpcDefinitions } from '@polkadot/types';
|
import { rpcDefinitions } from '@polkadot/types';
|
||||||
import { assert, hexToU8a, isFunction, isNull, isUndefined, lazyMethod, logger, memoize, objectSpread, u8aToU8a } from '@polkadot/util';
|
import { assert, hexToU8a, isFunction, isNull, isUndefined, lazyMethod, logger, memoize, objectSpread, u8aConcat, u8aToU8a } from '@polkadot/util';
|
||||||
|
|
||||||
import { drr, refCountDelay } from './util';
|
import { drr, refCountDelay } from './util';
|
||||||
|
|
||||||
@@ -455,7 +455,10 @@ export class RpcCore {
|
|||||||
return registry.createTypeUnsafe(type, [
|
return registry.createTypeUnsafe(type, [
|
||||||
isEmpty
|
isEmpty
|
||||||
? meta.fallback
|
? meta.fallback
|
||||||
? hexToU8a(meta.fallback.toHex())
|
// For old-style Linkage, we add an empty linkage at the end
|
||||||
|
? type.includes('Linkage<')
|
||||||
|
? u8aConcat(hexToU8a(meta.fallback.toHex()), new Uint8Array(2))
|
||||||
|
: hexToU8a(meta.fallback.toHex())
|
||||||
: undefined
|
: undefined
|
||||||
: meta.modifier.isOptional
|
: meta.modifier.isOptional
|
||||||
? registry.createTypeUnsafe(type, [input], { blockHash, isPedantic: true })
|
? registry.createTypeUnsafe(type, [input], { blockHash, isPedantic: true })
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '7.14.1' };
|
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '8.6.1' };
|
||||||
|
|||||||
@@ -44,18 +44,18 @@ console.log('latest block Hash', hash);
|
|||||||
|
|
||||||
Instantiating a Provider for the Polkadot Relay Chain:
|
Instantiating a Provider for the Polkadot Relay Chain:
|
||||||
```javascript
|
```javascript
|
||||||
import { ScProvider } from '@polkadot/rpc-provider';
|
import { ScProvider, WellKnownChain } from '@polkadot/rpc-provider/substrate-connect';
|
||||||
|
|
||||||
const provider = new ScProvider(SupportedChains.polkadot);
|
const provider = new ScProvider(WellKnownChain.polkadot);
|
||||||
await provider.connect();
|
await provider.connect();
|
||||||
const version = await provider.send('chain_getBlockHash', []);
|
const version = await provider.send('chain_getBlockHash', []);
|
||||||
```
|
```
|
||||||
|
|
||||||
Instantiating a Provider for a Polkadot parachain:
|
Instantiating a Provider for a Polkadot parachain:
|
||||||
```javascript
|
```javascript
|
||||||
import { ScProvider } from '@polkadot/rpc-provider';
|
import { ScProvider, WellKnownChain } from '@polkadot/rpc-provider/substrate-connect';
|
||||||
|
|
||||||
const polkadotProvider = new ScProvider(SupportedChains.polkadot);
|
const polkadotProvider = new ScProvider(WellKnownChain.polkadot);
|
||||||
const parachainProvider = new ScProvider(parachainSpec, polkadotProvider);
|
const parachainProvider = new ScProvider(parachainSpec, polkadotProvider);
|
||||||
await parachainProvider.connect();
|
await parachainProvider.connect();
|
||||||
const version = await parachainProvider.send('chain_getBlockHash', []);
|
const version = await parachainProvider.send('chain_getBlockHash', []);
|
||||||
|
|||||||
@@ -20,21 +20,21 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.14.1",
|
"version": "8.6.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.17.8",
|
"@babel/runtime": "^7.18.3",
|
||||||
"@polkadot/keyring": "^8.7.1",
|
"@polkadot/keyring": "^9.3.1",
|
||||||
"@polkadot/types": "7.14.1",
|
"@polkadot/types": "8.6.1",
|
||||||
"@polkadot/types-support": "7.14.1",
|
"@polkadot/types-support": "8.6.1",
|
||||||
"@polkadot/util": "^8.7.1",
|
"@polkadot/util": "^9.3.1",
|
||||||
"@polkadot/util-crypto": "^8.7.1",
|
"@polkadot/util-crypto": "^9.3.1",
|
||||||
"@polkadot/x-fetch": "^8.7.1",
|
"@polkadot/x-fetch": "^9.3.1",
|
||||||
"@polkadot/x-global": "^8.7.1",
|
"@polkadot/x-global": "^9.3.1",
|
||||||
"@polkadot/x-ws": "^8.7.1",
|
"@polkadot/x-ws": "^9.3.1",
|
||||||
"@substrate/connect": "0.7.0-alpha.0",
|
"@substrate/connect": "0.7.5",
|
||||||
"eventemitter3": "^4.0.7",
|
"eventemitter3": "^4.0.7",
|
||||||
"mock-socket": "^9.1.2",
|
"mock-socket": "^9.1.4",
|
||||||
"nock": "^13.2.4"
|
"nock": "^13.2.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,4 +4,6 @@
|
|||||||
export { HttpProvider } from './http';
|
export { HttpProvider } from './http';
|
||||||
export { packageInfo } from './packageInfo';
|
export { packageInfo } from './packageInfo';
|
||||||
export { WsProvider } from './ws';
|
export { WsProvider } from './ws';
|
||||||
export { ScProvider } from './substrate-connect';
|
|
||||||
|
// ESM-only, only export top-level when we have dual versions
|
||||||
|
// export { ScProvider } from './substrate-connect';
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ describe('decodeResponse', (): void => {
|
|||||||
it('expects a non-empty input object', (): void => {
|
it('expects a non-empty input object', (): void => {
|
||||||
expect(
|
expect(
|
||||||
() => coder.decodeResponse(undefined as unknown as JsonRpcResponse)
|
() => coder.decodeResponse(undefined as unknown as JsonRpcResponse)
|
||||||
).toThrow(/Empty response/);
|
).toThrow(/Invalid jsonrpc/);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('expects a valid jsonrpc field', (): void => {
|
it('expects a valid jsonrpc field', (): void => {
|
||||||
|
|||||||
@@ -13,6 +13,6 @@ describe('encodeJson', (): void => {
|
|||||||
it('encodes a valid JsonRPC JSON string', (): void => {
|
it('encodes a valid JsonRPC JSON string', (): void => {
|
||||||
expect(
|
expect(
|
||||||
coder.encodeJson('method', ['params'])
|
coder.encodeJson('method', ['params'])
|
||||||
).toEqual('{"id":1,"jsonrpc":"2.0","method":"method","params":["params"]}');
|
).toEqual([1, '{"id":1,"jsonrpc":"2.0","method":"method","params":["params"]}']);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,19 +10,14 @@ describe('encodeObject', (): void => {
|
|||||||
coder = new RpcCoder();
|
coder = new RpcCoder();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('starts with id === 0 (nothing sent)', (): void => {
|
|
||||||
expect(coder.getId()).toEqual(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('encodes a valid JsonRPC object', (): void => {
|
it('encodes a valid JsonRPC object', (): void => {
|
||||||
expect(
|
expect(
|
||||||
coder.encodeObject('method', ['a', 'b'])
|
coder.encodeObject('method', ['a', 'b'])
|
||||||
).toEqual({
|
).toEqual([1, {
|
||||||
id: 1,
|
id: 1,
|
||||||
jsonrpc: '2.0',
|
jsonrpc: '2.0',
|
||||||
method: 'method',
|
method: 'method',
|
||||||
params: ['a', 'b']
|
params: ['a', 'b']
|
||||||
});
|
}]);
|
||||||
expect(coder.getId()).toEqual(1);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -20,27 +20,34 @@ function formatErrorData (data?: string | number): string {
|
|||||||
// very nested, pick a number and trim the result display to it
|
// very nested, pick a number and trim the result display to it
|
||||||
return formatted.length <= 256
|
return formatted.length <= 256
|
||||||
? formatted
|
? formatted
|
||||||
: `${formatted.substr(0, 255)}…`;
|
: `${formatted.substring(0, 255)}…`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkError (error?: JsonRpcResponseBaseError): void {
|
||||||
|
if (error) {
|
||||||
|
const { code, data, message } = error;
|
||||||
|
|
||||||
|
throw new RpcError(`${code}: ${message}${formatErrorData(data)}`, code, data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
export class RpcCoder {
|
export class RpcCoder {
|
||||||
#id = 0;
|
#id = 0;
|
||||||
|
|
||||||
public decodeResponse (response: JsonRpcResponse): unknown {
|
public decodeResponse (response?: JsonRpcResponse): unknown {
|
||||||
assert(response, 'Empty response object received');
|
assert(response && response.jsonrpc === '2.0', 'Invalid jsonrpc field in decoded object');
|
||||||
assert(response.jsonrpc === '2.0', 'Invalid jsonrpc field in decoded object');
|
|
||||||
|
|
||||||
const isSubscription = !isUndefined(response.params) && !isUndefined(response.method);
|
const isSubscription = !isUndefined(response.params) && !isUndefined(response.method);
|
||||||
|
|
||||||
assert(isNumber(response.id) || (isSubscription && (isNumber(response.params.subscription) || isString(response.params.subscription))), 'Invalid id field in decoded object');
|
assert(isNumber(response.id) || (isSubscription && (isNumber(response.params.subscription) || isString(response.params.subscription))), 'Invalid id field in decoded object');
|
||||||
|
|
||||||
this._checkError(response.error);
|
checkError(response.error);
|
||||||
|
|
||||||
assert(!isUndefined(response.result) || isSubscription, 'No result found in JsonRpc response');
|
assert(!isUndefined(response.result) || isSubscription, 'No result found in jsonrpc response');
|
||||||
|
|
||||||
if (isSubscription) {
|
if (isSubscription) {
|
||||||
this._checkError(response.params.error);
|
checkError(response.params.error);
|
||||||
|
|
||||||
return response.params.result;
|
return response.params.result;
|
||||||
}
|
}
|
||||||
@@ -48,31 +55,20 @@ export class RpcCoder {
|
|||||||
return response.result;
|
return response.result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public encodeJson (method: string, params: unknown[]): string {
|
public encodeJson (method: string, params: unknown[]): [number, string] {
|
||||||
return stringify(
|
const [id, data] = this.encodeObject(method, params);
|
||||||
this.encodeObject(method, params)
|
|
||||||
);
|
return [id, stringify(data)];
|
||||||
}
|
}
|
||||||
|
|
||||||
public encodeObject (method: string, params: unknown[]): JsonRpcRequest {
|
public encodeObject (method: string, params: unknown[]): [number, JsonRpcRequest] {
|
||||||
return {
|
const id = ++this.#id;
|
||||||
id: ++this.#id,
|
|
||||||
|
return [id, {
|
||||||
|
id,
|
||||||
jsonrpc: '2.0',
|
jsonrpc: '2.0',
|
||||||
method,
|
method,
|
||||||
params
|
params
|
||||||
};
|
}];
|
||||||
}
|
|
||||||
|
|
||||||
public getId (): number {
|
|
||||||
return this.#id;
|
|
||||||
}
|
|
||||||
|
|
||||||
private _checkError (error?: JsonRpcResponseBaseError): void {
|
|
||||||
if (error) {
|
|
||||||
const { code, data, message } = error;
|
|
||||||
const fmtMessage = `${code}: ${message}${formatErrorData(data)}`;
|
|
||||||
|
|
||||||
throw new RpcError(fmtMessage, code, data);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ export class HttpProvider implements ProviderInterface {
|
|||||||
public async send <T> (method: string, params: unknown[], isCacheable?: boolean): Promise<T> {
|
public async send <T> (method: string, params: unknown[], isCacheable?: boolean): Promise<T> {
|
||||||
this.#stats.total.requests++;
|
this.#stats.total.requests++;
|
||||||
|
|
||||||
const body = this.#coder.encodeJson(method, params);
|
const [, body] = this.#coder.encodeJson(method, params);
|
||||||
let resultPromise: Promise<T> | null = isCacheable
|
let resultPromise: Promise<T> | null = isCacheable
|
||||||
? this.#callCache.get(body) as Promise<T>
|
? this.#callCache.get(body) as Promise<T>
|
||||||
: null;
|
: null;
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '7.14.1' };
|
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '8.6.1' };
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ const getFakeClient = () => {
|
|||||||
enum WellKnownChain {
|
enum WellKnownChain {
|
||||||
polkadot = 'polkadot',
|
polkadot = 'polkadot',
|
||||||
ksmcc3 = 'ksmcc3',
|
ksmcc3 = 'ksmcc3',
|
||||||
rococo_v2_1 = 'rococo_v2_1',
|
rococo_v2_2 = 'rococo_v2_2',
|
||||||
westend2 = 'westend2'
|
westend2 = 'westend2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// Copyright 2017-2022 @polkadot/rpc-provider authors & contributors
|
// Copyright 2017-2022 @polkadot/rpc-provider authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import type { Config as ScConfig } from '@substrate/connect';
|
||||||
import type { JsonRpcResponse, ProviderInterface, ProviderInterfaceCallback, ProviderInterfaceEmitCb, ProviderInterfaceEmitted } from '../types';
|
import type { JsonRpcResponse, ProviderInterface, ProviderInterfaceCallback, ProviderInterfaceEmitCb, ProviderInterfaceEmitted } from '../types';
|
||||||
|
|
||||||
import { Chain, createScClient, ScClient, WellKnownChain } from '@substrate/connect';
|
import { Chain, createScClient, ScClient, WellKnownChain } from '@substrate/connect';
|
||||||
@@ -34,6 +35,7 @@ const subscriptionUnsubscriptionMethods = new Map<string, string>([
|
|||||||
const wellKnownChains = new Set(Object.values(WellKnownChain));
|
const wellKnownChains = new Set(Object.values(WellKnownChain));
|
||||||
const scClients = new WeakMap<ScProvider, ScClient>();
|
const scClients = new WeakMap<ScProvider, ScClient>();
|
||||||
|
|
||||||
|
export { WellKnownChain };
|
||||||
export class ScProvider implements ProviderInterface {
|
export class ScProvider implements ProviderInterface {
|
||||||
readonly #coder: RpcCoder = new RpcCoder();
|
readonly #coder: RpcCoder = new RpcCoder();
|
||||||
readonly #spec: string | WellKnownChain;
|
readonly #spec: string | WellKnownChain;
|
||||||
@@ -66,7 +68,9 @@ export class ScProvider implements ProviderInterface {
|
|||||||
throw new Error('clone() is not supported.');
|
throw new Error('clone() is not supported.');
|
||||||
}
|
}
|
||||||
|
|
||||||
async connect (): Promise<void> {
|
// Config details can be found in @substrate/connect repo following the link:
|
||||||
|
// https://github.com/paritytech/substrate-connect/blob/main/packages/connect/src/connector/index.ts
|
||||||
|
async connect (config?: ScConfig): Promise<void> {
|
||||||
assert(!this.isConnected, 'Already connected!');
|
assert(!this.isConnected, 'Already connected!');
|
||||||
|
|
||||||
// it could happen that after emitting `disconnected` due to the fact taht
|
// it could happen that after emitting `disconnected` due to the fact taht
|
||||||
@@ -85,7 +89,7 @@ export class ScProvider implements ProviderInterface {
|
|||||||
|
|
||||||
const client = this.#sharedSandbox
|
const client = this.#sharedSandbox
|
||||||
? scClients.get(this.#sharedSandbox)
|
? scClients.get(this.#sharedSandbox)
|
||||||
: createScClient();
|
: createScClient(config);
|
||||||
|
|
||||||
assert(client, 'Unkown ScProvider!');
|
assert(client, 'Unkown ScProvider!');
|
||||||
scClients.set(this, client);
|
scClients.set(this, client);
|
||||||
@@ -150,14 +154,19 @@ export class ScProvider implements ProviderInterface {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
const stale = staleSubscriptions.pop();
|
||||||
const { id, unsubscribeMethod } = staleSubscriptions.pop()!;
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
assert(stale, 'Unable to get stale subscription');
|
||||||
Promise.race([
|
|
||||||
this.send(unsubscribeMethod, [id]).catch(Function.prototype as () => void),
|
const { id, unsubscribeMethod } = stale;
|
||||||
new Promise((resolve) => setTimeout(resolve, 500))
|
|
||||||
]).then(killStaleSubscriptions);
|
Promise
|
||||||
|
.race([
|
||||||
|
this.send(unsubscribeMethod, [id]).catch(() => undefined),
|
||||||
|
new Promise((resolve) => setTimeout(resolve, 500))
|
||||||
|
])
|
||||||
|
.then(killStaleSubscriptions)
|
||||||
|
.catch(() => undefined);
|
||||||
};
|
};
|
||||||
|
|
||||||
hc.start((health) => {
|
hc.start((health) => {
|
||||||
@@ -255,12 +264,10 @@ export class ScProvider implements ProviderInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async send<T = any> (method: string, params: unknown[]): Promise<T> {
|
public async send<T = any> (method: string, params: unknown[]): Promise<T> {
|
||||||
assert(this.isConnected, 'Provider is not connected');
|
assert(this.isConnected && this.#chain, 'Provider is not connected');
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
const chain = await this.#chain;
|
||||||
const chain = await this.#chain!;
|
const [id, json] = this.#coder.encodeJson(method, params);
|
||||||
const json = this.#coder.encodeJson(method, params);
|
|
||||||
const id = this.#coder.getId();
|
|
||||||
|
|
||||||
const result = new Promise<T>((resolve, reject): void => {
|
const result = new Promise<T>((resolve, reject): void => {
|
||||||
this.#requests.set(id, (response) => {
|
this.#requests.set(id, (response) => {
|
||||||
@@ -311,8 +318,9 @@ export class ScProvider implements ProviderInterface {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
const unsubscribeMethod = subscriptionUnsubscriptionMethods.get(method);
|
||||||
const unsubscribeMethod = subscriptionUnsubscriptionMethods.get(method)!;
|
|
||||||
|
assert(unsubscribeMethod, 'Invalid unsubscribe method found');
|
||||||
|
|
||||||
this.#subscriptions.set(subscriptionId, [cb, { id, unsubscribeMethod }]);
|
this.#subscriptions.set(subscriptionId, [cb, { id, unsubscribeMethod }]);
|
||||||
|
|
||||||
@@ -343,3 +351,4 @@ export class ScProvider implements ProviderInterface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
export type ScProviderClass = typeof ScProvider
|
export type ScProviderClass = typeof ScProvider
|
||||||
|
export type Config = ScConfig
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ const TEST_WS_URL = 'ws://localhost-index.spec.ts:9977';
|
|||||||
let provider: WsProvider | null;
|
let provider: WsProvider | null;
|
||||||
let mock: Mock;
|
let mock: Mock;
|
||||||
|
|
||||||
function createWs (requests: Request[], autoConnect = 1000, headers?: Record<string, string>): WsProvider {
|
function createWs (requests: Request[], autoConnect = 1000, headers?: Record<string, string>, timeout?: number): WsProvider {
|
||||||
mock = mockWs(requests, TEST_WS_URL);
|
mock = mockWs(requests, TEST_WS_URL);
|
||||||
provider = new WsProvider(TEST_WS_URL, autoConnect, headers);
|
provider = new WsProvider(TEST_WS_URL, autoConnect, headers, timeout);
|
||||||
|
|
||||||
return provider;
|
return provider;
|
||||||
}
|
}
|
||||||
@@ -40,6 +40,13 @@ describe('Ws', (): void => {
|
|||||||
it('allows you to initialize the provider with custom headers', () => {
|
it('allows you to initialize the provider with custom headers', () => {
|
||||||
createWs([], 100, { foo: 'bar' });
|
createWs([], 100, { foo: 'bar' });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('allows you to set custom timeout value for handlers', () => {
|
||||||
|
const CUSTOM_TIMEOUT_S = 90;
|
||||||
|
const CUSTOM_TIMEOUT_MS = CUSTOM_TIMEOUT_S * 1000;
|
||||||
|
|
||||||
|
createWs([], 100, { foo: 'bar' }, CUSTOM_TIMEOUT_MS);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Endpoint Parsing', (): void => {
|
describe('Endpoint Parsing', (): void => {
|
||||||
|
|||||||
@@ -42,8 +42,7 @@ const ALIASES: { [index: string]: string } = {
|
|||||||
|
|
||||||
const RETRY_DELAY = 2_500;
|
const RETRY_DELAY = 2_500;
|
||||||
|
|
||||||
const TIMEOUT_S = 30;
|
const DEFAULT_TIMEOUT_MS = 60 * 1000;
|
||||||
const TIMEOUT_MS = TIMEOUT_S * 1000;
|
|
||||||
const TIMEOUT_INTERVAL = 5_000;
|
const TIMEOUT_INTERVAL = 5_000;
|
||||||
|
|
||||||
const MEGABYTE = 1024 * 1024;
|
const MEGABYTE = 1024 * 1024;
|
||||||
@@ -111,11 +110,14 @@ export class WsProvider implements ProviderInterface {
|
|||||||
|
|
||||||
#websocket: WebSocket | null;
|
#websocket: WebSocket | null;
|
||||||
|
|
||||||
|
#timeout: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string | string[]} endpoint The endpoint url. Usually `ws://ip:9944` or `wss://ip:9944`, may provide an array of endpoint strings.
|
* @param {string | string[]} endpoint The endpoint url. Usually `ws://ip:9944` or `wss://ip:9944`, may provide an array of endpoint strings.
|
||||||
* @param {boolean} autoConnect Whether to connect automatically or not.
|
* @param {boolean} autoConnect Whether to connect automatically or not.
|
||||||
|
* @param {number} [timeout] Custom timeout value
|
||||||
*/
|
*/
|
||||||
constructor (endpoint: string | string[] = defaults.WS_URL, autoConnectMs: number | false = RETRY_DELAY, headers: Record<string, string> = {}) {
|
constructor (endpoint: string | string[] = defaults.WS_URL, autoConnectMs: number | false = RETRY_DELAY, headers: Record<string, string> = {}, timeout?: number) {
|
||||||
const endpoints = Array.isArray(endpoint)
|
const endpoints = Array.isArray(endpoint)
|
||||||
? endpoint
|
? endpoint
|
||||||
: [endpoint];
|
: [endpoint];
|
||||||
@@ -137,6 +139,7 @@ export class WsProvider implements ProviderInterface {
|
|||||||
active: { requests: 0, subscriptions: 0 },
|
active: { requests: 0, subscriptions: 0 },
|
||||||
total: { bytesRecv: 0, bytesSent: 0, cached: 0, requests: 0, subscriptions: 0, timeout: 0 }
|
total: { bytesRecv: 0, bytesSent: 0, cached: 0, requests: 0, subscriptions: 0, timeout: 0 }
|
||||||
};
|
};
|
||||||
|
this.#timeout = timeout || DEFAULT_TIMEOUT_MS;
|
||||||
|
|
||||||
if (autoConnectMs > 0) {
|
if (autoConnectMs > 0) {
|
||||||
this.connectWithRetry().catch((): void => {
|
this.connectWithRetry().catch((): void => {
|
||||||
@@ -210,7 +213,7 @@ export class WsProvider implements ProviderInterface {
|
|||||||
this.#websocket.onopen = this.#onSocketOpen;
|
this.#websocket.onopen = this.#onSocketOpen;
|
||||||
|
|
||||||
// timeout any handlers that have not had a response
|
// timeout any handlers that have not had a response
|
||||||
this.#timeoutId = setInterval(() => this.#timeout(), TIMEOUT_INTERVAL);
|
this.#timeoutId = setInterval(() => this.#timeoutHandlers(), TIMEOUT_INTERVAL);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
l.error(error);
|
l.error(error);
|
||||||
|
|
||||||
@@ -295,13 +298,13 @@ export class WsProvider implements ProviderInterface {
|
|||||||
public send <T = any> (method: string, params: unknown[], isCacheable?: boolean, subscription?: SubscriptionHandler): Promise<T> {
|
public send <T = any> (method: string, params: unknown[], isCacheable?: boolean, subscription?: SubscriptionHandler): Promise<T> {
|
||||||
this.#stats.total.requests++;
|
this.#stats.total.requests++;
|
||||||
|
|
||||||
const body = this.#coder.encodeJson(method, params);
|
const [id, body] = this.#coder.encodeJson(method, params);
|
||||||
let resultPromise: Promise<T> | null = isCacheable
|
let resultPromise: Promise<T> | null = isCacheable
|
||||||
? this.#callCache.get(body) as Promise<T>
|
? this.#callCache.get(body) as Promise<T>
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
if (!resultPromise) {
|
if (!resultPromise) {
|
||||||
resultPromise = this.#send(body, method, params, subscription);
|
resultPromise = this.#send(id, body, method, params, subscription);
|
||||||
|
|
||||||
if (isCacheable) {
|
if (isCacheable) {
|
||||||
this.#callCache.set(body, resultPromise);
|
this.#callCache.set(body, resultPromise);
|
||||||
@@ -313,20 +316,18 @@ export class WsProvider implements ProviderInterface {
|
|||||||
return resultPromise;
|
return resultPromise;
|
||||||
}
|
}
|
||||||
|
|
||||||
async #send <T> (json: string, method: string, params: unknown[], subscription?: SubscriptionHandler): Promise<T> {
|
async #send <T> (id: number, body: string, method: string, params: unknown[], subscription?: SubscriptionHandler): Promise<T> {
|
||||||
return new Promise<T>((resolve, reject): void => {
|
return new Promise<T>((resolve, reject): void => {
|
||||||
try {
|
try {
|
||||||
assert(this.isConnected && !isNull(this.#websocket), 'WebSocket is not connected');
|
assert(this.isConnected && !isNull(this.#websocket), 'WebSocket is not connected');
|
||||||
|
|
||||||
const id = this.#coder.getId();
|
|
||||||
|
|
||||||
const callback = (error?: Error | null, result?: T): void => {
|
const callback = (error?: Error | null, result?: T): void => {
|
||||||
error
|
error
|
||||||
? reject(error)
|
? reject(error)
|
||||||
: resolve(result as T);
|
: resolve(result as T);
|
||||||
};
|
};
|
||||||
|
|
||||||
l.debug(() => ['calling', method, json]);
|
l.debug(() => ['calling', method, body]);
|
||||||
|
|
||||||
this.#handlers[id] = {
|
this.#handlers[id] = {
|
||||||
callback,
|
callback,
|
||||||
@@ -335,8 +336,8 @@ export class WsProvider implements ProviderInterface {
|
|||||||
start: Date.now(),
|
start: Date.now(),
|
||||||
subscription
|
subscription
|
||||||
};
|
};
|
||||||
this.#stats.total.bytesSent += json.length;
|
this.#stats.total.bytesSent += body.length;
|
||||||
this.#websocket.send(json);
|
this.#websocket.send(body);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
reject(error);
|
reject(error);
|
||||||
}
|
}
|
||||||
@@ -559,16 +560,16 @@ export class WsProvider implements ProviderInterface {
|
|||||||
})).catch(l.error);
|
})).catch(l.error);
|
||||||
};
|
};
|
||||||
|
|
||||||
#timeout = (): void => {
|
#timeoutHandlers = (): void => {
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
const ids = Object.keys(this.#handlers);
|
const ids = Object.keys(this.#handlers);
|
||||||
|
|
||||||
for (let i = 0; i < ids.length; i++) {
|
for (let i = 0; i < ids.length; i++) {
|
||||||
const handler = this.#handlers[ids[i]];
|
const handler = this.#handlers[ids[i]];
|
||||||
|
|
||||||
if ((now - handler.start) > TIMEOUT_MS) {
|
if ((now - handler.start) > this.#timeout) {
|
||||||
try {
|
try {
|
||||||
handler.callback(new Error(`No response received from RPC endpoint in ${TIMEOUT_S}s`), undefined);
|
handler.callback(new Error(`No response received from RPC endpoint in ${this.#timeout / 1000}s`), undefined);
|
||||||
} catch {
|
} catch {
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.14.1",
|
"version": "8.6.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
|
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
|
||||||
@@ -30,23 +30,23 @@
|
|||||||
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.cjs"
|
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.cjs"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.17.8",
|
"@babel/core": "^7.18.2",
|
||||||
"@babel/register": "^7.17.7",
|
"@babel/register": "^7.17.7",
|
||||||
"@babel/runtime": "^7.17.8",
|
"@babel/runtime": "^7.18.3",
|
||||||
"@polkadot/api": "7.14.1",
|
"@polkadot/api": "8.6.1",
|
||||||
"@polkadot/api-augment": "7.14.1",
|
"@polkadot/api-augment": "8.6.1",
|
||||||
"@polkadot/rpc-augment": "7.14.1",
|
"@polkadot/rpc-augment": "8.6.1",
|
||||||
"@polkadot/rpc-provider": "7.14.1",
|
"@polkadot/rpc-provider": "8.6.1",
|
||||||
"@polkadot/types": "7.14.1",
|
"@polkadot/types": "8.6.1",
|
||||||
"@polkadot/types-augment": "7.14.1",
|
"@polkadot/types-augment": "8.6.1",
|
||||||
"@polkadot/types-codec": "7.14.1",
|
"@polkadot/types-codec": "8.6.1",
|
||||||
"@polkadot/types-create": "7.14.1",
|
"@polkadot/types-create": "8.6.1",
|
||||||
"@polkadot/types-support": "7.14.1",
|
"@polkadot/types-support": "8.6.1",
|
||||||
"@polkadot/util": "^8.7.1",
|
"@polkadot/util": "^9.3.1",
|
||||||
"@polkadot/x-ws": "^8.7.1",
|
"@polkadot/x-ws": "^9.3.1",
|
||||||
"handlebars": "^4.7.7",
|
"handlebars": "^4.7.7",
|
||||||
"websocket": "^1.0.34",
|
"websocket": "^1.0.34",
|
||||||
"yargs": "^17.4.0"
|
"yargs": "^17.5.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/websocket": "^1.0.5",
|
"@types/websocket": "^1.0.5",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ module.exports = function (file) {
|
|||||||
let main;
|
let main;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
main = require(`../${file}.cjs`).main;
|
main = require(`../cjs/${file}.js`).main;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// required for dev-only setups
|
// required for dev-only setups
|
||||||
process.env.JEST_WORKER_ID = '123';
|
process.env.JEST_WORKER_ID = '123';
|
||||||
|
|||||||
@@ -8,40 +8,46 @@ import yargs from 'yargs';
|
|||||||
|
|
||||||
import { Definitions } from '@polkadot/types/types';
|
import { Definitions } from '@polkadot/types/types';
|
||||||
import { formatNumber } from '@polkadot/util';
|
import { formatNumber } from '@polkadot/util';
|
||||||
import { WebSocket } from '@polkadot/x-ws';
|
|
||||||
|
|
||||||
import { generateDefaultConsts, generateDefaultErrors, generateDefaultEvents, generateDefaultQuery, generateDefaultRpc, generateDefaultTx } from './generate';
|
import { generateDefaultConsts, generateDefaultErrors, generateDefaultEvents, generateDefaultQuery, generateDefaultRpc, generateDefaultTx } from './generate';
|
||||||
import { HEADER, writeFile } from './util';
|
import { assertDir, assertFile, getMetadataViaWs, HEADER, writeFile } from './util';
|
||||||
|
|
||||||
function generate (metaHex: HexString, pkg: string | undefined, output: string, isStrict?: boolean): void {
|
function generate (metaHex: HexString, pkg: string | undefined, output: string, isStrict?: boolean): void {
|
||||||
console.log(`Generating from metadata, ${formatNumber((metaHex.length - 2) / 2)} bytes`);
|
console.log(`Generating from metadata, ${formatNumber((metaHex.length - 2) / 2)} bytes`);
|
||||||
|
|
||||||
const base = path.join(process.cwd(), output);
|
const outputPath = assertDir(path.join(process.cwd(), output));
|
||||||
const extraTypes = pkg
|
let extraTypes: Record<string, any> = {};
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
let customLookupDefinitions: Definitions = { rpc: {}, types: {} };
|
||||||
? { [pkg]: require(path.join(base, 'definitions')) as Record<string, any> }
|
|
||||||
: {};
|
|
||||||
|
|
||||||
let customLookupDefinitions;
|
if (pkg) {
|
||||||
|
try {
|
||||||
|
extraTypes = {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-unsafe-argument
|
||||||
|
[pkg]: require(assertFile(path.join(outputPath, 'definitions.ts'))) as Record<string, any>
|
||||||
|
};
|
||||||
|
} catch (error) {
|
||||||
|
console.error('ERROR: No custom definitions found:', (error as Error).message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
customLookupDefinitions = {
|
customLookupDefinitions = {
|
||||||
rpc: {},
|
rpc: {},
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
|
||||||
types: require(path.join(base, 'lookup.ts')).default
|
types: require(assertFile(path.join(outputPath, 'lookup.ts'))).default
|
||||||
} as Definitions;
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('No custom definitions found.');
|
console.error('ERROR: No lookup definitions found:', (error as Error).message);
|
||||||
}
|
}
|
||||||
|
|
||||||
generateDefaultConsts(path.join(base, 'augment-api-consts.ts'), metaHex, extraTypes, isStrict, customLookupDefinitions);
|
generateDefaultConsts(path.join(outputPath, 'augment-api-consts.ts'), metaHex, extraTypes, isStrict, customLookupDefinitions);
|
||||||
generateDefaultErrors(path.join(base, 'augment-api-errors.ts'), metaHex, extraTypes, isStrict);
|
generateDefaultErrors(path.join(outputPath, 'augment-api-errors.ts'), metaHex, extraTypes, isStrict);
|
||||||
generateDefaultEvents(path.join(base, 'augment-api-events.ts'), metaHex, extraTypes, isStrict, customLookupDefinitions);
|
generateDefaultEvents(path.join(outputPath, 'augment-api-events.ts'), metaHex, extraTypes, isStrict, customLookupDefinitions);
|
||||||
generateDefaultQuery(path.join(base, 'augment-api-query.ts'), metaHex, extraTypes, isStrict, customLookupDefinitions);
|
generateDefaultQuery(path.join(outputPath, 'augment-api-query.ts'), metaHex, extraTypes, isStrict, customLookupDefinitions);
|
||||||
generateDefaultRpc(path.join(base, 'augment-api-rpc.ts'), extraTypes);
|
generateDefaultRpc(path.join(outputPath, 'augment-api-rpc.ts'), extraTypes);
|
||||||
generateDefaultTx(path.join(base, 'augment-api-tx.ts'), metaHex, extraTypes, isStrict, customLookupDefinitions);
|
generateDefaultTx(path.join(outputPath, 'augment-api-tx.ts'), metaHex, extraTypes, isStrict, customLookupDefinitions);
|
||||||
|
|
||||||
writeFile(path.join(base, 'augment-api.ts'), (): string =>
|
writeFile(path.join(outputPath, 'augment-api.ts'), (): string =>
|
||||||
[
|
[
|
||||||
HEADER('chain'),
|
HEADER('chain'),
|
||||||
...[
|
...[
|
||||||
@@ -78,32 +84,11 @@ export function main (): void {
|
|||||||
}).argv as ArgV;
|
}).argv as ArgV;
|
||||||
|
|
||||||
if (endpoint.startsWith('wss://') || endpoint.startsWith('ws://')) {
|
if (endpoint.startsWith('wss://') || endpoint.startsWith('ws://')) {
|
||||||
try {
|
getMetadataViaWs(endpoint)
|
||||||
const websocket = new WebSocket(endpoint);
|
.then((metadata) => generate(metadata, pkg, output, isStrict))
|
||||||
|
.catch(() => process.exit(1));
|
||||||
websocket.onclose = (event: { code: number; reason: string }): void => {
|
|
||||||
console.error(`disconnected, code: '${event.code}' reason: '${event.reason}'`);
|
|
||||||
process.exit(1);
|
|
||||||
};
|
|
||||||
|
|
||||||
websocket.onerror = (event: unknown): void => {
|
|
||||||
console.error(event);
|
|
||||||
process.exit(1);
|
|
||||||
};
|
|
||||||
|
|
||||||
websocket.onopen = (): void => {
|
|
||||||
console.log('connected');
|
|
||||||
websocket.send('{"id":"1","jsonrpc":"2.0","method":"state_getMetadata","params":[]}');
|
|
||||||
};
|
|
||||||
|
|
||||||
websocket.onmessage = (message: unknown): void => {
|
|
||||||
generate((JSON.parse((message as Record<string, string>).data) as Record<string, HexString>).result, pkg, output, isStrict);
|
|
||||||
};
|
|
||||||
} catch (error) {
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
generate((require(path.join(process.cwd(), endpoint)) as Record<string, HexString>).result, pkg, output, isStrict);
|
generate((require(assertFile(path.join(process.cwd(), endpoint))) as Record<string, HexString>).result, pkg, output, isStrict);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import * as substrateDefs from '@polkadot/types/interfaces/definitions';
|
|||||||
import { generateInterfaceTypes } from './generate/interfaceRegistry';
|
import { generateInterfaceTypes } from './generate/interfaceRegistry';
|
||||||
import { generateTsDef } from './generate/tsDef';
|
import { generateTsDef } from './generate/tsDef';
|
||||||
import { generateDefaultLookup } from './generate';
|
import { generateDefaultLookup } from './generate';
|
||||||
|
import { assertDir, assertFile, getMetadataViaWs } from './util';
|
||||||
|
|
||||||
type ArgV = { input: string; package: string; endpoint?: string; };
|
type ArgV = { input: string; package: string; endpoint?: string; };
|
||||||
|
|
||||||
@@ -32,15 +33,16 @@ export function main (): void {
|
|||||||
}
|
}
|
||||||
}).argv as ArgV;
|
}).argv as ArgV;
|
||||||
|
|
||||||
if (endpoint) {
|
const inputPath = assertDir(path.join(process.cwd(), input));
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
let userDefs: Record<string, any> = {};
|
||||||
const metaHex = (require(path.join(process.cwd(), endpoint)) as Record<string, HexString>).result;
|
|
||||||
|
|
||||||
generateDefaultLookup(path.join(process.cwd(), input), metaHex);
|
try {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
|
userDefs = require(assertFile(path.join(inputPath, 'definitions.ts'))) as Record<string, any>;
|
||||||
|
} catch (error) {
|
||||||
|
console.error('ERROR: Unable to load user definitions:', (error as Error).message);
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
||||||
const userDefs = require(path.join(process.cwd(), input, 'definitions.ts')) as Record<string, any>;
|
|
||||||
const userKeys = Object.keys(userDefs);
|
const userKeys = Object.keys(userDefs);
|
||||||
const filteredBase = Object
|
const filteredBase = Object
|
||||||
.entries(substrateDefs as Record<string, unknown>)
|
.entries(substrateDefs as Record<string, unknown>)
|
||||||
@@ -64,6 +66,19 @@ export function main (): void {
|
|||||||
[pkg]: userDefs
|
[pkg]: userDefs
|
||||||
};
|
};
|
||||||
|
|
||||||
generateTsDef(allDefs, path.join(process.cwd(), input), pkg);
|
generateTsDef(allDefs, inputPath, pkg);
|
||||||
generateInterfaceTypes(allDefs, path.join(process.cwd(), input, 'augment-types.ts'));
|
generateInterfaceTypes(allDefs, path.join(inputPath, 'augment-types.ts'));
|
||||||
|
|
||||||
|
if (endpoint) {
|
||||||
|
if (endpoint.startsWith('wss://') || endpoint.startsWith('ws://')) {
|
||||||
|
getMetadataViaWs(endpoint)
|
||||||
|
.then((metadata) => generateDefaultLookup(inputPath, metadata))
|
||||||
|
.catch(() => process.exit(1));
|
||||||
|
} else {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
|
const metaHex = (require(assertFile(path.join(process.cwd(), endpoint))) as Record<string, HexString>).result;
|
||||||
|
|
||||||
|
generateDefaultLookup(inputPath, metaHex);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,17 +42,6 @@ function tsExport (registry: Registry, definitions: Record<string, ModuleTypes>,
|
|||||||
return exportInterface(def.lookupIndex, def.name, formatType(registry, definitions, def, imports, false));
|
return exportInterface(def.lookupIndex, def.name, formatType(registry, definitions, def, imports, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
const tsBTreeMap = tsExport;
|
|
||||||
const tsBTreeSet = tsExport;
|
|
||||||
const tsCompact = tsExport;
|
|
||||||
const tsDoNotConstruct = tsExport;
|
|
||||||
const tsHashMap = tsExport;
|
|
||||||
const tsOption = tsExport;
|
|
||||||
const tsPlain = tsExport;
|
|
||||||
const tsTuple = tsExport;
|
|
||||||
const tsWrapperKeepOpaque = tsExport;
|
|
||||||
const tsWrapperOpaque = tsExport;
|
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, { lookupIndex, name: enumName, sub }: TypeDef, imports: TypeImports): string {
|
function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, { lookupIndex, name: enumName, sub }: TypeDef, imports: TypeImports): string {
|
||||||
setImports(definitions, imports, ['Enum']);
|
setImports(definitions, imports, ['Enum']);
|
||||||
@@ -227,29 +216,29 @@ function tsVec (registry: Registry, definitions: Record<string, ModuleTypes>, de
|
|||||||
// `generators[typedef.info](...)` TS will show any unhandled types. Rather
|
// `generators[typedef.info](...)` TS will show any unhandled types. Rather
|
||||||
// we are being explicit in having no handlers where we do not support (yet)
|
// we are being explicit in having no handlers where we do not support (yet)
|
||||||
export const typeEncoders: Record<TypeDefInfo, (registry: Registry, definitions: Record<string, ModuleTypes>, def: TypeDef, imports: TypeImports) => string> = {
|
export const typeEncoders: Record<TypeDefInfo, (registry: Registry, definitions: Record<string, ModuleTypes>, def: TypeDef, imports: TypeImports) => string> = {
|
||||||
[TypeDefInfo.BTreeMap]: tsBTreeMap,
|
[TypeDefInfo.BTreeMap]: tsExport,
|
||||||
[TypeDefInfo.BTreeSet]: tsBTreeSet,
|
[TypeDefInfo.BTreeSet]: tsExport,
|
||||||
[TypeDefInfo.Compact]: tsCompact,
|
[TypeDefInfo.Compact]: tsExport,
|
||||||
[TypeDefInfo.DoNotConstruct]: tsDoNotConstruct,
|
[TypeDefInfo.DoNotConstruct]: tsExport,
|
||||||
[TypeDefInfo.Enum]: tsEnum,
|
[TypeDefInfo.Enum]: tsEnum,
|
||||||
[TypeDefInfo.HashMap]: tsHashMap,
|
[TypeDefInfo.HashMap]: tsExport,
|
||||||
[TypeDefInfo.Int]: tsInt,
|
[TypeDefInfo.Int]: tsInt,
|
||||||
[TypeDefInfo.Linkage]: errorUnhandled,
|
[TypeDefInfo.Linkage]: errorUnhandled,
|
||||||
[TypeDefInfo.Null]: tsNull,
|
[TypeDefInfo.Null]: tsNull,
|
||||||
[TypeDefInfo.Option]: tsOption,
|
[TypeDefInfo.Option]: tsExport,
|
||||||
[TypeDefInfo.Plain]: tsPlain,
|
[TypeDefInfo.Plain]: tsExport,
|
||||||
[TypeDefInfo.Range]: errorUnhandled,
|
[TypeDefInfo.Range]: tsExport,
|
||||||
[TypeDefInfo.RangeInclusive]: errorUnhandled,
|
[TypeDefInfo.RangeInclusive]: tsExport,
|
||||||
[TypeDefInfo.Result]: tsResult,
|
[TypeDefInfo.Result]: tsResult,
|
||||||
[TypeDefInfo.Set]: tsSet,
|
[TypeDefInfo.Set]: tsSet,
|
||||||
[TypeDefInfo.Si]: tsSi,
|
[TypeDefInfo.Si]: tsSi,
|
||||||
[TypeDefInfo.Struct]: tsStruct,
|
[TypeDefInfo.Struct]: tsStruct,
|
||||||
[TypeDefInfo.Tuple]: tsTuple,
|
[TypeDefInfo.Tuple]: tsExport,
|
||||||
[TypeDefInfo.UInt]: tsUInt,
|
[TypeDefInfo.UInt]: tsUInt,
|
||||||
[TypeDefInfo.Vec]: tsVec,
|
[TypeDefInfo.Vec]: tsVec,
|
||||||
[TypeDefInfo.VecFixed]: tsVec,
|
[TypeDefInfo.VecFixed]: tsVec,
|
||||||
[TypeDefInfo.WrapperKeepOpaque]: tsWrapperKeepOpaque,
|
[TypeDefInfo.WrapperKeepOpaque]: tsExport,
|
||||||
[TypeDefInfo.WrapperOpaque]: tsWrapperOpaque
|
[TypeDefInfo.WrapperOpaque]: tsExport
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ const BASE = 'packages/api-augment/src';
|
|||||||
const METAS = Object.entries({ kusama, polkadot, substrate }) as [string, HexString][];
|
const METAS = Object.entries({ kusama, polkadot, substrate }) as [string, HexString][];
|
||||||
|
|
||||||
export function main (): void {
|
export function main (): void {
|
||||||
generateDefaultLookup();
|
|
||||||
generateDefaultInterface();
|
generateDefaultInterface();
|
||||||
|
generateDefaultLookup();
|
||||||
generateDefaultRpc();
|
generateDefaultRpc();
|
||||||
generateDefaultTsDef();
|
generateDefaultTsDef();
|
||||||
|
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '7.14.1' };
|
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '8.6.1' };
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/typegen authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import fs from 'fs';
|
||||||
|
|
||||||
|
import { assert } from '@polkadot/util';
|
||||||
|
|
||||||
|
export function assertDir (path: string): string {
|
||||||
|
assert(fs.existsSync(path) && fs.lstatSync(path).isDirectory(), `${path} is not a directory`);
|
||||||
|
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function assertFile (path: string): string {
|
||||||
|
assert(fs.existsSync(path) && fs.lstatSync(path).isFile(), `${path} is not a file`);
|
||||||
|
|
||||||
|
return path;
|
||||||
|
}
|
||||||
@@ -8,26 +8,54 @@ import { getSimilarTypes } from './derived';
|
|||||||
describe('getSimilarTypes', (): void => {
|
describe('getSimilarTypes', (): void => {
|
||||||
let registry: TypeRegistry;
|
let registry: TypeRegistry;
|
||||||
|
|
||||||
|
const mockImports = {
|
||||||
|
codecTypes: {},
|
||||||
|
definitions: {},
|
||||||
|
extrinsicTypes: {},
|
||||||
|
genericTypes: {},
|
||||||
|
ignoredTypes: [],
|
||||||
|
localTypes: {},
|
||||||
|
lookupTypes: {},
|
||||||
|
metadataTypes: {},
|
||||||
|
primitiveTypes: {},
|
||||||
|
typeToModule: {},
|
||||||
|
typesTypes: {}
|
||||||
|
};
|
||||||
|
|
||||||
beforeAll((): void => {
|
beforeAll((): void => {
|
||||||
registry = new TypeRegistry();
|
registry = new TypeRegistry();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('handles nested Tuples', (): void => {
|
it('handles nested Tuples', (): void => {
|
||||||
expect(getSimilarTypes(registry, {}, '(AccountId, (Balance, u32), u64)', {
|
expect(getSimilarTypes(registry, {}, '(AccountId, (Balance, u32), u64)', mockImports)).toEqual([
|
||||||
codecTypes: {},
|
|
||||||
definitions: {},
|
|
||||||
extrinsicTypes: {},
|
|
||||||
genericTypes: {},
|
|
||||||
ignoredTypes: [],
|
|
||||||
localTypes: {},
|
|
||||||
lookupTypes: {},
|
|
||||||
metadataTypes: {},
|
|
||||||
primitiveTypes: {},
|
|
||||||
typeToModule: {},
|
|
||||||
typesTypes: {}
|
|
||||||
})).toEqual([
|
|
||||||
'ITuple<[AccountId, ITuple<[Balance, u32]>, u64]>',
|
'ITuple<[AccountId, ITuple<[Balance, u32]>, u64]>',
|
||||||
'[AccountId | string | Uint8Array, ITuple<[Balance, u32]> | [Balance | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array], u64 | AnyNumber | Uint8Array]'
|
'[AccountId | string | Uint8Array, ITuple<[Balance, u32]> | [Balance | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array], u64 | AnyNumber | Uint8Array]'
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('handles vectors of slices', (): void => {
|
||||||
|
expect(getSimilarTypes(registry, {}, 'Vec<[u8;4]>', mockImports)).toEqual([
|
||||||
|
'Vec<U8aFixed>'
|
||||||
|
]);
|
||||||
|
expect(getSimilarTypes(registry, {}, 'Vec<[Balance;8]>', mockImports)).toEqual([
|
||||||
|
'Vec<Vec<Balance>>'
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('handles structs', (): void => {
|
||||||
|
expect(getSimilarTypes(registry, {}, '{ "a": "u8", "b": "Vec<u8>" }', mockImports)).toEqual([
|
||||||
|
`{
|
||||||
|
readonly a: u8;
|
||||||
|
readonly b: Bytes;
|
||||||
|
} & Struct`, '{ a?: any; b?: any }', 'string', 'Uint8Array'
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
it('handles vectors of structs', (): void => {
|
||||||
|
expect(getSimilarTypes(registry, {}, 'Vec<{ "a": "H256", "b": "Vec<H256>" }>', mockImports)).toEqual([
|
||||||
|
`Vec<{
|
||||||
|
readonly a: H256;
|
||||||
|
readonly b: Vec<H256>;
|
||||||
|
} & Struct>`
|
||||||
|
]);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import type { Constructor, Registry } from '@polkadot/types/types';
|
import type { Constructor, Registry } from '@polkadot/types/types';
|
||||||
import type { TypeDef } from '@polkadot/types-create/types';
|
import type { TypeDef } from '@polkadot/types-create/types';
|
||||||
|
|
||||||
import { GenericAccountId, GenericLookupSource, GenericVote } from '@polkadot/types/generic';
|
import { GenericAccountId, GenericCall, GenericLookupSource, GenericVote } from '@polkadot/types/generic';
|
||||||
import { AllConvictions } from '@polkadot/types/interfaces/democracy/definitions';
|
import { AllConvictions } from '@polkadot/types/interfaces/democracy/definitions';
|
||||||
import { AbstractInt, bool, Compact, Enum, Null, Option, Struct, Tuple, UInt, Vec, WrapperKeepOpaque, WrapperOpaque } from '@polkadot/types-codec';
|
import { AbstractInt, bool, Compact, Enum, Null, Option, Struct, Tuple, UInt, Vec, WrapperKeepOpaque, WrapperOpaque } from '@polkadot/types-codec';
|
||||||
import { getTypeDef, TypeDefInfo } from '@polkadot/types-create';
|
import { getTypeDef, TypeDefInfo } from '@polkadot/types-create';
|
||||||
@@ -58,6 +58,10 @@ export function getSimilarTypes (registry: Registry, definitions: Record<string,
|
|||||||
);
|
);
|
||||||
|
|
||||||
possibleTypes.push(`([${subs.join(', ')}])[]`);
|
possibleTypes.push(`([${subs.join(', ')}])[]`);
|
||||||
|
} else if (subDef.info === TypeDefInfo.Option || subDef.info === TypeDefInfo.Vec || subDef.info === TypeDefInfo.VecFixed) {
|
||||||
|
// TODO: Add possibleTypes so imports work
|
||||||
|
} else if (subDef.info === TypeDefInfo.Struct) {
|
||||||
|
// TODO: Add possibleTypes so imports work
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`Unhandled subtype in Vec, ${stringify(subDef)}`);
|
throw new Error(`Unhandled subtype in Vec, ${stringify(subDef)}`);
|
||||||
}
|
}
|
||||||
@@ -80,6 +84,8 @@ export function getSimilarTypes (registry: Registry, definitions: Record<string,
|
|||||||
possibleTypes.push('Address', 'AccountId', 'AccountIndex', 'LookupSource', 'string', 'Uint8Array');
|
possibleTypes.push('Address', 'AccountId', 'AccountIndex', 'LookupSource', 'string', 'Uint8Array');
|
||||||
} else if (isChildClass(GenericAccountId, Clazz)) {
|
} else if (isChildClass(GenericAccountId, Clazz)) {
|
||||||
possibleTypes.push('string', 'Uint8Array');
|
possibleTypes.push('string', 'Uint8Array');
|
||||||
|
} else if (isChildClass(GenericCall, Clazz)) {
|
||||||
|
possibleTypes.push('IMethod', 'string', 'Uint8Array');
|
||||||
} else if (isChildClass(bool, Clazz)) {
|
} else if (isChildClass(bool, Clazz)) {
|
||||||
possibleTypes.push('boolean', 'Uint8Array');
|
possibleTypes.push('boolean', 'Uint8Array');
|
||||||
} else if (isChildClass(Null, Clazz)) {
|
} else if (isChildClass(Null, Clazz)) {
|
||||||
|
|||||||
@@ -4,6 +4,10 @@
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
|
import { assert } from '@polkadot/util';
|
||||||
|
|
||||||
|
import { packageInfo } from '../packageInfo';
|
||||||
|
|
||||||
export function writeFile (dest: string, generator: () => string, noLog?: boolean): void {
|
export function writeFile (dest: string, generator: () => string, noLog?: boolean): void {
|
||||||
!noLog && console.log(`${dest}\n\tGenerating`);
|
!noLog && console.log(`${dest}\n\tGenerating`);
|
||||||
|
|
||||||
@@ -21,5 +25,17 @@ export function writeFile (dest: string, generator: () => string, noLog?: boolea
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function readTemplate (template: string): string {
|
export function readTemplate (template: string): string {
|
||||||
return fs.readFileSync(path.join(__dirname, `../templates/${template}.hbs`)).toString();
|
// Inside the api repo itself, it will be 'auto'
|
||||||
|
const rootDir = packageInfo.path === 'auto'
|
||||||
|
? path.join(__dirname, '..')
|
||||||
|
: packageInfo.path;
|
||||||
|
|
||||||
|
// NOTE With cjs in a subdir, search one lower as well
|
||||||
|
const file = ['./templates', '../templates']
|
||||||
|
.map((p) => path.join(rootDir, p, `${template}.hbs`))
|
||||||
|
.find((p) => fs.existsSync(p));
|
||||||
|
|
||||||
|
assert(file, `Unable to locate ${template}.hbs from ${rootDir}`);
|
||||||
|
|
||||||
|
return fs.readFileSync(file).toString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,11 +175,11 @@ const formatters: Record<TypeDefInfo, (registry: Registry, typeDef: TypeDef, def
|
|||||||
},
|
},
|
||||||
|
|
||||||
[TypeDefInfo.Range]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
[TypeDefInfo.Range]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||||
throw new Error(`TypeDefInfo.Range: Not implemented on ${stringify(typeDef)}`);
|
return singleParamNotation(registry, 'Range', typeDef, definitions, imports, withShortcut);
|
||||||
},
|
},
|
||||||
|
|
||||||
[TypeDefInfo.RangeInclusive]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
[TypeDefInfo.RangeInclusive]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||||
throw new Error(`TypeDefInfo.RangeInclusive: Not implemented on ${stringify(typeDef)}`);
|
return singleParamNotation(registry, 'RangeInclusive', typeDef, definitions, imports, withShortcut);
|
||||||
},
|
},
|
||||||
|
|
||||||
[TypeDefInfo.Set]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
[TypeDefInfo.Set]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export function setImports (allDefs: Record<string, ModuleTypes>, imports: TypeI
|
|||||||
types.filter((t): t is string => !!t).forEach((type): void => {
|
types.filter((t): t is string => !!t).forEach((type): void => {
|
||||||
if (ignoredTypes.includes(type)) {
|
if (ignoredTypes.includes(type)) {
|
||||||
// do nothing
|
// do nothing
|
||||||
} else if (['AnyNumber', 'CallFunction', 'Codec', 'IExtrinsic', 'ITuple'].includes(type)) {
|
} else if (['AnyNumber', 'CallFunction', 'Codec', 'IExtrinsic', 'IMethod', 'ITuple'].includes(type)) {
|
||||||
typesTypes[type] = true;
|
typesTypes[type] = true;
|
||||||
} else if (['Metadata', 'PortableRegistry'].includes(type)) {
|
} else if (['Metadata', 'PortableRegistry'].includes(type)) {
|
||||||
metadataTypes[type] = true;
|
metadataTypes[type] = true;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// Copyright 2017-2022 @polkadot/typegen authors & contributors
|
// Copyright 2017-2022 @polkadot/typegen authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
export * from './assert';
|
||||||
export * from './derived';
|
export * from './derived';
|
||||||
export * from './docs';
|
export * from './docs';
|
||||||
export * from './file';
|
export * from './file';
|
||||||
@@ -8,6 +9,7 @@ export * from './formatting';
|
|||||||
export * from './imports';
|
export * from './imports';
|
||||||
export * from './initMeta';
|
export * from './initMeta';
|
||||||
export * from './register';
|
export * from './register';
|
||||||
|
export * from './wsMeta';
|
||||||
|
|
||||||
type Cmp = { name: { toString(): string } };
|
type Cmp = { name: { toString(): string } };
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/typegen authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import type { HexString } from '@polkadot/util/types';
|
||||||
|
|
||||||
|
import { WebSocket } from '@polkadot/x-ws';
|
||||||
|
|
||||||
|
export async function getMetadataViaWs (endpoint: string): Promise<HexString> {
|
||||||
|
return new Promise((resolve): void => {
|
||||||
|
try {
|
||||||
|
const websocket = new WebSocket(endpoint);
|
||||||
|
|
||||||
|
websocket.onclose = (event: { code: number; reason: string }): void => {
|
||||||
|
console.error(`disconnected, code: '${event.code}' reason: '${event.reason}'`);
|
||||||
|
process.exit(1);
|
||||||
|
};
|
||||||
|
|
||||||
|
websocket.onerror = (event: unknown): void => {
|
||||||
|
console.error(event);
|
||||||
|
process.exit(1);
|
||||||
|
};
|
||||||
|
|
||||||
|
websocket.onopen = (): void => {
|
||||||
|
console.log('connected');
|
||||||
|
websocket.send('{"id":"1","jsonrpc":"2.0","method":"state_getMetadata","params":[]}');
|
||||||
|
};
|
||||||
|
|
||||||
|
websocket.onmessage = (message: { data: string }): void => {
|
||||||
|
resolve((JSON.parse(message.data) as { result: HexString }).result);
|
||||||
|
};
|
||||||
|
} catch (error) {
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -20,12 +20,12 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.14.1",
|
"version": "8.6.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.17.8",
|
"@babel/runtime": "^7.18.3",
|
||||||
"@polkadot/types": "7.14.1",
|
"@polkadot/types": "8.6.1",
|
||||||
"@polkadot/types-codec": "7.14.1",
|
"@polkadot/types-codec": "8.6.1",
|
||||||
"@polkadot/util": "^8.7.1"
|
"@polkadot/util": "^9.3.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
/**
|
/**
|
||||||
* Lookup75: kusama_runtime::ProxyType
|
* Lookup79: kusama_runtime::ProxyType
|
||||||
**/
|
**/
|
||||||
KusamaRuntimeProxyType: {
|
KusamaRuntimeProxyType: {
|
||||||
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'IdentityJudgement', 'CancelProxy', 'Auction', 'Society']
|
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'IdentityJudgement', 'CancelProxy', 'Auction', 'Society']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup252: kusama_runtime::SessionKeys
|
* Lookup258: kusama_runtime::SessionKeys
|
||||||
**/
|
**/
|
||||||
KusamaRuntimeSessionKeys: {
|
KusamaRuntimeSessionKeys: {
|
||||||
grandpa: 'SpFinalityGrandpaAppPublic',
|
grandpa: 'SpFinalityGrandpaAppPublic',
|
||||||
@@ -22,7 +22,7 @@ export default {
|
|||||||
authorityDiscovery: 'SpAuthorityDiscoveryAppPublic'
|
authorityDiscovery: 'SpAuthorityDiscoveryAppPublic'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup326: kusama_runtime::OriginCaller
|
* Lookup332: kusama_runtime::OriginCaller
|
||||||
**/
|
**/
|
||||||
KusamaRuntimeOriginCaller: {
|
KusamaRuntimeOriginCaller: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -129,7 +129,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup392: kusama_runtime::NposCompactSolution24
|
* Lookup398: kusama_runtime::NposCompactSolution24
|
||||||
**/
|
**/
|
||||||
KusamaRuntimeNposCompactSolution24: {
|
KusamaRuntimeNposCompactSolution24: {
|
||||||
votes1: 'Vec<(Compact<u32>,Compact<u16>)>',
|
votes1: 'Vec<(Compact<u32>,Compact<u16>)>',
|
||||||
@@ -158,7 +158,7 @@ export default {
|
|||||||
votes24: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);23],Compact<u16>)>'
|
votes24: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);23],Compact<u16>)>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup747: kusama_runtime::Runtime
|
* Lookup774: kusama_runtime::Runtime
|
||||||
**/
|
**/
|
||||||
KusamaRuntimeRuntime: 'Null'
|
KusamaRuntimeRuntime: 'Null'
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
import type { ITuple } from '@polkadot/types-codec/types';
|
import type { ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { PerU16 } from '@polkadot/types/interfaces/runtime';
|
import type { PerU16 } from '@polkadot/types/interfaces/runtime';
|
||||||
|
|
||||||
/** @name KusamaRuntimeProxyType (75) */
|
/** @name KusamaRuntimeProxyType (79) */
|
||||||
export interface KusamaRuntimeProxyType extends Enum {
|
export interface KusamaRuntimeProxyType extends Enum {
|
||||||
readonly isAny: boolean;
|
readonly isAny: boolean;
|
||||||
readonly isNonTransfer: boolean;
|
readonly isNonTransfer: boolean;
|
||||||
@@ -19,7 +19,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly type: 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society';
|
readonly type: 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society';
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name KusamaRuntimeSessionKeys (252) */
|
/** @name KusamaRuntimeSessionKeys (258) */
|
||||||
export interface KusamaRuntimeSessionKeys extends Struct {
|
export interface KusamaRuntimeSessionKeys extends Struct {
|
||||||
readonly grandpa: SpFinalityGrandpaAppPublic;
|
readonly grandpa: SpFinalityGrandpaAppPublic;
|
||||||
readonly babe: SpConsensusBabeAppPublic;
|
readonly babe: SpConsensusBabeAppPublic;
|
||||||
@@ -29,7 +29,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly authorityDiscovery: SpAuthorityDiscoveryAppPublic;
|
readonly authorityDiscovery: SpAuthorityDiscoveryAppPublic;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name KusamaRuntimeOriginCaller (326) */
|
/** @name KusamaRuntimeOriginCaller (332) */
|
||||||
export interface KusamaRuntimeOriginCaller extends Enum {
|
export interface KusamaRuntimeOriginCaller extends Enum {
|
||||||
readonly isSystem: boolean;
|
readonly isSystem: boolean;
|
||||||
readonly asSystem: FrameSupportDispatchRawOrigin;
|
readonly asSystem: FrameSupportDispatchRawOrigin;
|
||||||
@@ -45,7 +45,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly type: 'System' | 'Void' | 'Council' | 'TechnicalCommittee' | 'ParachainsOrigin' | 'XcmPallet';
|
readonly type: 'System' | 'Void' | 'Council' | 'TechnicalCommittee' | 'ParachainsOrigin' | 'XcmPallet';
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name KusamaRuntimeNposCompactSolution24 (392) */
|
/** @name KusamaRuntimeNposCompactSolution24 (398) */
|
||||||
export interface KusamaRuntimeNposCompactSolution24 extends Struct {
|
export interface KusamaRuntimeNposCompactSolution24 extends Struct {
|
||||||
readonly votes1: Vec<ITuple<[Compact<u32>, Compact<u16>]>>;
|
readonly votes1: Vec<ITuple<[Compact<u32>, Compact<u16>]>>;
|
||||||
readonly votes2: Vec<ITuple<[Compact<u32>, ITuple<[Compact<u16>, Compact<PerU16>]>, Compact<u16>]>>;
|
readonly votes2: Vec<ITuple<[Compact<u32>, ITuple<[Compact<u16>, Compact<PerU16>]>, Compact<u16>]>>;
|
||||||
@@ -73,7 +73,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly votes24: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
readonly votes24: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name KusamaRuntimeRuntime (747) */
|
/** @name KusamaRuntimeRuntime (774) */
|
||||||
export type KusamaRuntimeRuntime = Null;
|
export type KusamaRuntimeRuntime = Null;
|
||||||
|
|
||||||
} // declare module
|
} // declare module
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '7.14.1' };
|
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '8.6.1' };
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
import type { Data, StorageKey } from '@polkadot/types';
|
import type { Data, StorageKey } from '@polkadot/types';
|
||||||
import type { BitVec, Bool, Bytes, I128, I16, I256, I32, I64, I8, Json, Null, Raw, Text, Type, U128, U16, U256, U32, U64, U8, USize, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types-codec';
|
import type { BitVec, Bool, Bytes, I128, I16, I256, I32, I64, I8, Json, Null, OptionBool, Raw, Text, Type, U128, U16, U256, U32, U64, U8, USize, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types-codec';
|
||||||
import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';
|
import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';
|
||||||
import type { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polkadot/types/interfaces/attestations';
|
import type { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polkadot/types/interfaces/attestations';
|
||||||
import type { RawAuraPreDigest } from '@polkadot/types/interfaces/aura';
|
import type { RawAuraPreDigest } from '@polkadot/types/interfaces/aura';
|
||||||
@@ -35,7 +35,7 @@ import type { IdentityFields, IdentityInfo, IdentityInfoAdditional, IdentityInfo
|
|||||||
import type { AuthIndex, AuthoritySignature, Heartbeat, HeartbeatTo244, OpaqueMultiaddr, OpaqueNetworkState, OpaquePeerId } from '@polkadot/types/interfaces/imOnline';
|
import type { AuthIndex, AuthoritySignature, Heartbeat, HeartbeatTo244, OpaqueMultiaddr, OpaqueNetworkState, OpaquePeerId } from '@polkadot/types/interfaces/imOnline';
|
||||||
import type { CallIndex, LotteryConfig } from '@polkadot/types/interfaces/lottery';
|
import type { CallIndex, LotteryConfig } from '@polkadot/types/interfaces/lottery';
|
||||||
import type { ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV12, ErrorMetadataV13, ErrorMetadataV14, ErrorMetadataV9, EventMetadataLatest, EventMetadataV10, EventMetadataV11, EventMetadataV12, EventMetadataV13, EventMetadataV14, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, ExtrinsicMetadataV12, ExtrinsicMetadataV13, ExtrinsicMetadataV14, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV12, FunctionArgumentMetadataV13, FunctionArgumentMetadataV14, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV12, FunctionMetadataV13, FunctionMetadataV14, FunctionMetadataV9, MetadataAll, MetadataLatest, MetadataV10, MetadataV11, MetadataV12, MetadataV13, MetadataV14, MetadataV9, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV13, ModuleConstantMetadataV9, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV12, ModuleMetadataV13, ModuleMetadataV9, PalletCallMetadataLatest, PalletCallMetadataV14, PalletConstantMetadataLatest, PalletConstantMetadataV14, PalletErrorMetadataLatest, PalletErrorMetadataV14, PalletEventMetadataLatest, PalletEventMetadataV14, PalletMetadataLatest, PalletMetadataV14, PalletStorageMetadataLatest, PalletStorageMetadataV14, PortableType, PortableTypeV14, SignedExtensionMetadataLatest, SignedExtensionMetadataV14, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV11, StorageEntryMetadataV12, StorageEntryMetadataV13, StorageEntryMetadataV14, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV11, StorageEntryModifierV12, StorageEntryModifierV13, StorageEntryModifierV14, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV11, StorageEntryTypeV12, StorageEntryTypeV13, StorageEntryTypeV14, StorageEntryTypeV9, StorageHasher, StorageHasherV10, StorageHasherV11, StorageHasherV12, StorageHasherV13, StorageHasherV14, StorageHasherV9, StorageMetadataV10, StorageMetadataV11, StorageMetadataV12, StorageMetadataV13, StorageMetadataV9 } from '@polkadot/types/interfaces/metadata';
|
import type { ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV12, ErrorMetadataV13, ErrorMetadataV14, ErrorMetadataV9, EventMetadataLatest, EventMetadataV10, EventMetadataV11, EventMetadataV12, EventMetadataV13, EventMetadataV14, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, ExtrinsicMetadataV12, ExtrinsicMetadataV13, ExtrinsicMetadataV14, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV12, FunctionArgumentMetadataV13, FunctionArgumentMetadataV14, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV12, FunctionMetadataV13, FunctionMetadataV14, FunctionMetadataV9, MetadataAll, MetadataLatest, MetadataV10, MetadataV11, MetadataV12, MetadataV13, MetadataV14, MetadataV9, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV13, ModuleConstantMetadataV9, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV12, ModuleMetadataV13, ModuleMetadataV9, PalletCallMetadataLatest, PalletCallMetadataV14, PalletConstantMetadataLatest, PalletConstantMetadataV14, PalletErrorMetadataLatest, PalletErrorMetadataV14, PalletEventMetadataLatest, PalletEventMetadataV14, PalletMetadataLatest, PalletMetadataV14, PalletStorageMetadataLatest, PalletStorageMetadataV14, PortableType, PortableTypeV14, SignedExtensionMetadataLatest, SignedExtensionMetadataV14, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV11, StorageEntryMetadataV12, StorageEntryMetadataV13, StorageEntryMetadataV14, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV11, StorageEntryModifierV12, StorageEntryModifierV13, StorageEntryModifierV14, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV11, StorageEntryTypeV12, StorageEntryTypeV13, StorageEntryTypeV14, StorageEntryTypeV9, StorageHasher, StorageHasherV10, StorageHasherV11, StorageHasherV12, StorageHasherV13, StorageHasherV14, StorageHasherV9, StorageMetadataV10, StorageMetadataV11, StorageMetadataV12, StorageMetadataV13, StorageMetadataV9 } from '@polkadot/types/interfaces/metadata';
|
||||||
import type { MmrLeafProof } from '@polkadot/types/interfaces/mmr';
|
import type { MmrLeafBatchProof, MmrLeafProof } from '@polkadot/types/interfaces/mmr';
|
||||||
import type { StorageKind } from '@polkadot/types/interfaces/offchain';
|
import type { StorageKind } from '@polkadot/types/interfaces/offchain';
|
||||||
import type { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
|
import type { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
|
||||||
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidateInfo, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, DisputeLocation, DisputeResult, DisputeState, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, ReplacementTimes, Retriable, Scheduling, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, SlotRange10, Statement, SubId, SystemInherentData, TransientValidationData, UpgradeGoAhead, UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationCodeHash, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersData10, WinnersDataTuple, WinnersDataTuple10, WinningData, WinningData10, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
|
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidateInfo, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, DisputeLocation, DisputeResult, DisputeState, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, ReplacementTimes, Retriable, Scheduling, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, SlotRange10, Statement, SubId, SystemInherentData, TransientValidationData, UpgradeGoAhead, UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationCodeHash, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersData10, WinnersDataTuple, WinnersDataTuple10, WinningData, WinningData10, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
|
||||||
@@ -53,7 +53,7 @@ import type { Bid, BidKind, SocietyJudgement, SocietyVote, StrikeCount, Vouching
|
|||||||
import type { ActiveEraInfo, CompactAssignments, CompactAssignmentsTo257, CompactAssignmentsTo265, CompactAssignmentsWith16, CompactAssignmentsWith24, CompactScore, CompactScoreCompact, ElectionCompute, ElectionPhase, ElectionResult, ElectionScore, ElectionSize, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, ExtendedBalance, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, NominatorIndexCompact, OffchainAccuracy, OffchainAccuracyCompact, PhragmenScore, Points, RawSolution, RawSolutionTo265, RawSolutionWith16, RawSolutionWith24, ReadySolution, RewardDestination, RewardPoint, RoundSnapshot, SeatHolder, SignedSubmission, SignedSubmissionOf, SignedSubmissionTo276, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SolutionOrSnapshotSize, SolutionSupport, SolutionSupports, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, SubmissionIndicesOf, Supports, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorIndexCompact, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196, ValidatorPrefsWithBlocked, ValidatorPrefsWithCommission, VoteWeight, Voter } from '@polkadot/types/interfaces/staking';
|
import type { ActiveEraInfo, CompactAssignments, CompactAssignmentsTo257, CompactAssignmentsTo265, CompactAssignmentsWith16, CompactAssignmentsWith24, CompactScore, CompactScoreCompact, ElectionCompute, ElectionPhase, ElectionResult, ElectionScore, ElectionSize, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, ExtendedBalance, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, NominatorIndexCompact, OffchainAccuracy, OffchainAccuracyCompact, PhragmenScore, Points, RawSolution, RawSolutionTo265, RawSolutionWith16, RawSolutionWith24, ReadySolution, RewardDestination, RewardPoint, RoundSnapshot, SeatHolder, SignedSubmission, SignedSubmissionOf, SignedSubmissionTo276, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SolutionOrSnapshotSize, SolutionSupport, SolutionSupports, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, SubmissionIndicesOf, Supports, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorIndexCompact, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196, ValidatorPrefsWithBlocked, ValidatorPrefsWithCommission, VoteWeight, Voter } from '@polkadot/types/interfaces/staking';
|
||||||
import type { ApiId, BlockTrace, BlockTraceEvent, BlockTraceEventData, BlockTraceSpan, KeyValueOption, MigrationStatusResult, ReadProof, RuntimeVersion, RuntimeVersionApi, RuntimeVersionPartial, SpecVersion, StorageChangeSet, TraceBlockResponse, TraceError } from '@polkadot/types/interfaces/state';
|
import type { ApiId, BlockTrace, BlockTraceEvent, BlockTraceEventData, BlockTraceSpan, KeyValueOption, MigrationStatusResult, ReadProof, RuntimeVersion, RuntimeVersionApi, RuntimeVersionPartial, SpecVersion, StorageChangeSet, TraceBlockResponse, TraceError } from '@polkadot/types/interfaces/state';
|
||||||
import type { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
|
import type { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
|
||||||
import type { AccountInfo, AccountInfoWithDualRefCount, AccountInfoWithProviders, AccountInfoWithRefCount, AccountInfoWithRefCountU8, AccountInfoWithTripleRefCount, ApplyExtrinsicResult, ArithmeticError, BlockLength, BlockWeights, ChainProperties, ChainType, ConsumedWeight, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, DispatchOutcome, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, Health, InvalidTransaction, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, PerDispatchClassU32, PerDispatchClassWeight, PerDispatchClassWeightsPerClass, Phase, RawOrigin, RefCount, RefCountTo259, SyncState, SystemOrigin, TokenError, TransactionValidityError, UnknownTransaction, WeightPerClass } from '@polkadot/types/interfaces/system';
|
import type { AccountInfo, AccountInfoWithDualRefCount, AccountInfoWithProviders, AccountInfoWithRefCount, AccountInfoWithRefCountU8, AccountInfoWithTripleRefCount, ApplyExtrinsicResult, ArithmeticError, BlockLength, BlockWeights, ChainProperties, ChainType, ConsumedWeight, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, DispatchErrorModuleU8a, DispatchErrorTo198, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, DispatchOutcome, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, Health, InvalidTransaction, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, PerDispatchClassU32, PerDispatchClassWeight, PerDispatchClassWeightsPerClass, Phase, RawOrigin, RefCount, RefCountTo259, SyncState, SystemOrigin, TokenError, TransactionValidityError, UnknownTransaction, WeightPerClass } from '@polkadot/types/interfaces/system';
|
||||||
import type { Bounty, BountyIndex, BountyStatus, BountyStatusActive, BountyStatusCuratorProposed, BountyStatusPendingPayout, OpenTip, OpenTipFinderTo225, OpenTipTip, OpenTipTo225, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
|
import type { Bounty, BountyIndex, BountyStatus, BountyStatusActive, BountyStatusCuratorProposed, BountyStatusPendingPayout, OpenTip, OpenTipFinderTo225, OpenTipTip, OpenTipTo225, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
|
||||||
import type { Multiplier } from '@polkadot/types/interfaces/txpayment';
|
import type { Multiplier } from '@polkadot/types/interfaces/txpayment';
|
||||||
import type { ClassDetails, ClassId, ClassMetadata, DepositBalance, DepositBalanceOf, DestroyWitness, InstanceDetails, InstanceId, InstanceMetadata } from '@polkadot/types/interfaces/uniques';
|
import type { ClassDetails, ClassId, ClassMetadata, DepositBalance, DepositBalanceOf, DestroyWitness, InstanceDetails, InstanceId, InstanceMetadata } from '@polkadot/types/interfaces/uniques';
|
||||||
@@ -307,6 +307,7 @@ declare module '@polkadot/types/types/registry' {
|
|||||||
DispatchClass: DispatchClass;
|
DispatchClass: DispatchClass;
|
||||||
DispatchError: DispatchError;
|
DispatchError: DispatchError;
|
||||||
DispatchErrorModule: DispatchErrorModule;
|
DispatchErrorModule: DispatchErrorModule;
|
||||||
|
DispatchErrorModuleU8a: DispatchErrorModuleU8a;
|
||||||
DispatchErrorTo198: DispatchErrorTo198;
|
DispatchErrorTo198: DispatchErrorTo198;
|
||||||
DispatchFeePayment: DispatchFeePayment;
|
DispatchFeePayment: DispatchFeePayment;
|
||||||
DispatchInfo: DispatchInfo;
|
DispatchInfo: DispatchInfo;
|
||||||
@@ -594,6 +595,7 @@ declare module '@polkadot/types/types/registry' {
|
|||||||
MetadataV14: MetadataV14;
|
MetadataV14: MetadataV14;
|
||||||
MetadataV9: MetadataV9;
|
MetadataV9: MetadataV9;
|
||||||
MigrationStatusResult: MigrationStatusResult;
|
MigrationStatusResult: MigrationStatusResult;
|
||||||
|
MmrLeafBatchProof: MmrLeafBatchProof;
|
||||||
MmrLeafProof: MmrLeafProof;
|
MmrLeafProof: MmrLeafProof;
|
||||||
MmrRootHash: MmrRootHash;
|
MmrRootHash: MmrRootHash;
|
||||||
ModuleConstantMetadataV10: ModuleConstantMetadataV10;
|
ModuleConstantMetadataV10: ModuleConstantMetadataV10;
|
||||||
@@ -659,6 +661,7 @@ declare module '@polkadot/types/types/registry' {
|
|||||||
OpenTipTip: OpenTipTip;
|
OpenTipTip: OpenTipTip;
|
||||||
OpenTipTo225: OpenTipTo225;
|
OpenTipTo225: OpenTipTo225;
|
||||||
OperatingMode: OperatingMode;
|
OperatingMode: OperatingMode;
|
||||||
|
OptionBool: OptionBool;
|
||||||
Origin: Origin;
|
Origin: Origin;
|
||||||
OriginCaller: OriginCaller;
|
OriginCaller: OriginCaller;
|
||||||
OriginKindV0: OriginKindV0;
|
OriginKindV0: OriginKindV0;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -20,16 +20,16 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.14.1",
|
"version": "8.6.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.17.8",
|
"@babel/runtime": "^7.18.3",
|
||||||
"@polkadot/util": "^8.7.1"
|
"@polkadot/util": "^9.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/types": "7.14.1",
|
"@polkadot/types": "8.6.1",
|
||||||
"@polkadot/types-augment": "7.14.1",
|
"@polkadot/types-augment": "8.6.1",
|
||||||
"@polkadot/types-support": "7.14.1",
|
"@polkadot/types-support": "8.6.1",
|
||||||
"@polkadot/util-crypto": "^8.7.1"
|
"@polkadot/util-crypto": "^9.3.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user