Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d4b5df61e | ||
|
|
8bacac840f | ||
|
|
f75d32e198 | ||
|
|
0282cbac35 | ||
|
|
98506f9fea | ||
|
|
ecf6ad725b | ||
|
|
627e54473e | ||
|
|
8e56995556 | ||
|
|
45525b4288 | ||
|
|
6808eb1925 | ||
|
|
c301e7128d | ||
|
|
72a6f60498 | ||
|
|
ef6cbce6e5 | ||
|
|
50e9e9cb1e | ||
|
|
230cc2c437 | ||
|
|
511a345b23 | ||
|
|
5800ba5d91 | ||
|
|
d91b16f93d | ||
|
|
6d4027e116 | ||
|
|
e39a1ebac5 | ||
|
|
2ef672d4ec | ||
|
|
9a89ad37c9 | ||
|
|
7eb907b155 | ||
|
|
5fc142cf5c | ||
|
|
7571c6ae76 | ||
|
|
5a1598a389 | ||
|
|
b8451b4fe7 | ||
|
|
a97da748be | ||
|
|
34fead5c8a | ||
|
|
332b79a04a | ||
|
|
64384a6a04 | ||
|
|
6e6f46a188 | ||
|
|
ee09a2f4d6 | ||
|
|
62be4530f9 | ||
|
|
516289bcb7 | ||
|
|
b24e13f478 | ||
|
|
6fdd0d674e | ||
|
|
d85a096066 | ||
|
|
df68fde6cd | ||
|
|
1664c868df | ||
|
|
f5e89b7530 | ||
|
|
abdbd37215 | ||
|
|
354c4b8fd4 | ||
|
|
2ddacb67db | ||
|
|
602cff44a4 | ||
|
|
9ea866815b | ||
|
|
74e1442343 | ||
|
|
23069dad76 | ||
|
|
560bf096f7 | ||
|
|
ac1837cdfe | ||
|
|
0a9158befc | ||
|
|
9c4e984f7b | ||
|
|
c1187f4c7a | ||
|
|
e279d50224 | ||
|
|
f28908d28e | ||
|
|
570cf5fea4 | ||
|
|
7bf5bb7a3b | ||
|
|
756502771e | ||
|
|
977eb3f9ec | ||
|
|
909b3429f2 | ||
|
|
116b817696 | ||
|
|
c295d699e7 | ||
|
|
c8ab0e6959 | ||
|
|
cf52676025 | ||
|
|
935b176740 | ||
|
|
af9c4e0e4b | ||
|
|
17eccc0b7b | ||
|
|
1ba2413c86 | ||
|
|
ff69198b1a | ||
|
|
7b368a3f2d | ||
|
|
58020291ea | ||
|
|
fb1e428615 | ||
|
|
2164f80a3c | ||
|
|
59903dfba3 | ||
|
|
97ded7d284 | ||
|
|
772ab6e7d1 | ||
|
|
f7a3907519 | ||
|
|
891790b2b6 | ||
|
|
fac008f453 | ||
|
|
32fd91a221 | ||
|
|
472ab9acac | ||
|
|
393f528e89 | ||
|
|
4a9d5fd3c1 | ||
|
|
8e8bcd5f68 | ||
|
|
bd300791b5 | ||
|
|
cd2b3be962 | ||
|
|
87df83a2b9 | ||
|
|
697688eea5 | ||
|
|
9bbe095a5d | ||
|
|
51a6e50b09 | ||
|
|
d496ab2d1e | ||
|
|
3acca845f7 | ||
|
|
3a8b1c5683 | ||
|
|
94c5c025a9 | ||
|
|
a7c54d704b | ||
|
|
4640939908 | ||
|
|
6d07803003 | ||
|
|
13f7e853e8 | ||
|
|
fbd0e4212f | ||
|
|
ebb9f5c63b | ||
|
|
bffb72f29f | ||
|
|
68272615e7 | ||
|
|
190959dbd4 | ||
|
|
dbb427be5c | ||
|
|
9a18016701 | ||
|
|
bcda5caa39 | ||
|
|
b88cad4b87 | ||
|
|
c86807c0b8 | ||
|
|
771f3bc6fd | ||
|
|
58a18e1da5 | ||
|
|
b42669f864 | ||
|
|
0d2e938674 | ||
|
|
98b3b10bd9 | ||
|
|
34a1e0cbe2 | ||
|
|
44512c1d5f | ||
|
|
0440ce606a | ||
|
|
c05cb79005 | ||
|
|
ce39264b77 | ||
|
|
7c5f82404f | ||
|
|
7da9c5c20b | ||
|
|
ccd3b62632 | ||
|
|
fdf6ec9530 | ||
|
|
51b583d9ea | ||
|
|
6149b6ca76 | ||
|
|
083e0478c3 | ||
|
|
ee584f62a7 | ||
|
|
530909d773 | ||
|
|
d0c55a31b8 | ||
|
|
eafd4923fe | ||
|
|
264bcaf4ac | ||
|
|
a25c057ae7 | ||
|
|
29927129a1 | ||
|
|
4385320554 | ||
|
|
58eadc4e0f | ||
|
|
89e4cba131 | ||
|
|
afc4ebcd43 | ||
|
|
a93c4e16d3 | ||
|
|
dd0da859e4 | ||
|
|
7c75f7b923 | ||
|
|
f2e8b7702b | ||
|
|
dc01f6d4a0 | ||
|
|
f023b81b77 | ||
|
|
ebb47f0865 | ||
|
|
e23d44d3f5 | ||
|
|
0a444be04c | ||
|
|
1abb7085d6 | ||
|
|
bda5cda4bf | ||
|
|
fe7e313f21 | ||
|
|
31971b5d2c | ||
|
|
54efaa665d | ||
|
|
ddb435219d | ||
|
|
6ceb381ed0 | ||
|
|
6a82ab1efd | ||
|
|
8e3cef8dbc | ||
|
|
5fcfb1277d | ||
|
|
61ca15c143 | ||
|
|
0930a5e0dc | ||
|
|
03824f4600 | ||
|
|
1e785b50da | ||
|
|
daeb86a7af | ||
|
|
7461527448 | ||
|
|
322ac0861d | ||
|
|
52cd06917d | ||
|
|
767eb1fa15 | ||
|
|
60640b4c6c | ||
|
|
dfd45e866b | ||
|
|
dafa9ccc2c | ||
|
|
aeb76aea9a | ||
|
|
436e48aab2 | ||
|
|
0871458312 | ||
|
|
7edff67240 | ||
|
|
89a2ff2cda | ||
|
|
d0fbecb0c4 | ||
|
|
ed8802e605 | ||
|
|
791e76546a | ||
|
|
804b58139a | ||
|
|
ec746648c7 | ||
|
|
4cd8d5c60b | ||
|
|
df74330b67 | ||
|
|
ea36b6d486 | ||
|
|
a210a7314d | ||
|
|
2d5d8e6713 | ||
|
|
56a3d4ece8 | ||
|
|
3336f5530c | ||
|
|
f96b9c6d19 | ||
|
|
e7996e478a | ||
|
|
a695a486dd | ||
|
|
2a1ff7bb1e | ||
|
|
59b4e41cb6 | ||
|
|
194d65d31b | ||
|
|
10995b5696 | ||
|
|
73e717e665 | ||
|
|
f770f29422 | ||
|
|
a7ad18bd0c | ||
|
|
45d6c00816 | ||
|
|
4d02c78fe2 | ||
|
|
e73a347700 | ||
|
|
ea25189d2f | ||
|
|
99be561a88 | ||
|
|
871429b726 | ||
|
|
b041e7985c | ||
|
|
93ad99c5e9 | ||
|
|
3e41751130 | ||
|
|
697c25a541 | ||
|
|
05cf0cba8a | ||
|
|
d245bc69c9 | ||
|
|
c385ec2047 | ||
|
|
374e69f2fc | ||
|
|
12f2fbdaf5 | ||
|
|
e7e81c62c5 | ||
|
|
7e8f5f6bae | ||
|
|
90f7f375e6 | ||
|
|
e7beb2d46f |
@@ -0,0 +1 @@
|
|||||||
|
8.11.1
|
||||||
+2
-1
@@ -54,4 +54,5 @@
|
|||||||
8.0.2
|
8.0.2
|
||||||
8.3.2
|
8.3.2
|
||||||
8.4.2
|
8.4.2
|
||||||
8.6.2
|
8.6.2
|
||||||
|
8.8.2
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
For general support, howto, coding and bundling questions, please use the Substrate & Polkadot StackExchange at https://substrate.stackexchange.com/ and get other ecosystem developers involved. This issues in this repository are meant for the tracking of feature requests and bug reports.
|
||||||
|
|
||||||
|
While all issues are looked at non-bug and non-features would take quite a bit longer to get to and may yield less than satisfactory responses in this format.
|
||||||
|
|
||||||
|
Additionally, please ensure you have done a search on the existing and closed issues before logging a new request. This saves time on all sides.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
* **I'm submitting a ...**
|
||||||
|
|
||||||
|
<!--- Try and classify your actual report -->
|
||||||
|
|
||||||
|
- [ ] Bug report
|
||||||
|
- [ ] Feature request
|
||||||
|
- [ ] Support request (please bear the comments above in mind)
|
||||||
|
- [ ] Other
|
||||||
|
|
||||||
|
|
||||||
|
* **What is the current behavior and expected behavior?**
|
||||||
|
|
||||||
|
<!--- If you're describing a bug, tell us what should happen -->
|
||||||
|
<!--- If you're suggesting a change/improvement, tell us how it should work -->
|
||||||
|
|
||||||
|
|
||||||
|
* **What is the motivation for changing the behavior?**
|
||||||
|
|
||||||
|
<!--- Not obligatory, but suggest a motivation for the request -->
|
||||||
|
<!--- or ideas how to implement the addition or change -->
|
||||||
|
|
||||||
|
|
||||||
|
* **Please tell us about your environment:**
|
||||||
|
|
||||||
|
<!--- Include as many relevant details about the environment you experienced the issue in -->
|
||||||
|
<!--- Also snsure that you have tested against the latest stable releases if a bug -->
|
||||||
|
|
||||||
|
- Version:
|
||||||
|
- Environment:
|
||||||
|
|
||||||
|
- [ ] Node.js
|
||||||
|
- [ ] Browser
|
||||||
|
- [ ] Other (limited support for other environments available)
|
||||||
|
|
||||||
|
- Language:
|
||||||
|
|
||||||
|
- [ ] JavaScript
|
||||||
|
- [ ] TypeScript
|
||||||
|
- [ ] Other
|
||||||
@@ -2,6 +2,7 @@ _book/
|
|||||||
build/
|
build/
|
||||||
build-cjs/
|
build-cjs/
|
||||||
build-esm/
|
build-esm/
|
||||||
|
build-deno/
|
||||||
build-docs/
|
build-docs/
|
||||||
coverage/
|
coverage/
|
||||||
docs/.vuepress/dist/
|
docs/.vuepress/dist/
|
||||||
|
|||||||
@@ -1,5 +1,98 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## 8.11.1 Jul 2, 2022
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Adjust `api.{tx, query, ...}` with no external side-effects (Thanks to https://github.com/btwiuse)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Support for `state_call` definitions via API config (exposed on `api.call.*`)
|
||||||
|
- Base type definitions for `state_call` from Substrate, Polkadot & Orml
|
||||||
|
- Align runtime types with latest Substrate master
|
||||||
|
- Type generation for runtime call definitions (internal & external)
|
||||||
|
- Update to latest Substrate, Polkadot & Kusama metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 8.10.1 Jun 26, 2022
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Bump `@substrate/connect` to 0.7.7 (Thanks to https://github.com/wirednkod)
|
||||||
|
- Support `feeHistory` & `maxPriorityFeePerGas` eth RPCs (Thanks to https://github.com/crystalin)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Align `BeefyPayload` with Substrate master
|
||||||
|
- Use `static get [Symbol.species] ()` for `Array` & `Uint8Array` types
|
||||||
|
- Add support for (optional, non-runtime recommended) `f32` & `f64` types
|
||||||
|
- Add future-use `AbstrateBigInt` wrapper extension
|
||||||
|
- Update Codec-internal performance tests
|
||||||
|
- Add Westend 9250 upgrade block
|
||||||
|
- Update to latest Substrate, Polkadot & Kusama metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 8.9.1 Jun 19, 2022
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Update `@substrate/connect` to 0.7.6 (Thanks to https://github.com/tomaka)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Deupe all internal type property getters
|
||||||
|
- Adjust `@polkadot/types-codec` asserts
|
||||||
|
- Rename `Base` type to `AbstractBase` (reflecting usage)
|
||||||
|
- Alias `blockHash` on `rpc.engine.createBlock` return
|
||||||
|
- Instantiate `Compact/UInt/Int` with `number` when passed
|
||||||
|
- Adjust name extraction in `PortableRegistry` (maintainability)
|
||||||
|
- Adjust string type path extraction (maintainability)
|
||||||
|
- Add Kusama 9230 upgrade block
|
||||||
|
- Update to latest Substrate metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 8.8.2 Jun 14, 2022
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Align historic `DispatchErrorModule` with `U8` variant
|
||||||
|
- Extend lookup type name generation when conflicts arrise
|
||||||
|
- Update to latest Substrate metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 8.8.1 Jun 12, 2022
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Ensure typegen disconnects from WS endpoint (Thanks to https://github.com/rflechtner)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Ensure storage `Option<Option<Type>>` are correctly handled
|
||||||
|
- Cater for named event fields (expose on event data as available)
|
||||||
|
- Expose (partial) `runtimeVersion` on `api.at` interfaces
|
||||||
|
- Add aliases for `DispatchError{U8, U8a}` (default to new `U8a` variant)
|
||||||
|
- Align `DispatchError` definition with latest Substrate
|
||||||
|
- Adjust contracts RPC definitions with `DispatchError` return
|
||||||
|
- Ensure `blockHash` is passed through with `era` sign options
|
||||||
|
- Workaround for default calls on chains with non-standard indexes
|
||||||
|
- Optimization for value returns on merged queries
|
||||||
|
- Update `derive.bagsList` to detect `voterList` pallet
|
||||||
|
- Add Polkadot 9200/9220 & Westend 9230 upgrade blocks
|
||||||
|
|
||||||
|
|
||||||
|
## 8.7.1 Jun 4, 2022
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Add internal merge of single storage queries
|
||||||
|
- Expose provider stats on API intrerface via `.stats`
|
||||||
|
- Adjust flag extraction for latest phragmen types
|
||||||
|
- Support for `Range` in typegen for `Enum`
|
||||||
|
- Add Kusama 9220 upgrade block
|
||||||
|
|
||||||
|
|
||||||
## 8.6.2 May 30, 2022
|
## 8.6.2 May 30, 2022
|
||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|||||||
+6
-2
@@ -1,4 +1,4 @@
|
|||||||
2985 Jaco 8.6.2 (#4876)
|
3087 Jaco 8.11.1 (#5018)
|
||||||
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)
|
||||||
@@ -9,12 +9,12 @@
|
|||||||
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)
|
||||||
|
5 Nikos Kontakis Bump substrate connect to 0.7.7 (#4962)
|
||||||
4 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
|
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 André Silva add support for ValidationCodeHash (#3640)
|
3 André Silva add support for ValidationCodeHash (#3640)
|
||||||
@@ -43,8 +43,10 @@
|
|||||||
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 Zannis Kalampoukis fix: Typegen handles structs and vectors of structs without erroring (#4743)
|
||||||
2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594)
|
2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594)
|
||||||
|
1 Alan Sapede Adds Eth feeHistory & maxPriorityFeePerGas rpc (#4956)
|
||||||
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)
|
||||||
|
1 Btwiuse Arch Add side effect check workaround (#4994) (#5009)
|
||||||
1 chriswmercer little readme tweak (#279)
|
1 chriswmercer little readme tweak (#279)
|
||||||
1 codingsh #2182 - add: search for docs (#2232)
|
1 codingsh #2182 - add: search for docs (#2232)
|
||||||
1 coolcorexix Investigate 4559 v2 (#4608)
|
1 coolcorexix Investigate 4559 v2 (#4608)
|
||||||
@@ -86,8 +88,10 @@
|
|||||||
1 Oleksandr Mykhailenko Add more complex namespaced contracts & test cases for them (#4472)
|
1 Oleksandr Mykhailenko Add more complex namespaced contracts & test cases for them (#4472)
|
||||||
1 Paul M Fox Basic BTreeMaps codec support (#1474)
|
1 Paul M Fox Basic BTreeMaps codec support (#1474)
|
||||||
1 philipstanislaus Update types for centrifuge chain v1.2.0 (#2424)
|
1 philipstanislaus Update types for centrifuge chain v1.2.0 (#2424)
|
||||||
|
1 Pierre Krieger Update substrate/connect to 0.7.6 (#4940)
|
||||||
1 qiuhao update DeriveCustom type (#2581)
|
1 qiuhao update DeriveCustom type (#2581)
|
||||||
1 r0t0r-r0t0r Fix memory leak on raw rpc call (#4505)
|
1 r0t0r-r0t0r Fix memory leak on raw rpc call (#4505)
|
||||||
|
1 Raphael Flechtner fix: typegen disconnect ws on success (#4901)
|
||||||
1 Rocco Musolino remove broken link (#2671)
|
1 Rocco Musolino remove broken link (#2671)
|
||||||
1 satellitex Add BTreeSet<V> Codec (#1639)
|
1 satellitex Add BTreeSet<V> Codec (#1639)
|
||||||
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)
|
||||||
|
|||||||
+7
-7
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"version": "8.6.2",
|
"version": "8.11.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.18.2",
|
"@babel/core": "^7.18.6",
|
||||||
"@babel/register": "^7.17.7",
|
"@babel/register": "^7.18.6",
|
||||||
"@babel/runtime": "^7.18.3",
|
"@babel/runtime": "^7.18.6",
|
||||||
"@polkadot/dev": "^0.66.32",
|
"@polkadot/dev": "^0.67.46",
|
||||||
"@polkadot/typegen": "workspace:packages/typegen",
|
"@polkadot/typegen": "workspace:packages/typegen",
|
||||||
"@types/jest": "^27.5.1",
|
"@types/jest": "^28.1.4",
|
||||||
"copyfiles": "^2.4.1"
|
"copyfiles": "^2.4.1"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"typescript": "^4.7.2"
|
"typescript": "^4.7.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,18 +20,18 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "8.6.2",
|
"version": "8.11.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.3",
|
"@babel/runtime": "^7.18.6",
|
||||||
"@polkadot/api-base": "8.6.2",
|
"@polkadot/api-base": "8.11.1",
|
||||||
"@polkadot/rpc-augment": "8.6.2",
|
"@polkadot/rpc-augment": "8.11.1",
|
||||||
"@polkadot/types": "8.6.2",
|
"@polkadot/types": "8.11.1",
|
||||||
"@polkadot/types-augment": "8.6.2",
|
"@polkadot/types-augment": "8.11.1",
|
||||||
"@polkadot/types-codec": "8.6.2",
|
"@polkadot/types-codec": "8.11.1",
|
||||||
"@polkadot/util": "^9.3.1"
|
"@polkadot/util": "^9.7.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/types-support": "8.6.2"
|
"@polkadot/types-support": "8.11.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -497,6 +497,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* these are removed, either through `unvote` or `reap_vote`.
|
* these are removed, either through `unvote` or `reap_vote`.
|
||||||
**/
|
**/
|
||||||
VotesExist: AugmentedError<ApiType>;
|
VotesExist: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Voting period too low
|
||||||
|
**/
|
||||||
|
VotingPeriodLow: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Invalid upper bound.
|
* Invalid upper bound.
|
||||||
**/
|
**/
|
||||||
@@ -895,10 +899,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* pool at a time.
|
* pool at a time.
|
||||||
**/
|
**/
|
||||||
AccountBelongsToOtherPool: AugmentedError<ApiType>;
|
AccountBelongsToOtherPool: AugmentedError<ApiType>;
|
||||||
/**
|
|
||||||
* The member is already unbonding in this era.
|
|
||||||
**/
|
|
||||||
AlreadyUnbonding: AugmentedError<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* The pools state cannot be changed.
|
* The pools state cannot be changed.
|
||||||
**/
|
**/
|
||||||
@@ -911,7 +911,7 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Some error occurred that should never happen. This should be reported to the
|
* Some error occurred that should never happen. This should be reported to the
|
||||||
* maintainers.
|
* maintainers.
|
||||||
**/
|
**/
|
||||||
DefensiveError: AugmentedError<ApiType>;
|
Defensive: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The caller does not have adequate permissions.
|
* The caller does not have adequate permissions.
|
||||||
**/
|
**/
|
||||||
@@ -921,10 +921,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* anymore to, for example, collect rewards).
|
* anymore to, for example, collect rewards).
|
||||||
**/
|
**/
|
||||||
FullyUnbonding: AugmentedError<ApiType>;
|
FullyUnbonding: AugmentedError<ApiType>;
|
||||||
/**
|
|
||||||
* The pool has insufficient balance to bond as a nominator.
|
|
||||||
**/
|
|
||||||
InsufficientBond: AugmentedError<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Too many members in the pool or system.
|
* Too many members in the pool or system.
|
||||||
**/
|
**/
|
||||||
@@ -1855,6 +1851,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Not a member.
|
* Not a member.
|
||||||
**/
|
**/
|
||||||
NotMember: AugmentedError<ApiType>;
|
NotMember: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Too many members.
|
||||||
|
**/
|
||||||
|
TooManyMembers: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Generic error
|
* Generic error
|
||||||
**/
|
**/
|
||||||
@@ -1891,6 +1891,11 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
treasury: {
|
treasury: {
|
||||||
|
/**
|
||||||
|
* The spend origin is valid but the amount it is allowed to spend is lower than the
|
||||||
|
* amount to be spent.
|
||||||
|
**/
|
||||||
|
InsufficientPermission: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Proposer's balance is too low.
|
* Proposer's balance is too low.
|
||||||
**/
|
**/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -7,4 +7,5 @@ import './errors';
|
|||||||
import './events';
|
import './events';
|
||||||
import './query';
|
import './query';
|
||||||
import './registry';
|
import './registry';
|
||||||
|
import './runtime';
|
||||||
import './tx';
|
import './tx';
|
||||||
|
|||||||
@@ -849,6 +849,9 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
*
|
*
|
||||||
* This is the amount that the depositor must put as their initial stake in the pool, as an
|
* This is the amount that the depositor must put as their initial stake in the pool, as an
|
||||||
* indication of "skin in the game".
|
* indication of "skin in the game".
|
||||||
|
*
|
||||||
|
* This is the value that will always exist in the staking ledger of the pool bonded account
|
||||||
|
* while all other accounts leave.
|
||||||
**/
|
**/
|
||||||
minCreateBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
minCreateBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,334 @@
|
|||||||
|
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import type { ApiTypes } from '@polkadot/api-base/types';
|
||||||
|
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
|
||||||
|
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||||
|
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
|
||||||
|
import type { ValidatorSet } from '@polkadot/types/interfaces/beefy';
|
||||||
|
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
|
||||||
|
import type { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||||
|
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||||
|
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||||
|
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
|
||||||
|
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||||
|
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||||
|
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
|
||||||
|
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||||
|
import type { AccountId, Block, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||||
|
import type { SessionIndex } from '@polkadot/types/interfaces/session';
|
||||||
|
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||||
|
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
||||||
|
import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
|
||||||
|
import type { IExtrinsic, Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
|
declare module '@polkadot/api-base/types/calls' {
|
||||||
|
export interface AugmentedCalls<ApiType extends ApiTypes> {
|
||||||
|
/** 0xbc9d89904f5b923f/1 */
|
||||||
|
accountNonceApi: {
|
||||||
|
/**
|
||||||
|
* The API to query account nonce (aka transaction index)
|
||||||
|
**/
|
||||||
|
accountNonce: AugmentedCall<ApiType, (accountId: AccountId | string | Uint8Array) => Observable<Index>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0x687ad44ad37f03c2/1 */
|
||||||
|
authorityDiscoveryApi: {
|
||||||
|
/**
|
||||||
|
* Retrieve authority identifiers of the current and next authority set.
|
||||||
|
**/
|
||||||
|
authorities: AugmentedCall<ApiType, () => Observable<Vec<AuthorityId>>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xcbca25e39f142387/2 */
|
||||||
|
babeApi: {
|
||||||
|
/**
|
||||||
|
* Return the genesis configuration for BABE. The configuration is only read on genesis.
|
||||||
|
**/
|
||||||
|
configuration: AugmentedCall<ApiType, () => Observable<BabeGenesisConfiguration>>;
|
||||||
|
/**
|
||||||
|
* Returns information regarding the current epoch.
|
||||||
|
**/
|
||||||
|
currentEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
|
||||||
|
/**
|
||||||
|
* Returns the slot that started the current epoch.
|
||||||
|
**/
|
||||||
|
currentEpochStart: AugmentedCall<ApiType, () => Observable<Slot>>;
|
||||||
|
/**
|
||||||
|
* Generates a proof of key ownership for the given authority in the current epoch.
|
||||||
|
**/
|
||||||
|
generateKeyOwnershipProof: AugmentedCall<ApiType, (slot: Slot | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||||
|
/**
|
||||||
|
* Returns information regarding the next epoch (which was already previously announced).
|
||||||
|
**/
|
||||||
|
nextEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
|
||||||
|
/**
|
||||||
|
* Submits an unsigned extrinsic to report an equivocation.
|
||||||
|
**/
|
||||||
|
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: BabeEquivocationProof | { offender?: any; slotNumber?: any; firstHeader?: any; secondHeader?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0x49eaaf1b548a0cb0/1 */
|
||||||
|
beefyApi: {
|
||||||
|
/**
|
||||||
|
* Return the current active BEEFY validator set
|
||||||
|
**/
|
||||||
|
validatorSet: AugmentedCall<ApiType, () => Observable<Option<ValidatorSet>>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0x40fe3ad401f8959a/6 */
|
||||||
|
blockBuilder: {
|
||||||
|
/**
|
||||||
|
* Apply the given extrinsic.
|
||||||
|
**/
|
||||||
|
applyExtrinsic: AugmentedCall<ApiType, (extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<ApplyExtrinsicResult>>;
|
||||||
|
/**
|
||||||
|
* Check that the inherents are valid.
|
||||||
|
**/
|
||||||
|
checkInherents: AugmentedCall<ApiType, (block: Block | { header?: any; extrinsics?: any } | string | Uint8Array, data: InherentData | { data?: any } | string | Uint8Array) => Observable<CheckInherentsResult>>;
|
||||||
|
/**
|
||||||
|
* Finish the current block.
|
||||||
|
**/
|
||||||
|
finalizeBlock: AugmentedCall<ApiType, () => Observable<Header>>;
|
||||||
|
/**
|
||||||
|
* Generate inherent extrinsics.
|
||||||
|
**/
|
||||||
|
inherentExtrinsics: AugmentedCall<ApiType, (inherent: InherentData | { data?: any } | string | Uint8Array) => Observable<Vec<Extrinsic>>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xdf6acb689907609b/4 */
|
||||||
|
core: {
|
||||||
|
/**
|
||||||
|
* Execute the given block.
|
||||||
|
**/
|
||||||
|
executeBlock: AugmentedCall<ApiType, (block: Block | { header?: any; extrinsics?: any } | string | Uint8Array) => Observable<Null>>;
|
||||||
|
/**
|
||||||
|
* Initialize a block with the given header.
|
||||||
|
**/
|
||||||
|
initializeBlock: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||||
|
/**
|
||||||
|
* Returns the version of the runtime.
|
||||||
|
**/
|
||||||
|
version: AugmentedCall<ApiType, () => Observable<RuntimeVersion>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xed99c5acb25eedf5/3 */
|
||||||
|
grandpaApi: {
|
||||||
|
/**
|
||||||
|
* Get current GRANDPA authority set id.
|
||||||
|
**/
|
||||||
|
currentSetId: AugmentedCall<ApiType, () => Observable<SetId>>;
|
||||||
|
/**
|
||||||
|
* Generates a proof of key ownership for the given authority in the given set.
|
||||||
|
**/
|
||||||
|
generateKeyOwnershipProof: AugmentedCall<ApiType, (setId: SetId | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||||
|
/**
|
||||||
|
* Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed.
|
||||||
|
**/
|
||||||
|
grandpaAuthorities: AugmentedCall<ApiType, () => Observable<AuthorityList>>;
|
||||||
|
/**
|
||||||
|
* Submits an unsigned extrinsic to report an equivocation.
|
||||||
|
**/
|
||||||
|
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: GrandpaEquivocationProof | { setId?: any; equivocation?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0x37e397fc7c91f5e4/1 */
|
||||||
|
metadata: {
|
||||||
|
/**
|
||||||
|
* Returns the metadata of a runtime
|
||||||
|
**/
|
||||||
|
metadata: AugmentedCall<ApiType, () => Observable<OpaqueMetadata>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0x91d5df18b0d2cf58/1 */
|
||||||
|
mmrApi: {
|
||||||
|
/**
|
||||||
|
* Generate MMR proof for a series of leaves under given indices.
|
||||||
|
**/
|
||||||
|
generateBatchProof: AugmentedCall<ApiType, (leafIndices: Vec<MmrLeafIndex> | (MmrLeafIndex | AnyNumber | Uint8Array)[]) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Generate MMR proof for a leaf under given index.
|
||||||
|
**/
|
||||||
|
generateProof: AugmentedCall<ApiType, (leafIndex: MmrLeafIndex | AnyNumber | Uint8Array) => Observable<Result<ITuple<[MmrEncodableOpaqueLeaf, MmrProof]>, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Return the on-chain MMR root hash.
|
||||||
|
**/
|
||||||
|
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Verify MMR proof against on-chain MMR for a batch of leaves.
|
||||||
|
**/
|
||||||
|
verifyBatchProof: AugmentedCall<ApiType, (leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Verify MMR proof against given root hash or a batch of leaves.
|
||||||
|
**/
|
||||||
|
verifyBatchProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Verify MMR proof against on-chain MMR.
|
||||||
|
**/
|
||||||
|
verifyProof: AugmentedCall<ApiType, (leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Verify MMR proof against given root hash.
|
||||||
|
**/
|
||||||
|
verifyProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xf78b278be53f454c/2 */
|
||||||
|
offchainWorkerApi: {
|
||||||
|
/**
|
||||||
|
* Starts the off-chain task for given block header.
|
||||||
|
**/
|
||||||
|
offchainWorker: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xaf2c0297a23e6d3d/2 */
|
||||||
|
parachainHost: {
|
||||||
|
/**
|
||||||
|
* Returns the persisted validation data for the given `ParaId` along with the corresponding validation code hash.
|
||||||
|
**/
|
||||||
|
assumedValidationData: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, hash: Hash | string | Uint8Array) => Observable<Option<ITuple<[PersistedValidationData, ValidationCodeHash]>>>>;
|
||||||
|
/**
|
||||||
|
* Yields information on all availability cores as relevant to the child block.
|
||||||
|
**/
|
||||||
|
availabilityCores: AugmentedCall<ApiType, () => Observable<Vec<CoreState>>>;
|
||||||
|
/**
|
||||||
|
* Get a vector of events concerning candidates that occurred within a block.
|
||||||
|
**/
|
||||||
|
candidateEvents: AugmentedCall<ApiType, () => Observable<Vec<CandidateEvent>>>;
|
||||||
|
/**
|
||||||
|
* Get the receipt of a candidate pending availability.
|
||||||
|
**/
|
||||||
|
candidatePendingAvailability: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Option<CommittedCandidateReceipt>>>;
|
||||||
|
/**
|
||||||
|
* Checks if the given validation outputs pass the acceptance criteria.
|
||||||
|
**/
|
||||||
|
checkValidationOutputs: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, outputs: CandidateCommitments | { upwardMessages?: any; horizontalMessages?: any; newValidationCode?: any; headData?: any; processedDownwardMessages?: any; hrmpWatermark?: any } | string | Uint8Array) => Observable<bool>>;
|
||||||
|
/**
|
||||||
|
* Get all the pending inbound messages in the downward message queue for a para.
|
||||||
|
**/
|
||||||
|
dmqContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundDownwardMessage>>>;
|
||||||
|
/**
|
||||||
|
* Get the contents of all channels addressed to the given recipient.
|
||||||
|
**/
|
||||||
|
inboundHrmpChannelsContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundHrmpMessage>>>;
|
||||||
|
/**
|
||||||
|
* Scrape dispute relevant from on-chain, backing votes and resolved disputes.
|
||||||
|
**/
|
||||||
|
onChainVotes: AugmentedCall<ApiType, () => Observable<Option<ScrapedOnChainVotes>>>;
|
||||||
|
/**
|
||||||
|
* Yields the persisted validation data for the given `ParaId` along with an assumption that should be used if the para currently occupies a core.
|
||||||
|
**/
|
||||||
|
persistedValidationData: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<PersistedValidationData>>>;
|
||||||
|
/**
|
||||||
|
* Returns code hashes of PVFs that require pre-checking by validators in the active set.
|
||||||
|
**/
|
||||||
|
pvfsRequirePrecheck: AugmentedCall<ApiType, () => Observable<Vec<ValidationCodeHash>>>;
|
||||||
|
/**
|
||||||
|
* Returns the session index expected at a child of the block.
|
||||||
|
**/
|
||||||
|
sessionIndexForChild: AugmentedCall<ApiType, () => Observable<SessionIndex>>;
|
||||||
|
/**
|
||||||
|
* Get the session info for the given session, if stored.
|
||||||
|
**/
|
||||||
|
sessionInfo: AugmentedCall<ApiType, (index: SessionIndex | AnyNumber | Uint8Array) => Observable<Option<SessionInfo>>>;
|
||||||
|
/**
|
||||||
|
* Submits a PVF pre-checking statement into the transaction pool.
|
||||||
|
**/
|
||||||
|
submitPvfCheckStatement: AugmentedCall<ApiType, (stmt: PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: ValidatorSignature | string | Uint8Array) => Observable<Null>>;
|
||||||
|
/**
|
||||||
|
* Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.
|
||||||
|
**/
|
||||||
|
validationCode: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<ValidationCode>>;
|
||||||
|
/**
|
||||||
|
* Get the validation code from its hash.
|
||||||
|
**/
|
||||||
|
validationCodeByHash: AugmentedCall<ApiType, (hash: ValidationCodeHash | string | Uint8Array) => Observable<Option<ValidationCode>>>;
|
||||||
|
/**
|
||||||
|
* Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.
|
||||||
|
**/
|
||||||
|
validationCodeHash: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<ValidationCodeHash>>>;
|
||||||
|
/**
|
||||||
|
* Returns the validator groups and rotation info localized based on the hypothetical child of a block whose state this is invoked on
|
||||||
|
**/
|
||||||
|
validatorGroups: AugmentedCall<ApiType, () => Observable<ITuple<[Vec<Vec<ParaValidatorIndex>>, GroupRotationInfo]>>>;
|
||||||
|
/**
|
||||||
|
* Get the current validators.
|
||||||
|
**/
|
||||||
|
validators: AugmentedCall<ApiType, () => Observable<Vec<ValidatorId>>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xab3c0572291feb8b/1 */
|
||||||
|
sessionKeys: {
|
||||||
|
/**
|
||||||
|
* Decode the given public session keys.
|
||||||
|
**/
|
||||||
|
decodeSessionKeys: AugmentedCall<ApiType, (encoded: Bytes | string | Uint8Array) => Observable<Option<Vec<ITuple<[Bytes, KeyTypeId]>>>>>;
|
||||||
|
/**
|
||||||
|
* Generate a set of session keys with optionally using the given seed.
|
||||||
|
**/
|
||||||
|
generateSessionKeys: AugmentedCall<ApiType, (seed: Option<Bytes> | null | object | string | Uint8Array) => Observable<Bytes>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xd2bc9897eed08f15/3 */
|
||||||
|
taggedTransactionQueue: {
|
||||||
|
/**
|
||||||
|
* Validate the transaction.
|
||||||
|
**/
|
||||||
|
validateTransaction: AugmentedCall<ApiType, (source: TransactionSource | 'InBlock' | 'Local' | 'External' | number | Uint8Array, tx: Extrinsic | IExtrinsic | string | Uint8Array, blockHash: BlockHash | string | Uint8Array) => Observable<TransactionValidity>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0x37c8bb1350a9a2a8/1 */
|
||||||
|
transactionPaymentApi: {
|
||||||
|
/**
|
||||||
|
* The transaction fee details
|
||||||
|
**/
|
||||||
|
queryFeeDetails: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
|
||||||
|
/**
|
||||||
|
* The transaction info
|
||||||
|
**/
|
||||||
|
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
} // AugmentedCalls
|
||||||
|
} // declare module
|
||||||
@@ -1139,8 +1139,9 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* The dispatch of this call must be `FastTrackOrigin`.
|
* The dispatch of this call must be `FastTrackOrigin`.
|
||||||
*
|
*
|
||||||
* - `proposal_hash`: The hash of the current external proposal.
|
* - `proposal_hash`: The hash of the current external proposal.
|
||||||
* - `voting_period`: The period that is allowed for voting on this proposal. Increased to
|
* - `voting_period`: The period that is allowed for voting on this proposal.
|
||||||
* `FastTrackVotingPeriod` if too low.
|
* Must be always greater than zero.
|
||||||
|
* For `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`.
|
||||||
* - `delay`: The number of block after voting has ended in approval and this should be
|
* - `delay`: The number of block after voting has ended in approval and this should be
|
||||||
* enacted. This doesn't have a minimum amount.
|
* enacted. This doesn't have a minimum amount.
|
||||||
*
|
*
|
||||||
@@ -1452,12 +1453,17 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
};
|
};
|
||||||
grandpa: {
|
grandpa: {
|
||||||
/**
|
/**
|
||||||
* Note that the current authority set of the GRANDPA finality gadget has
|
* Note that the current authority set of the GRANDPA finality gadget has stalled.
|
||||||
* stalled. This will trigger a forced authority set change at the beginning
|
*
|
||||||
* of the next session, to be enacted `delay` blocks after that. The delay
|
* This will trigger a forced authority set change at the beginning of the next session, to
|
||||||
* should be high enough to safely assume that the block signalling the
|
* be enacted `delay` blocks after that. The `delay` should be high enough to safely assume
|
||||||
* forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters
|
* that the block signalling the forced change will not be re-orged e.g. 1000 blocks.
|
||||||
* will start the new authority set using the given finalized block as base.
|
* The block production rate (which may be slowed down because of finality lagging) should
|
||||||
|
* be taken into account when choosing the `delay`. The GRANDPA voters based on the new
|
||||||
|
* authority will start voting on top of `best_finalized_block_number` for new finalized
|
||||||
|
* blocks. `best_finalized_block_number` should be the highest of the latest finalized
|
||||||
|
* block of all validators of the new authority set.
|
||||||
|
*
|
||||||
* Only callable by root.
|
* Only callable by root.
|
||||||
**/
|
**/
|
||||||
noteStalled: AugmentedSubmittable<(delay: u32 | AnyNumber | Uint8Array, bestFinalizedBlockNumber: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
|
noteStalled: AugmentedSubmittable<(delay: u32 | AnyNumber | Uint8Array, bestFinalizedBlockNumber: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
|
||||||
@@ -2117,6 +2123,16 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* accumulated rewards, see [`BondExtra`].
|
* accumulated rewards, see [`BondExtra`].
|
||||||
**/
|
**/
|
||||||
bondExtra: AugmentedSubmittable<(extra: PalletNominationPoolsBondExtra | { FreeBalance: any } | { Rewards: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsBondExtra]>;
|
bondExtra: AugmentedSubmittable<(extra: PalletNominationPoolsBondExtra | { FreeBalance: any } | { Rewards: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsBondExtra]>;
|
||||||
|
/**
|
||||||
|
* Chill on behalf of the pool.
|
||||||
|
*
|
||||||
|
* The dispatch origin of this call must be signed by the pool nominator or the pool
|
||||||
|
* root role, same as [`Pallet::nominate`].
|
||||||
|
*
|
||||||
|
* This directly forward the call to the staking pallet, on behalf of the pool bonded
|
||||||
|
* account.
|
||||||
|
**/
|
||||||
|
chill: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||||
/**
|
/**
|
||||||
* A bonded member can use this to claim their payout based on the rewards that the pool
|
* 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
|
* has accumulated since their last claimed payout (OR since joining if this is there first
|
||||||
@@ -2159,6 +2175,15 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* * Only a pool with [`PoolState::Open`] can be joined
|
* * 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]>;
|
join: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, poolId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, u32]>;
|
||||||
|
/**
|
||||||
|
* Nominate on behalf of the pool.
|
||||||
|
*
|
||||||
|
* The dispatch origin of this call must be signed by the pool nominator or the pool
|
||||||
|
* root role.
|
||||||
|
*
|
||||||
|
* This directly forward the call to the staking pallet, on behalf of the pool bonded
|
||||||
|
* account.
|
||||||
|
**/
|
||||||
nominate: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, validators: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<AccountId32>]>;
|
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.
|
* Call `withdraw_unbonded` for the pools account. This call can be made by any account.
|
||||||
@@ -2182,12 +2207,24 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`].
|
* * `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]>;
|
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]>;
|
||||||
|
/**
|
||||||
|
* Set a new metadata for the pool.
|
||||||
|
*
|
||||||
|
* The dispatch origin of this call must be signed by the state toggler, or the root role
|
||||||
|
* of the pool.
|
||||||
|
**/
|
||||||
setMetadata: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, metadata: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
|
setMetadata: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, metadata: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
|
||||||
|
/**
|
||||||
|
* Set a new state for the pool.
|
||||||
|
*
|
||||||
|
* The dispatch origin of this call must be signed by the state toggler, or the root role
|
||||||
|
* of the pool.
|
||||||
|
**/
|
||||||
setState: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, state: PalletNominationPoolsPoolState | 'Open' | 'Blocked' | 'Destroying' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsPoolState]>;
|
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
|
* 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
|
* implicitly collects the rewards one last time, since not doing so would mean some
|
||||||
* rewards would go forfeited.
|
* rewards would be forfeited.
|
||||||
*
|
*
|
||||||
* Under certain conditions, this call can be dispatched permissionlessly (i.e. by any
|
* Under certain conditions, this call can be dispatched permissionlessly (i.e. by any
|
||||||
* account).
|
* account).
|
||||||
@@ -4209,6 +4246,17 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* exist altogether, thus there is no way it would have been approved in the first place.
|
* 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>]>;
|
removeApproval: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
|
||||||
|
/**
|
||||||
|
* Propose and approve a spend of treasury funds.
|
||||||
|
*
|
||||||
|
* - `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`.
|
||||||
|
* - `amount`: The amount to be transferred from the treasury to the `beneficiary`.
|
||||||
|
* - `beneficiary`: The destination account for the transfer.
|
||||||
|
*
|
||||||
|
* NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the
|
||||||
|
* beneficiary.
|
||||||
|
**/
|
||||||
|
spend: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, beneficiary: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress]>;
|
||||||
/**
|
/**
|
||||||
* Generic tx
|
* Generic tx
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
export * from './index';
|
||||||
@@ -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: '8.6.2' };
|
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '8.11.1' };
|
||||||
|
|||||||
@@ -497,6 +497,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* these are removed, either through `unvote` or `reap_vote`.
|
* these are removed, either through `unvote` or `reap_vote`.
|
||||||
**/
|
**/
|
||||||
VotesExist: AugmentedError<ApiType>;
|
VotesExist: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Voting period too low
|
||||||
|
**/
|
||||||
|
VotingPeriodLow: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Invalid upper bound.
|
* Invalid upper bound.
|
||||||
**/
|
**/
|
||||||
@@ -1557,6 +1561,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Not a member.
|
* Not a member.
|
||||||
**/
|
**/
|
||||||
NotMember: AugmentedError<ApiType>;
|
NotMember: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Too many members.
|
||||||
|
**/
|
||||||
|
TooManyMembers: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Generic error
|
* Generic error
|
||||||
**/
|
**/
|
||||||
@@ -1593,6 +1601,11 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
treasury: {
|
treasury: {
|
||||||
|
/**
|
||||||
|
* The spend origin is valid but the amount it is allowed to spend is lower than the
|
||||||
|
* amount to be spent.
|
||||||
|
**/
|
||||||
|
InsufficientPermission: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Proposer's balance is too low.
|
* Proposer's balance is too low.
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -14,34 +14,34 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* An auction ended. All funds become unreserved.
|
* An auction ended. All funds become unreserved.
|
||||||
**/
|
**/
|
||||||
AuctionClosed: AugmentedEvent<ApiType, [u32]>;
|
AuctionClosed: AugmentedEvent<ApiType, [auctionIndex: u32], { auctionIndex: 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.
|
||||||
**/
|
**/
|
||||||
AuctionStarted: AugmentedEvent<ApiType, [u32, u32, u32]>;
|
AuctionStarted: AugmentedEvent<ApiType, [auctionIndex: u32, leasePeriod: u32, ending: u32], { auctionIndex: u32, leasePeriod: u32, ending: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A new bid has been accepted as the current winner.
|
* A new bid has been accepted as the current winner.
|
||||||
**/
|
**/
|
||||||
BidAccepted: AugmentedEvent<ApiType, [AccountId32, u32, u128, u32, u32]>;
|
BidAccepted: AugmentedEvent<ApiType, [bidder: AccountId32, paraId: u32, amount: u128, firstSlot: u32, lastSlot: u32], { bidder: AccountId32, paraId: u32, amount: u128, firstSlot: u32, lastSlot: 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.
|
||||||
**/
|
**/
|
||||||
ReserveConfiscated: AugmentedEvent<ApiType, [u32, AccountId32, u128]>;
|
ReserveConfiscated: AugmentedEvent<ApiType, [paraId: u32, leaser: AccountId32, amount: u128], { paraId: u32, leaser: AccountId32, amount: 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.
|
* Second is the total.
|
||||||
**/
|
**/
|
||||||
Reserved: AugmentedEvent<ApiType, [AccountId32, u128, u128]>;
|
Reserved: AugmentedEvent<ApiType, [bidder: AccountId32, extraReserved: u128, totalAmount: u128], { bidder: AccountId32, extraReserved: u128, totalAmount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Funds were unreserved since bidder is no longer active. `[bidder, amount]`
|
* Funds were unreserved since bidder is no longer active. `[bidder, amount]`
|
||||||
**/
|
**/
|
||||||
Unreserved: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Unreserved: AugmentedEvent<ApiType, [bidder: AccountId32, amount: u128], { bidder: AccountId32, amount: 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.
|
||||||
**/
|
**/
|
||||||
WinningOffset: AugmentedEvent<ApiType, [u32, u32]>;
|
WinningOffset: AugmentedEvent<ApiType, [auctionIndex: u32, blockNumber: u32], { auctionIndex: u32, blockNumber: u32 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -51,45 +51,45 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* A balance was set by root.
|
* A balance was set by root.
|
||||||
**/
|
**/
|
||||||
BalanceSet: AugmentedEvent<ApiType, [AccountId32, u128, u128]>;
|
BalanceSet: AugmentedEvent<ApiType, [who: AccountId32, free: u128, reserved: u128], { who: AccountId32, free: u128, reserved: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Some amount was deposited (e.g. for transaction fees).
|
* Some amount was deposited (e.g. for transaction fees).
|
||||||
**/
|
**/
|
||||||
Deposit: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Deposit: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* An account was removed whose balance was non-zero but below ExistentialDeposit,
|
* An account was removed whose balance was non-zero but below ExistentialDeposit,
|
||||||
* resulting in an outright loss.
|
* resulting in an outright loss.
|
||||||
**/
|
**/
|
||||||
DustLost: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
DustLost: AugmentedEvent<ApiType, [account: AccountId32, amount: u128], { account: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* An account was created with some free balance.
|
* An account was created with some free balance.
|
||||||
**/
|
**/
|
||||||
Endowed: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Endowed: AugmentedEvent<ApiType, [account: AccountId32, freeBalance: u128], { account: AccountId32, freeBalance: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Some balance was reserved (moved from free to reserved).
|
* Some balance was reserved (moved from free to reserved).
|
||||||
**/
|
**/
|
||||||
Reserved: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Reserved: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Some balance was moved from the reserve of the first account to the second account.
|
* Some balance was moved from the reserve of the first account to the second account.
|
||||||
* Final argument indicates the destination balance type.
|
* Final argument indicates the destination balance type.
|
||||||
**/
|
**/
|
||||||
ReserveRepatriated: AugmentedEvent<ApiType, [AccountId32, AccountId32, u128, FrameSupportTokensMiscBalanceStatus]>;
|
ReserveRepatriated: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, amount: u128, destinationStatus: FrameSupportTokensMiscBalanceStatus], { from: AccountId32, to: AccountId32, amount: u128, destinationStatus: FrameSupportTokensMiscBalanceStatus }>;
|
||||||
/**
|
/**
|
||||||
* Some amount was removed from the account (e.g. for misbehavior).
|
* Some amount was removed from the account (e.g. for misbehavior).
|
||||||
**/
|
**/
|
||||||
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Slashed: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Transfer succeeded.
|
* Transfer succeeded.
|
||||||
**/
|
**/
|
||||||
Transfer: AugmentedEvent<ApiType, [AccountId32, AccountId32, u128]>;
|
Transfer: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, amount: u128], { from: AccountId32, to: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Some balance was unreserved (moved from reserved to free).
|
* Some balance was unreserved (moved from reserved to free).
|
||||||
**/
|
**/
|
||||||
Unreserved: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Unreserved: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Some amount was withdrawn from the account (e.g. for transaction fees).
|
* Some amount was withdrawn from the account (e.g. for transaction fees).
|
||||||
**/
|
**/
|
||||||
Withdraw: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Withdraw: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -99,31 +99,31 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* A bounty is awarded to a beneficiary.
|
* A bounty is awarded to a beneficiary.
|
||||||
**/
|
**/
|
||||||
BountyAwarded: AugmentedEvent<ApiType, [u32, AccountId32]>;
|
BountyAwarded: AugmentedEvent<ApiType, [index: u32, beneficiary: AccountId32], { index: u32, beneficiary: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* A bounty proposal is funded and became active.
|
* A bounty proposal is funded and became active.
|
||||||
**/
|
**/
|
||||||
BountyBecameActive: AugmentedEvent<ApiType, [u32]>;
|
BountyBecameActive: AugmentedEvent<ApiType, [index: u32], { index: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A bounty is cancelled.
|
* A bounty is cancelled.
|
||||||
**/
|
**/
|
||||||
BountyCanceled: AugmentedEvent<ApiType, [u32]>;
|
BountyCanceled: AugmentedEvent<ApiType, [index: u32], { index: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A bounty is claimed by beneficiary.
|
* A bounty is claimed by beneficiary.
|
||||||
**/
|
**/
|
||||||
BountyClaimed: AugmentedEvent<ApiType, [u32, u128, AccountId32]>;
|
BountyClaimed: AugmentedEvent<ApiType, [index: u32, payout: u128, beneficiary: AccountId32], { index: u32, payout: u128, beneficiary: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* A bounty expiry is extended.
|
* A bounty expiry is extended.
|
||||||
**/
|
**/
|
||||||
BountyExtended: AugmentedEvent<ApiType, [u32]>;
|
BountyExtended: AugmentedEvent<ApiType, [index: u32], { index: u32 }>;
|
||||||
/**
|
/**
|
||||||
* New bounty proposal.
|
* New bounty proposal.
|
||||||
**/
|
**/
|
||||||
BountyProposed: AugmentedEvent<ApiType, [u32]>;
|
BountyProposed: AugmentedEvent<ApiType, [index: u32], { index: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A bounty proposal was rejected; funds were slashed.
|
* A bounty proposal was rejected; funds were slashed.
|
||||||
**/
|
**/
|
||||||
BountyRejected: AugmentedEvent<ApiType, [u32, u128]>;
|
BountyRejected: AugmentedEvent<ApiType, [index: u32, bond: u128], { index: u32, bond: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -133,19 +133,19 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* A child-bounty is added.
|
* A child-bounty is added.
|
||||||
**/
|
**/
|
||||||
Added: AugmentedEvent<ApiType, [u32, u32]>;
|
Added: AugmentedEvent<ApiType, [index: u32, childIndex: u32], { index: u32, childIndex: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A child-bounty is awarded to a beneficiary.
|
* A child-bounty is awarded to a beneficiary.
|
||||||
**/
|
**/
|
||||||
Awarded: AugmentedEvent<ApiType, [u32, u32, AccountId32]>;
|
Awarded: AugmentedEvent<ApiType, [index: u32, childIndex: u32, beneficiary: AccountId32], { index: u32, childIndex: u32, beneficiary: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* A child-bounty is cancelled.
|
* A child-bounty is cancelled.
|
||||||
**/
|
**/
|
||||||
Canceled: AugmentedEvent<ApiType, [u32, u32]>;
|
Canceled: AugmentedEvent<ApiType, [index: u32, childIndex: u32], { index: u32, childIndex: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A child-bounty is claimed by beneficiary.
|
* A child-bounty is claimed by beneficiary.
|
||||||
**/
|
**/
|
||||||
Claimed: AugmentedEvent<ApiType, [u32, u32, u128, AccountId32]>;
|
Claimed: AugmentedEvent<ApiType, [index: u32, childIndex: u32, payout: u128, beneficiary: AccountId32], { index: u32, childIndex: u32, payout: u128, beneficiary: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -155,7 +155,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* Someone claimed some DOTs.
|
* Someone claimed some DOTs.
|
||||||
**/
|
**/
|
||||||
Claimed: AugmentedEvent<ApiType, [AccountId32, EthereumAddress, u128]>;
|
Claimed: AugmentedEvent<ApiType, [who: AccountId32, ethereumAddress: EthereumAddress, amount: u128], { who: AccountId32, ethereumAddress: EthereumAddress, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -165,33 +165,33 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* A motion was approved by the required threshold.
|
* A motion was approved by the required threshold.
|
||||||
**/
|
**/
|
||||||
Approved: AugmentedEvent<ApiType, [H256]>;
|
Approved: AugmentedEvent<ApiType, [proposalHash: H256], { proposalHash: H256 }>;
|
||||||
/**
|
/**
|
||||||
* A proposal was closed because its threshold was reached or after its duration was up.
|
* A proposal was closed because its threshold was reached or after its duration was up.
|
||||||
**/
|
**/
|
||||||
Closed: AugmentedEvent<ApiType, [H256, u32, u32]>;
|
Closed: AugmentedEvent<ApiType, [proposalHash: H256, yes: u32, no: u32], { proposalHash: H256, yes: u32, no: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A motion was not approved by the required threshold.
|
* A motion was not approved by the required threshold.
|
||||||
**/
|
**/
|
||||||
Disapproved: AugmentedEvent<ApiType, [H256]>;
|
Disapproved: AugmentedEvent<ApiType, [proposalHash: H256], { proposalHash: H256 }>;
|
||||||
/**
|
/**
|
||||||
* A motion was executed; result will be `Ok` if it returned without error.
|
* A motion was executed; result will be `Ok` if it returned without error.
|
||||||
**/
|
**/
|
||||||
Executed: AugmentedEvent<ApiType, [H256, Result<Null, SpRuntimeDispatchError>]>;
|
Executed: AugmentedEvent<ApiType, [proposalHash: H256, result: Result<Null, SpRuntimeDispatchError>], { proposalHash: H256, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||||
/**
|
/**
|
||||||
* A single member did some action; result will be `Ok` if it returned without error.
|
* A single member did some action; result will be `Ok` if it returned without error.
|
||||||
**/
|
**/
|
||||||
MemberExecuted: AugmentedEvent<ApiType, [H256, Result<Null, SpRuntimeDispatchError>]>;
|
MemberExecuted: AugmentedEvent<ApiType, [proposalHash: H256, result: Result<Null, SpRuntimeDispatchError>], { proposalHash: H256, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||||
/**
|
/**
|
||||||
* A motion (given hash) has been proposed (by given account) with a threshold (given
|
* A motion (given hash) has been proposed (by given account) with a threshold (given
|
||||||
* `MemberCount`).
|
* `MemberCount`).
|
||||||
**/
|
**/
|
||||||
Proposed: AugmentedEvent<ApiType, [AccountId32, u32, H256, u32]>;
|
Proposed: AugmentedEvent<ApiType, [account: AccountId32, proposalIndex: u32, proposalHash: H256, threshold: u32], { account: AccountId32, proposalIndex: u32, proposalHash: H256, threshold: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A motion (given hash) has been voted on by given account, leaving
|
* A motion (given hash) has been voted on by given account, leaving
|
||||||
* a tally (yes votes and no votes given respectively as `MemberCount`).
|
* a tally (yes votes and no votes given respectively as `MemberCount`).
|
||||||
**/
|
**/
|
||||||
Voted: AugmentedEvent<ApiType, [AccountId32, H256, bool, u32, u32]>;
|
Voted: AugmentedEvent<ApiType, [account: AccountId32, proposalHash: H256, voted: bool, yes: u32, no: u32], { account: AccountId32, proposalHash: H256, voted: bool, yes: u32, no: u32 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -201,44 +201,44 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* A parachain has been moved to `NewRaise`
|
* A parachain has been moved to `NewRaise`
|
||||||
**/
|
**/
|
||||||
AddedToNewRaise: AugmentedEvent<ApiType, [u32]>;
|
AddedToNewRaise: AugmentedEvent<ApiType, [paraId: u32], { paraId: u32 }>;
|
||||||
/**
|
/**
|
||||||
* All loans in a fund have been refunded.
|
* All loans in a fund have been refunded.
|
||||||
**/
|
**/
|
||||||
AllRefunded: AugmentedEvent<ApiType, [u32]>;
|
AllRefunded: AugmentedEvent<ApiType, [paraId: u32], { paraId: u32 }>;
|
||||||
/**
|
/**
|
||||||
* Contributed to a crowd sale.
|
* Contributed to a crowd sale.
|
||||||
**/
|
**/
|
||||||
Contributed: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
|
Contributed: AugmentedEvent<ApiType, [who: AccountId32, fundIndex: u32, amount: u128], { who: AccountId32, fundIndex: u32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Create a new crowdloaning campaign.
|
* Create a new crowdloaning campaign.
|
||||||
**/
|
**/
|
||||||
Created: AugmentedEvent<ApiType, [u32]>;
|
Created: AugmentedEvent<ApiType, [paraId: u32], { paraId: u32 }>;
|
||||||
/**
|
/**
|
||||||
* Fund is dissolved.
|
* Fund is dissolved.
|
||||||
**/
|
**/
|
||||||
Dissolved: AugmentedEvent<ApiType, [u32]>;
|
Dissolved: AugmentedEvent<ApiType, [paraId: u32], { paraId: u32 }>;
|
||||||
/**
|
/**
|
||||||
* The configuration to a crowdloan has been edited.
|
* The configuration to a crowdloan has been edited.
|
||||||
**/
|
**/
|
||||||
Edited: AugmentedEvent<ApiType, [u32]>;
|
Edited: AugmentedEvent<ApiType, [paraId: u32], { paraId: u32 }>;
|
||||||
/**
|
/**
|
||||||
* The result of trying to submit a new bid to the Slots pallet.
|
* The result of trying to submit a new bid to the Slots pallet.
|
||||||
**/
|
**/
|
||||||
HandleBidResult: AugmentedEvent<ApiType, [u32, Result<Null, SpRuntimeDispatchError>]>;
|
HandleBidResult: AugmentedEvent<ApiType, [paraId: u32, result: Result<Null, SpRuntimeDispatchError>], { paraId: u32, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||||
/**
|
/**
|
||||||
* A memo has been updated.
|
* A memo has been updated.
|
||||||
**/
|
**/
|
||||||
MemoUpdated: AugmentedEvent<ApiType, [AccountId32, u32, Bytes]>;
|
MemoUpdated: AugmentedEvent<ApiType, [who: AccountId32, paraId: u32, memo: Bytes], { who: AccountId32, paraId: u32, memo: 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.
|
* over child keys that still need to be killed.
|
||||||
**/
|
**/
|
||||||
PartiallyRefunded: AugmentedEvent<ApiType, [u32]>;
|
PartiallyRefunded: AugmentedEvent<ApiType, [paraId: u32], { paraId: u32 }>;
|
||||||
/**
|
/**
|
||||||
* Withdrew full balance of a contributor.
|
* Withdrew full balance of a contributor.
|
||||||
**/
|
**/
|
||||||
Withdrew: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
|
Withdrew: AugmentedEvent<ApiType, [who: AccountId32, fundIndex: u32, amount: u128], { who: AccountId32, fundIndex: u32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -248,19 +248,19 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* A proposal_hash has been blacklisted permanently.
|
* A proposal_hash has been blacklisted permanently.
|
||||||
**/
|
**/
|
||||||
Blacklisted: AugmentedEvent<ApiType, [H256]>;
|
Blacklisted: AugmentedEvent<ApiType, [proposalHash: H256], { proposalHash: H256 }>;
|
||||||
/**
|
/**
|
||||||
* A referendum has been cancelled.
|
* A referendum has been cancelled.
|
||||||
**/
|
**/
|
||||||
Cancelled: AugmentedEvent<ApiType, [u32]>;
|
Cancelled: AugmentedEvent<ApiType, [refIndex: u32], { refIndex: u32 }>;
|
||||||
/**
|
/**
|
||||||
* An account has delegated their vote to another account.
|
* An account has delegated their vote to another account.
|
||||||
**/
|
**/
|
||||||
Delegated: AugmentedEvent<ApiType, [AccountId32, AccountId32]>;
|
Delegated: AugmentedEvent<ApiType, [who: AccountId32, target: AccountId32], { who: AccountId32, target: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* A proposal has been enacted.
|
* A proposal has been enacted.
|
||||||
**/
|
**/
|
||||||
Executed: AugmentedEvent<ApiType, [u32, Result<Null, SpRuntimeDispatchError>]>;
|
Executed: AugmentedEvent<ApiType, [refIndex: u32, result: Result<Null, SpRuntimeDispatchError>], { refIndex: u32, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||||
/**
|
/**
|
||||||
* An external proposal has been tabled.
|
* An external proposal has been tabled.
|
||||||
**/
|
**/
|
||||||
@@ -268,59 +268,63 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* A proposal has been rejected by referendum.
|
* A proposal has been rejected by referendum.
|
||||||
**/
|
**/
|
||||||
NotPassed: AugmentedEvent<ApiType, [u32]>;
|
NotPassed: AugmentedEvent<ApiType, [refIndex: u32], { refIndex: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A proposal has been approved by referendum.
|
* A proposal has been approved by referendum.
|
||||||
**/
|
**/
|
||||||
Passed: AugmentedEvent<ApiType, [u32]>;
|
Passed: AugmentedEvent<ApiType, [refIndex: u32], { refIndex: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A proposal could not be executed because its preimage was invalid.
|
* A proposal could not be executed because its preimage was invalid.
|
||||||
**/
|
**/
|
||||||
PreimageInvalid: AugmentedEvent<ApiType, [H256, u32]>;
|
PreimageInvalid: AugmentedEvent<ApiType, [proposalHash: H256, refIndex: u32], { proposalHash: H256, refIndex: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A proposal could not be executed because its preimage was missing.
|
* A proposal could not be executed because its preimage was missing.
|
||||||
**/
|
**/
|
||||||
PreimageMissing: AugmentedEvent<ApiType, [H256, u32]>;
|
PreimageMissing: AugmentedEvent<ApiType, [proposalHash: H256, refIndex: u32], { proposalHash: H256, refIndex: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A proposal's preimage was noted, and the deposit taken.
|
* A proposal's preimage was noted, and the deposit taken.
|
||||||
**/
|
**/
|
||||||
PreimageNoted: AugmentedEvent<ApiType, [H256, AccountId32, u128]>;
|
PreimageNoted: AugmentedEvent<ApiType, [proposalHash: H256, who: AccountId32, deposit: u128], { proposalHash: H256, who: AccountId32, deposit: u128 }>;
|
||||||
/**
|
/**
|
||||||
* A registered preimage was removed and the deposit collected by the reaper.
|
* A registered preimage was removed and the deposit collected by the reaper.
|
||||||
**/
|
**/
|
||||||
PreimageReaped: AugmentedEvent<ApiType, [H256, AccountId32, u128, AccountId32]>;
|
PreimageReaped: AugmentedEvent<ApiType, [proposalHash: H256, provider: AccountId32, deposit: u128, reaper: AccountId32], { proposalHash: H256, provider: AccountId32, deposit: u128, reaper: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* A proposal preimage was removed and used (the deposit was returned).
|
* A proposal preimage was removed and used (the deposit was returned).
|
||||||
**/
|
**/
|
||||||
PreimageUsed: AugmentedEvent<ApiType, [H256, AccountId32, u128]>;
|
PreimageUsed: AugmentedEvent<ApiType, [proposalHash: H256, provider: AccountId32, deposit: u128], { proposalHash: H256, provider: AccountId32, deposit: u128 }>;
|
||||||
|
/**
|
||||||
|
* A proposal got canceled.
|
||||||
|
**/
|
||||||
|
ProposalCanceled: AugmentedEvent<ApiType, [propIndex: u32], { propIndex: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A motion has been proposed by a public account.
|
* A motion has been proposed by a public account.
|
||||||
**/
|
**/
|
||||||
Proposed: AugmentedEvent<ApiType, [u32, u128]>;
|
Proposed: AugmentedEvent<ApiType, [proposalIndex: u32, deposit: u128], { proposalIndex: u32, deposit: u128 }>;
|
||||||
/**
|
/**
|
||||||
* An account has secconded a proposal
|
* An account has secconded a proposal
|
||||||
**/
|
**/
|
||||||
Seconded: AugmentedEvent<ApiType, [AccountId32, u32]>;
|
Seconded: AugmentedEvent<ApiType, [seconder: AccountId32, propIndex: u32], { seconder: AccountId32, propIndex: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A referendum has begun.
|
* A referendum has begun.
|
||||||
**/
|
**/
|
||||||
Started: AugmentedEvent<ApiType, [u32, PalletDemocracyVoteThreshold]>;
|
Started: AugmentedEvent<ApiType, [refIndex: u32, threshold: PalletDemocracyVoteThreshold], { refIndex: u32, threshold: PalletDemocracyVoteThreshold }>;
|
||||||
/**
|
/**
|
||||||
* A public proposal has been tabled for referendum vote.
|
* A public proposal has been tabled for referendum vote.
|
||||||
**/
|
**/
|
||||||
Tabled: AugmentedEvent<ApiType, [u32, u128, Vec<AccountId32>]>;
|
Tabled: AugmentedEvent<ApiType, [proposalIndex: u32, deposit: u128, depositors: Vec<AccountId32>], { proposalIndex: u32, deposit: u128, depositors: Vec<AccountId32> }>;
|
||||||
/**
|
/**
|
||||||
* An account has cancelled a previous delegation operation.
|
* An account has cancelled a previous delegation operation.
|
||||||
**/
|
**/
|
||||||
Undelegated: AugmentedEvent<ApiType, [AccountId32]>;
|
Undelegated: AugmentedEvent<ApiType, [account: AccountId32], { account: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* An external proposal has been vetoed.
|
* An external proposal has been vetoed.
|
||||||
**/
|
**/
|
||||||
Vetoed: AugmentedEvent<ApiType, [AccountId32, H256, u32]>;
|
Vetoed: AugmentedEvent<ApiType, [who: AccountId32, proposalHash: H256, until: u32], { who: AccountId32, proposalHash: H256, until: u32 }>;
|
||||||
/**
|
/**
|
||||||
* An account has voted in a referendum
|
* An account has voted in a referendum
|
||||||
**/
|
**/
|
||||||
Voted: AugmentedEvent<ApiType, [AccountId32, u32, PalletDemocracyVoteAccountVote]>;
|
Voted: AugmentedEvent<ApiType, [voter: AccountId32, refIndex: u32, vote: PalletDemocracyVoteAccountVote], { voter: AccountId32, refIndex: u32, vote: PalletDemocracyVoteAccountVote }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -331,19 +335,19 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* The election has been finalized, with `Some` of the given computation, or else if the
|
* The election has been finalized, with `Some` of the given computation, or else if the
|
||||||
* election failed, `None`.
|
* election failed, `None`.
|
||||||
**/
|
**/
|
||||||
ElectionFinalized: AugmentedEvent<ApiType, [Option<PalletElectionProviderMultiPhaseElectionCompute>]>;
|
ElectionFinalized: AugmentedEvent<ApiType, [electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute>], { electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute> }>;
|
||||||
/**
|
/**
|
||||||
* An account has been rewarded for their signed submission being finalized.
|
* An account has been rewarded for their signed submission being finalized.
|
||||||
**/
|
**/
|
||||||
Rewarded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Rewarded: AugmentedEvent<ApiType, [account: AccountId32, value: u128], { account: AccountId32, value: u128 }>;
|
||||||
/**
|
/**
|
||||||
* The signed phase of the given round has started.
|
* The signed phase of the given round has started.
|
||||||
**/
|
**/
|
||||||
SignedPhaseStarted: AugmentedEvent<ApiType, [u32]>;
|
SignedPhaseStarted: AugmentedEvent<ApiType, [round: u32], { round: u32 }>;
|
||||||
/**
|
/**
|
||||||
* An account has been slashed for submitting an invalid signed submission.
|
* An account has been slashed for submitting an invalid signed submission.
|
||||||
**/
|
**/
|
||||||
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Slashed: AugmentedEvent<ApiType, [account: AccountId32, value: u128], { account: AccountId32, value: u128 }>;
|
||||||
/**
|
/**
|
||||||
* A solution was stored with the given compute.
|
* A solution was stored with the given compute.
|
||||||
*
|
*
|
||||||
@@ -352,11 +356,11 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* The `bool` is `true` when a previous solution was ejected to make room for this one.
|
* The `bool` is `true` when a previous solution was ejected to make room for this one.
|
||||||
**/
|
**/
|
||||||
SolutionStored: AugmentedEvent<ApiType, [PalletElectionProviderMultiPhaseElectionCompute, bool]>;
|
SolutionStored: AugmentedEvent<ApiType, [electionCompute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool], { electionCompute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool }>;
|
||||||
/**
|
/**
|
||||||
* The unsigned phase of the given round has started.
|
* The unsigned phase of the given round has started.
|
||||||
**/
|
**/
|
||||||
UnsignedPhaseStarted: AugmentedEvent<ApiType, [u32]>;
|
UnsignedPhaseStarted: AugmentedEvent<ApiType, [round: u32], { round: u32 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -366,7 +370,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* New authority set has been applied.
|
* New authority set has been applied.
|
||||||
**/
|
**/
|
||||||
NewAuthorities: AugmentedEvent<ApiType, [Vec<ITuple<[SpFinalityGrandpaAppPublic, u64]>>]>;
|
NewAuthorities: AugmentedEvent<ApiType, [authoritySet: Vec<ITuple<[SpFinalityGrandpaAppPublic, u64]>>], { authoritySet: Vec<ITuple<[SpFinalityGrandpaAppPublic, u64]>> }>;
|
||||||
/**
|
/**
|
||||||
* Current authority set has been paused.
|
* Current authority set has been paused.
|
||||||
**/
|
**/
|
||||||
@@ -408,44 +412,44 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* A name was cleared, and the given balance returned.
|
* A name was cleared, and the given balance returned.
|
||||||
**/
|
**/
|
||||||
IdentityCleared: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
IdentityCleared: AugmentedEvent<ApiType, [who: AccountId32, deposit: u128], { who: AccountId32, deposit: u128 }>;
|
||||||
/**
|
/**
|
||||||
* A name was removed and the given balance slashed.
|
* A name was removed and the given balance slashed.
|
||||||
**/
|
**/
|
||||||
IdentityKilled: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
IdentityKilled: AugmentedEvent<ApiType, [who: AccountId32, deposit: u128], { who: AccountId32, deposit: u128 }>;
|
||||||
/**
|
/**
|
||||||
* A name was set or reset (which will remove all judgements).
|
* A name was set or reset (which will remove all judgements).
|
||||||
**/
|
**/
|
||||||
IdentitySet: AugmentedEvent<ApiType, [AccountId32]>;
|
IdentitySet: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* A judgement was given by a registrar.
|
* A judgement was given by a registrar.
|
||||||
**/
|
**/
|
||||||
JudgementGiven: AugmentedEvent<ApiType, [AccountId32, u32]>;
|
JudgementGiven: AugmentedEvent<ApiType, [target: AccountId32, registrarIndex: u32], { target: AccountId32, registrarIndex: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A judgement was asked from a registrar.
|
* A judgement was asked from a registrar.
|
||||||
**/
|
**/
|
||||||
JudgementRequested: AugmentedEvent<ApiType, [AccountId32, u32]>;
|
JudgementRequested: AugmentedEvent<ApiType, [who: AccountId32, registrarIndex: u32], { who: AccountId32, registrarIndex: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A judgement request was retracted.
|
* A judgement request was retracted.
|
||||||
**/
|
**/
|
||||||
JudgementUnrequested: AugmentedEvent<ApiType, [AccountId32, u32]>;
|
JudgementUnrequested: AugmentedEvent<ApiType, [who: AccountId32, registrarIndex: u32], { who: AccountId32, registrarIndex: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A registrar was added.
|
* A registrar was added.
|
||||||
**/
|
**/
|
||||||
RegistrarAdded: AugmentedEvent<ApiType, [u32]>;
|
RegistrarAdded: AugmentedEvent<ApiType, [registrarIndex: u32], { registrarIndex: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A sub-identity was added to an identity and the deposit paid.
|
* A sub-identity was added to an identity and the deposit paid.
|
||||||
**/
|
**/
|
||||||
SubIdentityAdded: AugmentedEvent<ApiType, [AccountId32, AccountId32, u128]>;
|
SubIdentityAdded: AugmentedEvent<ApiType, [sub: AccountId32, main: AccountId32, deposit: u128], { sub: AccountId32, main: AccountId32, deposit: u128 }>;
|
||||||
/**
|
/**
|
||||||
* A sub-identity was removed from an identity and the deposit freed.
|
* A sub-identity was removed from an identity and the deposit freed.
|
||||||
**/
|
**/
|
||||||
SubIdentityRemoved: AugmentedEvent<ApiType, [AccountId32, AccountId32, u128]>;
|
SubIdentityRemoved: AugmentedEvent<ApiType, [sub: AccountId32, main: AccountId32, deposit: u128], { sub: AccountId32, main: AccountId32, deposit: u128 }>;
|
||||||
/**
|
/**
|
||||||
* A sub-identity was cleared, and the given deposit repatriated from the
|
* A sub-identity was cleared, and the given deposit repatriated from the
|
||||||
* main identity account to the sub-identity account.
|
* main identity account to the sub-identity account.
|
||||||
**/
|
**/
|
||||||
SubIdentityRevoked: AugmentedEvent<ApiType, [AccountId32, AccountId32, u128]>;
|
SubIdentityRevoked: AugmentedEvent<ApiType, [sub: AccountId32, main: AccountId32, deposit: u128], { sub: AccountId32, main: AccountId32, deposit: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -459,11 +463,11 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* A new heartbeat was received from `AuthorityId`.
|
* A new heartbeat was received from `AuthorityId`.
|
||||||
**/
|
**/
|
||||||
HeartbeatReceived: AugmentedEvent<ApiType, [PalletImOnlineSr25519AppSr25519Public]>;
|
HeartbeatReceived: AugmentedEvent<ApiType, [authorityId: PalletImOnlineSr25519AppSr25519Public], { authorityId: PalletImOnlineSr25519AppSr25519Public }>;
|
||||||
/**
|
/**
|
||||||
* At the end of the session, at least one validator was found to be offline.
|
* At the end of the session, at least one validator was found to be offline.
|
||||||
**/
|
**/
|
||||||
SomeOffline: AugmentedEvent<ApiType, [Vec<ITuple<[AccountId32, PalletStakingExposure]>>]>;
|
SomeOffline: AugmentedEvent<ApiType, [offline: Vec<ITuple<[AccountId32, PalletStakingExposure]>>], { offline: Vec<ITuple<[AccountId32, PalletStakingExposure]>> }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -473,15 +477,15 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* A account index was assigned.
|
* A account index was assigned.
|
||||||
**/
|
**/
|
||||||
IndexAssigned: AugmentedEvent<ApiType, [AccountId32, u32]>;
|
IndexAssigned: AugmentedEvent<ApiType, [who: AccountId32, index: u32], { who: AccountId32, index: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A account index has been freed up (unassigned).
|
* A account index has been freed up (unassigned).
|
||||||
**/
|
**/
|
||||||
IndexFreed: AugmentedEvent<ApiType, [u32]>;
|
IndexFreed: AugmentedEvent<ApiType, [index: u32], { index: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A account index has been frozen to its current account ID.
|
* A account index has been frozen to its current account ID.
|
||||||
**/
|
**/
|
||||||
IndexFrozen: AugmentedEvent<ApiType, [u32, AccountId32]>;
|
IndexFrozen: AugmentedEvent<ApiType, [index: u32, who: AccountId32], { index: u32, who: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -491,19 +495,19 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* A multisig operation has been approved by someone.
|
* A multisig operation has been approved by someone.
|
||||||
**/
|
**/
|
||||||
MultisigApproval: AugmentedEvent<ApiType, [AccountId32, PalletMultisigTimepoint, AccountId32, U8aFixed]>;
|
MultisigApproval: AugmentedEvent<ApiType, [approving: AccountId32, timepoint: PalletMultisigTimepoint, multisig: AccountId32, callHash: U8aFixed], { approving: AccountId32, timepoint: PalletMultisigTimepoint, multisig: AccountId32, callHash: U8aFixed }>;
|
||||||
/**
|
/**
|
||||||
* A multisig operation has been cancelled.
|
* A multisig operation has been cancelled.
|
||||||
**/
|
**/
|
||||||
MultisigCancelled: AugmentedEvent<ApiType, [AccountId32, PalletMultisigTimepoint, AccountId32, U8aFixed]>;
|
MultisigCancelled: AugmentedEvent<ApiType, [cancelling: AccountId32, timepoint: PalletMultisigTimepoint, multisig: AccountId32, callHash: U8aFixed], { cancelling: AccountId32, timepoint: PalletMultisigTimepoint, multisig: AccountId32, callHash: U8aFixed }>;
|
||||||
/**
|
/**
|
||||||
* A multisig operation has been executed.
|
* A multisig operation has been executed.
|
||||||
**/
|
**/
|
||||||
MultisigExecuted: AugmentedEvent<ApiType, [AccountId32, PalletMultisigTimepoint, AccountId32, U8aFixed, Result<Null, SpRuntimeDispatchError>]>;
|
MultisigExecuted: AugmentedEvent<ApiType, [approving: AccountId32, timepoint: PalletMultisigTimepoint, multisig: AccountId32, callHash: U8aFixed, result: Result<Null, SpRuntimeDispatchError>], { approving: AccountId32, timepoint: PalletMultisigTimepoint, multisig: AccountId32, callHash: U8aFixed, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||||
/**
|
/**
|
||||||
* A new multisig operation has begun.
|
* A new multisig operation has begun.
|
||||||
**/
|
**/
|
||||||
NewMultisig: AugmentedEvent<ApiType, [AccountId32, AccountId32, U8aFixed]>;
|
NewMultisig: AugmentedEvent<ApiType, [approving: AccountId32, multisig: AccountId32, callHash: U8aFixed], { approving: AccountId32, multisig: AccountId32, callHash: U8aFixed }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -515,7 +519,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* (kind-specific) time slot. This event is not deposited for duplicate slashes.
|
* (kind-specific) time slot. This event is not deposited for duplicate slashes.
|
||||||
* \[kind, timeslot\].
|
* \[kind, timeslot\].
|
||||||
**/
|
**/
|
||||||
Offence: AugmentedEvent<ApiType, [U8aFixed, Bytes]>;
|
Offence: AugmentedEvent<ApiType, [kind: U8aFixed, timeslot: Bytes], { kind: U8aFixed, timeslot: Bytes }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -614,7 +618,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* Note that old members and runners-up are also candidates.
|
* Note that old members and runners-up are also candidates.
|
||||||
**/
|
**/
|
||||||
CandidateSlashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
CandidateSlashed: AugmentedEvent<ApiType, [candidate: AccountId32, amount: u128], { candidate: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Internal error happened while trying to perform election.
|
* Internal error happened while trying to perform election.
|
||||||
**/
|
**/
|
||||||
@@ -628,7 +632,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A member has been removed. This should always be followed by either `NewTerm` or
|
* A member has been removed. This should always be followed by either `NewTerm` or
|
||||||
* `EmptyTerm`.
|
* `EmptyTerm`.
|
||||||
**/
|
**/
|
||||||
MemberKicked: AugmentedEvent<ApiType, [AccountId32]>;
|
MemberKicked: AugmentedEvent<ApiType, [member: AccountId32], { member: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* A new term with new_members. This indicates that enough candidates existed to run
|
* A new term with new_members. This indicates that enough candidates existed to run
|
||||||
* the election, not that enough have has been elected. The inner value must be examined
|
* the election, not that enough have has been elected. The inner value must be examined
|
||||||
@@ -636,15 +640,15 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* slashed and none were elected, whilst `EmptyTerm` means that no candidates existed to
|
* slashed and none were elected, whilst `EmptyTerm` means that no candidates existed to
|
||||||
* begin with.
|
* begin with.
|
||||||
**/
|
**/
|
||||||
NewTerm: AugmentedEvent<ApiType, [Vec<ITuple<[AccountId32, u128]>>]>;
|
NewTerm: AugmentedEvent<ApiType, [newMembers: Vec<ITuple<[AccountId32, u128]>>], { newMembers: Vec<ITuple<[AccountId32, u128]>> }>;
|
||||||
/**
|
/**
|
||||||
* Someone has renounced their candidacy.
|
* Someone has renounced their candidacy.
|
||||||
**/
|
**/
|
||||||
Renounced: AugmentedEvent<ApiType, [AccountId32]>;
|
Renounced: AugmentedEvent<ApiType, [candidate: AccountId32], { candidate: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* A seat holder was slashed by amount by being forcefully removed from the set.
|
* A seat holder was slashed by amount by being forcefully removed from the set.
|
||||||
**/
|
**/
|
||||||
SeatHolderSlashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
SeatHolderSlashed: AugmentedEvent<ApiType, [seatHolder: AccountId32, amount: u128], { seatHolder: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -654,15 +658,15 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* A preimage has ben cleared.
|
* A preimage has ben cleared.
|
||||||
**/
|
**/
|
||||||
Cleared: AugmentedEvent<ApiType, [H256]>;
|
Cleared: AugmentedEvent<ApiType, [hash_: H256], { hash_: H256 }>;
|
||||||
/**
|
/**
|
||||||
* A preimage has been noted.
|
* A preimage has been noted.
|
||||||
**/
|
**/
|
||||||
Noted: AugmentedEvent<ApiType, [H256]>;
|
Noted: AugmentedEvent<ApiType, [hash_: H256], { hash_: H256 }>;
|
||||||
/**
|
/**
|
||||||
* A preimage has been requested.
|
* A preimage has been requested.
|
||||||
**/
|
**/
|
||||||
Requested: AugmentedEvent<ApiType, [H256]>;
|
Requested: AugmentedEvent<ApiType, [hash_: H256], { hash_: H256 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -672,33 +676,33 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* An announcement was placed to make a call in the future.
|
* An announcement was placed to make a call in the future.
|
||||||
**/
|
**/
|
||||||
Announced: AugmentedEvent<ApiType, [AccountId32, AccountId32, H256]>;
|
Announced: AugmentedEvent<ApiType, [real: AccountId32, proxy: AccountId32, callHash: H256], { real: AccountId32, proxy: AccountId32, callHash: H256 }>;
|
||||||
/**
|
/**
|
||||||
* Anonymous account has been created by new proxy with given
|
* Anonymous account has been created by new proxy with given
|
||||||
* disambiguation index and proxy type.
|
* disambiguation index and proxy type.
|
||||||
**/
|
**/
|
||||||
AnonymousCreated: AugmentedEvent<ApiType, [AccountId32, AccountId32, PolkadotRuntimeProxyType, u16]>;
|
AnonymousCreated: AugmentedEvent<ApiType, [anonymous: AccountId32, who: AccountId32, proxyType: PolkadotRuntimeProxyType, disambiguationIndex: u16], { anonymous: AccountId32, who: AccountId32, proxyType: PolkadotRuntimeProxyType, disambiguationIndex: u16 }>;
|
||||||
/**
|
/**
|
||||||
* A proxy was added.
|
* A proxy was added.
|
||||||
**/
|
**/
|
||||||
ProxyAdded: AugmentedEvent<ApiType, [AccountId32, AccountId32, PolkadotRuntimeProxyType, u32]>;
|
ProxyAdded: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: PolkadotRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: PolkadotRuntimeProxyType, delay: u32 }>;
|
||||||
/**
|
/**
|
||||||
* 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: Result<Null, SpRuntimeDispatchError>], { result: Result<Null, SpRuntimeDispatchError> }>;
|
||||||
/**
|
/**
|
||||||
* A proxy was removed.
|
* A proxy was removed.
|
||||||
**/
|
**/
|
||||||
ProxyRemoved: AugmentedEvent<ApiType, [AccountId32, AccountId32, PolkadotRuntimeProxyType, u32]>;
|
ProxyRemoved: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: PolkadotRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: PolkadotRuntimeProxyType, delay: u32 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
registrar: {
|
registrar: {
|
||||||
Deregistered: AugmentedEvent<ApiType, [u32]>;
|
Deregistered: AugmentedEvent<ApiType, [paraId: u32], { paraId: u32 }>;
|
||||||
Registered: AugmentedEvent<ApiType, [u32, AccountId32]>;
|
Registered: AugmentedEvent<ApiType, [paraId: u32, manager: AccountId32], { paraId: u32, manager: AccountId32 }>;
|
||||||
Reserved: AugmentedEvent<ApiType, [u32, AccountId32]>;
|
Reserved: AugmentedEvent<ApiType, [paraId: u32, who: AccountId32], { paraId: u32, who: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -708,19 +712,19 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* 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.
|
||||||
**/
|
**/
|
||||||
CallLookupFailed: AugmentedEvent<ApiType, [ITuple<[u32, u32]>, Option<Bytes>, FrameSupportScheduleLookupError]>;
|
CallLookupFailed: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<Bytes>, error: FrameSupportScheduleLookupError], { task: ITuple<[u32, u32]>, id: Option<Bytes>, error: FrameSupportScheduleLookupError }>;
|
||||||
/**
|
/**
|
||||||
* Canceled some task.
|
* Canceled some task.
|
||||||
**/
|
**/
|
||||||
Canceled: AugmentedEvent<ApiType, [u32, u32]>;
|
Canceled: AugmentedEvent<ApiType, [when: u32, index: u32], { when: u32, index: u32 }>;
|
||||||
/**
|
/**
|
||||||
* Dispatched some task.
|
* Dispatched some task.
|
||||||
**/
|
**/
|
||||||
Dispatched: AugmentedEvent<ApiType, [ITuple<[u32, u32]>, Option<Bytes>, Result<Null, SpRuntimeDispatchError>]>;
|
Dispatched: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<Bytes>, result: Result<Null, SpRuntimeDispatchError>], { task: ITuple<[u32, u32]>, id: Option<Bytes>, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||||
/**
|
/**
|
||||||
* Scheduled some task.
|
* Scheduled some task.
|
||||||
**/
|
**/
|
||||||
Scheduled: AugmentedEvent<ApiType, [u32, u32]>;
|
Scheduled: AugmentedEvent<ApiType, [when: u32, index: u32], { when: u32, index: u32 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -731,7 +735,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* New session has happened. Note that the argument is the session index, not the
|
* New session has happened. Note that the argument is the session index, not the
|
||||||
* block number as the type might suggest.
|
* block number as the type might suggest.
|
||||||
**/
|
**/
|
||||||
NewSession: AugmentedEvent<ApiType, [u32]>;
|
NewSession: AugmentedEvent<ApiType, [sessionIndex: u32], { sessionIndex: u32 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -743,11 +747,11 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* 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.
|
||||||
**/
|
**/
|
||||||
Leased: AugmentedEvent<ApiType, [u32, AccountId32, u32, u32, u128, u128]>;
|
Leased: AugmentedEvent<ApiType, [paraId: u32, leaser: AccountId32, periodBegin: u32, periodCount: u32, extraReserved: u128, totalAmount: u128], { paraId: u32, leaser: AccountId32, periodBegin: u32, periodCount: u32, extraReserved: u128, totalAmount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* A new `[lease_period]` is beginning.
|
* A new `[lease_period]` is beginning.
|
||||||
**/
|
**/
|
||||||
NewLeasePeriod: AugmentedEvent<ApiType, [u32]>;
|
NewLeasePeriod: AugmentedEvent<ApiType, [leasePeriod: u32], { leasePeriod: u32 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -828,23 +832,23 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* An extrinsic failed.
|
* An extrinsic failed.
|
||||||
**/
|
**/
|
||||||
ExtrinsicFailed: AugmentedEvent<ApiType, [SpRuntimeDispatchError, FrameSupportWeightsDispatchInfo]>;
|
ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo }>;
|
||||||
/**
|
/**
|
||||||
* An extrinsic completed successfully.
|
* An extrinsic completed successfully.
|
||||||
**/
|
**/
|
||||||
ExtrinsicSuccess: AugmentedEvent<ApiType, [FrameSupportWeightsDispatchInfo]>;
|
ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchInfo: FrameSupportWeightsDispatchInfo }>;
|
||||||
/**
|
/**
|
||||||
* An account was reaped.
|
* An account was reaped.
|
||||||
**/
|
**/
|
||||||
KilledAccount: AugmentedEvent<ApiType, [AccountId32]>;
|
KilledAccount: AugmentedEvent<ApiType, [account: AccountId32], { account: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* A new account was created.
|
* A new account was created.
|
||||||
**/
|
**/
|
||||||
NewAccount: AugmentedEvent<ApiType, [AccountId32]>;
|
NewAccount: AugmentedEvent<ApiType, [account: AccountId32], { account: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* On on-chain remark happened.
|
* On on-chain remark happened.
|
||||||
**/
|
**/
|
||||||
Remarked: AugmentedEvent<ApiType, [AccountId32, H256]>;
|
Remarked: AugmentedEvent<ApiType, [sender: AccountId32, hash_: H256], { sender: AccountId32, hash_: H256 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -854,33 +858,33 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* A motion was approved by the required threshold.
|
* A motion was approved by the required threshold.
|
||||||
**/
|
**/
|
||||||
Approved: AugmentedEvent<ApiType, [H256]>;
|
Approved: AugmentedEvent<ApiType, [proposalHash: H256], { proposalHash: H256 }>;
|
||||||
/**
|
/**
|
||||||
* A proposal was closed because its threshold was reached or after its duration was up.
|
* A proposal was closed because its threshold was reached or after its duration was up.
|
||||||
**/
|
**/
|
||||||
Closed: AugmentedEvent<ApiType, [H256, u32, u32]>;
|
Closed: AugmentedEvent<ApiType, [proposalHash: H256, yes: u32, no: u32], { proposalHash: H256, yes: u32, no: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A motion was not approved by the required threshold.
|
* A motion was not approved by the required threshold.
|
||||||
**/
|
**/
|
||||||
Disapproved: AugmentedEvent<ApiType, [H256]>;
|
Disapproved: AugmentedEvent<ApiType, [proposalHash: H256], { proposalHash: H256 }>;
|
||||||
/**
|
/**
|
||||||
* A motion was executed; result will be `Ok` if it returned without error.
|
* A motion was executed; result will be `Ok` if it returned without error.
|
||||||
**/
|
**/
|
||||||
Executed: AugmentedEvent<ApiType, [H256, Result<Null, SpRuntimeDispatchError>]>;
|
Executed: AugmentedEvent<ApiType, [proposalHash: H256, result: Result<Null, SpRuntimeDispatchError>], { proposalHash: H256, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||||
/**
|
/**
|
||||||
* A single member did some action; result will be `Ok` if it returned without error.
|
* A single member did some action; result will be `Ok` if it returned without error.
|
||||||
**/
|
**/
|
||||||
MemberExecuted: AugmentedEvent<ApiType, [H256, Result<Null, SpRuntimeDispatchError>]>;
|
MemberExecuted: AugmentedEvent<ApiType, [proposalHash: H256, result: Result<Null, SpRuntimeDispatchError>], { proposalHash: H256, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||||
/**
|
/**
|
||||||
* A motion (given hash) has been proposed (by given account) with a threshold (given
|
* A motion (given hash) has been proposed (by given account) with a threshold (given
|
||||||
* `MemberCount`).
|
* `MemberCount`).
|
||||||
**/
|
**/
|
||||||
Proposed: AugmentedEvent<ApiType, [AccountId32, u32, H256, u32]>;
|
Proposed: AugmentedEvent<ApiType, [account: AccountId32, proposalIndex: u32, proposalHash: H256, threshold: u32], { account: AccountId32, proposalIndex: u32, proposalHash: H256, threshold: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A motion (given hash) has been voted on by given account, leaving
|
* A motion (given hash) has been voted on by given account, leaving
|
||||||
* a tally (yes votes and no votes given respectively as `MemberCount`).
|
* a tally (yes votes and no votes given respectively as `MemberCount`).
|
||||||
**/
|
**/
|
||||||
Voted: AugmentedEvent<ApiType, [AccountId32, H256, bool, u32, u32]>;
|
Voted: AugmentedEvent<ApiType, [account: AccountId32, proposalHash: H256, voted: bool, yes: u32, no: u32], { account: AccountId32, proposalHash: H256, voted: bool, yes: u32, no: u32 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -920,23 +924,34 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* A new tip suggestion has been opened.
|
* A new tip suggestion has been opened.
|
||||||
**/
|
**/
|
||||||
NewTip: AugmentedEvent<ApiType, [H256]>;
|
NewTip: AugmentedEvent<ApiType, [tipHash: H256], { tipHash: H256 }>;
|
||||||
/**
|
/**
|
||||||
* A tip suggestion has been closed.
|
* A tip suggestion has been closed.
|
||||||
**/
|
**/
|
||||||
TipClosed: AugmentedEvent<ApiType, [H256, AccountId32, u128]>;
|
TipClosed: AugmentedEvent<ApiType, [tipHash: H256, who: AccountId32, payout: u128], { tipHash: H256, who: AccountId32, payout: u128 }>;
|
||||||
/**
|
/**
|
||||||
* A tip suggestion has reached threshold and is closing.
|
* A tip suggestion has reached threshold and is closing.
|
||||||
**/
|
**/
|
||||||
TipClosing: AugmentedEvent<ApiType, [H256]>;
|
TipClosing: AugmentedEvent<ApiType, [tipHash: H256], { tipHash: H256 }>;
|
||||||
/**
|
/**
|
||||||
* A tip suggestion has been retracted.
|
* A tip suggestion has been retracted.
|
||||||
**/
|
**/
|
||||||
TipRetracted: AugmentedEvent<ApiType, [H256]>;
|
TipRetracted: AugmentedEvent<ApiType, [tipHash: H256], { tipHash: H256 }>;
|
||||||
/**
|
/**
|
||||||
* A tip suggestion has been slashed.
|
* A tip suggestion has been slashed.
|
||||||
**/
|
**/
|
||||||
TipSlashed: AugmentedEvent<ApiType, [H256, AccountId32, u128]>;
|
TipSlashed: AugmentedEvent<ApiType, [tipHash: H256, finder: AccountId32, deposit: u128], { tipHash: H256, finder: AccountId32, deposit: u128 }>;
|
||||||
|
/**
|
||||||
|
* Generic event
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
|
};
|
||||||
|
transactionPayment: {
|
||||||
|
/**
|
||||||
|
* A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,
|
||||||
|
* has been paid by `who`.
|
||||||
|
**/
|
||||||
|
TransactionFeePaid: AugmentedEvent<ApiType, [who: AccountId32, actualFee: u128, tip: u128], { who: AccountId32, actualFee: u128, tip: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -946,31 +961,35 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* Some funds have been allocated.
|
* Some funds have been allocated.
|
||||||
**/
|
**/
|
||||||
Awarded: AugmentedEvent<ApiType, [u32, u128, AccountId32]>;
|
Awarded: AugmentedEvent<ApiType, [proposalIndex: u32, award: u128, account: AccountId32], { proposalIndex: u32, award: u128, account: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* Some of our funds have been burnt.
|
* Some of our funds have been burnt.
|
||||||
**/
|
**/
|
||||||
Burnt: AugmentedEvent<ApiType, [u128]>;
|
Burnt: AugmentedEvent<ApiType, [burntFunds: u128], { burntFunds: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Some funds have been deposited.
|
* Some funds have been deposited.
|
||||||
**/
|
**/
|
||||||
Deposit: AugmentedEvent<ApiType, [u128]>;
|
Deposit: AugmentedEvent<ApiType, [value: u128], { value: u128 }>;
|
||||||
/**
|
/**
|
||||||
* New proposal.
|
* New proposal.
|
||||||
**/
|
**/
|
||||||
Proposed: AugmentedEvent<ApiType, [u32]>;
|
Proposed: AugmentedEvent<ApiType, [proposalIndex: u32], { proposalIndex: u32 }>;
|
||||||
/**
|
/**
|
||||||
* A proposal was rejected; funds were slashed.
|
* A proposal was rejected; funds were slashed.
|
||||||
**/
|
**/
|
||||||
Rejected: AugmentedEvent<ApiType, [u32, u128]>;
|
Rejected: AugmentedEvent<ApiType, [proposalIndex: u32, slashed: u128], { proposalIndex: u32, slashed: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Spending has finished; this is the amount that rolls over until next spend.
|
* Spending has finished; this is the amount that rolls over until next spend.
|
||||||
**/
|
**/
|
||||||
Rollover: AugmentedEvent<ApiType, [u128]>;
|
Rollover: AugmentedEvent<ApiType, [rolloverBalance: u128], { rolloverBalance: u128 }>;
|
||||||
|
/**
|
||||||
|
* A new spend proposal has been approved.
|
||||||
|
**/
|
||||||
|
SpendApproved: AugmentedEvent<ApiType, [proposalIndex: u32, amount: u128, beneficiary: AccountId32], { proposalIndex: u32, amount: u128, beneficiary: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* We have ended a spend period and will now allocate funds.
|
* We have ended a spend period and will now allocate funds.
|
||||||
**/
|
**/
|
||||||
Spending: AugmentedEvent<ApiType, [u128]>;
|
Spending: AugmentedEvent<ApiType, [budgetRemaining: u128], { budgetRemaining: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -1036,11 +1055,11 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* 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.
|
||||||
**/
|
**/
|
||||||
BatchInterrupted: AugmentedEvent<ApiType, [u32, SpRuntimeDispatchError]>;
|
BatchInterrupted: AugmentedEvent<ApiType, [index: u32, error: SpRuntimeDispatchError], { index: u32, error: SpRuntimeDispatchError }>;
|
||||||
/**
|
/**
|
||||||
* A call was dispatched.
|
* A call was dispatched.
|
||||||
**/
|
**/
|
||||||
DispatchedAs: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;
|
DispatchedAs: AugmentedEvent<ApiType, [result: Result<Null, SpRuntimeDispatchError>], { result: Result<Null, SpRuntimeDispatchError> }>;
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
**/
|
**/
|
||||||
@@ -1048,7 +1067,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* A single item within a Batch of dispatches has completed with error.
|
* A single item within a Batch of dispatches has completed with error.
|
||||||
**/
|
**/
|
||||||
ItemFailed: AugmentedEvent<ApiType, [SpRuntimeDispatchError]>;
|
ItemFailed: AugmentedEvent<ApiType, [error: SpRuntimeDispatchError], { error: SpRuntimeDispatchError }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -1058,12 +1077,12 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* An \[account\] has become fully vested.
|
* An \[account\] has become fully vested.
|
||||||
**/
|
**/
|
||||||
VestingCompleted: AugmentedEvent<ApiType, [AccountId32]>;
|
VestingCompleted: AugmentedEvent<ApiType, [account: AccountId32], { account: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* The amount vested has been updated. This could indicate a change in funds available.
|
* The amount vested has been updated. This could indicate a change in funds available.
|
||||||
* The balance given is the amount which is left unvested (and thus locked).
|
* The balance given is the amount which is left unvested (and thus locked).
|
||||||
**/
|
**/
|
||||||
VestingUpdated: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
VestingUpdated: AugmentedEvent<ApiType, [account: AccountId32, unvested: u128], { account: AccountId32, unvested: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -1073,11 +1092,11 @@ 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, [who: AccountId32, from: u64, to: u64], { who: AccountId32, from: u64, to: u64 }>;
|
||||||
/**
|
/**
|
||||||
* Updated the score of some account to the given amount.
|
* Updated the score of some account to the given amount.
|
||||||
**/
|
**/
|
||||||
ScoreUpdated: AugmentedEvent<ApiType, [AccountId32, u64]>;
|
ScoreUpdated: AugmentedEvent<ApiType, [who: AccountId32, newScore: u64], { who: AccountId32, newScore: u64 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -7,4 +7,5 @@ import './errors';
|
|||||||
import './events';
|
import './events';
|
||||||
import './query';
|
import './query';
|
||||||
import './registry';
|
import './registry';
|
||||||
|
import './runtime';
|
||||||
import './tx';
|
import './tx';
|
||||||
|
|||||||
@@ -0,0 +1,334 @@
|
|||||||
|
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import type { ApiTypes } from '@polkadot/api-base/types';
|
||||||
|
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
|
||||||
|
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||||
|
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
|
||||||
|
import type { ValidatorSet } from '@polkadot/types/interfaces/beefy';
|
||||||
|
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
|
||||||
|
import type { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||||
|
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||||
|
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||||
|
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
|
||||||
|
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||||
|
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||||
|
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
|
||||||
|
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||||
|
import type { AccountId, Block, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||||
|
import type { SessionIndex } from '@polkadot/types/interfaces/session';
|
||||||
|
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||||
|
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
||||||
|
import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
|
||||||
|
import type { IExtrinsic, Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
|
declare module '@polkadot/api-base/types/calls' {
|
||||||
|
export interface AugmentedCalls<ApiType extends ApiTypes> {
|
||||||
|
/** 0xbc9d89904f5b923f/1 */
|
||||||
|
accountNonceApi: {
|
||||||
|
/**
|
||||||
|
* The API to query account nonce (aka transaction index)
|
||||||
|
**/
|
||||||
|
accountNonce: AugmentedCall<ApiType, (accountId: AccountId | string | Uint8Array) => Observable<Index>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0x687ad44ad37f03c2/1 */
|
||||||
|
authorityDiscoveryApi: {
|
||||||
|
/**
|
||||||
|
* Retrieve authority identifiers of the current and next authority set.
|
||||||
|
**/
|
||||||
|
authorities: AugmentedCall<ApiType, () => Observable<Vec<AuthorityId>>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xcbca25e39f142387/2 */
|
||||||
|
babeApi: {
|
||||||
|
/**
|
||||||
|
* Return the genesis configuration for BABE. The configuration is only read on genesis.
|
||||||
|
**/
|
||||||
|
configuration: AugmentedCall<ApiType, () => Observable<BabeGenesisConfiguration>>;
|
||||||
|
/**
|
||||||
|
* Returns information regarding the current epoch.
|
||||||
|
**/
|
||||||
|
currentEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
|
||||||
|
/**
|
||||||
|
* Returns the slot that started the current epoch.
|
||||||
|
**/
|
||||||
|
currentEpochStart: AugmentedCall<ApiType, () => Observable<Slot>>;
|
||||||
|
/**
|
||||||
|
* Generates a proof of key ownership for the given authority in the current epoch.
|
||||||
|
**/
|
||||||
|
generateKeyOwnershipProof: AugmentedCall<ApiType, (slot: Slot | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||||
|
/**
|
||||||
|
* Returns information regarding the next epoch (which was already previously announced).
|
||||||
|
**/
|
||||||
|
nextEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
|
||||||
|
/**
|
||||||
|
* Submits an unsigned extrinsic to report an equivocation.
|
||||||
|
**/
|
||||||
|
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: BabeEquivocationProof | { offender?: any; slotNumber?: any; firstHeader?: any; secondHeader?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0x49eaaf1b548a0cb0/1 */
|
||||||
|
beefyApi: {
|
||||||
|
/**
|
||||||
|
* Return the current active BEEFY validator set
|
||||||
|
**/
|
||||||
|
validatorSet: AugmentedCall<ApiType, () => Observable<Option<ValidatorSet>>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0x40fe3ad401f8959a/6 */
|
||||||
|
blockBuilder: {
|
||||||
|
/**
|
||||||
|
* Apply the given extrinsic.
|
||||||
|
**/
|
||||||
|
applyExtrinsic: AugmentedCall<ApiType, (extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<ApplyExtrinsicResult>>;
|
||||||
|
/**
|
||||||
|
* Check that the inherents are valid.
|
||||||
|
**/
|
||||||
|
checkInherents: AugmentedCall<ApiType, (block: Block | { header?: any; extrinsics?: any } | string | Uint8Array, data: InherentData | { data?: any } | string | Uint8Array) => Observable<CheckInherentsResult>>;
|
||||||
|
/**
|
||||||
|
* Finish the current block.
|
||||||
|
**/
|
||||||
|
finalizeBlock: AugmentedCall<ApiType, () => Observable<Header>>;
|
||||||
|
/**
|
||||||
|
* Generate inherent extrinsics.
|
||||||
|
**/
|
||||||
|
inherentExtrinsics: AugmentedCall<ApiType, (inherent: InherentData | { data?: any } | string | Uint8Array) => Observable<Vec<Extrinsic>>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xdf6acb689907609b/4 */
|
||||||
|
core: {
|
||||||
|
/**
|
||||||
|
* Execute the given block.
|
||||||
|
**/
|
||||||
|
executeBlock: AugmentedCall<ApiType, (block: Block | { header?: any; extrinsics?: any } | string | Uint8Array) => Observable<Null>>;
|
||||||
|
/**
|
||||||
|
* Initialize a block with the given header.
|
||||||
|
**/
|
||||||
|
initializeBlock: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||||
|
/**
|
||||||
|
* Returns the version of the runtime.
|
||||||
|
**/
|
||||||
|
version: AugmentedCall<ApiType, () => Observable<RuntimeVersion>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xed99c5acb25eedf5/3 */
|
||||||
|
grandpaApi: {
|
||||||
|
/**
|
||||||
|
* Get current GRANDPA authority set id.
|
||||||
|
**/
|
||||||
|
currentSetId: AugmentedCall<ApiType, () => Observable<SetId>>;
|
||||||
|
/**
|
||||||
|
* Generates a proof of key ownership for the given authority in the given set.
|
||||||
|
**/
|
||||||
|
generateKeyOwnershipProof: AugmentedCall<ApiType, (setId: SetId | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||||
|
/**
|
||||||
|
* Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed.
|
||||||
|
**/
|
||||||
|
grandpaAuthorities: AugmentedCall<ApiType, () => Observable<AuthorityList>>;
|
||||||
|
/**
|
||||||
|
* Submits an unsigned extrinsic to report an equivocation.
|
||||||
|
**/
|
||||||
|
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: GrandpaEquivocationProof | { setId?: any; equivocation?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0x37e397fc7c91f5e4/1 */
|
||||||
|
metadata: {
|
||||||
|
/**
|
||||||
|
* Returns the metadata of a runtime
|
||||||
|
**/
|
||||||
|
metadata: AugmentedCall<ApiType, () => Observable<OpaqueMetadata>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0x91d5df18b0d2cf58/1 */
|
||||||
|
mmrApi: {
|
||||||
|
/**
|
||||||
|
* Generate MMR proof for a series of leaves under given indices.
|
||||||
|
**/
|
||||||
|
generateBatchProof: AugmentedCall<ApiType, (leafIndices: Vec<MmrLeafIndex> | (MmrLeafIndex | AnyNumber | Uint8Array)[]) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Generate MMR proof for a leaf under given index.
|
||||||
|
**/
|
||||||
|
generateProof: AugmentedCall<ApiType, (leafIndex: MmrLeafIndex | AnyNumber | Uint8Array) => Observable<Result<ITuple<[MmrEncodableOpaqueLeaf, MmrProof]>, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Return the on-chain MMR root hash.
|
||||||
|
**/
|
||||||
|
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Verify MMR proof against on-chain MMR for a batch of leaves.
|
||||||
|
**/
|
||||||
|
verifyBatchProof: AugmentedCall<ApiType, (leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Verify MMR proof against given root hash or a batch of leaves.
|
||||||
|
**/
|
||||||
|
verifyBatchProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Verify MMR proof against on-chain MMR.
|
||||||
|
**/
|
||||||
|
verifyProof: AugmentedCall<ApiType, (leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Verify MMR proof against given root hash.
|
||||||
|
**/
|
||||||
|
verifyProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xf78b278be53f454c/2 */
|
||||||
|
offchainWorkerApi: {
|
||||||
|
/**
|
||||||
|
* Starts the off-chain task for given block header.
|
||||||
|
**/
|
||||||
|
offchainWorker: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xaf2c0297a23e6d3d/2 */
|
||||||
|
parachainHost: {
|
||||||
|
/**
|
||||||
|
* Returns the persisted validation data for the given `ParaId` along with the corresponding validation code hash.
|
||||||
|
**/
|
||||||
|
assumedValidationData: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, hash: Hash | string | Uint8Array) => Observable<Option<ITuple<[PersistedValidationData, ValidationCodeHash]>>>>;
|
||||||
|
/**
|
||||||
|
* Yields information on all availability cores as relevant to the child block.
|
||||||
|
**/
|
||||||
|
availabilityCores: AugmentedCall<ApiType, () => Observable<Vec<CoreState>>>;
|
||||||
|
/**
|
||||||
|
* Get a vector of events concerning candidates that occurred within a block.
|
||||||
|
**/
|
||||||
|
candidateEvents: AugmentedCall<ApiType, () => Observable<Vec<CandidateEvent>>>;
|
||||||
|
/**
|
||||||
|
* Get the receipt of a candidate pending availability.
|
||||||
|
**/
|
||||||
|
candidatePendingAvailability: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Option<CommittedCandidateReceipt>>>;
|
||||||
|
/**
|
||||||
|
* Checks if the given validation outputs pass the acceptance criteria.
|
||||||
|
**/
|
||||||
|
checkValidationOutputs: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, outputs: CandidateCommitments | { upwardMessages?: any; horizontalMessages?: any; newValidationCode?: any; headData?: any; processedDownwardMessages?: any; hrmpWatermark?: any } | string | Uint8Array) => Observable<bool>>;
|
||||||
|
/**
|
||||||
|
* Get all the pending inbound messages in the downward message queue for a para.
|
||||||
|
**/
|
||||||
|
dmqContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundDownwardMessage>>>;
|
||||||
|
/**
|
||||||
|
* Get the contents of all channels addressed to the given recipient.
|
||||||
|
**/
|
||||||
|
inboundHrmpChannelsContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundHrmpMessage>>>;
|
||||||
|
/**
|
||||||
|
* Scrape dispute relevant from on-chain, backing votes and resolved disputes.
|
||||||
|
**/
|
||||||
|
onChainVotes: AugmentedCall<ApiType, () => Observable<Option<ScrapedOnChainVotes>>>;
|
||||||
|
/**
|
||||||
|
* Yields the persisted validation data for the given `ParaId` along with an assumption that should be used if the para currently occupies a core.
|
||||||
|
**/
|
||||||
|
persistedValidationData: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<PersistedValidationData>>>;
|
||||||
|
/**
|
||||||
|
* Returns code hashes of PVFs that require pre-checking by validators in the active set.
|
||||||
|
**/
|
||||||
|
pvfsRequirePrecheck: AugmentedCall<ApiType, () => Observable<Vec<ValidationCodeHash>>>;
|
||||||
|
/**
|
||||||
|
* Returns the session index expected at a child of the block.
|
||||||
|
**/
|
||||||
|
sessionIndexForChild: AugmentedCall<ApiType, () => Observable<SessionIndex>>;
|
||||||
|
/**
|
||||||
|
* Get the session info for the given session, if stored.
|
||||||
|
**/
|
||||||
|
sessionInfo: AugmentedCall<ApiType, (index: SessionIndex | AnyNumber | Uint8Array) => Observable<Option<SessionInfo>>>;
|
||||||
|
/**
|
||||||
|
* Submits a PVF pre-checking statement into the transaction pool.
|
||||||
|
**/
|
||||||
|
submitPvfCheckStatement: AugmentedCall<ApiType, (stmt: PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: ValidatorSignature | string | Uint8Array) => Observable<Null>>;
|
||||||
|
/**
|
||||||
|
* Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.
|
||||||
|
**/
|
||||||
|
validationCode: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<ValidationCode>>;
|
||||||
|
/**
|
||||||
|
* Get the validation code from its hash.
|
||||||
|
**/
|
||||||
|
validationCodeByHash: AugmentedCall<ApiType, (hash: ValidationCodeHash | string | Uint8Array) => Observable<Option<ValidationCode>>>;
|
||||||
|
/**
|
||||||
|
* Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.
|
||||||
|
**/
|
||||||
|
validationCodeHash: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array, assumption: OccupiedCoreAssumption | 'Included,' | 'TimedOut' | 'Free' | number | Uint8Array) => Observable<Option<ValidationCodeHash>>>;
|
||||||
|
/**
|
||||||
|
* Returns the validator groups and rotation info localized based on the hypothetical child of a block whose state this is invoked on
|
||||||
|
**/
|
||||||
|
validatorGroups: AugmentedCall<ApiType, () => Observable<ITuple<[Vec<Vec<ParaValidatorIndex>>, GroupRotationInfo]>>>;
|
||||||
|
/**
|
||||||
|
* Get the current validators.
|
||||||
|
**/
|
||||||
|
validators: AugmentedCall<ApiType, () => Observable<Vec<ValidatorId>>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xab3c0572291feb8b/1 */
|
||||||
|
sessionKeys: {
|
||||||
|
/**
|
||||||
|
* Decode the given public session keys.
|
||||||
|
**/
|
||||||
|
decodeSessionKeys: AugmentedCall<ApiType, (encoded: Bytes | string | Uint8Array) => Observable<Option<Vec<ITuple<[Bytes, KeyTypeId]>>>>>;
|
||||||
|
/**
|
||||||
|
* Generate a set of session keys with optionally using the given seed.
|
||||||
|
**/
|
||||||
|
generateSessionKeys: AugmentedCall<ApiType, (seed: Option<Bytes> | null | object | string | Uint8Array) => Observable<Bytes>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xd2bc9897eed08f15/3 */
|
||||||
|
taggedTransactionQueue: {
|
||||||
|
/**
|
||||||
|
* Validate the transaction.
|
||||||
|
**/
|
||||||
|
validateTransaction: AugmentedCall<ApiType, (source: TransactionSource | 'InBlock' | 'Local' | 'External' | number | Uint8Array, tx: Extrinsic | IExtrinsic | string | Uint8Array, blockHash: BlockHash | string | Uint8Array) => Observable<TransactionValidity>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0x37c8bb1350a9a2a8/1 */
|
||||||
|
transactionPaymentApi: {
|
||||||
|
/**
|
||||||
|
* The transaction fee details
|
||||||
|
**/
|
||||||
|
queryFeeDetails: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
|
||||||
|
/**
|
||||||
|
* The transaction info
|
||||||
|
**/
|
||||||
|
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
} // AugmentedCalls
|
||||||
|
} // declare module
|
||||||
@@ -1139,8 +1139,9 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* The dispatch of this call must be `FastTrackOrigin`.
|
* The dispatch of this call must be `FastTrackOrigin`.
|
||||||
*
|
*
|
||||||
* - `proposal_hash`: The hash of the current external proposal.
|
* - `proposal_hash`: The hash of the current external proposal.
|
||||||
* - `voting_period`: The period that is allowed for voting on this proposal. Increased to
|
* - `voting_period`: The period that is allowed for voting on this proposal.
|
||||||
* `FastTrackVotingPeriod` if too low.
|
* Must be always greater than zero.
|
||||||
|
* For `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`.
|
||||||
* - `delay`: The number of block after voting has ended in approval and this should be
|
* - `delay`: The number of block after voting has ended in approval and this should be
|
||||||
* enacted. This doesn't have a minimum amount.
|
* enacted. This doesn't have a minimum amount.
|
||||||
*
|
*
|
||||||
@@ -1401,12 +1402,17 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
};
|
};
|
||||||
grandpa: {
|
grandpa: {
|
||||||
/**
|
/**
|
||||||
* Note that the current authority set of the GRANDPA finality gadget has
|
* Note that the current authority set of the GRANDPA finality gadget has stalled.
|
||||||
* stalled. This will trigger a forced authority set change at the beginning
|
*
|
||||||
* of the next session, to be enacted `delay` blocks after that. The delay
|
* This will trigger a forced authority set change at the beginning of the next session, to
|
||||||
* should be high enough to safely assume that the block signalling the
|
* be enacted `delay` blocks after that. The `delay` should be high enough to safely assume
|
||||||
* forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters
|
* that the block signalling the forced change will not be re-orged e.g. 1000 blocks.
|
||||||
* will start the new authority set using the given finalized block as base.
|
* The block production rate (which may be slowed down because of finality lagging) should
|
||||||
|
* be taken into account when choosing the `delay`. The GRANDPA voters based on the new
|
||||||
|
* authority will start voting on top of `best_finalized_block_number` for new finalized
|
||||||
|
* blocks. `best_finalized_block_number` should be the highest of the latest finalized
|
||||||
|
* block of all validators of the new authority set.
|
||||||
|
*
|
||||||
* Only callable by root.
|
* Only callable by root.
|
||||||
**/
|
**/
|
||||||
noteStalled: AugmentedSubmittable<(delay: u32 | AnyNumber | Uint8Array, bestFinalizedBlockNumber: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
|
noteStalled: AugmentedSubmittable<(delay: u32 | AnyNumber | Uint8Array, bestFinalizedBlockNumber: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
|
||||||
@@ -3562,6 +3568,17 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* exist altogether, thus there is no way it would have been approved in the first place.
|
* 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>]>;
|
removeApproval: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
|
||||||
|
/**
|
||||||
|
* Propose and approve a spend of treasury funds.
|
||||||
|
*
|
||||||
|
* - `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`.
|
||||||
|
* - `amount`: The amount to be transferred from the treasury to the `beneficiary`.
|
||||||
|
* - `beneficiary`: The destination account for the transfer.
|
||||||
|
*
|
||||||
|
* NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the
|
||||||
|
* beneficiary.
|
||||||
|
**/
|
||||||
|
spend: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, beneficiary: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress]>;
|
||||||
/**
|
/**
|
||||||
* Generic tx
|
* Generic tx
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -9,6 +9,33 @@ import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSys
|
|||||||
|
|
||||||
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> {
|
||||||
|
alliance: {
|
||||||
|
/**
|
||||||
|
* The deposit required for submitting candidacy.
|
||||||
|
**/
|
||||||
|
allyDeposit: u128 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The maximum number of announcements.
|
||||||
|
**/
|
||||||
|
maxAnnouncementsCount: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The maximum number of members per member role. Should not exceed the sum of
|
||||||
|
* `MaxFounders` and `MaxFellows`.
|
||||||
|
**/
|
||||||
|
maxMembersCount: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The maximum number of the unscrupulous items supported by the pallet.
|
||||||
|
**/
|
||||||
|
maxUnscrupulousItems: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The maximum length of a website URL.
|
||||||
|
**/
|
||||||
|
maxWebsiteUrlLength: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic const
|
||||||
|
**/
|
||||||
|
[key: string]: Codec;
|
||||||
|
};
|
||||||
assets: {
|
assets: {
|
||||||
/**
|
/**
|
||||||
* The amount of funds that must be reserved when creating a new approval.
|
* The amount of funds that must be reserved when creating a new approval.
|
||||||
@@ -223,7 +250,7 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
*
|
*
|
||||||
* For more information check out: <https://github.com/paritytech/substrate/issues/10301>
|
* For more information check out: <https://github.com/paritytech/substrate/issues/10301>
|
||||||
*
|
*
|
||||||
* [`DefaultContractAccessWeight`] is a safe default to be used for polkadot or kusama
|
* [`DefaultContractAccessWeight`] is a safe default to be used for Polkadot or Kusama
|
||||||
* parachains.
|
* parachains.
|
||||||
*
|
*
|
||||||
* # Note
|
* # Note
|
||||||
@@ -709,6 +736,31 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
|
rankedPolls: {
|
||||||
|
/**
|
||||||
|
* Quantization level for the referendum wakeup scheduler. A higher number will result in
|
||||||
|
* fewer storage reads/writes needed for smaller voters, but also result in delays to the
|
||||||
|
* automatic referendum status changes. Explicit servicing instructions are unaffected.
|
||||||
|
**/
|
||||||
|
alarmInterval: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Maximum size of the referendum queue for a single track.
|
||||||
|
**/
|
||||||
|
maxQueued: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The minimum amount to be used as a deposit for a public referendum proposal.
|
||||||
|
**/
|
||||||
|
submissionDeposit: u128 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The number of blocks after submission that a referendum must begin being decided by.
|
||||||
|
* Once this passes, then anyone may cancel the referendum.
|
||||||
|
**/
|
||||||
|
undecidingTimeout: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic const
|
||||||
|
**/
|
||||||
|
[key: string]: Codec;
|
||||||
|
};
|
||||||
recovery: {
|
recovery: {
|
||||||
/**
|
/**
|
||||||
* The base amount of currency needed to reserve for creating a recovery configuration.
|
* The base amount of currency needed to reserve for creating a recovery configuration.
|
||||||
@@ -871,6 +923,36 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
|
stateTrieMigration: {
|
||||||
|
/**
|
||||||
|
* Maximal number of bytes that a key can have.
|
||||||
|
*
|
||||||
|
* FRAME itself does not limit the key length.
|
||||||
|
* The concrete value must therefore depend on your storage usage.
|
||||||
|
* A [`frame_support::storage::StorageNMap`] for example can have an arbitrary number of
|
||||||
|
* keys which are then hashed and concatenated, resulting in arbitrarily long keys.
|
||||||
|
*
|
||||||
|
* Use the *state migration RPC* to retrieve the length of the longest key in your
|
||||||
|
* storage: <https://github.com/paritytech/substrate/issues/11642>
|
||||||
|
*
|
||||||
|
* The migration will halt with a `Halted` event if this value is too small.
|
||||||
|
* Since there is no real penalty from over-estimating, it is advised to use a large
|
||||||
|
* value. The default is 512 byte.
|
||||||
|
*
|
||||||
|
* Some key lengths for reference:
|
||||||
|
* - [`frame_support::storage::StorageValue`]: 32 byte
|
||||||
|
* - [`frame_support::storage::StorageMap`]: 64 byte
|
||||||
|
* - [`frame_support::storage::StorageDoubleMap`]: 96 byte
|
||||||
|
*
|
||||||
|
* For more info see
|
||||||
|
* <https://www.shawntabrizi.com/substrate/querying-substrate-storage-via-rpc/>
|
||||||
|
**/
|
||||||
|
maxKeyLen: u32 & 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).
|
||||||
|
|||||||
@@ -5,6 +5,143 @@ import type { ApiTypes } from '@polkadot/api-base/types';
|
|||||||
|
|
||||||
declare module '@polkadot/api-base/types/errors' {
|
declare module '@polkadot/api-base/types/errors' {
|
||||||
export interface AugmentedErrors<ApiType extends ApiTypes> {
|
export interface AugmentedErrors<ApiType extends ApiTypes> {
|
||||||
|
alliance: {
|
||||||
|
/**
|
||||||
|
* Account has been deemed unscrupulous by the Alliance and is not welcome to join or be
|
||||||
|
* nominated.
|
||||||
|
**/
|
||||||
|
AccountNonGrata: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Account is already an elevated (fellow) member.
|
||||||
|
**/
|
||||||
|
AlreadyElevated: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Account is already a member.
|
||||||
|
**/
|
||||||
|
AlreadyMember: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Item is already listed as unscrupulous.
|
||||||
|
**/
|
||||||
|
AlreadyUnscrupulous: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Balance is insufficient for the required deposit.
|
||||||
|
**/
|
||||||
|
InsufficientFunds: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The founders/fellows/allies have already been initialized.
|
||||||
|
**/
|
||||||
|
MembersAlreadyInitialized: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The announcement is not found.
|
||||||
|
**/
|
||||||
|
MissingAnnouncement: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The proposal hash is not found.
|
||||||
|
**/
|
||||||
|
MissingProposalHash: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Account is not an ally.
|
||||||
|
**/
|
||||||
|
NotAlly: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Account is not a founder.
|
||||||
|
**/
|
||||||
|
NotFounder: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Item has not been deemed unscrupulous.
|
||||||
|
**/
|
||||||
|
NotListedAsUnscrupulous: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Account is not a member.
|
||||||
|
**/
|
||||||
|
NotMember: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The proposal is not vetoable.
|
||||||
|
**/
|
||||||
|
NotVetoableProposal: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Account does not have voting rights.
|
||||||
|
**/
|
||||||
|
NoVotingRights: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Length of website URL exceeds `MaxWebsiteUrlLength`.
|
||||||
|
**/
|
||||||
|
TooLongWebsiteUrl: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Number of announcements exceeds `MaxAnnouncementsCount`.
|
||||||
|
**/
|
||||||
|
TooManyAnnouncements: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Number of members exceeds `MaxMembersCount`.
|
||||||
|
**/
|
||||||
|
TooManyMembers: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The number of unscrupulous items exceeds `MaxUnscrupulousItems`.
|
||||||
|
**/
|
||||||
|
TooManyUnscrupulousItems: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* This member is up for being kicked from the Alliance and cannot perform this operation.
|
||||||
|
**/
|
||||||
|
UpForKicking: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The account's identity has no good judgement.
|
||||||
|
**/
|
||||||
|
WithoutGoodIdentityJudgement: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The account's identity does not have display field and website field.
|
||||||
|
**/
|
||||||
|
WithoutIdentityDisplayAndWebsite: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic error
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedError<ApiType>;
|
||||||
|
};
|
||||||
|
allianceMotion: {
|
||||||
|
/**
|
||||||
|
* Members are already initialized!
|
||||||
|
**/
|
||||||
|
AlreadyInitialized: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Duplicate proposals not allowed
|
||||||
|
**/
|
||||||
|
DuplicateProposal: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Duplicate vote ignored
|
||||||
|
**/
|
||||||
|
DuplicateVote: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Account is not a member
|
||||||
|
**/
|
||||||
|
NotMember: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Proposal must exist
|
||||||
|
**/
|
||||||
|
ProposalMissing: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The close call was made too early, before the end of the voting.
|
||||||
|
**/
|
||||||
|
TooEarly: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* There can only be a maximum of `MaxProposals` active proposals.
|
||||||
|
**/
|
||||||
|
TooManyProposals: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Mismatched index
|
||||||
|
**/
|
||||||
|
WrongIndex: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The given length bound for the proposal was too low.
|
||||||
|
**/
|
||||||
|
WrongProposalLength: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The given weight bound for the proposal was too low.
|
||||||
|
**/
|
||||||
|
WrongProposalWeight: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic error
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedError<ApiType>;
|
||||||
|
};
|
||||||
assets: {
|
assets: {
|
||||||
/**
|
/**
|
||||||
* The asset-account already exists.
|
* The asset-account already exists.
|
||||||
@@ -596,6 +733,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* these are removed, either through `unvote` or `reap_vote`.
|
* these are removed, either through `unvote` or `reap_vote`.
|
||||||
**/
|
**/
|
||||||
VotesExist: AugmentedError<ApiType>;
|
VotesExist: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Voting period too low
|
||||||
|
**/
|
||||||
|
VotingPeriodLow: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Invalid upper bound.
|
* Invalid upper bound.
|
||||||
**/
|
**/
|
||||||
@@ -1020,10 +1161,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* pool at a time.
|
* pool at a time.
|
||||||
**/
|
**/
|
||||||
AccountBelongsToOtherPool: AugmentedError<ApiType>;
|
AccountBelongsToOtherPool: AugmentedError<ApiType>;
|
||||||
/**
|
|
||||||
* The member is already unbonding in this era.
|
|
||||||
**/
|
|
||||||
AlreadyUnbonding: AugmentedError<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* The pools state cannot be changed.
|
* The pools state cannot be changed.
|
||||||
**/
|
**/
|
||||||
@@ -1036,7 +1173,7 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Some error occurred that should never happen. This should be reported to the
|
* Some error occurred that should never happen. This should be reported to the
|
||||||
* maintainers.
|
* maintainers.
|
||||||
**/
|
**/
|
||||||
DefensiveError: AugmentedError<ApiType>;
|
Defensive: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The caller does not have adequate permissions.
|
* The caller does not have adequate permissions.
|
||||||
**/
|
**/
|
||||||
@@ -1046,10 +1183,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* anymore to, for example, collect rewards).
|
* anymore to, for example, collect rewards).
|
||||||
**/
|
**/
|
||||||
FullyUnbonding: AugmentedError<ApiType>;
|
FullyUnbonding: AugmentedError<ApiType>;
|
||||||
/**
|
|
||||||
* The pool has insufficient balance to bond as a nominator.
|
|
||||||
**/
|
|
||||||
InsufficientBond: AugmentedError<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* Too many members in the pool or system.
|
* Too many members in the pool or system.
|
||||||
**/
|
**/
|
||||||
@@ -1193,6 +1326,98 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
|
rankedCollective: {
|
||||||
|
/**
|
||||||
|
* Account is already a member.
|
||||||
|
**/
|
||||||
|
AlreadyMember: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Unexpected error in state.
|
||||||
|
**/
|
||||||
|
Corruption: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The information provided is incorrect.
|
||||||
|
**/
|
||||||
|
InvalidWitness: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* There are no further records to be removed.
|
||||||
|
**/
|
||||||
|
NoneRemaining: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The origin is not sufficiently privileged to do the operation.
|
||||||
|
**/
|
||||||
|
NoPermission: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Account is not a member.
|
||||||
|
**/
|
||||||
|
NotMember: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The given poll index is unknown or has closed.
|
||||||
|
**/
|
||||||
|
NotPolling: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The given poll is still ongoing.
|
||||||
|
**/
|
||||||
|
Ongoing: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The member's rank is too low to vote.
|
||||||
|
**/
|
||||||
|
RankTooLow: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic error
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedError<ApiType>;
|
||||||
|
};
|
||||||
|
rankedPolls: {
|
||||||
|
/**
|
||||||
|
* The referendum index provided is invalid in this context.
|
||||||
|
**/
|
||||||
|
BadReferendum: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The track identifier given was invalid.
|
||||||
|
**/
|
||||||
|
BadTrack: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* There are already a full complement of referendums in progress for this track.
|
||||||
|
**/
|
||||||
|
Full: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Referendum's decision deposit is already paid.
|
||||||
|
**/
|
||||||
|
HasDeposit: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The deposit cannot be refunded since none was made.
|
||||||
|
**/
|
||||||
|
NoDeposit: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The deposit refunder is not the depositor.
|
||||||
|
**/
|
||||||
|
NoPermission: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* There was nothing to do in the advancement.
|
||||||
|
**/
|
||||||
|
NothingToDo: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Referendum is not ongoing.
|
||||||
|
**/
|
||||||
|
NotOngoing: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* No track exists for the proposal origin.
|
||||||
|
**/
|
||||||
|
NoTrack: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The queue of the track is empty.
|
||||||
|
**/
|
||||||
|
QueueEmpty: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Any deposit cannot be refunded until after the decision is over.
|
||||||
|
**/
|
||||||
|
Unfinished: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic error
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedError<ApiType>;
|
||||||
|
};
|
||||||
recovery: {
|
recovery: {
|
||||||
/**
|
/**
|
||||||
* This account is already set up for recovery
|
* This account is already set up for recovery
|
||||||
@@ -1564,6 +1789,16 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* bad witness data provided.
|
* bad witness data provided.
|
||||||
**/
|
**/
|
||||||
BadWitness: AugmentedError<ApiType>;
|
BadWitness: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* A key was longer than the configured maximum.
|
||||||
|
*
|
||||||
|
* This means that the migration halted at the current [`Progress`] and
|
||||||
|
* can be resumed with a larger [`crate::Config::MaxKeyLen`] value.
|
||||||
|
* Retrying with the same [`crate::Config::MaxKeyLen`] value will not work.
|
||||||
|
* The value should only be increased to avoid a storage migration for the currently
|
||||||
|
* stored [`crate::Progress::LastKey`].
|
||||||
|
**/
|
||||||
|
KeyTooLong: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* max signed limits not respected.
|
* max signed limits not respected.
|
||||||
**/
|
**/
|
||||||
@@ -1684,6 +1919,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Not a member.
|
* Not a member.
|
||||||
**/
|
**/
|
||||||
NotMember: AugmentedError<ApiType>;
|
NotMember: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Too many members.
|
||||||
|
**/
|
||||||
|
TooManyMembers: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Generic error
|
* Generic error
|
||||||
**/
|
**/
|
||||||
@@ -1778,6 +2017,11 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
treasury: {
|
treasury: {
|
||||||
|
/**
|
||||||
|
* The spend origin is valid but the amount it is allowed to spend is lower than the
|
||||||
|
* amount to be spent.
|
||||||
|
**/
|
||||||
|
InsufficientPermission: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Proposer's balance is too low.
|
* Proposer's balance is too low.
|
||||||
**/
|
**/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -7,4 +7,5 @@ import './errors';
|
|||||||
import './events';
|
import './events';
|
||||||
import './query';
|
import './query';
|
||||||
import './registry';
|
import './registry';
|
||||||
|
import './runtime';
|
||||||
import './tx';
|
import './tx';
|
||||||
|
|||||||
@@ -3,14 +3,83 @@
|
|||||||
|
|
||||||
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 { 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, u16, 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, 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 { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, PalletAllianceCid, PalletAllianceMemberRole, 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, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, 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' {
|
||||||
export interface AugmentedQueries<ApiType extends ApiTypes> {
|
export interface AugmentedQueries<ApiType extends ApiTypes> {
|
||||||
|
alliance: {
|
||||||
|
/**
|
||||||
|
* The current IPFS CIDs of any announcements.
|
||||||
|
**/
|
||||||
|
announcements: AugmentedQuery<ApiType, () => Observable<Vec<PalletAllianceCid>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Maps members to their candidacy deposit.
|
||||||
|
**/
|
||||||
|
depositOf: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u128>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Maps member type to members of each type.
|
||||||
|
**/
|
||||||
|
members: AugmentedQuery<ApiType, (arg: PalletAllianceMemberRole | 'Founder' | 'Fellow' | 'Ally' | number | Uint8Array) => Observable<Vec<AccountId32>>, [PalletAllianceMemberRole]> & QueryableStorageEntry<ApiType, [PalletAllianceMemberRole]>;
|
||||||
|
/**
|
||||||
|
* The IPFS CID of the alliance rule.
|
||||||
|
* Founders and fellows can propose a new rule with a super-majority.
|
||||||
|
*
|
||||||
|
* Any founder has a special one-vote veto right to the rule setting.
|
||||||
|
**/
|
||||||
|
rule: AugmentedQuery<ApiType, () => Observable<Option<PalletAllianceCid>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* The current list of accounts deemed unscrupulous. These accounts non grata cannot submit
|
||||||
|
* candidacy.
|
||||||
|
**/
|
||||||
|
unscrupulousAccounts: AugmentedQuery<ApiType, () => Observable<Vec<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* The current list of websites deemed unscrupulous.
|
||||||
|
**/
|
||||||
|
unscrupulousWebsites: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* A set of members that are (potentially) being kicked out. They cannot retire until the
|
||||||
|
* motion is settled.
|
||||||
|
**/
|
||||||
|
upForKicking: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<bool>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
|
allianceMotion: {
|
||||||
|
/**
|
||||||
|
* The current members of the collective. This is stored sorted (just by value).
|
||||||
|
**/
|
||||||
|
members: AugmentedQuery<ApiType, () => Observable<Vec<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* The prime member that helps determine the default vote behavior in case of absentations.
|
||||||
|
**/
|
||||||
|
prime: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Proposals so far.
|
||||||
|
**/
|
||||||
|
proposalCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Actual proposal for a given hash, if it's current.
|
||||||
|
**/
|
||||||
|
proposalOf: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Call>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
|
||||||
|
/**
|
||||||
|
* The hashes of the active proposals.
|
||||||
|
**/
|
||||||
|
proposals: AugmentedQuery<ApiType, () => Observable<Vec<H256>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Votes on a given proposal, if it is ongoing.
|
||||||
|
**/
|
||||||
|
voting: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<PalletCollectiveVotes>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
assets: {
|
assets: {
|
||||||
/**
|
/**
|
||||||
* The holdings of a specific account for a specific asset.
|
* The holdings of a specific account for a specific asset.
|
||||||
@@ -354,12 +423,12 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* require. The actual amount locked on behalf of this pallet should always be the maximum of
|
* require. The actual amount locked on behalf of this pallet should always be the maximum of
|
||||||
* this list.
|
* this list.
|
||||||
**/
|
**/
|
||||||
classLocksFor: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<ITuple<[u8, u128]>>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
classLocksFor: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<ITuple<[u16, u128]>>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
* All voting for a particular voter in a particular voting class. We store the balance for the
|
* All voting for a particular voter in a particular voting class. We store the balance for the
|
||||||
* number of votes that we have recorded.
|
* number of votes that we have recorded.
|
||||||
**/
|
**/
|
||||||
votingFor: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u8 | AnyNumber | Uint8Array) => Observable<PalletConvictionVotingVoteVoting>, [AccountId32, u8]> & QueryableStorageEntry<ApiType, [AccountId32, u8]>;
|
votingFor: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u16 | AnyNumber | Uint8Array) => Observable<PalletConvictionVotingVoteVoting>, [AccountId32, u16]> & QueryableStorageEntry<ApiType, [AccountId32, u16]>;
|
||||||
/**
|
/**
|
||||||
* Generic query
|
* Generic query
|
||||||
**/
|
**/
|
||||||
@@ -842,6 +911,9 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
*
|
*
|
||||||
* This is the amount that the depositor must put as their initial stake in the pool, as an
|
* This is the amount that the depositor must put as their initial stake in the pool, as an
|
||||||
* indication of "skin in the game".
|
* indication of "skin in the game".
|
||||||
|
*
|
||||||
|
* This is the value that will always exist in the staking ledger of the pool bonded account
|
||||||
|
* while all other accounts leave.
|
||||||
**/
|
**/
|
||||||
minCreateBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
minCreateBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
@@ -938,6 +1010,60 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
|
rankedCollective: {
|
||||||
|
/**
|
||||||
|
* The index of each ranks's member into the group of members who have at least that rank.
|
||||||
|
**/
|
||||||
|
idToIndex: AugmentedQuery<ApiType, (arg1: u16 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u16, AccountId32]> & QueryableStorageEntry<ApiType, [u16, AccountId32]>;
|
||||||
|
/**
|
||||||
|
* The members in the collective by index. All indices in the range `0..MemberCount` will
|
||||||
|
* return `Some`, however a member's index is not guaranteed to remain unchanged over time.
|
||||||
|
**/
|
||||||
|
indexToId: AugmentedQuery<ApiType, (arg1: u16 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<AccountId32>>, [u16, u32]> & QueryableStorageEntry<ApiType, [u16, u32]>;
|
||||||
|
/**
|
||||||
|
* The number of members in the collective who have at least the rank according to the index
|
||||||
|
* of the vec.
|
||||||
|
**/
|
||||||
|
memberCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
|
||||||
|
/**
|
||||||
|
* The current members of the collective.
|
||||||
|
**/
|
||||||
|
members: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletRankedCollectiveMemberRecord>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Votes on a given proposal, if it is ongoing.
|
||||||
|
**/
|
||||||
|
voting: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<PalletRankedCollectiveVoteRecord>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;
|
||||||
|
votingCleanup: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
|
rankedPolls: {
|
||||||
|
/**
|
||||||
|
* The number of referenda being decided currently.
|
||||||
|
**/
|
||||||
|
decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
|
||||||
|
/**
|
||||||
|
* The next free referendum index, aka the number of referenda started so far.
|
||||||
|
**/
|
||||||
|
referendumCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Information concerning any given referendum.
|
||||||
|
**/
|
||||||
|
referendumInfoFor: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletReferendaReferendumInfoRankedCollectiveTally>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* The sorted list of referenda ready to be decided but not yet being decided, ordered by
|
||||||
|
* conviction-weighted approvals.
|
||||||
|
*
|
||||||
|
* This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`.
|
||||||
|
**/
|
||||||
|
trackQueue: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, u32]>>>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
recovery: {
|
recovery: {
|
||||||
/**
|
/**
|
||||||
* Active recovery attempts.
|
* Active recovery attempts.
|
||||||
@@ -965,7 +1091,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* The number of referenda being decided currently.
|
* The number of referenda being decided currently.
|
||||||
**/
|
**/
|
||||||
decidingCount: AugmentedQuery<ApiType, (arg: u8 | AnyNumber | Uint8Array) => Observable<u32>, [u8]> & QueryableStorageEntry<ApiType, [u8]>;
|
decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
|
||||||
/**
|
/**
|
||||||
* The next free referendum index, aka the number of referenda started so far.
|
* The next free referendum index, aka the number of referenda started so far.
|
||||||
**/
|
**/
|
||||||
@@ -973,14 +1099,14 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* Information concerning any given referendum.
|
* Information concerning any given referendum.
|
||||||
**/
|
**/
|
||||||
referendumInfoFor: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletReferendaReferendumInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
referendumInfoFor: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletReferendaReferendumInfoConvictionVotingTally>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* The sorted list of referenda ready to be decided but not yet being decided, ordered by
|
* The sorted list of referenda ready to be decided but not yet being decided, ordered by
|
||||||
* conviction-weighted approvals.
|
* conviction-weighted approvals.
|
||||||
*
|
*
|
||||||
* This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`.
|
* This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`.
|
||||||
**/
|
**/
|
||||||
trackQueue: AugmentedQuery<ApiType, (arg: u8 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, u128]>>>, [u8]> & QueryableStorageEntry<ApiType, [u8]>;
|
trackQueue: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, u128]>>>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
|
||||||
/**
|
/**
|
||||||
* Generic query
|
* Generic query
|
||||||
**/
|
**/
|
||||||
@@ -1575,14 +1701,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* Storage fee per transaction.
|
* Storage fee per transaction.
|
||||||
**/
|
**/
|
||||||
entryFee: AugmentedQuery<ApiType, () => Observable<Option<u128>>, []> & QueryableStorageEntry<ApiType, []>;
|
entryFee: AugmentedQuery<ApiType, () => Observable<Option<u128>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
|
||||||
* Maximum number of indexed transactions in the block.
|
|
||||||
**/
|
|
||||||
maxBlockTransactions: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
|
||||||
/**
|
|
||||||
* Maximum data set in a single transaction in bytes.
|
|
||||||
**/
|
|
||||||
maxTransactionSize: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
|
||||||
/**
|
/**
|
||||||
* Was the proof checked in this block?
|
* Was the proof checked in this block?
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -0,0 +1,265 @@
|
|||||||
|
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import type { ApiTypes } from '@polkadot/api-base/types';
|
||||||
|
import type { Bytes, Null, Option, Result, Vec, u32, u64 } from '@polkadot/types-codec';
|
||||||
|
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||||
|
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
|
||||||
|
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
|
||||||
|
import type { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||||
|
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||||
|
import type { CodeUploadResult, ContractExecResult, ContractInstantiateResult } from '@polkadot/types/interfaces/contracts';
|
||||||
|
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||||
|
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
|
||||||
|
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||||
|
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||||
|
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||||
|
import type { AccountId, Balance, Block, Hash, Header, Index, KeyTypeId, Slot } from '@polkadot/types/interfaces/runtime';
|
||||||
|
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||||
|
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
||||||
|
import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
|
||||||
|
import type { IExtrinsic, Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
|
declare module '@polkadot/api-base/types/calls' {
|
||||||
|
export interface AugmentedCalls<ApiType extends ApiTypes> {
|
||||||
|
/** 0xbc9d89904f5b923f/1 */
|
||||||
|
accountNonceApi: {
|
||||||
|
/**
|
||||||
|
* The API to query account nonce (aka transaction index)
|
||||||
|
**/
|
||||||
|
accountNonce: AugmentedCall<ApiType, (accountId: AccountId | string | Uint8Array) => Observable<Index>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0x687ad44ad37f03c2/1 */
|
||||||
|
authorityDiscoveryApi: {
|
||||||
|
/**
|
||||||
|
* Retrieve authority identifiers of the current and next authority set.
|
||||||
|
**/
|
||||||
|
authorities: AugmentedCall<ApiType, () => Observable<Vec<AuthorityId>>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xcbca25e39f142387/2 */
|
||||||
|
babeApi: {
|
||||||
|
/**
|
||||||
|
* Return the genesis configuration for BABE. The configuration is only read on genesis.
|
||||||
|
**/
|
||||||
|
configuration: AugmentedCall<ApiType, () => Observable<BabeGenesisConfiguration>>;
|
||||||
|
/**
|
||||||
|
* Returns information regarding the current epoch.
|
||||||
|
**/
|
||||||
|
currentEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
|
||||||
|
/**
|
||||||
|
* Returns the slot that started the current epoch.
|
||||||
|
**/
|
||||||
|
currentEpochStart: AugmentedCall<ApiType, () => Observable<Slot>>;
|
||||||
|
/**
|
||||||
|
* Generates a proof of key ownership for the given authority in the current epoch.
|
||||||
|
**/
|
||||||
|
generateKeyOwnershipProof: AugmentedCall<ApiType, (slot: Slot | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||||
|
/**
|
||||||
|
* Returns information regarding the next epoch (which was already previously announced).
|
||||||
|
**/
|
||||||
|
nextEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
|
||||||
|
/**
|
||||||
|
* Submits an unsigned extrinsic to report an equivocation.
|
||||||
|
**/
|
||||||
|
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: BabeEquivocationProof | { offender?: any; slotNumber?: any; firstHeader?: any; secondHeader?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0x40fe3ad401f8959a/6 */
|
||||||
|
blockBuilder: {
|
||||||
|
/**
|
||||||
|
* Apply the given extrinsic.
|
||||||
|
**/
|
||||||
|
applyExtrinsic: AugmentedCall<ApiType, (extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<ApplyExtrinsicResult>>;
|
||||||
|
/**
|
||||||
|
* Check that the inherents are valid.
|
||||||
|
**/
|
||||||
|
checkInherents: AugmentedCall<ApiType, (block: Block | { header?: any; extrinsics?: any } | string | Uint8Array, data: InherentData | { data?: any } | string | Uint8Array) => Observable<CheckInherentsResult>>;
|
||||||
|
/**
|
||||||
|
* Finish the current block.
|
||||||
|
**/
|
||||||
|
finalizeBlock: AugmentedCall<ApiType, () => Observable<Header>>;
|
||||||
|
/**
|
||||||
|
* Generate inherent extrinsics.
|
||||||
|
**/
|
||||||
|
inherentExtrinsics: AugmentedCall<ApiType, (inherent: InherentData | { data?: any } | string | Uint8Array) => Observable<Vec<Extrinsic>>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0x68b66ba122c93fa7/1 */
|
||||||
|
contractsApi: {
|
||||||
|
/**
|
||||||
|
* Perform a call from a specified account to a given contract.
|
||||||
|
**/
|
||||||
|
call: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, dest: AccountId | string | Uint8Array, value: Balance | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, storageDepositLimit: Option<Balance> | null | object | string | Uint8Array, inputData: Bytes | string | Uint8Array) => Observable<ContractExecResult>>;
|
||||||
|
/**
|
||||||
|
* Query a given storage key in a given contract.
|
||||||
|
**/
|
||||||
|
getStorage: AugmentedCall<ApiType, (address: AccountId | string | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||||
|
/**
|
||||||
|
* Instantiate a new contract.
|
||||||
|
**/
|
||||||
|
instantiate: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, value: Balance | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, storageDepositLimit: Option<Balance> | null | object | string | Uint8Array, code: Bytes | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => Observable<ContractInstantiateResult>>;
|
||||||
|
/**
|
||||||
|
* Upload new code without instantiating a contract from it.
|
||||||
|
**/
|
||||||
|
uploadCode: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, code: Bytes | string | Uint8Array, storageDepositLimit: Option<Balance> | null | object | string | Uint8Array) => Observable<CodeUploadResult>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xdf6acb689907609b/4 */
|
||||||
|
core: {
|
||||||
|
/**
|
||||||
|
* Execute the given block.
|
||||||
|
**/
|
||||||
|
executeBlock: AugmentedCall<ApiType, (block: Block | { header?: any; extrinsics?: any } | string | Uint8Array) => Observable<Null>>;
|
||||||
|
/**
|
||||||
|
* Initialize a block with the given header.
|
||||||
|
**/
|
||||||
|
initializeBlock: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||||
|
/**
|
||||||
|
* Returns the version of the runtime.
|
||||||
|
**/
|
||||||
|
version: AugmentedCall<ApiType, () => Observable<RuntimeVersion>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xed99c5acb25eedf5/3 */
|
||||||
|
grandpaApi: {
|
||||||
|
/**
|
||||||
|
* Get current GRANDPA authority set id.
|
||||||
|
**/
|
||||||
|
currentSetId: AugmentedCall<ApiType, () => Observable<SetId>>;
|
||||||
|
/**
|
||||||
|
* Generates a proof of key ownership for the given authority in the given set.
|
||||||
|
**/
|
||||||
|
generateKeyOwnershipProof: AugmentedCall<ApiType, (setId: SetId | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
|
||||||
|
/**
|
||||||
|
* Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed.
|
||||||
|
**/
|
||||||
|
grandpaAuthorities: AugmentedCall<ApiType, () => Observable<AuthorityList>>;
|
||||||
|
/**
|
||||||
|
* Submits an unsigned extrinsic to report an equivocation.
|
||||||
|
**/
|
||||||
|
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: GrandpaEquivocationProof | { setId?: any; equivocation?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0x37e397fc7c91f5e4/1 */
|
||||||
|
metadata: {
|
||||||
|
/**
|
||||||
|
* Returns the metadata of a runtime
|
||||||
|
**/
|
||||||
|
metadata: AugmentedCall<ApiType, () => Observable<OpaqueMetadata>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0x91d5df18b0d2cf58/1 */
|
||||||
|
mmrApi: {
|
||||||
|
/**
|
||||||
|
* Generate MMR proof for a series of leaves under given indices.
|
||||||
|
**/
|
||||||
|
generateBatchProof: AugmentedCall<ApiType, (leafIndices: Vec<MmrLeafIndex> | (MmrLeafIndex | AnyNumber | Uint8Array)[]) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Generate MMR proof for a leaf under given index.
|
||||||
|
**/
|
||||||
|
generateProof: AugmentedCall<ApiType, (leafIndex: MmrLeafIndex | AnyNumber | Uint8Array) => Observable<Result<ITuple<[MmrEncodableOpaqueLeaf, MmrProof]>, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Return the on-chain MMR root hash.
|
||||||
|
**/
|
||||||
|
mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Verify MMR proof against on-chain MMR for a batch of leaves.
|
||||||
|
**/
|
||||||
|
verifyBatchProof: AugmentedCall<ApiType, (leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Verify MMR proof against given root hash or a batch of leaves.
|
||||||
|
**/
|
||||||
|
verifyBatchProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | { leafIndices?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Verify MMR proof against on-chain MMR.
|
||||||
|
**/
|
||||||
|
verifyProof: AugmentedCall<ApiType, (leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Verify MMR proof against given root hash.
|
||||||
|
**/
|
||||||
|
verifyProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | { leafIndex?: any; leafCount?: any; items?: any } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xf78b278be53f454c/2 */
|
||||||
|
offchainWorkerApi: {
|
||||||
|
/**
|
||||||
|
* Starts the off-chain task for given block header.
|
||||||
|
**/
|
||||||
|
offchainWorker: AugmentedCall<ApiType, (header: Header | { parentHash?: any; number?: any; stateRoot?: any; extrinsicsRoot?: any; digest?: any } | string | Uint8Array) => Observable<Null>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xab3c0572291feb8b/1 */
|
||||||
|
sessionKeys: {
|
||||||
|
/**
|
||||||
|
* Decode the given public session keys.
|
||||||
|
**/
|
||||||
|
decodeSessionKeys: AugmentedCall<ApiType, (encoded: Bytes | string | Uint8Array) => Observable<Option<Vec<ITuple<[Bytes, KeyTypeId]>>>>>;
|
||||||
|
/**
|
||||||
|
* Generate a set of session keys with optionally using the given seed.
|
||||||
|
**/
|
||||||
|
generateSessionKeys: AugmentedCall<ApiType, (seed: Option<Bytes> | null | object | string | Uint8Array) => Observable<Bytes>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0xd2bc9897eed08f15/3 */
|
||||||
|
taggedTransactionQueue: {
|
||||||
|
/**
|
||||||
|
* Validate the transaction.
|
||||||
|
**/
|
||||||
|
validateTransaction: AugmentedCall<ApiType, (source: TransactionSource | 'InBlock' | 'Local' | 'External' | number | Uint8Array, tx: Extrinsic | IExtrinsic | string | Uint8Array, blockHash: BlockHash | string | Uint8Array) => Observable<TransactionValidity>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
/** 0x37c8bb1350a9a2a8/1 */
|
||||||
|
transactionPaymentApi: {
|
||||||
|
/**
|
||||||
|
* The transaction fee details
|
||||||
|
**/
|
||||||
|
queryFeeDetails: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
|
||||||
|
/**
|
||||||
|
* The transaction info
|
||||||
|
**/
|
||||||
|
queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
|
} // AugmentedCalls
|
||||||
|
} // declare module
|
||||||
@@ -6,10 +6,243 @@ 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, IMethod, ITuple } from '@polkadot/types-codec/types';
|
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
||||||
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 { FrameSupportScheduleDispatchTime, FrameSupportScheduleMaybeHashed, NodeRuntimeOriginCaller, NodeRuntimeProxyType, NodeRuntimeSessionKeys, PalletAssetsDestroyWitness, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof } from '@polkadot/types/lookup';
|
import type { FrameSupportScheduleDispatchTime, FrameSupportScheduleMaybeHashed, NodeRuntimeOriginCaller, NodeRuntimeProxyType, NodeRuntimeSessionKeys, PalletAllianceCid, PalletAllianceUnscrupulousItem, PalletAssetsDestroyWitness, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof } 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> {
|
||||||
|
alliance: {
|
||||||
|
/**
|
||||||
|
* Add accounts or websites to the list of unscrupulous items.
|
||||||
|
**/
|
||||||
|
addUnscrupulousItems: AugmentedSubmittable<(items: Vec<PalletAllianceUnscrupulousItem> | (PalletAllianceUnscrupulousItem | { AccountId: any } | { Website: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<PalletAllianceUnscrupulousItem>]>;
|
||||||
|
/**
|
||||||
|
* Make an announcement of a new IPFS CID about alliance issues.
|
||||||
|
**/
|
||||||
|
announce: AugmentedSubmittable<(announcement: PalletAllianceCid | { version?: any; codec?: any; hash_?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletAllianceCid]>;
|
||||||
|
/**
|
||||||
|
* Close a vote that is either approved, disapproved, or whose voting period has ended.
|
||||||
|
*
|
||||||
|
* Requires the sender to be a founder or fellow.
|
||||||
|
**/
|
||||||
|
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: Compact<u64> | AnyNumber | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, Compact<u64>, Compact<u32>]>;
|
||||||
|
/**
|
||||||
|
* Elevate an ally to fellow.
|
||||||
|
**/
|
||||||
|
elevateAlly: AugmentedSubmittable<(ally: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
|
||||||
|
/**
|
||||||
|
* Initialize the founders, fellows, and allies.
|
||||||
|
*
|
||||||
|
* This should only be called once, and must be called by the Root origin.
|
||||||
|
**/
|
||||||
|
initMembers: AugmentedSubmittable<(founders: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], fellows: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], allies: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, Vec<AccountId32>, Vec<AccountId32>]>;
|
||||||
|
/**
|
||||||
|
* Submit oneself for candidacy. A fixed deposit is reserved.
|
||||||
|
**/
|
||||||
|
joinAlliance: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||||
|
/**
|
||||||
|
* Kick a member from the alliance and slash its deposit.
|
||||||
|
**/
|
||||||
|
kickMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
|
||||||
|
/**
|
||||||
|
* A founder or fellow can nominate someone to join the alliance as an Ally.
|
||||||
|
* There is no deposit required to the nominator or nominee.
|
||||||
|
**/
|
||||||
|
nominateAlly: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
|
||||||
|
/**
|
||||||
|
* Add a new proposal to be voted on.
|
||||||
|
*
|
||||||
|
* Requires the sender to be a founder or fellow.
|
||||||
|
**/
|
||||||
|
propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>;
|
||||||
|
/**
|
||||||
|
* Remove an announcement.
|
||||||
|
**/
|
||||||
|
removeAnnouncement: AugmentedSubmittable<(announcement: PalletAllianceCid | { version?: any; codec?: any; hash_?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletAllianceCid]>;
|
||||||
|
/**
|
||||||
|
* Deem an item no longer unscrupulous.
|
||||||
|
**/
|
||||||
|
removeUnscrupulousItems: AugmentedSubmittable<(items: Vec<PalletAllianceUnscrupulousItem> | (PalletAllianceUnscrupulousItem | { AccountId: any } | { Website: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<PalletAllianceUnscrupulousItem>]>;
|
||||||
|
/**
|
||||||
|
* As a member, retire from the alliance and unreserve the deposit.
|
||||||
|
**/
|
||||||
|
retire: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||||
|
/**
|
||||||
|
* Set a new IPFS CID to the alliance rule.
|
||||||
|
**/
|
||||||
|
setRule: AugmentedSubmittable<(rule: PalletAllianceCid | { version?: any; codec?: any; hash_?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletAllianceCid]>;
|
||||||
|
/**
|
||||||
|
* Veto a proposal about `set_rule` and `elevate_ally`, close, and remove it from the
|
||||||
|
* system, regardless of its current state.
|
||||||
|
*
|
||||||
|
* Must be called by a founder.
|
||||||
|
**/
|
||||||
|
veto: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
|
||||||
|
/**
|
||||||
|
* Add an aye or nay vote for the sender to the given proposal.
|
||||||
|
*
|
||||||
|
* Requires the sender to be a founder or fellow.
|
||||||
|
**/
|
||||||
|
vote: AugmentedSubmittable<(proposal: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, approve: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, bool]>;
|
||||||
|
/**
|
||||||
|
* Generic tx
|
||||||
|
**/
|
||||||
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
|
};
|
||||||
|
allianceMotion: {
|
||||||
|
/**
|
||||||
|
* Close a vote that is either approved, disapproved or whose voting period has ended.
|
||||||
|
*
|
||||||
|
* May be called by any signed account in order to finish voting and close the proposal.
|
||||||
|
*
|
||||||
|
* If called before the end of the voting period it will only close the vote if it is
|
||||||
|
* has enough votes to be approved or disapproved.
|
||||||
|
*
|
||||||
|
* If called after the end of the voting period abstentions are counted as rejections
|
||||||
|
* unless there is a prime member set and the prime member cast an approval.
|
||||||
|
*
|
||||||
|
* If the close operation completes successfully with disapproval, the transaction fee will
|
||||||
|
* be waived. Otherwise execution of the approved operation will be charged to the caller.
|
||||||
|
*
|
||||||
|
* + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed
|
||||||
|
* proposal.
|
||||||
|
* + `length_bound`: The upper bound for the length of the proposal in storage. Checked via
|
||||||
|
* `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.
|
||||||
|
*
|
||||||
|
* # <weight>
|
||||||
|
* ## Weight
|
||||||
|
* - `O(B + M + P1 + P2)` where:
|
||||||
|
* - `B` is `proposal` size in bytes (length-fee-bounded)
|
||||||
|
* - `M` is members-count (code- and governance-bounded)
|
||||||
|
* - `P1` is the complexity of `proposal` preimage.
|
||||||
|
* - `P2` is proposal-count (code-bounded)
|
||||||
|
* - DB:
|
||||||
|
* - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)
|
||||||
|
* - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec
|
||||||
|
* `O(P2)`)
|
||||||
|
* - any mutations done while executing `proposal` (`P1`)
|
||||||
|
* - up to 3 events
|
||||||
|
* # </weight>
|
||||||
|
**/
|
||||||
|
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: Compact<u64> | AnyNumber | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, Compact<u64>, Compact<u32>]>;
|
||||||
|
/**
|
||||||
|
* Disapprove a proposal, close, and remove it from the system, regardless of its current
|
||||||
|
* state.
|
||||||
|
*
|
||||||
|
* Must be called by the Root origin.
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* * `proposal_hash`: The hash of the proposal that should be disapproved.
|
||||||
|
*
|
||||||
|
* # <weight>
|
||||||
|
* Complexity: O(P) where P is the number of max proposals
|
||||||
|
* DB Weight:
|
||||||
|
* * Reads: Proposals
|
||||||
|
* * Writes: Voting, Proposals, ProposalOf
|
||||||
|
* # </weight>
|
||||||
|
**/
|
||||||
|
disapproveProposal: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
|
||||||
|
/**
|
||||||
|
* Dispatch a proposal from a member using the `Member` origin.
|
||||||
|
*
|
||||||
|
* Origin must be a member of the collective.
|
||||||
|
*
|
||||||
|
* # <weight>
|
||||||
|
* ## Weight
|
||||||
|
* - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching
|
||||||
|
* `proposal`
|
||||||
|
* - DB: 1 read (codec `O(M)`) + DB access of `proposal`
|
||||||
|
* - 1 event
|
||||||
|
* # </weight>
|
||||||
|
**/
|
||||||
|
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.
|
||||||
|
*
|
||||||
|
* Requires the sender to be member.
|
||||||
|
*
|
||||||
|
* `threshold` determines whether `proposal` is executed directly (`threshold < 2`)
|
||||||
|
* or put up for voting.
|
||||||
|
*
|
||||||
|
* # <weight>
|
||||||
|
* ## Weight
|
||||||
|
* - `O(B + M + P1)` or `O(B + M + P2)` where:
|
||||||
|
* - `B` is `proposal` size in bytes (length-fee-bounded)
|
||||||
|
* - `M` is members-count (code- and governance-bounded)
|
||||||
|
* - branching is influenced by `threshold` where:
|
||||||
|
* - `P1` is proposal execution complexity (`threshold < 2`)
|
||||||
|
* - `P2` is proposals-count (code-bounded) (`threshold >= 2`)
|
||||||
|
* - DB:
|
||||||
|
* - 1 storage read `is_member` (codec `O(M)`)
|
||||||
|
* - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)
|
||||||
|
* - DB accesses influenced by `threshold`:
|
||||||
|
* - EITHER storage accesses done by `proposal` (`threshold < 2`)
|
||||||
|
* - OR proposal insertion (`threshold <= 2`)
|
||||||
|
* - 1 storage mutation `Proposals` (codec `O(P2)`)
|
||||||
|
* - 1 storage mutation `ProposalCount` (codec `O(1)`)
|
||||||
|
* - 1 storage write `ProposalOf` (codec `O(B)`)
|
||||||
|
* - 1 storage write `Voting` (codec `O(M)`)
|
||||||
|
* - 1 event
|
||||||
|
* # </weight>
|
||||||
|
**/
|
||||||
|
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.
|
||||||
|
*
|
||||||
|
* - `new_members`: The new member list. Be nice to the chain and provide it sorted.
|
||||||
|
* - `prime`: The prime member whose vote sets the default.
|
||||||
|
* - `old_count`: The upper bound for the previous number of members in storage. Used for
|
||||||
|
* weight estimation.
|
||||||
|
*
|
||||||
|
* Requires root origin.
|
||||||
|
*
|
||||||
|
* NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but
|
||||||
|
* the weight estimations rely on it to estimate dispatchable weight.
|
||||||
|
*
|
||||||
|
* # WARNING:
|
||||||
|
*
|
||||||
|
* The `pallet-collective` can also be managed by logic outside of the pallet through the
|
||||||
|
* implementation of the trait [`ChangeMembers`].
|
||||||
|
* Any call to `set_members` must be careful that the member set doesn't get out of sync
|
||||||
|
* with other logic managing the member set.
|
||||||
|
*
|
||||||
|
* # <weight>
|
||||||
|
* ## Weight
|
||||||
|
* - `O(MP + N)` where:
|
||||||
|
* - `M` old-members-count (code- and governance-bounded)
|
||||||
|
* - `N` new-members-count (code- and governance-bounded)
|
||||||
|
* - `P` proposals-count (code-bounded)
|
||||||
|
* - DB:
|
||||||
|
* - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the
|
||||||
|
* members
|
||||||
|
* - 1 storage read (codec `O(P)`) for reading the proposals
|
||||||
|
* - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal
|
||||||
|
* - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one
|
||||||
|
* # </weight>
|
||||||
|
**/
|
||||||
|
setMembers: AugmentedSubmittable<(newMembers: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], prime: Option<AccountId32> | null | object | string | Uint8Array, oldCount: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, Option<AccountId32>, u32]>;
|
||||||
|
/**
|
||||||
|
* Add an aye or nay vote for the sender to the given proposal.
|
||||||
|
*
|
||||||
|
* Requires the sender to be a member.
|
||||||
|
*
|
||||||
|
* Transaction fees will be waived if the member is voting on any particular proposal
|
||||||
|
* for the first time and the call is successful. Subsequent vote changes will charge a
|
||||||
|
* fee.
|
||||||
|
* # <weight>
|
||||||
|
* ## Weight
|
||||||
|
* - `O(M)` where `M` is members-count (code- and governance-bounded)
|
||||||
|
* - DB:
|
||||||
|
* - 1 storage read `Members` (codec `O(M)`)
|
||||||
|
* - 1 storage mutation `Voting` (codec `O(M)`)
|
||||||
|
* - 1 event
|
||||||
|
* # </weight>
|
||||||
|
**/
|
||||||
|
vote: AugmentedSubmittable<(proposal: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, approve: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, bool]>;
|
||||||
|
/**
|
||||||
|
* Generic tx
|
||||||
|
**/
|
||||||
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
|
};
|
||||||
assets: {
|
assets: {
|
||||||
/**
|
/**
|
||||||
* Approve an amount of asset for transfer by a delegated third-party account.
|
* Approve an amount of asset for transfer by a delegated third-party account.
|
||||||
@@ -1026,7 +1259,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Weight: `O(R)` where R is the number of polls the voter delegating to has
|
* Weight: `O(R)` where R is the number of polls the voter delegating to has
|
||||||
* voted on. Weight is initially charged as if maximum votes, but is refunded later.
|
* voted on. Weight is initially charged as if maximum votes, but is refunded later.
|
||||||
**/
|
**/
|
||||||
delegate: AugmentedSubmittable<(clazz: u8 | AnyNumber | Uint8Array, to: AccountId32 | string | Uint8Array, conviction: PalletConvictionVotingConviction | 'None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x' | number | Uint8Array, balance: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u8, AccountId32, PalletConvictionVotingConviction, u128]>;
|
delegate: AugmentedSubmittable<(clazz: u16 | AnyNumber | Uint8Array, to: AccountId32 | string | Uint8Array, conviction: PalletConvictionVotingConviction | 'None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x' | number | Uint8Array, balance: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, AccountId32, PalletConvictionVotingConviction, u128]>;
|
||||||
/**
|
/**
|
||||||
* Remove a vote for a poll.
|
* Remove a vote for a poll.
|
||||||
*
|
*
|
||||||
@@ -1045,7 +1278,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Weight: `O(R + log R)` where R is the number of polls that `target` has voted on.
|
* Weight: `O(R + log R)` where R is the number of polls that `target` has voted on.
|
||||||
* Weight is calculated for the maximum number of vote.
|
* Weight is calculated for the maximum number of vote.
|
||||||
**/
|
**/
|
||||||
removeOtherVote: AugmentedSubmittable<(target: AccountId32 | string | Uint8Array, clazz: u8 | AnyNumber | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u8, u32]>;
|
removeOtherVote: AugmentedSubmittable<(target: AccountId32 | string | Uint8Array, clazz: u16 | AnyNumber | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u16, u32]>;
|
||||||
/**
|
/**
|
||||||
* Remove a vote for a poll.
|
* Remove a vote for a poll.
|
||||||
*
|
*
|
||||||
@@ -1077,7 +1310,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Weight: `O(R + log R)` where R is the number of polls that `target` has voted on.
|
* Weight: `O(R + log R)` where R is the number of polls that `target` has voted on.
|
||||||
* Weight is calculated for the maximum number of vote.
|
* Weight is calculated for the maximum number of vote.
|
||||||
**/
|
**/
|
||||||
removeVote: AugmentedSubmittable<(clazz: Option<u8> | null | object | string | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<u8>, u32]>;
|
removeVote: AugmentedSubmittable<(clazz: Option<u16> | null | object | string | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<u16>, u32]>;
|
||||||
/**
|
/**
|
||||||
* Undelegate the voting power of the sending account for a particular class of polls.
|
* Undelegate the voting power of the sending account for a particular class of polls.
|
||||||
*
|
*
|
||||||
@@ -1094,7 +1327,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Weight: `O(R)` where R is the number of polls the voter delegating to has
|
* Weight: `O(R)` where R is the number of polls the voter delegating to has
|
||||||
* voted on. Weight is initially charged as if maximum votes, but is refunded later.
|
* voted on. Weight is initially charged as if maximum votes, but is refunded later.
|
||||||
**/
|
**/
|
||||||
undelegate: AugmentedSubmittable<(clazz: u8 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u8]>;
|
undelegate: AugmentedSubmittable<(clazz: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16]>;
|
||||||
/**
|
/**
|
||||||
* Remove the lock caused prior voting/delegating which has expired within a particluar
|
* Remove the lock caused prior voting/delegating which has expired within a particluar
|
||||||
* class.
|
* class.
|
||||||
@@ -1106,7 +1339,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* Weight: `O(R)` with R number of vote of target.
|
* Weight: `O(R)` with R number of vote of target.
|
||||||
**/
|
**/
|
||||||
unlock: AugmentedSubmittable<(clazz: u8 | AnyNumber | Uint8Array, target: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u8, AccountId32]>;
|
unlock: AugmentedSubmittable<(clazz: u16 | AnyNumber | Uint8Array, target: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, AccountId32]>;
|
||||||
/**
|
/**
|
||||||
* Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal;
|
* Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal;
|
||||||
* otherwise it is a vote to keep the status quo.
|
* otherwise it is a vote to keep the status quo.
|
||||||
@@ -1422,8 +1655,9 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* The dispatch of this call must be `FastTrackOrigin`.
|
* The dispatch of this call must be `FastTrackOrigin`.
|
||||||
*
|
*
|
||||||
* - `proposal_hash`: The hash of the current external proposal.
|
* - `proposal_hash`: The hash of the current external proposal.
|
||||||
* - `voting_period`: The period that is allowed for voting on this proposal. Increased to
|
* - `voting_period`: The period that is allowed for voting on this proposal.
|
||||||
* `FastTrackVotingPeriod` if too low.
|
* Must be always greater than zero.
|
||||||
|
* For `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`.
|
||||||
* - `delay`: The number of block after voting has ended in approval and this should be
|
* - `delay`: The number of block after voting has ended in approval and this should be
|
||||||
* enacted. This doesn't have a minimum amount.
|
* enacted. This doesn't have a minimum amount.
|
||||||
*
|
*
|
||||||
@@ -1838,12 +2072,17 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
};
|
};
|
||||||
grandpa: {
|
grandpa: {
|
||||||
/**
|
/**
|
||||||
* Note that the current authority set of the GRANDPA finality gadget has
|
* Note that the current authority set of the GRANDPA finality gadget has stalled.
|
||||||
* stalled. This will trigger a forced authority set change at the beginning
|
*
|
||||||
* of the next session, to be enacted `delay` blocks after that. The delay
|
* This will trigger a forced authority set change at the beginning of the next session, to
|
||||||
* should be high enough to safely assume that the block signalling the
|
* be enacted `delay` blocks after that. The `delay` should be high enough to safely assume
|
||||||
* forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters
|
* that the block signalling the forced change will not be re-orged e.g. 1000 blocks.
|
||||||
* will start the new authority set using the given finalized block as base.
|
* The block production rate (which may be slowed down because of finality lagging) should
|
||||||
|
* be taken into account when choosing the `delay`. The GRANDPA voters based on the new
|
||||||
|
* authority will start voting on top of `best_finalized_block_number` for new finalized
|
||||||
|
* blocks. `best_finalized_block_number` should be the highest of the latest finalized
|
||||||
|
* block of all validators of the new authority set.
|
||||||
|
*
|
||||||
* Only callable by root.
|
* Only callable by root.
|
||||||
**/
|
**/
|
||||||
noteStalled: AugmentedSubmittable<(delay: u32 | AnyNumber | Uint8Array, bestFinalizedBlockNumber: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
|
noteStalled: AugmentedSubmittable<(delay: u32 | AnyNumber | Uint8Array, bestFinalizedBlockNumber: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
|
||||||
@@ -2469,6 +2708,16 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* accumulated rewards, see [`BondExtra`].
|
* accumulated rewards, see [`BondExtra`].
|
||||||
**/
|
**/
|
||||||
bondExtra: AugmentedSubmittable<(extra: PalletNominationPoolsBondExtra | { FreeBalance: any } | { Rewards: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsBondExtra]>;
|
bondExtra: AugmentedSubmittable<(extra: PalletNominationPoolsBondExtra | { FreeBalance: any } | { Rewards: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsBondExtra]>;
|
||||||
|
/**
|
||||||
|
* Chill on behalf of the pool.
|
||||||
|
*
|
||||||
|
* The dispatch origin of this call must be signed by the pool nominator or the pool
|
||||||
|
* root role, same as [`Pallet::nominate`].
|
||||||
|
*
|
||||||
|
* This directly forward the call to the staking pallet, on behalf of the pool bonded
|
||||||
|
* account.
|
||||||
|
**/
|
||||||
|
chill: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||||
/**
|
/**
|
||||||
* A bonded member can use this to claim their payout based on the rewards that the pool
|
* 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
|
* has accumulated since their last claimed payout (OR since joining if this is there first
|
||||||
@@ -2511,6 +2760,15 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* * Only a pool with [`PoolState::Open`] can be joined
|
* * 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]>;
|
join: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, poolId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, u32]>;
|
||||||
|
/**
|
||||||
|
* Nominate on behalf of the pool.
|
||||||
|
*
|
||||||
|
* The dispatch origin of this call must be signed by the pool nominator or the pool
|
||||||
|
* root role.
|
||||||
|
*
|
||||||
|
* This directly forward the call to the staking pallet, on behalf of the pool bonded
|
||||||
|
* account.
|
||||||
|
**/
|
||||||
nominate: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, validators: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<AccountId32>]>;
|
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.
|
* Call `withdraw_unbonded` for the pools account. This call can be made by any account.
|
||||||
@@ -2534,12 +2792,24 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`].
|
* * `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]>;
|
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]>;
|
||||||
|
/**
|
||||||
|
* Set a new metadata for the pool.
|
||||||
|
*
|
||||||
|
* The dispatch origin of this call must be signed by the state toggler, or the root role
|
||||||
|
* of the pool.
|
||||||
|
**/
|
||||||
setMetadata: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, metadata: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
|
setMetadata: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, metadata: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
|
||||||
|
/**
|
||||||
|
* Set a new state for the pool.
|
||||||
|
*
|
||||||
|
* The dispatch origin of this call must be signed by the state toggler, or the root role
|
||||||
|
* of the pool.
|
||||||
|
**/
|
||||||
setState: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, state: PalletNominationPoolsPoolState | 'Open' | 'Blocked' | 'Destroying' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsPoolState]>;
|
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
|
* 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
|
* implicitly collects the rewards one last time, since not doing so would mean some
|
||||||
* rewards would go forfeited.
|
* rewards would be forfeited.
|
||||||
*
|
*
|
||||||
* Under certain conditions, this call can be dispatched permissionlessly (i.e. by any
|
* Under certain conditions, this call can be dispatched permissionlessly (i.e. by any
|
||||||
* account).
|
* account).
|
||||||
@@ -2832,6 +3102,154 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
|
rankedCollective: {
|
||||||
|
/**
|
||||||
|
* Introduce a new member.
|
||||||
|
*
|
||||||
|
* - `origin`: Must be the `AdminOrigin`.
|
||||||
|
* - `who`: Account of non-member which will become a member.
|
||||||
|
* - `rank`: The rank to give the new member.
|
||||||
|
*
|
||||||
|
* Weight: `O(1)`
|
||||||
|
**/
|
||||||
|
addMember: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Remove votes from the given poll. It must have ended.
|
||||||
|
*
|
||||||
|
* - `origin`: Must be `Signed` by any account.
|
||||||
|
* - `poll_index`: Index of a poll which is completed and for which votes continue to
|
||||||
|
* exist.
|
||||||
|
* - `max`: Maximum number of vote items from remove in this call.
|
||||||
|
*
|
||||||
|
* Transaction fees are waived if the operation is successful.
|
||||||
|
*
|
||||||
|
* Weight `O(max)` (less if there are fewer items to remove than `max`).
|
||||||
|
**/
|
||||||
|
cleanupPoll: AugmentedSubmittable<(pollIndex: u32 | AnyNumber | Uint8Array, max: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
|
||||||
|
/**
|
||||||
|
* Decrement the rank of an existing member by one. If the member is already at rank zero,
|
||||||
|
* then they are removed entirely.
|
||||||
|
*
|
||||||
|
* - `origin`: Must be the `AdminOrigin`.
|
||||||
|
* - `who`: Account of existing member of rank greater than zero.
|
||||||
|
*
|
||||||
|
* Weight: `O(1)`, less if the member's index is highest in its rank.
|
||||||
|
**/
|
||||||
|
demoteMember: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Increment the rank of an existing member by one.
|
||||||
|
*
|
||||||
|
* - `origin`: Must be the `AdminOrigin`.
|
||||||
|
* - `who`: Account of existing member.
|
||||||
|
*
|
||||||
|
* Weight: `O(1)`
|
||||||
|
**/
|
||||||
|
promoteMember: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Remove the member entirely.
|
||||||
|
*
|
||||||
|
* - `origin`: Must be the `AdminOrigin`.
|
||||||
|
* - `who`: Account of existing member of rank greater than zero.
|
||||||
|
* - `min_rank`: The rank of the member or greater.
|
||||||
|
*
|
||||||
|
* Weight: `O(min_rank)`.
|
||||||
|
**/
|
||||||
|
removeMember: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array, minRank: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u16]>;
|
||||||
|
/**
|
||||||
|
* Add an aye or nay vote for the sender to the given proposal.
|
||||||
|
*
|
||||||
|
* - `origin`: Must be `Signed` by a member account.
|
||||||
|
* - `poll`: Index of a poll which is ongoing.
|
||||||
|
* - `aye`: `true` if the vote is to approve the proposal, `false` otherwise.
|
||||||
|
*
|
||||||
|
* Transaction fees are be waived if the member is voting on any particular proposal
|
||||||
|
* for the first time and the call is successful. Subsequent vote changes will charge a
|
||||||
|
* fee.
|
||||||
|
*
|
||||||
|
* Weight: `O(1)`, less if there was no previous vote on the poll by the member.
|
||||||
|
**/
|
||||||
|
vote: AugmentedSubmittable<(poll: u32 | AnyNumber | Uint8Array, aye: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, bool]>;
|
||||||
|
/**
|
||||||
|
* Generic tx
|
||||||
|
**/
|
||||||
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
|
};
|
||||||
|
rankedPolls: {
|
||||||
|
/**
|
||||||
|
* Cancel an ongoing referendum.
|
||||||
|
*
|
||||||
|
* - `origin`: must be the `CancelOrigin`.
|
||||||
|
* - `index`: The index of the referendum to be cancelled.
|
||||||
|
*
|
||||||
|
* Emits `Cancelled`.
|
||||||
|
**/
|
||||||
|
cancel: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||||
|
/**
|
||||||
|
* Cancel an ongoing referendum and slash the deposits.
|
||||||
|
*
|
||||||
|
* - `origin`: must be the `KillOrigin`.
|
||||||
|
* - `index`: The index of the referendum to be cancelled.
|
||||||
|
*
|
||||||
|
* Emits `Killed` and `DepositSlashed`.
|
||||||
|
**/
|
||||||
|
kill: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||||
|
/**
|
||||||
|
* Advance a referendum onto its next logical state. Only used internally.
|
||||||
|
*
|
||||||
|
* - `origin`: must be `Root`.
|
||||||
|
* - `index`: the referendum to be advanced.
|
||||||
|
**/
|
||||||
|
nudgeReferendum: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||||
|
/**
|
||||||
|
* Advance a track onto its next logical state. Only used internally.
|
||||||
|
*
|
||||||
|
* - `origin`: must be `Root`.
|
||||||
|
* - `track`: the track to be advanced.
|
||||||
|
*
|
||||||
|
* Action item for when there is now one fewer referendum in the deciding phase and the
|
||||||
|
* `DecidingCount` is not yet updated. This means that we should either:
|
||||||
|
* - begin deciding another referendum (and leave `DecidingCount` alone); or
|
||||||
|
* - decrement `DecidingCount`.
|
||||||
|
**/
|
||||||
|
oneFewerDeciding: AugmentedSubmittable<(track: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16]>;
|
||||||
|
/**
|
||||||
|
* Post the Decision Deposit for a referendum.
|
||||||
|
*
|
||||||
|
* - `origin`: must be `Signed` and the account must have funds available for the
|
||||||
|
* referendum's track's Decision Deposit.
|
||||||
|
* - `index`: The index of the submitted referendum whose Decision Deposit is yet to be
|
||||||
|
* posted.
|
||||||
|
*
|
||||||
|
* Emits `DecisionDepositPlaced`.
|
||||||
|
**/
|
||||||
|
placeDecisionDeposit: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||||
|
/**
|
||||||
|
* Refund the Decision Deposit for a closed referendum back to the depositor.
|
||||||
|
*
|
||||||
|
* - `origin`: must be `Signed` or `Root`.
|
||||||
|
* - `index`: The index of a closed referendum whose Decision Deposit has not yet been
|
||||||
|
* refunded.
|
||||||
|
*
|
||||||
|
* Emits `DecisionDepositRefunded`.
|
||||||
|
**/
|
||||||
|
refundDecisionDeposit: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||||
|
/**
|
||||||
|
* Propose a referendum on a privileged action.
|
||||||
|
*
|
||||||
|
* - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds
|
||||||
|
* available.
|
||||||
|
* - `proposal_origin`: The origin from which the proposal should be executed.
|
||||||
|
* - `proposal_hash`: The hash of the proposal preimage.
|
||||||
|
* - `enactment_moment`: The moment that the proposal should be enacted.
|
||||||
|
*
|
||||||
|
* Emits `Submitted`.
|
||||||
|
**/
|
||||||
|
submit: AugmentedSubmittable<(proposalOrigin: NodeRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { AllianceMotion: any } | string | Uint8Array, proposalHash: H256 | string | Uint8Array, enactmentMoment: FrameSupportScheduleDispatchTime | { At: any } | { After: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [NodeRuntimeOriginCaller, H256, FrameSupportScheduleDispatchTime]>;
|
||||||
|
/**
|
||||||
|
* Generic tx
|
||||||
|
**/
|
||||||
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
|
};
|
||||||
recovery: {
|
recovery: {
|
||||||
/**
|
/**
|
||||||
* Send a call through a recovered account.
|
* Send a call through a recovered account.
|
||||||
@@ -2995,7 +3413,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - begin deciding another referendum (and leave `DecidingCount` alone); or
|
* - begin deciding another referendum (and leave `DecidingCount` alone); or
|
||||||
* - decrement `DecidingCount`.
|
* - decrement `DecidingCount`.
|
||||||
**/
|
**/
|
||||||
oneFewerDeciding: AugmentedSubmittable<(track: u8 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u8]>;
|
oneFewerDeciding: AugmentedSubmittable<(track: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16]>;
|
||||||
/**
|
/**
|
||||||
* Post the Decision Deposit for a referendum.
|
* Post the Decision Deposit for a referendum.
|
||||||
*
|
*
|
||||||
@@ -3020,7 +3438,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* Propose a referendum on a privileged action.
|
* Propose a referendum on a privileged action.
|
||||||
*
|
*
|
||||||
* - `origin`: must be `Signed` and the account must have `SubmissionDeposit` funds
|
* - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds
|
||||||
* available.
|
* available.
|
||||||
* - `proposal_origin`: The origin from which the proposal should be executed.
|
* - `proposal_origin`: The origin from which the proposal should be executed.
|
||||||
* - `proposal_hash`: The hash of the proposal preimage.
|
* - `proposal_hash`: The hash of the proposal preimage.
|
||||||
@@ -3028,7 +3446,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* Emits `Submitted`.
|
* Emits `Submitted`.
|
||||||
**/
|
**/
|
||||||
submit: AugmentedSubmittable<(proposalOrigin: NodeRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | string | Uint8Array, proposalHash: H256 | string | Uint8Array, enactmentMoment: FrameSupportScheduleDispatchTime | { At: any } | { After: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [NodeRuntimeOriginCaller, H256, FrameSupportScheduleDispatchTime]>;
|
submit: AugmentedSubmittable<(proposalOrigin: NodeRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { AllianceMotion: any } | string | Uint8Array, proposalHash: H256 | string | Uint8Array, enactmentMoment: FrameSupportScheduleDispatchTime | { At: any } | { After: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [NodeRuntimeOriginCaller, H256, FrameSupportScheduleDispatchTime]>;
|
||||||
/**
|
/**
|
||||||
* Generic tx
|
* Generic tx
|
||||||
**/
|
**/
|
||||||
@@ -4510,6 +4928,17 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* exist altogether, thus there is no way it would have been approved in the first place.
|
* 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>]>;
|
removeApproval: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
|
||||||
|
/**
|
||||||
|
* Propose and approve a spend of treasury funds.
|
||||||
|
*
|
||||||
|
* - `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`.
|
||||||
|
* - `amount`: The amount to be transferred from the treasury to the `beneficiary`.
|
||||||
|
* - `beneficiary`: The destination account for the transfer.
|
||||||
|
*
|
||||||
|
* NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the
|
||||||
|
* beneficiary.
|
||||||
|
**/
|
||||||
|
spend: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, beneficiary: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress]>;
|
||||||
/**
|
/**
|
||||||
* Generic tx
|
* Generic tx
|
||||||
**/
|
**/
|
||||||
@@ -4979,7 +5408,7 @@ 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: NodeRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [NodeRuntimeOriginCaller, Call]>;
|
dispatchAs: AugmentedSubmittable<(asOrigin: NodeRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { AllianceMotion: any } | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [NodeRuntimeOriginCaller, Call]>;
|
||||||
/**
|
/**
|
||||||
* Send a batch of dispatch calls.
|
* Send a batch of dispatch calls.
|
||||||
* Unlike `batch`, it allows errors and won't interrupt.
|
* Unlike `batch`, it allows errors and won't interrupt.
|
||||||
|
|||||||
@@ -20,13 +20,13 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "8.6.2",
|
"version": "8.11.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.3",
|
"@babel/runtime": "^7.18.6",
|
||||||
"@polkadot/rpc-core": "8.6.2",
|
"@polkadot/rpc-core": "8.11.1",
|
||||||
"@polkadot/types": "8.6.2",
|
"@polkadot/types": "8.11.1",
|
||||||
"@polkadot/util": "^9.3.1",
|
"@polkadot/util": "^9.7.1",
|
||||||
"rxjs": "^7.5.5"
|
"rxjs": "^7.5.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
export * from './index';
|
||||||
@@ -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: '8.6.2' };
|
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '8.11.1' };
|
||||||
|
|||||||
@@ -65,3 +65,9 @@ export interface PaginationOptions<A = unknown> {
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export type DecorateMethod<ApiType extends ApiTypes, T = any> =
|
export type DecorateMethod<ApiType extends ApiTypes, T = any> =
|
||||||
<M extends (...args: any[]) => Observable<any>>(method: M, options?: DecorateMethodOptions) => T;
|
<M extends (...args: any[]) => Observable<any>>(method: M, options?: DecorateMethodOptions) => T;
|
||||||
|
|
||||||
|
type AsCodec<R extends Codec | any> = R extends Codec
|
||||||
|
? R
|
||||||
|
: Codec;
|
||||||
|
|
||||||
|
export type ReturnCodec<F extends AnyFunction> = AsCodec<ObsInnerType<ReturnType<F>>>;
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api-base authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import type { Observable } from 'rxjs';
|
||||||
|
import type { AnyFunction, Codec, DefinitionCallNamed } from '@polkadot/types/types';
|
||||||
|
import type { ApiTypes, ReturnCodec } from './base';
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface
|
||||||
|
export interface AugmentedCalls<ApiType extends ApiTypes> {
|
||||||
|
// augmented
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface QueryableCalls<ApiType extends ApiTypes> extends AugmentedCalls<ApiType> {
|
||||||
|
// when non-augmented, we need to at least have Codec results
|
||||||
|
[key: string]: QueryableModuleCalls<ApiType>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface QueryableModuleCalls<ApiType extends ApiTypes> {
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type DecoratedCallBase<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> =
|
||||||
|
ApiType extends 'rxjs'
|
||||||
|
? <T extends Codec | any = ReturnCodec<F>> (...args: Parameters<F>) => Observable<T>
|
||||||
|
: <T extends Codec | any = ReturnCodec<F>> (...args: Parameters<F>) => Promise<T>;
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
|
export type AugmentedCall<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> =
|
||||||
|
DecoratedCallBase<ApiType, F> & { meta: DefinitionCallNamed };
|
||||||
@@ -16,8 +16,8 @@ export interface DecoratedEvents<ApiType extends ApiTypes> extends AugmentedEven
|
|||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export type AugmentedEvent<ApiType extends ApiTypes, T extends AnyTuple = AnyTuple> = IsEvent<T>;
|
export type AugmentedEvent<ApiType extends ApiTypes, T extends AnyTuple = AnyTuple, N = unknown> = IsEvent<T, N>;
|
||||||
|
|
||||||
export interface ModuleEvents<ApiType extends ApiTypes> {
|
export interface ModuleEvents<ApiType extends ApiTypes> {
|
||||||
[key: string]: AugmentedEvent<ApiType, AnyTuple>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// These are augmented, do an augmentation export
|
// These are augmented, do an augmentation export
|
||||||
|
export * from '@polkadot/api-base/types/calls';
|
||||||
export * from '@polkadot/api-base/types/consts';
|
export * from '@polkadot/api-base/types/consts';
|
||||||
export * from '@polkadot/api-base/types/errors';
|
export * from '@polkadot/api-base/types/errors';
|
||||||
export * from '@polkadot/api-base/types/events';
|
export * from '@polkadot/api-base/types/events';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import type { StorageKey, u64 } from '@polkadot/types';
|
|||||||
import type { Hash } from '@polkadot/types/interfaces';
|
import type { Hash } from '@polkadot/types/interfaces';
|
||||||
import type { StorageEntry } from '@polkadot/types/primitive/types';
|
import type { StorageEntry } from '@polkadot/types/primitive/types';
|
||||||
import type { AnyFunction, AnyTuple, Callback, Codec, IStorageKey } from '@polkadot/types/types';
|
import type { AnyFunction, AnyTuple, Callback, Codec, IStorageKey } from '@polkadot/types/types';
|
||||||
import type { ApiTypes, DropLast, MethodResult, ObsInnerType, PaginationOptions, PromiseOrObs, UnsubscribePromise } from './base';
|
import type { ApiTypes, DropLast, MethodResult, PaginationOptions, PromiseOrObs, ReturnCodec, UnsubscribePromise } from './base';
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface
|
||||||
export interface AugmentedQueries<ApiType extends ApiTypes> {
|
export interface AugmentedQueries<ApiType extends ApiTypes> {
|
||||||
@@ -22,12 +22,6 @@ export interface QueryableStorageAt<ApiType extends ApiTypes> extends AugmentedQ
|
|||||||
[key: string]: QueryableModuleStorageAt<ApiType>;
|
[key: string]: QueryableModuleStorageAt<ApiType>;
|
||||||
}
|
}
|
||||||
|
|
||||||
type AsCodec<R extends Codec | any> = R extends Codec
|
|
||||||
? R
|
|
||||||
: Codec;
|
|
||||||
|
|
||||||
type ReturnCodec<F extends AnyFunction> = AsCodec<ObsInnerType<ReturnType<F>>>;
|
|
||||||
|
|
||||||
interface StorageEntryObservableMulti<R extends Codec = Codec> {
|
interface StorageEntryObservableMulti<R extends Codec = Codec> {
|
||||||
<T extends Codec = R>(args: (unknown[] | unknown)[]): Observable<T[]>;
|
<T extends Codec = R>(args: (unknown[] | unknown)[]): Observable<T[]>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,20 +20,20 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "8.6.2",
|
"version": "8.11.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.3",
|
"@babel/runtime": "^7.18.6",
|
||||||
"@polkadot/api": "8.6.2",
|
"@polkadot/api": "8.11.1",
|
||||||
"@polkadot/types": "8.6.2",
|
"@polkadot/types": "8.11.1",
|
||||||
"@polkadot/types-codec": "8.6.2",
|
"@polkadot/types-codec": "8.11.1",
|
||||||
"@polkadot/types-create": "8.6.2",
|
"@polkadot/types-create": "8.11.1",
|
||||||
"@polkadot/util": "^9.3.1",
|
"@polkadot/util": "^9.7.1",
|
||||||
"@polkadot/util-crypto": "^9.3.1",
|
"@polkadot/util-crypto": "^9.7.1",
|
||||||
"rxjs": "^7.5.5"
|
"rxjs": "^7.5.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/api-augment": "8.6.2",
|
"@polkadot/api-augment": "8.11.1",
|
||||||
"@polkadot/keyring": "^9.3.1"
|
"@polkadot/keyring": "^9.7.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
export * from './index';
|
||||||
@@ -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: '8.6.2' };
|
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '8.11.1' };
|
||||||
|
|||||||
@@ -160,6 +160,7 @@
|
|||||||
{
|
{
|
||||||
"info": "Enum",
|
"info": "Enum",
|
||||||
"lookupIndex": 10,
|
"lookupIndex": 10,
|
||||||
|
"lookupName": "InkStorageCollectionsStashEntry",
|
||||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"(AccountId,AccountId)\"}}",
|
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"(AccountId,AccountId)\"}}",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "ink_storage::collections::stash::Entry",
|
"namespace": "ink_storage::collections::stash::Entry",
|
||||||
|
|||||||
@@ -180,6 +180,7 @@
|
|||||||
{
|
{
|
||||||
"info": "Struct",
|
"info": "Struct",
|
||||||
"lookupIndex": 10,
|
"lookupIndex": 10,
|
||||||
|
"lookupName": "InkStorageCollectionsHashmapValueEntryEntry",
|
||||||
"type": "{\"value\":\"u32\",\"keyIndex\":\"u32\"}",
|
"type": "{\"value\":\"u32\",\"keyIndex\":\"u32\"}",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||||
@@ -205,6 +206,7 @@
|
|||||||
{
|
{
|
||||||
"info": "Enum",
|
"info": "Enum",
|
||||||
"lookupIndex": 11,
|
"lookupIndex": 11,
|
||||||
|
"lookupName": "InkStorageCollectionsStashEntry",
|
||||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"(AccountId,AccountId)\"}}",
|
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"(AccountId,AccountId)\"}}",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "ink_storage::collections::stash::Entry",
|
"namespace": "ink_storage::collections::stash::Entry",
|
||||||
@@ -275,6 +277,7 @@
|
|||||||
{
|
{
|
||||||
"info": "Struct",
|
"info": "Struct",
|
||||||
"lookupIndex": 13,
|
"lookupIndex": 13,
|
||||||
|
"lookupName": "InkStorageCollectionsHashmapValueEntryOption",
|
||||||
"type": "{\"value\":\"bool\",\"keyIndex\":\"u32\"}",
|
"type": "{\"value\":\"bool\",\"keyIndex\":\"u32\"}",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||||
|
|||||||
@@ -226,6 +226,7 @@
|
|||||||
{
|
{
|
||||||
"info": "Struct",
|
"info": "Struct",
|
||||||
"lookupIndex": 12,
|
"lookupIndex": 12,
|
||||||
|
"lookupName": "InkStorageCollectionsHashmapValueEntry",
|
||||||
"type": "{\"value\":\"u32\",\"keyIndex\":\"u32\"}",
|
"type": "{\"value\":\"u32\",\"keyIndex\":\"u32\"}",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||||
@@ -251,7 +252,7 @@
|
|||||||
{
|
{
|
||||||
"info": "Enum",
|
"info": "Enum",
|
||||||
"lookupIndex": 13,
|
"lookupIndex": 13,
|
||||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"MultisigPlainMultisigPlainTransaction\"}}",
|
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"MultisigPlainTransaction\"}}",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "ink_storage::collections::stash::Entry",
|
"namespace": "ink_storage::collections::stash::Entry",
|
||||||
"sub": [
|
"sub": [
|
||||||
@@ -268,7 +269,7 @@
|
|||||||
"docs": [],
|
"docs": [],
|
||||||
"info": "Si",
|
"info": "Si",
|
||||||
"lookupIndex": 14,
|
"lookupIndex": 14,
|
||||||
"lookupName": "MultisigPlainMultisigPlainTransaction",
|
"lookupName": "MultisigPlainTransaction",
|
||||||
"type": "Lookup14",
|
"type": "Lookup14",
|
||||||
"index": 1,
|
"index": 1,
|
||||||
"name": "Occupied"
|
"name": "Occupied"
|
||||||
@@ -278,7 +279,7 @@
|
|||||||
{
|
{
|
||||||
"info": "Struct",
|
"info": "Struct",
|
||||||
"lookupIndex": 14,
|
"lookupIndex": 14,
|
||||||
"lookupName": "MultisigPlainMultisigPlainTransaction",
|
"lookupName": "MultisigPlainTransaction",
|
||||||
"type": "{\"callee\":\"AccountId\",\"selector\":\"[u8;4]\",\"input\":\"Bytes\",\"transferredValue\":\"u128\",\"gasLimit\":\"u64\"}",
|
"type": "{\"callee\":\"AccountId\",\"selector\":\"[u8;4]\",\"input\":\"Bytes\",\"transferredValue\":\"u128\",\"gasLimit\":\"u64\"}",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "multisig_plain::multisig_plain::Transaction",
|
"namespace": "multisig_plain::multisig_plain::Transaction",
|
||||||
@@ -373,6 +374,7 @@
|
|||||||
{
|
{
|
||||||
"info": "Enum",
|
"info": "Enum",
|
||||||
"lookupIndex": 19,
|
"lookupIndex": 19,
|
||||||
|
"lookupName": "InkStorageCollectionsStashEntry",
|
||||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"AccountId\"}}",
|
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"AccountId\"}}",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "ink_storage::collections::stash::Entry",
|
"namespace": "ink_storage::collections::stash::Entry",
|
||||||
@@ -416,7 +418,7 @@
|
|||||||
{
|
{
|
||||||
"info": "Tuple",
|
"info": "Tuple",
|
||||||
"lookupIndex": 21,
|
"lookupIndex": 21,
|
||||||
"type": "(u32,MultisigPlainMultisigPlainConfirmationStatus)",
|
"type": "(u32,MultisigPlainConfirmationStatus)",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "",
|
"namespace": "",
|
||||||
"sub": [
|
"sub": [
|
||||||
@@ -431,7 +433,7 @@
|
|||||||
"docs": [],
|
"docs": [],
|
||||||
"info": "Si",
|
"info": "Si",
|
||||||
"lookupIndex": 22,
|
"lookupIndex": 22,
|
||||||
"lookupName": "MultisigPlainMultisigPlainConfirmationStatus",
|
"lookupName": "MultisigPlainConfirmationStatus",
|
||||||
"type": "Lookup22"
|
"type": "Lookup22"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -439,7 +441,7 @@
|
|||||||
{
|
{
|
||||||
"info": "Enum",
|
"info": "Enum",
|
||||||
"lookupIndex": 22,
|
"lookupIndex": 22,
|
||||||
"lookupName": "MultisigPlainMultisigPlainConfirmationStatus",
|
"lookupName": "MultisigPlainConfirmationStatus",
|
||||||
"type": "{\"_enum\":{\"Confirmed\":\"Null\",\"ConfirmationsNeeded\":\"u32\"}}",
|
"type": "{\"_enum\":{\"Confirmed\":\"Null\",\"ConfirmationsNeeded\":\"u32\"}}",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "multisig_plain::multisig_plain::ConfirmationStatus",
|
"namespace": "multisig_plain::multisig_plain::ConfirmationStatus",
|
||||||
|
|||||||
@@ -310,6 +310,7 @@
|
|||||||
{
|
{
|
||||||
"info": "Enum",
|
"info": "Enum",
|
||||||
"lookupIndex": 15,
|
"lookupIndex": 15,
|
||||||
|
"lookupName": "InkStorageCollectionsStashEntry",
|
||||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"(u32,AccountId)\"}}",
|
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"(u32,AccountId)\"}}",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "ink_storage::collections::stash::Entry",
|
"namespace": "ink_storage::collections::stash::Entry",
|
||||||
@@ -380,6 +381,7 @@
|
|||||||
{
|
{
|
||||||
"info": "Struct",
|
"info": "Struct",
|
||||||
"lookupIndex": 17,
|
"lookupIndex": 17,
|
||||||
|
"lookupName": "InkStorageCollectionsHashmapValueEntry",
|
||||||
"type": "{\"value\":\"Null\",\"keyIndex\":\"u32\"}",
|
"type": "{\"value\":\"Null\",\"keyIndex\":\"u32\"}",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
{
|
{
|
||||||
"info": "Struct",
|
"info": "Struct",
|
||||||
"lookupIndex": 6,
|
"lookupIndex": 6,
|
||||||
|
"lookupName": "InkStorageLazyMapping",
|
||||||
"type": "{\"offsetKey\":\"InkPrimitivesKey\"}",
|
"type": "{\"offsetKey\":\"InkPrimitivesKey\"}",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
{
|
{
|
||||||
"info": "Struct",
|
"info": "Struct",
|
||||||
"lookupIndex": 6,
|
"lookupIndex": 6,
|
||||||
|
"lookupName": "InkStorageLazyMapping",
|
||||||
"type": "{\"offsetKey\":\"InkPrimitivesKey\"}",
|
"type": "{\"offsetKey\":\"InkPrimitivesKey\"}",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||||
|
|||||||
@@ -23,8 +23,8 @@
|
|||||||
{
|
{
|
||||||
"info": "Enum",
|
"info": "Enum",
|
||||||
"lookupIndex": 4,
|
"lookupIndex": 4,
|
||||||
"lookupName": "EnumExampleEnumExampleVariant",
|
"lookupName": "EnumExampleVariant",
|
||||||
"type": "{\"_enum\":{\"None\":\"Null\",\"Weekday\":\"EnumExampleEnumExampleWeekday\",\"TupleMaybeSigned\":\"EnumExampleEnumExampleTupleMaybeSigned\",\"NamedMaybeSigned\":\"EnumExampleEnumExampleNamedMaybeSigned\",\"Color\":\"EnumExampleEnumExampleColor\"}}",
|
"type": "{\"_enum\":{\"None\":\"Null\",\"Weekday\":\"EnumExampleWeekday\",\"TupleMaybeSigned\":\"EnumExampleTupleMaybeSigned\",\"NamedMaybeSigned\":\"EnumExampleNamedMaybeSigned\",\"Color\":\"EnumExampleColor\"}}",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "enum_example::enum_example::Variant",
|
"namespace": "enum_example::enum_example::Variant",
|
||||||
"sub": [
|
"sub": [
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
"docs": [],
|
"docs": [],
|
||||||
"info": "Si",
|
"info": "Si",
|
||||||
"lookupIndex": 5,
|
"lookupIndex": 5,
|
||||||
"lookupName": "EnumExampleEnumExampleWeekday",
|
"lookupName": "EnumExampleWeekday",
|
||||||
"type": "Lookup5",
|
"type": "Lookup5",
|
||||||
"index": 1,
|
"index": 1,
|
||||||
"name": "Weekday"
|
"name": "Weekday"
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
"docs": [],
|
"docs": [],
|
||||||
"info": "Si",
|
"info": "Si",
|
||||||
"lookupIndex": 6,
|
"lookupIndex": 6,
|
||||||
"lookupName": "EnumExampleEnumExampleTupleMaybeSigned",
|
"lookupName": "EnumExampleTupleMaybeSigned",
|
||||||
"type": "Lookup6",
|
"type": "Lookup6",
|
||||||
"index": 2,
|
"index": 2,
|
||||||
"name": "TupleMaybeSigned"
|
"name": "TupleMaybeSigned"
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
"docs": [],
|
"docs": [],
|
||||||
"info": "Si",
|
"info": "Si",
|
||||||
"lookupIndex": 7,
|
"lookupIndex": 7,
|
||||||
"lookupName": "EnumExampleEnumExampleNamedMaybeSigned",
|
"lookupName": "EnumExampleNamedMaybeSigned",
|
||||||
"type": "Lookup7",
|
"type": "Lookup7",
|
||||||
"index": 3,
|
"index": 3,
|
||||||
"name": "NamedMaybeSigned"
|
"name": "NamedMaybeSigned"
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
"docs": [],
|
"docs": [],
|
||||||
"info": "Si",
|
"info": "Si",
|
||||||
"lookupIndex": 8,
|
"lookupIndex": 8,
|
||||||
"lookupName": "EnumExampleEnumExampleColor",
|
"lookupName": "EnumExampleColor",
|
||||||
"type": "Lookup8",
|
"type": "Lookup8",
|
||||||
"index": 4,
|
"index": 4,
|
||||||
"name": "Color"
|
"name": "Color"
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
{
|
{
|
||||||
"info": "Enum",
|
"info": "Enum",
|
||||||
"lookupIndex": 5,
|
"lookupIndex": 5,
|
||||||
"lookupName": "EnumExampleEnumExampleWeekday",
|
"lookupName": "EnumExampleWeekday",
|
||||||
"type": "{\"_enum\":[\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\",\"Sunday\"]}",
|
"type": "{\"_enum\":[\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\",\"Sunday\"]}",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "enum_example::enum_example::Weekday",
|
"namespace": "enum_example::enum_example::Weekday",
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
{
|
{
|
||||||
"info": "Enum",
|
"info": "Enum",
|
||||||
"lookupIndex": 6,
|
"lookupIndex": 6,
|
||||||
"lookupName": "EnumExampleEnumExampleTupleMaybeSigned",
|
"lookupName": "EnumExampleTupleMaybeSigned",
|
||||||
"type": "{\"_enum\":{\"Signed\":\"i32\",\"Unsigned\":\"u32\"}}",
|
"type": "{\"_enum\":{\"Signed\":\"i32\",\"Unsigned\":\"u32\"}}",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "enum_example::enum_example::TupleMaybeSigned",
|
"namespace": "enum_example::enum_example::TupleMaybeSigned",
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
{
|
{
|
||||||
"info": "Enum",
|
"info": "Enum",
|
||||||
"lookupIndex": 7,
|
"lookupIndex": 7,
|
||||||
"lookupName": "EnumExampleEnumExampleNamedMaybeSigned",
|
"lookupName": "EnumExampleNamedMaybeSigned",
|
||||||
"type": "{\"_enum\":{\"Signed\":\"{\\\"value\\\":\\\"i32\\\"}\",\"Unsigned\":\"{\\\"value\\\":\\\"u32\\\"}\"}}",
|
"type": "{\"_enum\":{\"Signed\":\"{\\\"value\\\":\\\"i32\\\"}\",\"Unsigned\":\"{\\\"value\\\":\\\"u32\\\"}\"}}",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "enum_example::enum_example::NamedMaybeSigned",
|
"namespace": "enum_example::enum_example::NamedMaybeSigned",
|
||||||
@@ -197,7 +197,7 @@
|
|||||||
{
|
{
|
||||||
"info": "Enum",
|
"info": "Enum",
|
||||||
"lookupIndex": 8,
|
"lookupIndex": 8,
|
||||||
"lookupName": "EnumExampleEnumExampleColor",
|
"lookupName": "EnumExampleColor",
|
||||||
"type": "{\"_enum\":{\"Red\":\"Null\",\"Blue\":\"Null\",\"Green\":\"Null\",\"Yellow\":\"Null\",\"Rgb\":\"{\\\"r\\\":\\\"u8\\\",\\\"g\\\":\\\"u8\\\",\\\"b\\\":\\\"u8\\\"}\",\"Rgba\":\"{\\\"r\\\":\\\"u8\\\",\\\"g\\\":\\\"u8\\\",\\\"b\\\":\\\"u8\\\",\\\"a\\\":\\\"u8\\\"}\"}}",
|
"type": "{\"_enum\":{\"Red\":\"Null\",\"Blue\":\"Null\",\"Green\":\"Null\",\"Yellow\":\"Null\",\"Rgb\":\"{\\\"r\\\":\\\"u8\\\",\\\"g\\\":\\\"u8\\\",\\\"b\\\":\\\"u8\\\"}\",\"Rgba\":\"{\\\"r\\\":\\\"u8\\\",\\\"g\\\":\\\"u8\\\",\\\"b\\\":\\\"u8\\\",\\\"a\\\":\\\"u8\\\"}\"}}",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "enum_example::enum_example::Color",
|
"namespace": "enum_example::enum_example::Color",
|
||||||
|
|||||||
@@ -160,6 +160,7 @@
|
|||||||
{
|
{
|
||||||
"info": "Enum",
|
"info": "Enum",
|
||||||
"lookupIndex": 10,
|
"lookupIndex": 10,
|
||||||
|
"lookupName": "InkStorageCollectionsStashEntry",
|
||||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"(AccountId,AccountId)\"}}",
|
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"(AccountId,AccountId)\"}}",
|
||||||
"docs": [],
|
"docs": [],
|
||||||
"namespace": "ink_storage::collections::stash::Entry",
|
"namespace": "ink_storage::collections::stash::Entry",
|
||||||
|
|||||||
@@ -20,25 +20,25 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "8.6.2",
|
"version": "8.11.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.3",
|
"@babel/runtime": "^7.18.6",
|
||||||
"@polkadot/api": "8.6.2",
|
"@polkadot/api": "8.11.1",
|
||||||
"@polkadot/api-augment": "8.6.2",
|
"@polkadot/api-augment": "8.11.1",
|
||||||
"@polkadot/api-base": "8.6.2",
|
"@polkadot/api-base": "8.11.1",
|
||||||
"@polkadot/rpc-core": "8.6.2",
|
"@polkadot/rpc-core": "8.11.1",
|
||||||
"@polkadot/types": "8.6.2",
|
"@polkadot/types": "8.11.1",
|
||||||
"@polkadot/types-codec": "8.6.2",
|
"@polkadot/types-codec": "8.11.1",
|
||||||
"@polkadot/util": "^9.3.1",
|
"@polkadot/util": "^9.7.1",
|
||||||
"@polkadot/util-crypto": "^9.3.1",
|
"@polkadot/util-crypto": "^9.7.1",
|
||||||
"rxjs": "^7.5.5"
|
"rxjs": "^7.5.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/api": "8.6.2",
|
"@polkadot/api": "8.11.1",
|
||||||
"@polkadot/api-augment": "8.6.2",
|
"@polkadot/api-augment": "8.11.1",
|
||||||
"@polkadot/rpc-augment": "8.6.2",
|
"@polkadot/rpc-augment": "8.11.1",
|
||||||
"@polkadot/rpc-provider": "8.6.2",
|
"@polkadot/rpc-provider": "8.11.1",
|
||||||
"@polkadot/types-support": "8.6.2"
|
"@polkadot/types-support": "8.11.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,15 +3,19 @@
|
|||||||
|
|
||||||
import type { Observable } from 'rxjs';
|
import type { Observable } from 'rxjs';
|
||||||
import type { AccountId, Address, Balance } from '@polkadot/types/interfaces';
|
import type { AccountId, Address, Balance } from '@polkadot/types/interfaces';
|
||||||
|
import type{ PalletElectionsPhragmenSeatHolder } from '@polkadot/types/lookup';
|
||||||
|
import type { Codec } from '@polkadot/types/types';
|
||||||
import type { Option } from '@polkadot/types-codec';
|
import type { Option } from '@polkadot/types-codec';
|
||||||
import type { DeriveAccountFlags, DeriveApi } from '../types';
|
import type { DeriveAccountFlags, DeriveApi } from '../types';
|
||||||
|
|
||||||
import { combineLatest, map, of } from 'rxjs';
|
import { map, of } from 'rxjs';
|
||||||
|
|
||||||
|
import { isFunction } from '@polkadot/util';
|
||||||
|
|
||||||
import { memo } from '../util';
|
import { memo } from '../util';
|
||||||
|
|
||||||
type FlagsIntermediate = [
|
type FlagsIntermediate = [
|
||||||
[AccountId, Balance][] | undefined,
|
PalletElectionsPhragmenSeatHolder[] | [AccountId, Balance][] | undefined,
|
||||||
AccountId[],
|
AccountId[],
|
||||||
AccountId[],
|
AccountId[],
|
||||||
AccountId[],
|
AccountId[],
|
||||||
@@ -24,39 +28,53 @@ function parseFlags (address: AccountId | Address | string | null | undefined, [
|
|||||||
id.toString() === addrStr;
|
id.toString() === addrStr;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
isCouncil: (electionsMembers?.map(([id]) => id) || councilMembers || []).some(isIncluded),
|
isCouncil: (electionsMembers?.map((r) => Array.isArray(r) ? r[0] : r.who) || councilMembers || []).some(isIncluded),
|
||||||
isSociety: (societyMembers || []).some(isIncluded),
|
isSociety: (societyMembers || []).some(isIncluded),
|
||||||
isSudo: sudoKey?.toString() === addrStr,
|
isSudo: sudoKey?.toString() === addrStr,
|
||||||
isTechCommittee: (technicalCommitteeMembers || []).some(isIncluded)
|
isTechCommittee: (technicalCommitteeMembers || []).some(isIncluded)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function _flags (instanceId: string, api: DeriveApi): () => Observable<FlagsIntermediate> {
|
||||||
|
return memo(instanceId, (): Observable<FlagsIntermediate> => {
|
||||||
|
const results: unknown[] = [undefined, [], [], [], undefined];
|
||||||
|
const calls = [
|
||||||
|
(api.query.phragmenElection || api.query.electionsPhragmen || api.query.elections)?.members,
|
||||||
|
api.query.council?.members,
|
||||||
|
api.query.technicalCommittee?.members,
|
||||||
|
api.query.society?.members,
|
||||||
|
api.query.sudo?.key
|
||||||
|
];
|
||||||
|
const filtered = calls.filter((c) => c);
|
||||||
|
|
||||||
|
if (!filtered.length) {
|
||||||
|
return of(results as FlagsIntermediate);
|
||||||
|
}
|
||||||
|
|
||||||
|
return api.queryMulti(filtered).pipe(
|
||||||
|
map((values: Codec[]): FlagsIntermediate => {
|
||||||
|
let resultIndex = -1;
|
||||||
|
|
||||||
|
for (let i = 0; i < calls.length; i++) {
|
||||||
|
if (isFunction(calls[i])) {
|
||||||
|
results[i] = values[++resultIndex];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return results as FlagsIntermediate;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name info
|
* @name info
|
||||||
* @description Returns account membership flags
|
* @description Returns account membership flags
|
||||||
*/
|
*/
|
||||||
export function flags (instanceId: string, api: DeriveApi): (address?: AccountId | Address | string | null) => Observable<DeriveAccountFlags> {
|
export function flags (instanceId: string, api: DeriveApi): (address?: AccountId | Address | string | null) => Observable<DeriveAccountFlags> {
|
||||||
return memo(instanceId, (address?: AccountId | Address | string | null): Observable<DeriveAccountFlags> => {
|
return memo(instanceId, (address?: AccountId | Address | string | null): Observable<DeriveAccountFlags> =>
|
||||||
const elections = api.query.phragmenElection || api.query.electionsPhragmen || api.query.elections;
|
api.derive.accounts._flags().pipe(
|
||||||
|
|
||||||
return combineLatest([
|
|
||||||
address && elections?.members
|
|
||||||
? elections.members<[AccountId, Balance][]>()
|
|
||||||
: of(undefined),
|
|
||||||
address && api.query.council?.members
|
|
||||||
? api.query.council.members()
|
|
||||||
: of([]),
|
|
||||||
address && api.query.technicalCommittee?.members
|
|
||||||
? api.query.technicalCommittee.members()
|
|
||||||
: of([]),
|
|
||||||
address && api.query.society?.members
|
|
||||||
? api.query.society.members()
|
|
||||||
: of([]),
|
|
||||||
address && api.query.sudo?.key
|
|
||||||
? api.query.sudo.key()
|
|
||||||
: of(undefined)
|
|
||||||
]).pipe(
|
|
||||||
map((r) => parseFlags(address, r))
|
map((r) => parseFlags(address, r))
|
||||||
);
|
)
|
||||||
});
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,9 +71,10 @@ function getParent (api: DeriveApi, identityOfOpt: Option<PalletIdentityRegistra
|
|||||||
} else if (superOfOpt?.isSome) {
|
} else if (superOfOpt?.isSome) {
|
||||||
const superOf = superOfOpt.unwrap();
|
const superOf = superOfOpt.unwrap();
|
||||||
|
|
||||||
// we have a super
|
|
||||||
return combineLatest([
|
return combineLatest([
|
||||||
api.query.identity.identityOf(superOf[0]),
|
api.derive.accounts._identity(superOf[0]).pipe(
|
||||||
|
map(([info]) => info)
|
||||||
|
),
|
||||||
of(superOf)
|
of(superOf)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -82,13 +83,15 @@ function getParent (api: DeriveApi, identityOfOpt: Option<PalletIdentityRegistra
|
|||||||
return of([undefined, undefined]);
|
return of([undefined, undefined]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBase (api: DeriveApi, accountId?: AccountId | Uint8Array | string): Observable<[Option<PalletIdentityRegistration> | undefined, Option<ITuple<[AccountId, Data]>> | undefined]> {
|
export function _identity (instanceId: string, api: DeriveApi): (accountId?: AccountId | Uint8Array | string) => Observable<[Option<PalletIdentityRegistration> | undefined, Option<ITuple<[AccountId, Data]>> | undefined]> {
|
||||||
return accountId && api.query.identity?.identityOf
|
return memo(instanceId, (accountId?: AccountId | Uint8Array | string): Observable<[Option<PalletIdentityRegistration> | undefined, Option<ITuple<[AccountId, Data]>> | undefined]> =>
|
||||||
? api.queryMulti<[Option<PalletIdentityRegistration>, Option<ITuple<[AccountId, Data]>>]>([
|
accountId && api.query.identity?.identityOf
|
||||||
[api.query.identity.identityOf, accountId],
|
? combineLatest([
|
||||||
[api.query.identity.superOf, accountId]
|
api.query.identity.identityOf(accountId),
|
||||||
])
|
api.query.identity.superOf(accountId)
|
||||||
: of([undefined, undefined]);
|
])
|
||||||
|
: of([undefined, undefined])
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -97,9 +100,13 @@ function getBase (api: DeriveApi, accountId?: AccountId | Uint8Array | string):
|
|||||||
*/
|
*/
|
||||||
export function identity (instanceId: string, api: DeriveApi): (accountId?: AccountId | Uint8Array | string) => Observable<DeriveAccountRegistration> {
|
export function identity (instanceId: string, api: DeriveApi): (accountId?: AccountId | Uint8Array | string) => Observable<DeriveAccountRegistration> {
|
||||||
return memo(instanceId, (accountId?: AccountId | Uint8Array | string): Observable<DeriveAccountRegistration> =>
|
return memo(instanceId, (accountId?: AccountId | Uint8Array | string): Observable<DeriveAccountRegistration> =>
|
||||||
getBase(api, accountId).pipe(
|
api.derive.accounts._identity(accountId).pipe(
|
||||||
switchMap(([identityOfOpt, superOfOpt]) => getParent(api, identityOfOpt, superOfOpt)),
|
switchMap(([identityOfOpt, superOfOpt]) =>
|
||||||
map(([identityOfOpt, superOf]) => extractIdentity(identityOfOpt, superOf))
|
getParent(api, identityOfOpt, superOfOpt)
|
||||||
|
),
|
||||||
|
map(([identityOfOpt, superOf]) =>
|
||||||
|
extractIdentity(identityOfOpt, superOf)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// 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 } from '@polkadot/types';
|
import type { Option, u64 } from '@polkadot/types';
|
||||||
import type { PalletBagsListListBag } from '@polkadot/types/lookup';
|
import type { PalletBagsListListBag } from '@polkadot/types/lookup';
|
||||||
import type { BN } from '@polkadot/util';
|
import type { BN } from '@polkadot/util';
|
||||||
import type { DeriveApi } from '../types';
|
import type { DeriveApi } from '../types';
|
||||||
@@ -43,7 +43,7 @@ export function _getIds (instanceId: string, api: DeriveApi): (ids: (BN | number
|
|||||||
const ids = _ids.map((id) => bnToBn(id));
|
const ids = _ids.map((id) => bnToBn(id));
|
||||||
|
|
||||||
return ids.length
|
return ids.length
|
||||||
? api.query.listBags.multi<Option<PalletBagsListListBag>[]>(ids).pipe(
|
? (api.query.voterList || api.query.bagsList).listBags.multi<Option<PalletBagsListListBag>>(ids).pipe(
|
||||||
map((bags) => orderBags(ids, bags))
|
map((bags) => orderBags(ids, bags))
|
||||||
)
|
)
|
||||||
: of([]);
|
: of([]);
|
||||||
@@ -52,7 +52,7 @@ export function _getIds (instanceId: string, api: DeriveApi): (ids: (BN | number
|
|||||||
|
|
||||||
export function all (instanceId: string, api: DeriveApi): () => Observable<Bag[]> {
|
export function all (instanceId: string, api: DeriveApi): () => Observable<Bag[]> {
|
||||||
return memo(instanceId, (): Observable<Bag[]> =>
|
return memo(instanceId, (): Observable<Bag[]> =>
|
||||||
api.query.bagsList.listBags.keys().pipe(
|
(api.query.voterList || api.query.bagsList).listBags.keys<[u64]>().pipe(
|
||||||
switchMap((keys) =>
|
switchMap((keys) =>
|
||||||
api.derive.bagsList._getIds(keys.map(({ args: [id] }) => id))
|
api.derive.bagsList._getIds(keys.map(({ args: [id] }) => id))
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import type { DeriveApi } from '../types';
|
|||||||
|
|
||||||
import { BehaviorSubject, map, of, switchMap, tap, toArray } from 'rxjs';
|
import { BehaviorSubject, map, of, switchMap, tap, toArray } from 'rxjs';
|
||||||
|
|
||||||
|
import { nextTick } from '@polkadot/util';
|
||||||
|
|
||||||
import { memo } from '../util';
|
import { memo } from '../util';
|
||||||
|
|
||||||
function traverseLinks (api: DeriveApi, head: AccountId32 | string): Observable<PalletBagsListListNode[]> {
|
function traverseLinks (api: DeriveApi, head: AccountId32 | string): Observable<PalletBagsListListNode[]> {
|
||||||
@@ -16,14 +18,14 @@ function traverseLinks (api: DeriveApi, head: AccountId32 | string): Observable<
|
|||||||
|
|
||||||
return subject.pipe(
|
return subject.pipe(
|
||||||
switchMap((account) =>
|
switchMap((account) =>
|
||||||
api.query.bagsList.listNodes(account)
|
(api.query.voterList || api.query.bagsList).listNodes<Option<PalletBagsListListNode>>(account)
|
||||||
),
|
),
|
||||||
tap((node: Option<PalletBagsListListNode>): void => {
|
tap((node: Option<PalletBagsListListNode>): void => {
|
||||||
setTimeout((): void => {
|
nextTick((): void => {
|
||||||
node.isSome && node.value.next.isSome
|
node.isSome && node.value.next.isSome
|
||||||
? subject.next(node.unwrap().next.unwrap())
|
? subject.next(node.unwrap().next.unwrap())
|
||||||
: subject.complete();
|
: subject.complete();
|
||||||
}, 0);
|
});
|
||||||
}),
|
}),
|
||||||
toArray(), // toArray since we want to startSubject to be completed
|
toArray(), // toArray since we want to startSubject to be completed
|
||||||
map((all: Option<PalletBagsListListNode>[]) =>
|
map((all: Option<PalletBagsListListNode>[]) =>
|
||||||
|
|||||||
@@ -50,10 +50,10 @@ function calcBalances (api: DeriveApi, [accountId, [accountNonce, [primary, ...a
|
|||||||
|
|
||||||
// old
|
// old
|
||||||
function queryBalancesFree (api: DeriveApi, accountId: AccountId): Observable<Result> {
|
function queryBalancesFree (api: DeriveApi, accountId: AccountId): Observable<Result> {
|
||||||
return api.queryMulti<[Balance, Balance, Index]>([
|
return combineLatest([
|
||||||
[api.query.balances.freeBalance, accountId],
|
api.query.balances.freeBalance<Balance>(accountId),
|
||||||
[api.query.balances.reservedBalance, accountId],
|
api.query.balances.reservedBalance<Balance>(accountId),
|
||||||
[api.query.system.accountNonce, accountId]
|
api.query.system.accountNonce<Index>(accountId)
|
||||||
]).pipe(
|
]).pipe(
|
||||||
map(([freeBalance, reservedBalance, accountNonce]): Result => [
|
map(([freeBalance, reservedBalance, accountNonce]): Result => [
|
||||||
accountNonce,
|
accountNonce,
|
||||||
@@ -82,8 +82,7 @@ function queryNonceOnly (api: DeriveApi, accountId: AccountId): Observable<Resul
|
|||||||
function queryBalancesAccount (api: DeriveApi, accountId: AccountId, modules: string[] = ['balances']): Observable<Result> {
|
function queryBalancesAccount (api: DeriveApi, accountId: AccountId, modules: string[] = ['balances']): Observable<Result> {
|
||||||
const balances = modules
|
const balances = modules
|
||||||
.map((m): QueryableStorageEntry<'rxjs'> => (api.derive as DeriveCustomAccount)[m]?.customAccount || api.query[m]?.account)
|
.map((m): QueryableStorageEntry<'rxjs'> => (api.derive as DeriveCustomAccount)[m]?.customAccount || api.query[m]?.account)
|
||||||
.filter((q) => isFunction(q))
|
.filter((q) => isFunction(q));
|
||||||
.map((q): [QueryableStorageEntry<'rxjs'>, AccountId] => [q, accountId]);
|
|
||||||
|
|
||||||
const extract = (nonce: Index, data: AccountData[]): Result => [
|
const extract = (nonce: Index, data: AccountData[]): Result => [
|
||||||
nonce,
|
nonce,
|
||||||
@@ -93,11 +92,17 @@ function queryBalancesAccount (api: DeriveApi, accountId: AccountId, modules: st
|
|||||||
// NOTE this is for the first case where we do have instances specified
|
// NOTE this is for the first case where we do have instances specified
|
||||||
return balances.length
|
return balances.length
|
||||||
? isFunction(api.query.system.account)
|
? isFunction(api.query.system.account)
|
||||||
? api.queryMulti<[AccountInfo, ...(AccountData[])]>([[api.query.system.account, accountId], ...balances]).pipe(
|
? combineLatest([
|
||||||
map(([{ nonce }, ...balances]) => extract(nonce, balances))
|
api.query.system.account(accountId),
|
||||||
|
...balances.map((c) => c(accountId))
|
||||||
|
]).pipe(
|
||||||
|
map(([{ nonce }, ...balances]) => extract(nonce, balances as unknown as AccountData[]))
|
||||||
)
|
)
|
||||||
: api.queryMulti<[Index, ...(AccountData[])]>([[api.query.system.accountNonce, accountId], ...balances]).pipe(
|
: combineLatest([
|
||||||
map(([nonce, ...balances]) => extract(nonce, balances))
|
api.query.system.accountNonce<Index>(accountId),
|
||||||
|
...balances.map((c) => c(accountId))
|
||||||
|
]).pipe(
|
||||||
|
map(([nonce, ...balances]) => extract(nonce, balances as unknown as AccountData[]))
|
||||||
)
|
)
|
||||||
: queryNonceOnly(api, accountId);
|
: queryNonceOnly(api, accountId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,8 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { Observable } from 'rxjs';
|
import type { Observable } from 'rxjs';
|
||||||
import type { QueryableStorageMultiArg } from '@polkadot/api-base/types';
|
|
||||||
import type { Option, Vec } from '@polkadot/types';
|
import type { Option, Vec } from '@polkadot/types';
|
||||||
import type { AccountId, AccountIndex, Address, Balance, BalanceLockTo212, BlockNumber, VestingSchedule } from '@polkadot/types/interfaces';
|
import type { AccountId, Balance, BalanceLockTo212, BlockNumber, VestingSchedule } from '@polkadot/types/interfaces';
|
||||||
import type { PalletBalancesBalanceLock, PalletBalancesReserveData, PalletVestingVestingInfo } from '@polkadot/types/lookup';
|
import type { PalletBalancesBalanceLock, PalletBalancesReserveData, PalletVestingVestingInfo } from '@polkadot/types/lookup';
|
||||||
import type { DeriveApi, DeriveBalancesAccount, DeriveBalancesAccountData, DeriveBalancesAll, DeriveBalancesAllAccountData, DeriveBalancesAllVesting } from '../types';
|
import type { DeriveApi, DeriveBalancesAccount, DeriveBalancesAccountData, DeriveBalancesAll, DeriveBalancesAllAccountData, DeriveBalancesAllVesting } from '../types';
|
||||||
|
|
||||||
@@ -15,7 +14,7 @@ import { BN, BN_ZERO, bnMax, bnMin, isFunction } from '@polkadot/util';
|
|||||||
import { memo } from '../util';
|
import { memo } from '../util';
|
||||||
|
|
||||||
type ResultBalance = [PalletVestingVestingInfo[] | null, ((PalletBalancesBalanceLock | BalanceLockTo212)[])[], PalletBalancesReserveData[][]];
|
type ResultBalance = [PalletVestingVestingInfo[] | null, ((PalletBalancesBalanceLock | BalanceLockTo212)[])[], PalletBalancesReserveData[][]];
|
||||||
type Result = [DeriveBalancesAccount, BlockNumber, ResultBalance];
|
type Result = [DeriveBalancesAccount, ResultBalance, BlockNumber];
|
||||||
|
|
||||||
interface AllLocked {
|
interface AllLocked {
|
||||||
allLocked: boolean,
|
allLocked: boolean,
|
||||||
@@ -100,7 +99,7 @@ function calcVesting (bestNumber: BlockNumber, shared: DeriveBalancesAllAccountD
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function calcBalances (api: DeriveApi, [data, bestNumber, [vesting, allLocks, namedReserves]]: Result): DeriveBalancesAll {
|
function calcBalances (api: DeriveApi, [data, [vesting, allLocks, namedReserves], bestNumber]: Result): DeriveBalancesAll {
|
||||||
const shared = calcShared(api, bestNumber, data, allLocks[0]);
|
const shared = calcShared(api, bestNumber, data, allLocks[0]);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -116,10 +115,10 @@ function calcBalances (api: DeriveApi, [data, bestNumber, [vesting, allLocks, na
|
|||||||
}
|
}
|
||||||
|
|
||||||
// old
|
// old
|
||||||
function queryOld (api: DeriveApi, accountId: AccountId): Observable<ResultBalance> {
|
function queryOld (api: DeriveApi, accountId: AccountId | string): Observable<ResultBalance> {
|
||||||
return api.queryMulti<[Vec<PalletBalancesBalanceLock>, Option<VestingSchedule>]>([
|
return combineLatest([
|
||||||
[api.query.balances.locks, accountId],
|
api.query.balances.locks(accountId),
|
||||||
[api.query.balances.vesting, accountId]
|
api.query.balances.vesting<Option<VestingSchedule>>(accountId)
|
||||||
]).pipe(
|
]).pipe(
|
||||||
map(([locks, optVesting]): ResultBalance => {
|
map(([locks, optVesting]): ResultBalance => {
|
||||||
let vestingNew = null;
|
let vestingNew = null;
|
||||||
@@ -143,26 +142,22 @@ function queryOld (api: DeriveApi, accountId: AccountId): Observable<ResultBalan
|
|||||||
|
|
||||||
const isNonNullable = <T>(nullable: T): nullable is NonNullable<T> => !!nullable;
|
const isNonNullable = <T>(nullable: T): nullable is NonNullable<T> => !!nullable;
|
||||||
|
|
||||||
function createCalls (accountId: AccountId, calls: unknown[]): [boolean[], QueryableStorageMultiArg<'rxjs'>[]] {
|
function createCalls <T> (calls: (((a: unknown) => Observable<T>) | null | undefined)[]): [boolean[], ((a: unknown) => Observable<T>)[]] {
|
||||||
return [
|
return [
|
||||||
calls.map((c) => !c),
|
calls.map((c) => !c),
|
||||||
calls
|
calls.filter(isNonNullable)
|
||||||
.filter(isNonNullable)
|
|
||||||
.map((c) => [c, accountId] as unknown as QueryableStorageMultiArg<'rxjs'>)
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
// current (balances, vesting)
|
// current (balances, vesting)
|
||||||
function queryCurrent (api: DeriveApi, accountId: AccountId, balanceInstances: string[] = ['balances']): Observable<ResultBalance> {
|
function queryCurrent (api: DeriveApi, accountId: AccountId | string, balanceInstances: string[] = ['balances']): Observable<ResultBalance> {
|
||||||
const [lockEmpty, lockQueries] = createCalls(
|
const [lockEmpty, lockQueries] = createCalls<Vec<PalletBalancesBalanceLock>>(
|
||||||
accountId,
|
balanceInstances.map((m) =>
|
||||||
balanceInstances.map((m): DeriveApi['query']['balances']['locks'] | undefined =>
|
|
||||||
(api.derive as DeriveCustomLocks)[m]?.customLocks || api.query[m as 'balances']?.locks
|
(api.derive as DeriveCustomLocks)[m]?.customLocks || api.query[m as 'balances']?.locks
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
const [reserveEmpty, reserveQueries] = createCalls(
|
const [reserveEmpty, reserveQueries] = createCalls<Vec<PalletBalancesReserveData>>(
|
||||||
accountId,
|
balanceInstances.map((m) =>
|
||||||
balanceInstances.map((m): DeriveApi['query']['balances']['reserves'] | undefined =>
|
|
||||||
api.query[m as 'balances']?.reserves
|
api.query[m as 'balances']?.reserves
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -172,10 +167,10 @@ function queryCurrent (api: DeriveApi, accountId: AccountId, balanceInstances: s
|
|||||||
? api.query.vesting.vesting(accountId)
|
? api.query.vesting.vesting(accountId)
|
||||||
: of(api.registry.createType('Option<VestingInfo>')),
|
: of(api.registry.createType('Option<VestingInfo>')),
|
||||||
lockQueries.length
|
lockQueries.length
|
||||||
? api.queryMulti<[...(Vec<PalletBalancesBalanceLock>)[]]>(lockQueries)
|
? combineLatest(lockQueries.map((c) => c(accountId)))
|
||||||
: of([] as Vec<PalletBalancesBalanceLock>[]),
|
: of([] as Vec<PalletBalancesBalanceLock>[]),
|
||||||
reserveQueries.length
|
reserveQueries.length
|
||||||
? api.queryMulti<[...(Vec<PalletBalancesReserveData>)[]]>(reserveQueries)
|
? combineLatest(reserveQueries.map((c) => c(accountId)))
|
||||||
: of([] as Vec<PalletBalancesReserveData>[])
|
: of([] as Vec<PalletBalancesReserveData>[])
|
||||||
]).pipe(
|
]).pipe(
|
||||||
map(([opt, locks, reserves]): ResultBalance => {
|
map(([opt, locks, reserves]): ResultBalance => {
|
||||||
@@ -215,23 +210,23 @@ function queryCurrent (api: DeriveApi, accountId: AccountId, balanceInstances: s
|
|||||||
* });
|
* });
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
export function all (instanceId: string, api: DeriveApi): (address: AccountIndex | AccountId | Address | string) => Observable<DeriveBalancesAll> {
|
export function all (instanceId: string, api: DeriveApi): (address: AccountId | string) => Observable<DeriveBalancesAll> {
|
||||||
const balanceInstances = api.registry.getModuleInstances(api.runtimeVersion.specName.toString(), 'balances');
|
const balanceInstances = api.registry.getModuleInstances(api.runtimeVersion.specName.toString(), 'balances');
|
||||||
|
|
||||||
return memo(instanceId, (address: AccountIndex | AccountId | Address | string): Observable<DeriveBalancesAll> =>
|
return memo(instanceId, (address: AccountId | string): Observable<DeriveBalancesAll> =>
|
||||||
api.derive.balances.account(address).pipe(
|
combineLatest([
|
||||||
switchMap((account): Observable<Result> =>
|
api.derive.balances.account(address),
|
||||||
(!account.accountId.isEmpty
|
isFunction(api.query.system?.account) || isFunction(api.query.balances?.account)
|
||||||
? combineLatest([
|
? queryCurrent(api, address, balanceInstances)
|
||||||
of(account),
|
: queryOld(api, address)
|
||||||
api.derive.chain.bestNumber(),
|
]).pipe(
|
||||||
isFunction(api.query.system?.account) || isFunction(api.query.balances?.account)
|
switchMap(([account, locks]) =>
|
||||||
? queryCurrent(api, account.accountId, balanceInstances)
|
combineLatest([
|
||||||
: queryOld(api, account.accountId)
|
of(account),
|
||||||
])
|
of(locks),
|
||||||
: of([account, api.registry.createType('BlockNumber'), [null, [], []]])
|
api.derive.chain.bestNumber()
|
||||||
)
|
])
|
||||||
),
|
),
|
||||||
map((result): DeriveBalancesAll => calcBalances(api, result))
|
map((result) => calcBalances(api, result))
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,6 +156,6 @@ describe('bounties derive', () => {
|
|||||||
expect(result).toHaveLength(2);
|
expect(result).toHaveLength(2);
|
||||||
expect(result[0].proposals).toHaveLength(0);
|
expect(result[0].proposals).toHaveLength(0);
|
||||||
expect(result[1].proposals).toHaveLength(1);
|
expect(result[1].proposals).toHaveLength(1);
|
||||||
expect(result[1].proposals[0].proposal.method).toEqual('approveBounty');
|
expect(result[1].proposals[0].proposal && result[1].proposals[0].proposal.method).toEqual('approveBounty');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ function parseResult ([maybeBounties, maybeDescriptions, ids, bountyProposals]:
|
|||||||
bounty: bounty.unwrap(),
|
bounty: bounty.unwrap(),
|
||||||
description: maybeDescriptions[index].unwrapOrDefault().toUtf8(),
|
description: maybeDescriptions[index].unwrapOrDefault().toUtf8(),
|
||||||
index: ids[index],
|
index: ids[index],
|
||||||
proposals: bountyProposals.filter((bountyProposal) => ids[index].eq(bountyProposal.proposal.args[0]))
|
proposals: bountyProposals.filter((bountyProposal) =>
|
||||||
|
bountyProposal.proposal && ids[index].eq(bountyProposal.proposal.args[0])
|
||||||
|
)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -7,5 +7,7 @@ export function filterBountiesProposals (api: DeriveApi, allProposals: DeriveCol
|
|||||||
const bountyTxBase = api.tx.bounties ? api.tx.bounties : api.tx.treasury;
|
const bountyTxBase = api.tx.bounties ? api.tx.bounties : api.tx.treasury;
|
||||||
const bountyProposalCalls = [bountyTxBase.approveBounty, bountyTxBase.closeBounty, bountyTxBase.proposeCurator, bountyTxBase.unassignCurator];
|
const bountyProposalCalls = [bountyTxBase.approveBounty, bountyTxBase.closeBounty, bountyTxBase.proposeCurator, bountyTxBase.unassignCurator];
|
||||||
|
|
||||||
return allProposals.filter((proposal) => bountyProposalCalls.find((bountyCall) => bountyCall.is(proposal.proposal)));
|
return allProposals.filter((proposal) => bountyProposalCalls.find((bountyCall) =>
|
||||||
|
proposal.proposal && bountyCall.is(proposal.proposal))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import type { AnyFunction } from '@polkadot/types/types';
|
|||||||
import type { ExactDerive } from './derive';
|
import type { ExactDerive } from './derive';
|
||||||
import type { DeriveApi } from './types';
|
import type { DeriveApi } from './types';
|
||||||
|
|
||||||
import { lazyDeriveSection } from './util/lazy';
|
|
||||||
import { derive } from './derive';
|
import { derive } from './derive';
|
||||||
|
import { lazyDeriveSection } from './util';
|
||||||
|
|
||||||
export * from './derive';
|
export * from './derive';
|
||||||
export * from './type';
|
export * from './type';
|
||||||
@@ -23,8 +23,9 @@ 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: {
|
bagsList: {
|
||||||
instances: ['bagsList'],
|
instances: ['voterList', 'bagsList'],
|
||||||
methods: []
|
methods: [],
|
||||||
|
withDetect: true
|
||||||
},
|
},
|
||||||
contracts: {
|
contracts: {
|
||||||
instances: ['contracts'],
|
instances: ['contracts'],
|
||||||
|
|||||||
@@ -21,17 +21,13 @@ export type { Hash, Proposal, Votes } from '@polkadot/types/interfaces';
|
|||||||
type Result = [(Hash | Uint8Array | string)[], (Option<Proposal> | null)[], Option<Votes>[]];
|
type Result = [(Hash | Uint8Array | string)[], (Option<Proposal> | null)[], Option<Votes>[]];
|
||||||
|
|
||||||
function parse (api: DeriveApi, [hashes, proposals, votes]: Result): DeriveCollectiveProposal[] {
|
function parse (api: DeriveApi, [hashes, proposals, votes]: Result): DeriveCollectiveProposal[] {
|
||||||
return proposals
|
return proposals.map((o, index): DeriveCollectiveProposal => ({
|
||||||
.map((o, index): DeriveCollectiveProposal | null =>
|
hash: api.registry.createType('Hash', hashes[index]),
|
||||||
o && o.isSome
|
proposal: o && o.isSome
|
||||||
? {
|
? o.unwrap()
|
||||||
hash: api.registry.createType('Hash', hashes[index]),
|
: null,
|
||||||
proposal: o.unwrap(),
|
votes: votes[index].unwrapOr(null)
|
||||||
votes: votes[index].unwrapOr(null)
|
}));
|
||||||
}
|
|
||||||
: null
|
|
||||||
)
|
|
||||||
.filter((proposal): proposal is DeriveCollectiveProposal => !!proposal);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function _proposalsFrom (api: DeriveApi, query: DeriveApi['query']['council'], hashes: (Hash | Uint8Array | string)[]): Observable<DeriveCollectiveProposal[]> {
|
function _proposalsFrom (api: DeriveApi, query: DeriveApi['query']['council'], hashes: (Hash | Uint8Array | string)[]): Observable<DeriveCollectiveProposal[]> {
|
||||||
@@ -41,11 +37,9 @@ function _proposalsFrom (api: DeriveApi, query: DeriveApi['query']['council'], h
|
|||||||
// this should simply be api.query[section].proposalOf.multi<Option<Proposal>>(hashes),
|
// this should simply be api.query[section].proposalOf.multi<Option<Proposal>>(hashes),
|
||||||
// however we have had cases on Edgeware where the indices have moved around after an
|
// however we have had cases on Edgeware where the indices have moved around after an
|
||||||
// upgrade, which results in invalid on-chain data
|
// upgrade, which results in invalid on-chain data
|
||||||
combineLatest(hashes.map((h) =>
|
query.proposalOf.multi<Option<Proposal>>(hashes).pipe(
|
||||||
query.proposalOf<Option<Proposal>>(h).pipe(
|
catchError(() => of(hashes.map(() => null)))
|
||||||
catchError(() => of(null))
|
),
|
||||||
)
|
|
||||||
)),
|
|
||||||
query.voting.multi<Option<Votes>>(hashes)
|
query.voting.multi<Option<Votes>>(hashes)
|
||||||
])
|
])
|
||||||
: of<Result>([[], [], []])
|
: of<Result>([[], [], []])
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import type { DeriveApi, DeriveContributions } from '../types';
|
|||||||
|
|
||||||
import { BehaviorSubject, combineLatest, EMPTY, map, of, startWith, switchMap, tap, toArray } from 'rxjs';
|
import { BehaviorSubject, combineLatest, EMPTY, map, of, startWith, switchMap, tap, toArray } from 'rxjs';
|
||||||
|
|
||||||
import { arrayFlatten, isFunction } from '@polkadot/util';
|
import { arrayFlatten, isFunction, nextTick } from '@polkadot/util';
|
||||||
|
|
||||||
import { memo } from '../util';
|
import { memo } from '../util';
|
||||||
import { extractContributed } from './util';
|
import { extractContributed } from './util';
|
||||||
@@ -67,11 +67,11 @@ function _getKeysPaged (api: DeriveApi, childKey: string): Observable<StorageKey
|
|||||||
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 => {
|
nextTick((): void => {
|
||||||
keys.length === PAGE_SIZE_K
|
keys.length === PAGE_SIZE_K
|
||||||
? subject.next(keys[PAGE_SIZE_K - 1].toHex())
|
? subject.next(keys[PAGE_SIZE_K - 1].toHex())
|
||||||
: subject.complete();
|
: subject.complete();
|
||||||
}, 0);
|
});
|
||||||
}),
|
}),
|
||||||
toArray(), // toArray since we want to startSubject to be completed
|
toArray(), // toArray since we want to startSubject to be completed
|
||||||
map((keyArr: StorageKey[][]) => arrayFlatten(keyArr))
|
map((keyArr: StorageKey[][]) => arrayFlatten(keyArr))
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import type { DeriveApi, DeriveDispatch, DeriveProposalImage } from '../types';
|
|||||||
|
|
||||||
import { catchError, combineLatest, map, of, switchMap } from 'rxjs';
|
import { catchError, combineLatest, map, of, switchMap } from 'rxjs';
|
||||||
|
|
||||||
|
import { Enum } from '@polkadot/types';
|
||||||
import { isFunction, stringToHex } from '@polkadot/util';
|
import { isFunction, stringToHex } from '@polkadot/util';
|
||||||
|
|
||||||
import { memo } from '../util';
|
import { memo } from '../util';
|
||||||
@@ -24,7 +25,7 @@ interface SchedulerInfo {
|
|||||||
|
|
||||||
function isMaybeHashed (call: FrameSupportScheduleMaybeHashed | Call): call is FrameSupportScheduleMaybeHashed {
|
function isMaybeHashed (call: FrameSupportScheduleMaybeHashed | Call): call is FrameSupportScheduleMaybeHashed {
|
||||||
// check for enum
|
// check for enum
|
||||||
return (call as FrameSupportScheduleMaybeHashed).isBasic === false;
|
return call instanceof Enum;
|
||||||
}
|
}
|
||||||
|
|
||||||
function queryQueue (api: DeriveApi): Observable<DeriveDispatch[]> {
|
function queryQueue (api: DeriveApi): Observable<DeriveDispatch[]> {
|
||||||
@@ -47,7 +48,7 @@ function queryQueue (api: DeriveApi): Observable<DeriveDispatch[]> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function schedulerEntries (api: DeriveApi): Observable<[BlockNumber[], (Option<PalletSchedulerScheduledV3 | Scheduled>[] | null)[]]> {
|
function schedulerEntries (api: DeriveApi): Observable<[BlockNumber[], Option<PalletSchedulerScheduledV3 | Scheduled>[][]]> {
|
||||||
// We don't get entries, but rather we get the keys (triggered via finished referendums) and
|
// We don't get entries, but rather we get the keys (triggered via finished referendums) and
|
||||||
// the subscribe to those keys - this means we pickup when the schedulers actually executes
|
// the subscribe to those keys - this means we pickup when the schedulers actually executes
|
||||||
// at a block, the entry for that block will become empty
|
// at a block, the entry for that block will become empty
|
||||||
@@ -64,12 +65,11 @@ function schedulerEntries (api: DeriveApi): Observable<[BlockNumber[], (Option<P
|
|||||||
// this should simply be api.query.scheduler.agenda.multi,
|
// this should simply be api.query.scheduler.agenda.multi,
|
||||||
// however we have had cases on Darwinia where the indices have moved around after an
|
// however we have had cases on Darwinia where the indices have moved around after an
|
||||||
// upgrade, which results in invalid on-chain data
|
// upgrade, which results in invalid on-chain data
|
||||||
combineLatest(blockNumbers.map((blockNumber) =>
|
api.query.scheduler.agenda.multi(blockNumbers).pipe(
|
||||||
// this does create an issue since it discards all at that block
|
catchError(() => of(blockNumbers.map(() => [])))
|
||||||
api.query.scheduler.agenda(blockNumber).pipe(catchError(() => of(null)))
|
)
|
||||||
))
|
|
||||||
])
|
])
|
||||||
: of<[BlockNumber[], null[]]>([[], []]);
|
: of<[BlockNumber[], Option<PalletSchedulerScheduledV3 | Scheduled>[][]]>([[], []]);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
export * from './index';
|
||||||
@@ -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: '8.6.2' };
|
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '8.11.1' };
|
||||||
|
|||||||
@@ -39,12 +39,14 @@ export function keysMulti (instanceId: string, api: DeriveApi): (stashIds: (Uint
|
|||||||
combineLatest([
|
combineLatest([
|
||||||
of(queuedKeys),
|
of(queuedKeys),
|
||||||
api.consts.session?.dedupKeyPrefix
|
api.consts.session?.dedupKeyPrefix
|
||||||
? api.query.session.nextKeys.multi(stashIds.map((stashId) => [api.consts.session.dedupKeyPrefix, stashId]))
|
? api.query.session.nextKeys.multi(stashIds.map((s) => [api.consts.session.dedupKeyPrefix, s]))
|
||||||
: api.query.session.nextKeys.multi(stashIds)
|
: combineLatest(stashIds.map((s) => api.query.session.nextKeys(s)))
|
||||||
])
|
])
|
||||||
),
|
),
|
||||||
map(([queuedKeys, nextKeys]) =>
|
map(([queuedKeys, nextKeys]) =>
|
||||||
stashIds.map((stashId, index) => extractsIds(stashId, queuedKeys, nextKeys[index]))
|
stashIds.map((stashId, index) =>
|
||||||
|
extractsIds(stashId, queuedKeys, nextKeys[index])
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
: of([])
|
: of([])
|
||||||
|
|||||||
@@ -2,12 +2,10 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { Observable } from 'rxjs';
|
import type { Observable } from 'rxjs';
|
||||||
import type { QueryableStorageMultiArg } from '@polkadot/api-base/types';
|
|
||||||
import type { EraIndex } from '@polkadot/types/interfaces';
|
import type { EraIndex } from '@polkadot/types/interfaces';
|
||||||
import type { PalletStakingExposure } from '@polkadot/types/lookup';
|
|
||||||
import type { DeriveApi, DeriveOwnExposure } from '../types';
|
import type { DeriveApi, DeriveOwnExposure } from '../types';
|
||||||
|
|
||||||
import { map, of } from 'rxjs';
|
import { combineLatest, map, of } from 'rxjs';
|
||||||
|
|
||||||
import { firstMemo, memo } from '../util';
|
import { firstMemo, memo } from '../util';
|
||||||
import { erasHistoricApplyAccount } from './util';
|
import { erasHistoricApplyAccount } from './util';
|
||||||
@@ -16,12 +14,12 @@ export function _ownExposures (instanceId: string, api: DeriveApi): (accountId:
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
return memo(instanceId, (accountId: Uint8Array | string, eras: EraIndex[], _withActive: boolean): Observable<DeriveOwnExposure[]> =>
|
return memo(instanceId, (accountId: Uint8Array | string, eras: EraIndex[], _withActive: boolean): Observable<DeriveOwnExposure[]> =>
|
||||||
eras.length
|
eras.length
|
||||||
? api.queryMulti<PalletStakingExposure[]>([
|
? combineLatest([
|
||||||
...eras.map((e): QueryableStorageMultiArg<'rxjs'> => [api.query.staking.erasStakersClipped, [e, accountId]]),
|
combineLatest(eras.map((e) => api.query.staking.erasStakersClipped(e, accountId))),
|
||||||
...eras.map((e): QueryableStorageMultiArg<'rxjs'> => [api.query.staking.erasStakers, [e, accountId]])
|
combineLatest(eras.map((e) => api.query.staking.erasStakers(e, accountId)))
|
||||||
]).pipe(
|
]).pipe(
|
||||||
map((all): DeriveOwnExposure[] =>
|
map(([clp, exp]): DeriveOwnExposure[] =>
|
||||||
eras.map((era, index) => ({ clipped: all[index], era, exposure: all[eras.length + index] }))
|
eras.map((era, index) => ({ clipped: clp[index], era, exposure: exp[index] }))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
: of([])
|
: of([])
|
||||||
|
|||||||
@@ -2,13 +2,11 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { Observable } from 'rxjs';
|
import type { Observable } from 'rxjs';
|
||||||
import type { QueryableStorageMultiArg } from '@polkadot/api-base/types';
|
|
||||||
import type { Option } from '@polkadot/types';
|
|
||||||
import type { BalanceOf, EraIndex, Perbill } from '@polkadot/types/interfaces';
|
import type { BalanceOf, EraIndex, Perbill } from '@polkadot/types/interfaces';
|
||||||
import type { ITuple } from '@polkadot/types/types';
|
import type { ITuple } from '@polkadot/types/types';
|
||||||
import type { DeriveApi, DeriveStakerSlashes } from '../types';
|
import type { DeriveApi, DeriveStakerSlashes } from '../types';
|
||||||
|
|
||||||
import { map, of } from 'rxjs';
|
import { combineLatest, map, of } from 'rxjs';
|
||||||
|
|
||||||
import { firstMemo, memo } from '../util';
|
import { firstMemo, memo } from '../util';
|
||||||
import { erasHistoricApplyAccount } from './util';
|
import { erasHistoricApplyAccount } from './util';
|
||||||
@@ -17,16 +15,16 @@ export function _ownSlashes (instanceId: string, api: DeriveApi): (accountId: Ui
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
return memo(instanceId, (accountId: Uint8Array | string, eras: EraIndex[], _withActive: boolean): Observable<DeriveStakerSlashes[]> =>
|
return memo(instanceId, (accountId: Uint8Array | string, eras: EraIndex[], _withActive: boolean): Observable<DeriveStakerSlashes[]> =>
|
||||||
eras.length
|
eras.length
|
||||||
? api.queryMulti<(Option<ITuple<[Perbill, BalanceOf]>> | Option<BalanceOf>)[]>([
|
? combineLatest([
|
||||||
...eras.map((e): QueryableStorageMultiArg<'rxjs'> => [api.query.staking.validatorSlashInEra, [e, accountId]]),
|
combineLatest(eras.map((e) => api.query.staking.validatorSlashInEra(e, accountId))),
|
||||||
...eras.map((e): QueryableStorageMultiArg<'rxjs'> => [api.query.staking.nominatorSlashInEra, [e, accountId]])
|
combineLatest(eras.map((e) => api.query.staking.nominatorSlashInEra(e, accountId)))
|
||||||
]).pipe(
|
]).pipe(
|
||||||
map((values): DeriveStakerSlashes[] =>
|
map(([vals, noms]): DeriveStakerSlashes[] =>
|
||||||
eras.map((era, index) => ({
|
eras.map((era, index) => ({
|
||||||
era,
|
era,
|
||||||
total: values[index].isSome
|
total: vals[index].isSome
|
||||||
? (values[index].unwrap() as ITuple<[Perbill, BalanceOf]>)[1]
|
? (vals[index].unwrap() as ITuple<[Perbill, BalanceOf]>)[1]
|
||||||
: (values[index + eras.length].unwrapOrDefault() as BalanceOf)
|
: (noms[index].unwrapOrDefault() as BalanceOf)
|
||||||
}))
|
}))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ function getLedgers (api: DeriveApi, optIds: (Option<AccountId> | null)[], { wit
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
ids.length
|
ids.length
|
||||||
? api.query.staking.ledger.multi(ids)
|
? combineLatest(ids.map((s) => api.query.staking.ledger(s)))
|
||||||
: of([])
|
: of([])
|
||||||
).pipe(
|
).pipe(
|
||||||
map((optLedgers): Option<PalletStakingStakingLedger>[] => {
|
map((optLedgers): Option<PalletStakingStakingLedger>[] => {
|
||||||
@@ -57,19 +57,19 @@ function getStashInfo (api: DeriveApi, stashIds: AccountId[], activeEra: EraInde
|
|||||||
|
|
||||||
return combineLatest([
|
return combineLatest([
|
||||||
withController || withLedger
|
withController || withLedger
|
||||||
? api.query.staking.bonded.multi(stashIds)
|
? combineLatest(stashIds.map((s) => api.query.staking.bonded(s)))
|
||||||
: of(stashIds.map(() => null)),
|
: of(stashIds.map(() => null)),
|
||||||
withNominations
|
withNominations
|
||||||
? api.query.staking.nominators.multi(stashIds)
|
? combineLatest(stashIds.map((s) => api.query.staking.nominators(s)))
|
||||||
: of(stashIds.map(() => emptyNoms)),
|
: of(stashIds.map(() => emptyNoms)),
|
||||||
withDestination
|
withDestination
|
||||||
? api.query.staking.payee.multi(stashIds)
|
? combineLatest(stashIds.map((s) => api.query.staking.payee(s)))
|
||||||
: of(stashIds.map(() => emptyRewa)),
|
: of(stashIds.map(() => emptyRewa)),
|
||||||
withPrefs
|
withPrefs
|
||||||
? api.query.staking.validators.multi(stashIds)
|
? combineLatest(stashIds.map((s) => api.query.staking.validators(s)))
|
||||||
: of(stashIds.map(() => emptyPrefs)),
|
: of(stashIds.map(() => emptyPrefs)),
|
||||||
withExposure
|
withExposure
|
||||||
? api.query.staking.erasStakers.multi(stashIds.map((stashId) => [activeEra, stashId]))
|
? combineLatest(stashIds.map((s) => api.query.staking.erasStakers(activeEra, s)))
|
||||||
: of(stashIds.map(() => emptyExpo))
|
: of(stashIds.map(() => emptyExpo))
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import type { DeriveApi } from '../types';
|
|||||||
|
|
||||||
import { BehaviorSubject, combineLatest, map, of, switchMap, tap, toArray } from 'rxjs';
|
import { BehaviorSubject, combineLatest, map, of, switchMap, tap, toArray } from 'rxjs';
|
||||||
|
|
||||||
import { arrayChunk, arrayFlatten } from '@polkadot/util';
|
import { arrayChunk, arrayFlatten, nextTick } from '@polkadot/util';
|
||||||
|
|
||||||
import { memo } from '../util';
|
import { memo } from '../util';
|
||||||
|
|
||||||
@@ -28,13 +28,13 @@ function chunkEras <T> (eras: EraIndex[], fn: (eras: EraIndex[]) => Observable<T
|
|||||||
return subject.pipe(
|
return subject.pipe(
|
||||||
switchMap(fn),
|
switchMap(fn),
|
||||||
tap((): void => {
|
tap((): void => {
|
||||||
setTimeout((): void => {
|
nextTick((): void => {
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
index === chunked.length
|
index === chunked.length
|
||||||
? subject.complete()
|
? subject.complete()
|
||||||
: subject.next(chunked[index]);
|
: subject.next(chunked[index]);
|
||||||
}, 0);
|
});
|
||||||
}),
|
}),
|
||||||
toArray(),
|
toArray(),
|
||||||
map(arrayFlatten)
|
map(arrayFlatten)
|
||||||
|
|||||||
@@ -23,15 +23,23 @@ function parseResult (api: DeriveApi, { allIds, allProposals, approvalIds, counc
|
|||||||
const approvals: DeriveTreasuryProposal[] = [];
|
const approvals: DeriveTreasuryProposal[] = [];
|
||||||
const proposals: DeriveTreasuryProposal[] = [];
|
const proposals: DeriveTreasuryProposal[] = [];
|
||||||
const councilTreasury = councilProposals.filter(({ proposal }) =>
|
const councilTreasury = councilProposals.filter(({ proposal }) =>
|
||||||
api.tx.treasury.approveProposal.is(proposal) ||
|
proposal && (
|
||||||
api.tx.treasury.rejectProposal.is(proposal)
|
api.tx.treasury.approveProposal.is(proposal) ||
|
||||||
|
api.tx.treasury.rejectProposal.is(proposal)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
allIds.forEach((id, index): void => {
|
allIds.forEach((id, index): void => {
|
||||||
if (allProposals[index].isSome) {
|
if (allProposals[index].isSome) {
|
||||||
const council = councilTreasury
|
const council = councilTreasury
|
||||||
.filter(({ proposal }) => id.eq(proposal.args[0]))
|
.filter(({ proposal }) => proposal && id.eq(proposal.args[0]))
|
||||||
.sort((a, b) => a.proposal.method.localeCompare(b.proposal.method));
|
.sort((a, b) =>
|
||||||
|
a.proposal && b.proposal
|
||||||
|
? a.proposal.method.localeCompare(b.proposal.method)
|
||||||
|
: a.proposal
|
||||||
|
? -1
|
||||||
|
: 1
|
||||||
|
);
|
||||||
const isApproval = approvalIds.some((approvalId) => approvalId.eq(id));
|
const isApproval = approvalIds.some((approvalId) => approvalId.eq(id));
|
||||||
const derived = { council, id, proposal: allProposals[index].unwrap() };
|
const derived = { council, id, proposal: allProposals[index].unwrap() };
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export interface DeriveContractFees {
|
|||||||
|
|
||||||
export interface DeriveCollectiveProposal {
|
export interface DeriveCollectiveProposal {
|
||||||
hash: Hash;
|
hash: Hash;
|
||||||
proposal: Proposal;
|
proposal: Proposal | null;
|
||||||
votes: Votes | null;
|
votes: Votes | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,3 +7,4 @@ export * from './approvalFlagsToBools';
|
|||||||
export * from './cache';
|
export * from './cache';
|
||||||
export * from './cacheImpl';
|
export * from './cacheImpl';
|
||||||
export * from './first';
|
export * from './first';
|
||||||
|
export * from './lazy';
|
||||||
|
|||||||
+18
-18
@@ -20,29 +20,29 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "8.6.2",
|
"version": "8.11.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.3",
|
"@babel/runtime": "^7.18.6",
|
||||||
"@polkadot/api-augment": "8.6.2",
|
"@polkadot/api-augment": "8.11.1",
|
||||||
"@polkadot/api-base": "8.6.2",
|
"@polkadot/api-base": "8.11.1",
|
||||||
"@polkadot/api-derive": "8.6.2",
|
"@polkadot/api-derive": "8.11.1",
|
||||||
"@polkadot/keyring": "^9.3.1",
|
"@polkadot/keyring": "^9.7.1",
|
||||||
"@polkadot/rpc-augment": "8.6.2",
|
"@polkadot/rpc-augment": "8.11.1",
|
||||||
"@polkadot/rpc-core": "8.6.2",
|
"@polkadot/rpc-core": "8.11.1",
|
||||||
"@polkadot/rpc-provider": "8.6.2",
|
"@polkadot/rpc-provider": "8.11.1",
|
||||||
"@polkadot/types": "8.6.2",
|
"@polkadot/types": "8.11.1",
|
||||||
"@polkadot/types-augment": "8.6.2",
|
"@polkadot/types-augment": "8.11.1",
|
||||||
"@polkadot/types-codec": "8.6.2",
|
"@polkadot/types-codec": "8.11.1",
|
||||||
"@polkadot/types-create": "8.6.2",
|
"@polkadot/types-create": "8.11.1",
|
||||||
"@polkadot/types-known": "8.6.2",
|
"@polkadot/types-known": "8.11.1",
|
||||||
"@polkadot/util": "^9.3.1",
|
"@polkadot/util": "^9.7.1",
|
||||||
"@polkadot/util-crypto": "^9.3.1",
|
"@polkadot/util-crypto": "^9.7.1",
|
||||||
"eventemitter3": "^4.0.7",
|
"eventemitter3": "^4.0.7",
|
||||||
"rxjs": "^7.5.5"
|
"rxjs": "^7.5.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/api-augment": "8.6.2",
|
"@polkadot/api-augment": "8.11.1",
|
||||||
"@polkadot/types-support": "8.6.2"
|
"@polkadot/types-support": "8.11.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,13 +2,14 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { Observable } from 'rxjs';
|
import type { Observable } from 'rxjs';
|
||||||
import type { DeriveCustom } from '@polkadot/api-base/types';
|
import type { AugmentedCall, DeriveCustom, QueryableCalls } from '@polkadot/api-base/types';
|
||||||
import type { RpcInterface } from '@polkadot/rpc-core/types';
|
import type { RpcInterface } from '@polkadot/rpc-core/types';
|
||||||
import type { Option, Raw, StorageKey, Text, u64 } from '@polkadot/types';
|
import type { Option, Raw, StorageKey, Text, u64 } from '@polkadot/types';
|
||||||
import type { Call, Hash, RuntimeVersion } from '@polkadot/types/interfaces';
|
import type { Call, Hash, RuntimeVersion } from '@polkadot/types/interfaces';
|
||||||
import type { DecoratedMeta } from '@polkadot/types/metadata/decorate/types';
|
import type { DecoratedMeta } from '@polkadot/types/metadata/decorate/types';
|
||||||
import type { StorageEntry } from '@polkadot/types/primitive/types';
|
import type { StorageEntry } from '@polkadot/types/primitive/types';
|
||||||
import type { AnyFunction, AnyTuple, CallFunction, Codec, DefinitionRpc, DefinitionRpcSub, DetectCodec, IMethod, IStorageKey, Registry, RegistryError, RegistryTypes } from '@polkadot/types/types';
|
import type { AnyFunction, AnyTuple, CallFunction, Codec, DefinitionCallNamed, DefinitionRpc, DefinitionRpcSub, DefinitionsCall, DefinitionsCallEntry, DetectCodec, IMethod, IStorageKey, Registry, RegistryError, RegistryTypes } from '@polkadot/types/types';
|
||||||
|
import type { HexString } from '@polkadot/util/types';
|
||||||
import type { SubmittableExtrinsic } from '../submittable/types';
|
import type { SubmittableExtrinsic } from '../submittable/types';
|
||||||
import type { ApiDecoration, ApiInterfaceRx, ApiOptions, ApiTypes, AugmentedQuery, DecoratedErrors, DecoratedEvents, DecoratedRpc, DecorateMethod, GenericStorageEntryFunction, PaginationOptions, QueryableConsts, QueryableStorage, QueryableStorageEntry, QueryableStorageEntryAt, QueryableStorageMulti, QueryableStorageMultiArg, SubmittableExtrinsicFunction, SubmittableExtrinsics } from '../types';
|
import type { ApiDecoration, ApiInterfaceRx, ApiOptions, ApiTypes, AugmentedQuery, DecoratedErrors, DecoratedEvents, DecoratedRpc, DecorateMethod, GenericStorageEntryFunction, PaginationOptions, QueryableConsts, QueryableStorage, QueryableStorageEntry, QueryableStorageEntryAt, QueryableStorageMulti, QueryableStorageMultiArg, SubmittableExtrinsicFunction, SubmittableExtrinsics } from '../types';
|
||||||
import type { VersionedRegistry } from './types';
|
import type { VersionedRegistry } from './types';
|
||||||
@@ -18,8 +19,10 @@ import { BehaviorSubject, combineLatest, from, map, of, switchMap, tap, toArray
|
|||||||
import { getAvailableDerives } from '@polkadot/api-derive';
|
import { getAvailableDerives } from '@polkadot/api-derive';
|
||||||
import { memo, RpcCore } from '@polkadot/rpc-core';
|
import { memo, RpcCore } from '@polkadot/rpc-core';
|
||||||
import { WsProvider } from '@polkadot/rpc-provider';
|
import { WsProvider } from '@polkadot/rpc-provider';
|
||||||
import { expandMetadata, Metadata, TypeRegistry, unwrapStorageType } from '@polkadot/types';
|
import { expandMetadata, Metadata, typeDefinitions, TypeRegistry, unwrapStorageType } from '@polkadot/types';
|
||||||
import { arrayChunk, arrayFlatten, assert, assertReturn, BN, BN_ZERO, compactStripLength, lazyMethod, lazyMethods, logger, objectSpread, u8aToHex } from '@polkadot/util';
|
import { getSpecRuntime } from '@polkadot/types-known';
|
||||||
|
import { arrayChunk, arrayFlatten, assert, assertReturn, BN, compactStripLength, lazyMethod, lazyMethods, logger, nextTick, objectSpread, stringCamelCase, stringUpperFirst, u8aConcatStrict, u8aToHex } from '@polkadot/util';
|
||||||
|
import { blake2AsHex } from '@polkadot/util-crypto';
|
||||||
|
|
||||||
import { createSubmittable } from '../submittable';
|
import { createSubmittable } from '../submittable';
|
||||||
import { augmentObject } from '../util/augmentObject';
|
import { augmentObject } from '../util/augmentObject';
|
||||||
@@ -43,7 +46,8 @@ interface FullDecoration<ApiType extends ApiTypes> {
|
|||||||
|
|
||||||
// the max amount of keys/values that we will retrieve at once
|
// the max amount of keys/values that we will retrieve at once
|
||||||
const PAGE_SIZE_K = 1000; // limit aligned with the 1k on the node (trie lookups are heavy)
|
const PAGE_SIZE_K = 1000; // limit aligned with the 1k on the node (trie lookups are heavy)
|
||||||
const PAGE_SIZE_V = 250; // limited since the data may be very large (e.g. misfiring elections)
|
const PAGE_SIZE_V = 250; // limited since the data may be > 16MB (e.g. misfiring elections)
|
||||||
|
const PAGE_SIZE_Q = 50; // queue of pending storage queries (mapped together, next tick)
|
||||||
|
|
||||||
const l = logger('api/init');
|
const l = logger('api/init');
|
||||||
|
|
||||||
@@ -58,9 +62,15 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
|
|
||||||
#registry: Registry;
|
#registry: Registry;
|
||||||
|
|
||||||
|
#storageGetQ: [Observable<Codec[]>, [StorageEntry, unknown[]][]][] = [];
|
||||||
|
|
||||||
|
#storageSubQ: [Observable<Codec[]>, [StorageEntry, unknown[]][]][] = [];
|
||||||
|
|
||||||
// HACK Use BN import so decorateDerive works... yes, wtf.
|
// HACK Use BN import so decorateDerive works... yes, wtf.
|
||||||
protected __phantom = new BN(0);
|
protected __phantom = new BN(0);
|
||||||
|
|
||||||
|
protected _call: QueryableCalls<ApiType> = {} as QueryableCalls<ApiType>;
|
||||||
|
|
||||||
protected _consts: QueryableConsts<ApiType> = {} as QueryableConsts<ApiType>;
|
protected _consts: QueryableConsts<ApiType> = {} as QueryableConsts<ApiType>;
|
||||||
|
|
||||||
protected _derive?: ReturnType<Decorate<ApiType>['_decorateDerive']>;
|
protected _derive?: ReturnType<Decorate<ApiType>['_decorateDerive']>;
|
||||||
@@ -89,6 +99,8 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
|
|
||||||
protected _rpcCore: RpcCore & RpcInterface;
|
protected _rpcCore: RpcCore & RpcInterface;
|
||||||
|
|
||||||
|
protected _runtimeMap: Record<HexString, string> = {};
|
||||||
|
|
||||||
protected _runtimeChain?: Text;
|
protected _runtimeChain?: Text;
|
||||||
|
|
||||||
protected _runtimeMetadata?: Metadata;
|
protected _runtimeMetadata?: Metadata;
|
||||||
@@ -201,6 +213,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
|
|
||||||
protected _emptyDecorated (registry: Registry, blockHash?: Uint8Array): ApiDecoration<ApiType> {
|
protected _emptyDecorated (registry: Registry, blockHash?: Uint8Array): ApiDecoration<ApiType> {
|
||||||
return {
|
return {
|
||||||
|
call: {},
|
||||||
consts: {},
|
consts: {},
|
||||||
errors: {},
|
errors: {},
|
||||||
events: {},
|
events: {},
|
||||||
@@ -222,6 +235,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
registry.decoratedMeta = expandMetadata(registry.registry, registry.metadata);
|
registry.decoratedMeta = expandMetadata(registry.registry, registry.metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const runtime = this._decorateCalls(registry, this._decorateMethod, blockHash);
|
||||||
const storage = this._decorateStorage(registry.decoratedMeta, this._decorateMethod, blockHash);
|
const storage = this._decorateStorage(registry.decoratedMeta, this._decorateMethod, blockHash);
|
||||||
const storageRx = this._decorateStorage(registry.decoratedMeta, this._rxDecorateMethod, blockHash);
|
const storageRx = this._decorateStorage(registry.decoratedMeta, this._rxDecorateMethod, blockHash);
|
||||||
|
|
||||||
@@ -230,6 +244,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
augmentObject('events', registry.decoratedMeta.events, decoratedApi.events, fromEmpty);
|
augmentObject('events', registry.decoratedMeta.events, decoratedApi.events, fromEmpty);
|
||||||
augmentObject('query', storage, decoratedApi.query, fromEmpty);
|
augmentObject('query', storage, decoratedApi.query, fromEmpty);
|
||||||
augmentObject('query', storageRx, decoratedApi.rx.query, fromEmpty);
|
augmentObject('query', storageRx, decoratedApi.rx.query, fromEmpty);
|
||||||
|
augmentObject('call', runtime, decoratedApi.call, fromEmpty);
|
||||||
|
|
||||||
decoratedApi.findCall = (callIndex: Uint8Array | string): CallFunction =>
|
decoratedApi.findCall = (callIndex: Uint8Array | string): CallFunction =>
|
||||||
findCall(registry.registry, callIndex);
|
findCall(registry.registry, callIndex);
|
||||||
@@ -238,6 +253,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
decoratedApi.queryMulti = blockHash
|
decoratedApi.queryMulti = blockHash
|
||||||
? this._decorateMultiAt(decoratedApi, this._decorateMethod, blockHash)
|
? this._decorateMultiAt(decoratedApi, this._decorateMethod, blockHash)
|
||||||
: this._decorateMulti(this._decorateMethod);
|
: this._decorateMulti(this._decorateMethod);
|
||||||
|
decoratedApi.runtimeVersion = registry.runtimeVersion;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
decoratedApi,
|
decoratedApi,
|
||||||
@@ -253,6 +269,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
|
|
||||||
const { decoratedApi, decoratedMeta } = this._createDecorated(registry, fromEmpty, registry.decoratedApi);
|
const { decoratedApi, decoratedMeta } = this._createDecorated(registry, fromEmpty, registry.decoratedApi);
|
||||||
|
|
||||||
|
this._call = decoratedApi.call;
|
||||||
this._consts = decoratedApi.consts;
|
this._consts = decoratedApi.consts;
|
||||||
this._errors = decoratedApi.errors;
|
this._errors = decoratedApi.errors;
|
||||||
this._events = decoratedApi.events;
|
this._events = decoratedApi.events;
|
||||||
@@ -280,7 +297,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
* backwards compatible endpoint for metadata injection, may be removed in the future (However, it is still useful for testing injection)
|
* backwards compatible endpoint for metadata injection, may be removed in the future (However, it is still useful for testing injection)
|
||||||
*/
|
*/
|
||||||
public injectMetadata (metadata: Metadata, fromEmpty?: boolean, registry?: Registry): void {
|
public injectMetadata (metadata: Metadata, fromEmpty?: boolean, registry?: Registry): void {
|
||||||
this._injectMetadata({ metadata, registry: registry || this.#registry, specName: this.#registry.createType('Text'), specVersion: BN_ZERO }, fromEmpty);
|
this._injectMetadata({ metadata, registry: registry || this.#registry, runtimeVersion: this.#registry.createType('RuntimeVersionPartial') }, fromEmpty);
|
||||||
}
|
}
|
||||||
|
|
||||||
private _decorateFunctionMeta (input: MetaDecoration, output: MetaDecoration): MetaDecoration {
|
private _decorateFunctionMeta (input: MetaDecoration, output: MetaDecoration): MetaDecoration {
|
||||||
@@ -310,6 +327,28 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
this._decorateRpc(this._rpcCore, this._rxDecorateMethod, this._rx.rpc);
|
this._decorateRpc(this._rpcCore, this._rxDecorateMethod, this._rx.rpc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// extract the actual sections from the methods (this is useful when
|
||||||
|
// we try and create mappings to runtime names via a hash mapping)
|
||||||
|
const sectionMap: Record<string, boolean> = {};
|
||||||
|
|
||||||
|
for (let i = 0; i < methods.length; i++) {
|
||||||
|
const [section] = methods[i].split('_');
|
||||||
|
|
||||||
|
sectionMap[section] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// convert the actual section names into an easy name lookup
|
||||||
|
const sections = Object.keys(sectionMap);
|
||||||
|
|
||||||
|
for (let i = 0; i < sections.length; i++) {
|
||||||
|
const nameA = stringUpperFirst(sections[i]);
|
||||||
|
const nameB = `${nameA}Api`;
|
||||||
|
|
||||||
|
this._runtimeMap[blake2AsHex(nameA, 64)] = nameA;
|
||||||
|
this._runtimeMap[blake2AsHex(nameB, 64)] = nameB;
|
||||||
|
}
|
||||||
|
|
||||||
|
// finally we filter the actual methods to expose
|
||||||
this._filterRpcMethods(methods);
|
this._filterRpcMethods(methods);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,21 +437,168 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
return out as DecoratedRpc<ApiType, RpcInterface>;
|
return out as DecoratedRpc<ApiType, RpcInterface>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// add all definition entries
|
||||||
|
protected _addRuntimeDef (result: DefinitionsCall, additional?: DefinitionsCall): void {
|
||||||
|
if (!additional) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const entries = Object.entries(additional);
|
||||||
|
|
||||||
|
for (let j = 0; j < entries.length; j++) {
|
||||||
|
const [key, defs] = entries[j];
|
||||||
|
|
||||||
|
if (result[key]) {
|
||||||
|
// we have this one already, step through for new versions or
|
||||||
|
// new methods and add those as applicable
|
||||||
|
for (let k = 0; k < defs.length; k++) {
|
||||||
|
const def = defs[k];
|
||||||
|
const prev = result[key].find(({ version }) => def.version === version);
|
||||||
|
|
||||||
|
if (prev) {
|
||||||
|
// interleave the new methods with the old - last definition wins
|
||||||
|
objectSpread(prev.methods, def.methods);
|
||||||
|
} else {
|
||||||
|
// we don't have this specific version, add it
|
||||||
|
result[key].push(def);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// we don't have this runtime definition, add it as-is
|
||||||
|
result[key] = defs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// extract all runtime definitions
|
||||||
|
protected _getRuntimeDefs (registry: Registry, specName: Text, chain: Text | string = ''): [string, DefinitionsCallEntry[]][] {
|
||||||
|
const result: DefinitionsCall = {};
|
||||||
|
const defValues = Object.values(typeDefinitions);
|
||||||
|
|
||||||
|
// options > chain/spec > built-in, apply in reverse order with
|
||||||
|
// methods overriding previous definitions (or interleave missing)
|
||||||
|
for (let i = 0; i < defValues.length; i++) {
|
||||||
|
this._addRuntimeDef(result, defValues[i].runtime);
|
||||||
|
}
|
||||||
|
|
||||||
|
this._addRuntimeDef(result, getSpecRuntime(registry, chain, specName));
|
||||||
|
this._addRuntimeDef(result, this._options.runtime);
|
||||||
|
|
||||||
|
return Object.entries(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
// pre-metadata decoration
|
||||||
|
protected _decorateCalls<ApiType extends ApiTypes> ({ registry, runtimeVersion: { apis, specName } }: VersionedRegistry<ApiType>, decorateMethod: DecorateMethod<ApiType>, blockHash?: Uint8Array | string | null): QueryableCalls<ApiType> {
|
||||||
|
const result = {} as QueryableCalls<ApiType>;
|
||||||
|
const named: Record<string, Record<string, DefinitionCallNamed>> = {};
|
||||||
|
const hashes: Record<HexString, boolean> = {};
|
||||||
|
const sections = this._getRuntimeDefs(registry, specName, this._runtimeChain);
|
||||||
|
const older: string[] = [];
|
||||||
|
|
||||||
|
for (let i = 0; i < sections.length; i++) {
|
||||||
|
const [_section, secs] = sections[i];
|
||||||
|
const sectionHash = blake2AsHex(_section, 64);
|
||||||
|
const rtApi = apis.find(([a]) => a.eq(sectionHash));
|
||||||
|
|
||||||
|
hashes[sectionHash] = true;
|
||||||
|
|
||||||
|
if (rtApi) {
|
||||||
|
const all = secs.map(({ version }) => version).sort();
|
||||||
|
const sec = secs.find(({ version }) => rtApi[1].eq(version));
|
||||||
|
|
||||||
|
if (sec) {
|
||||||
|
const section = stringCamelCase(_section);
|
||||||
|
const methods = Object.entries(sec.methods);
|
||||||
|
|
||||||
|
if (methods.length) {
|
||||||
|
if (!named[section]) {
|
||||||
|
named[section] = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let m = 0; m < methods.length; m++) {
|
||||||
|
const [_method, def] = methods[m];
|
||||||
|
const method = stringCamelCase(_method);
|
||||||
|
|
||||||
|
named[section][method] = objectSpread({ method, name: `${_section}_${_method}`, section, sectionHash }, def);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
older.push(`${_section}/${rtApi[1].toString()} (${all.join('/')} known)`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// find the runtimes that we don't have hashes for
|
||||||
|
const notFound = apis
|
||||||
|
.map(([a, v]): [HexString, string] => [a.toHex(), v.toString()])
|
||||||
|
.filter(([a]) => !hashes[a])
|
||||||
|
.map(([a, v]) => `${this._runtimeMap[a] || a}/${v}`);
|
||||||
|
|
||||||
|
if (older.length) {
|
||||||
|
l.warn(`Not decorating runtime apis without matching versions: ${older.join(', ')}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (notFound.length) {
|
||||||
|
l.warn(`Not decorating unknown runtime apis: ${notFound.join(', ')}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const stateCall = blockHash
|
||||||
|
? (name: string, bytes: Uint8Array) => this._rpcCore.state.call(name, bytes, blockHash)
|
||||||
|
: (name: string, bytes: Uint8Array) => this._rpcCore.state.call(name, bytes);
|
||||||
|
|
||||||
|
const lazySection = (section: string) =>
|
||||||
|
lazyMethods({}, Object.keys(named[section]), (method: string) =>
|
||||||
|
this._decorateCall(registry, named[section][method], stateCall, decorateMethod)
|
||||||
|
);
|
||||||
|
|
||||||
|
const modules = Object.keys(named);
|
||||||
|
|
||||||
|
for (let i = 0; i < modules.length; i++) {
|
||||||
|
lazyMethod(result, modules[i], lazySection);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected _decorateCall<ApiType extends ApiTypes> (registry: Registry, def: DefinitionCallNamed, stateCall: (method: string, bytes: Uint8Array) => Observable<Codec>, decorateMethod: DecorateMethod<ApiType>): AugmentedCall<ApiType> {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||||
|
const decorated = decorateMethod((...args: unknown[]): Observable<Codec> => {
|
||||||
|
if (args.length !== def.params.length) {
|
||||||
|
throw new Error(`${def.name}:: Expected ${def.params.length} arguments, found ${args.length}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const bytes = registry.createType('Raw', u8aConcatStrict(
|
||||||
|
args.map((a, i) => registry.createTypeUnsafe(def.params[i].type, [a]).toU8a())
|
||||||
|
));
|
||||||
|
|
||||||
|
return stateCall(def.name, bytes).pipe(
|
||||||
|
map((r) => registry.createTypeUnsafe(def.type, [r]))
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
(decorated as AugmentedCall<ApiType>).meta = def;
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||||
|
return decorated;
|
||||||
|
}
|
||||||
|
|
||||||
// only be called if supportMulti is true
|
// only be called if supportMulti is true
|
||||||
protected _decorateMulti<ApiType extends ApiTypes> (decorateMethod: DecorateMethod<ApiType>): QueryableStorageMulti<ApiType> {
|
protected _decorateMulti<ApiType extends ApiTypes> (decorateMethod: DecorateMethod<ApiType>): QueryableStorageMulti<ApiType> {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||||
return decorateMethod((calls: QueryableStorageMultiArg<ApiType>[]): Observable<Codec[]> =>
|
return decorateMethod((keys: QueryableStorageMultiArg<ApiType>[]): Observable<Codec[]> =>
|
||||||
(this.hasSubscriptions
|
(this.hasSubscriptions
|
||||||
? this._rpcCore.state.subscribeStorage
|
? this._rpcCore.state.subscribeStorage
|
||||||
: this._rpcCore.state.queryStorageAt)(
|
: this._rpcCore.state.queryStorageAt
|
||||||
calls.map((args: QueryableStorageMultiArg<ApiType>) =>
|
)(keys.map((args: QueryableStorageMultiArg<ApiType>): [StorageEntry, ...unknown[]] =>
|
||||||
Array.isArray(args)
|
Array.isArray(args)
|
||||||
? args[0].creator.meta.type.isPlain
|
? args[0].creator.meta.type.isPlain
|
||||||
? [args[0].creator]
|
? [args[0].creator]
|
||||||
: args[0].creator.meta.type.asMap.hashers.length === 1
|
: args[0].creator.meta.type.asMap.hashers.length === 1
|
||||||
? [args[0].creator, args.slice(1)]
|
? [args[0].creator, args.slice(1)]
|
||||||
: [args[0].creator, ...args.slice(1)]
|
: [args[0].creator, ...args.slice(1)]
|
||||||
: [args.creator])));
|
: [args.creator]
|
||||||
|
))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected _decorateMultiAt<ApiType extends ApiTypes> (atApi: ApiDecoration<ApiType>, decorateMethod: DecorateMethod<ApiType>, blockHash: Uint8Array | string): QueryableStorageMulti<ApiType> {
|
protected _decorateMultiAt<ApiType extends ApiTypes> (atApi: ApiDecoration<ApiType>, decorateMethod: DecorateMethod<ApiType>, blockHash: Uint8Array | string): QueryableStorageMulti<ApiType> {
|
||||||
@@ -633,18 +819,61 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
return this._decorateFunctionMeta(creator as unknown as MetaDecoration, decorated) as unknown as QueryableStorageEntry<ApiType>;
|
return this._decorateFunctionMeta(creator as unknown as MetaDecoration, decorated) as unknown as QueryableStorageEntry<ApiType>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _queueStorage (call: [StorageEntry, unknown[]], queue: [Observable<Codec[]>, [StorageEntry, unknown[]][]][]): Observable<Codec> {
|
||||||
|
const query = queue === this.#storageSubQ
|
||||||
|
? this._rpcCore.state.subscribeStorage
|
||||||
|
: this._rpcCore.state.queryStorageAt;
|
||||||
|
let queueIdx = queue.length - 1;
|
||||||
|
let valueIdx = 0;
|
||||||
|
let valueObs: Observable<Codec[]>;
|
||||||
|
|
||||||
|
if (queueIdx === -1 || !queue[queueIdx] || queue[queueIdx][1].length === PAGE_SIZE_Q) {
|
||||||
|
queueIdx++;
|
||||||
|
|
||||||
|
valueObs = from(
|
||||||
|
// Defer to the next tick - this aligns with nextTick in @polkadot/util,
|
||||||
|
// however since we return a value here, we don't re-use what is there
|
||||||
|
Promise
|
||||||
|
.resolve()
|
||||||
|
.then((): [StorageEntry, unknown[]][] => {
|
||||||
|
const calls = queue[queueIdx][1];
|
||||||
|
|
||||||
|
delete queue[queueIdx];
|
||||||
|
|
||||||
|
return calls;
|
||||||
|
})
|
||||||
|
).pipe(
|
||||||
|
switchMap((calls) => query(calls))
|
||||||
|
);
|
||||||
|
|
||||||
|
queue.push([valueObs, [call]]);
|
||||||
|
} else {
|
||||||
|
valueObs = queue[queueIdx][0];
|
||||||
|
valueIdx = queue[queueIdx][1].length;
|
||||||
|
|
||||||
|
queue[queueIdx][1].push(call);
|
||||||
|
}
|
||||||
|
|
||||||
|
return valueObs.pipe(
|
||||||
|
map((values) => values[valueIdx])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Decorate the base storage call. In the case or rxjs or promise-without-callback (await)
|
// Decorate the base storage call. In the case or rxjs or promise-without-callback (await)
|
||||||
// we make a subscription, alternatively we push this through a single-shot query
|
// we make a subscription, alternatively we push this through a single-shot query
|
||||||
private _decorateStorageCall<ApiType extends ApiTypes> (creator: StorageEntry, decorateMethod: DecorateMethod<ApiType>): ReturnType<DecorateMethod<ApiType>> {
|
private _decorateStorageCall<ApiType extends ApiTypes> (creator: StorageEntry, decorateMethod: DecorateMethod<ApiType>): ReturnType<DecorateMethod<ApiType>> {
|
||||||
return decorateMethod((...args: unknown[]): Observable<Codec> => {
|
return decorateMethod((...args: unknown[]): Observable<Codec> => {
|
||||||
return this.hasSubscriptions
|
const call = extractStorageArgs(this.#registry, creator, args);
|
||||||
? this._rpcCore.state.subscribeStorage<[Codec]>([extractStorageArgs(this.#registry, creator, args)]).pipe(
|
|
||||||
map(([data]) => data) // extract first/only result from list
|
if (!this.hasSubscriptions) {
|
||||||
)
|
return this._rpcCore.state.getStorage(call);
|
||||||
: this._rpcCore.state.getStorage(extractStorageArgs(this.#registry, creator, args));
|
}
|
||||||
|
|
||||||
|
return this._queueStorage(call, this.#storageSubQ);
|
||||||
}, {
|
}, {
|
||||||
methodName: creator.method,
|
methodName: creator.method,
|
||||||
overrideNoSub: (...args: unknown[]) => this._rpcCore.state.getStorage(extractStorageArgs(this.#registry, creator, args))
|
overrideNoSub: (...args: unknown[]) =>
|
||||||
|
this._queueStorage(extractStorageArgs(this.#registry, creator, args), this.#storageGetQ)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -667,15 +896,21 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
return of([]);
|
return of([]);
|
||||||
}
|
}
|
||||||
|
|
||||||
const queryCall = this.hasSubscriptions && !blockHash
|
const query = this.hasSubscriptions && !blockHash
|
||||||
? this._rpcCore.state.subscribeStorage
|
? this._rpcCore.state.subscribeStorage
|
||||||
: this._rpcCore.state.queryStorageAt;
|
: this._rpcCore.state.queryStorageAt;
|
||||||
|
|
||||||
|
if (keys.length <= PAGE_SIZE_V) {
|
||||||
|
return blockHash
|
||||||
|
? query(keys, blockHash)
|
||||||
|
: query(keys);
|
||||||
|
}
|
||||||
|
|
||||||
return combineLatest(
|
return combineLatest(
|
||||||
arrayChunk(keys, PAGE_SIZE_V).map((k) =>
|
arrayChunk(keys, PAGE_SIZE_V).map((k) =>
|
||||||
blockHash
|
blockHash
|
||||||
? queryCall(k, blockHash)
|
? query(k, blockHash)
|
||||||
: queryCall(k)
|
: query(k)
|
||||||
)
|
)
|
||||||
).pipe(
|
).pipe(
|
||||||
map(arrayFlatten)
|
map(arrayFlatten)
|
||||||
@@ -687,21 +922,23 @@ 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 getKeysPaged = at
|
const query = at
|
||||||
? (startKey: string) => this._rpcCore.state.getKeysPaged(headKey, PAGE_SIZE_K, startKey, at)
|
? (startKey: string) =>
|
||||||
: (startKey: string) => this._rpcCore.state.getKeysPaged(headKey, PAGE_SIZE_K, startKey);
|
this._rpcCore.state.getKeysPaged(headKey, PAGE_SIZE_K, startKey, at)
|
||||||
|
: (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(getKeysPaged),
|
switchMap(query),
|
||||||
map((keys) => keys.map(setMeta)),
|
map((keys) => keys.map(setMeta)),
|
||||||
tap((keys): void => {
|
tap((keys) =>
|
||||||
setTimeout((): void => {
|
nextTick((): void => {
|
||||||
keys.length === PAGE_SIZE_K
|
keys.length === PAGE_SIZE_K
|
||||||
? startSubject.next(keys[PAGE_SIZE_K - 1].toHex())
|
? startSubject.next(keys[PAGE_SIZE_K - 1].toHex())
|
||||||
: startSubject.complete();
|
: startSubject.complete();
|
||||||
}, 0);
|
})
|
||||||
}),
|
),
|
||||||
toArray(), // toArray since we want to startSubject to be completed
|
toArray(), // toArray since we want to startSubject to be completed
|
||||||
map(arrayFlatten)
|
map(arrayFlatten)
|
||||||
);
|
);
|
||||||
@@ -711,24 +948,28 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
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 setMeta = (key: StorageKey) => key.setMeta(meta, section, method);
|
const setMeta = (key: StorageKey) => key.setMeta(meta, section, method);
|
||||||
const getKeysPaged = at
|
const query = at
|
||||||
? (headKey: string) => this._rpcCore.state.getKeysPaged(headKey, opts.pageSize, opts.startKey || headKey, at)
|
? (headKey: string) =>
|
||||||
: (headKey: string) => this._rpcCore.state.getKeysPaged(headKey, opts.pageSize, opts.startKey || headKey);
|
this._rpcCore.state.getKeysPaged(headKey, opts.pageSize, opts.startKey || headKey, at)
|
||||||
|
: (headKey: string) =>
|
||||||
|
this._rpcCore.state.getKeysPaged(headKey, opts.pageSize, opts.startKey || headKey);
|
||||||
|
|
||||||
return getKeysPaged(iterKey(...opts.args).toHex()).pipe(
|
return query(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 queryStorageAt = at
|
const query = at
|
||||||
? (keys: StorageKey[]) => this._rpcCore.state.queryStorageAt(keys, at)
|
? (keys: StorageKey[]) =>
|
||||||
: (keys: StorageKey[]) => this._rpcCore.state.queryStorageAt(keys);
|
this._rpcCore.state.queryStorageAt(keys, at)
|
||||||
|
: (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(queryStorageAt)).pipe(
|
? combineLatest(arrayChunk(keys, PAGE_SIZE_V).map(query)).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])
|
||||||
)
|
)
|
||||||
@@ -739,14 +980,16 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _retrieveMapEntriesPaged (entry: StorageEntry, at: Hash | Uint8Array | string | undefined, opts: PaginationOptions): Observable<[StorageKey, Codec][]> {
|
private _retrieveMapEntriesPaged (entry: StorageEntry, at: Hash | Uint8Array | string | undefined, opts: PaginationOptions): Observable<[StorageKey, Codec][]> {
|
||||||
const queryStorageAt = at
|
const query = at
|
||||||
? (keys: StorageKey[]) => this._rpcCore.state.queryStorageAt(keys, at)
|
? (keys: StorageKey[]) =>
|
||||||
: (keys: StorageKey[]) => this._rpcCore.state.queryStorageAt(keys);
|
this._rpcCore.state.queryStorageAt(keys, at)
|
||||||
|
: (keys: StorageKey[]) =>
|
||||||
|
this._rpcCore.state.queryStorageAt(keys);
|
||||||
|
|
||||||
return this._retrieveMapKeysPaged(entry, at, opts).pipe(
|
return this._retrieveMapKeysPaged(entry, at, opts).pipe(
|
||||||
switchMap((keys) =>
|
switchMap((keys) =>
|
||||||
keys.length
|
keys.length
|
||||||
? queryStorageAt(keys).pipe(
|
? query(keys).pipe(
|
||||||
map((valsArr) =>
|
map((valsArr) =>
|
||||||
valsArr.map((value, index): [StorageKey, Codec] => [keys[index], value])
|
valsArr.map((value, index): [StorageKey, Codec] => [keys[index], value])
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,13 +2,12 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { RpcInterface } from '@polkadot/rpc-core/types';
|
import type { RpcInterface } from '@polkadot/rpc-core/types';
|
||||||
|
import type { ProviderInterface } from '@polkadot/rpc-provider/types';
|
||||||
import type { Text } from '@polkadot/types';
|
import type { Text } from '@polkadot/types';
|
||||||
import type { Hash, RuntimeVersion } from '@polkadot/types/interfaces';
|
import type { Hash, RuntimeVersion } from '@polkadot/types/interfaces';
|
||||||
import type { Metadata } from '@polkadot/types/metadata';
|
import type { Metadata } from '@polkadot/types/metadata';
|
||||||
import type { CallFunction, RegistryError } from '@polkadot/types/types';
|
import type { CallFunction, RegistryError } from '@polkadot/types/types';
|
||||||
import type { ApiDecoration, ApiInterfaceRx, ApiTypes, DecoratedErrors, DecoratedEvents, DecoratedRpc, QueryableConsts, QueryableStorage, QueryableStorageMulti, SubmittableExtrinsics } from '../types';
|
import type { ApiDecoration, ApiInterfaceRx, ApiTypes, DecoratedErrors, DecoratedEvents, DecoratedRpc, QueryableCalls, QueryableConsts, QueryableStorage, QueryableStorageMulti, SubmittableExtrinsics } from '../types';
|
||||||
|
|
||||||
import { assertReturn } from '@polkadot/util';
|
|
||||||
|
|
||||||
import { packageInfo } from '../packageInfo';
|
import { packageInfo } from '../packageInfo';
|
||||||
import { findCall, findError } from './find';
|
import { findCall, findError } from './find';
|
||||||
@@ -20,10 +19,21 @@ interface PkgJson {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function assertResult<T> (value: T | undefined): T {
|
function assertResult<T> (value: T | undefined): T {
|
||||||
return assertReturn(value, 'Api needs to be initialized before using, listen on \'ready\'');
|
if (value === undefined) {
|
||||||
|
throw new Error("Api interfaces needs to be initialized before using, wait for 'isReady'");
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
export abstract class Getters<ApiType extends ApiTypes> extends Init<ApiType> implements ApiDecoration<ApiType> {
|
export abstract class Getters<ApiType extends ApiTypes> extends Init<ApiType> implements ApiDecoration<ApiType> {
|
||||||
|
/**
|
||||||
|
* @description Runtime call interfaces (currently untyped, only decorated via API options)
|
||||||
|
*/
|
||||||
|
public get call (): QueryableCalls<ApiType> {
|
||||||
|
return assertResult(this._call);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Contains the parameter types (constants) of all modules.
|
* @description Contains the parameter types (constants) of all modules.
|
||||||
*
|
*
|
||||||
@@ -188,6 +198,13 @@ export abstract class Getters<ApiType extends ApiTypes> extends Init<ApiType> im
|
|||||||
return assertResult(this._rx as Pick<ApiInterfaceRx, 'tx' | 'rpc' | 'query'>);
|
return assertResult(this._rx as Pick<ApiInterfaceRx, 'tx' | 'rpc' | 'query'>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Returns the underlying provider stats
|
||||||
|
*/
|
||||||
|
public get stats (): ProviderInterface['stats'] | undefined {
|
||||||
|
return this._rpcCore.provider.stats;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description The type of this API instance, either 'rxjs' or 'promise'
|
* @description The type of this API instance, either 'rxjs' or 'promise'
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
|||||||
this._initRegistry(registry, this._runtimeChain as Text, version, metadata);
|
this._initRegistry(registry, this._runtimeChain as Text, version, metadata);
|
||||||
|
|
||||||
// add our new registry
|
// add our new registry
|
||||||
const result = { lastBlockHash: blockHash, metadata, registry, specName: version.specName, specVersion: version.specVersion };
|
const result = { lastBlockHash: blockHash, metadata, registry, runtimeVersion: version };
|
||||||
|
|
||||||
this.#registries.push(result);
|
this.#registries.push(result);
|
||||||
|
|
||||||
@@ -162,7 +162,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
|||||||
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
|
||||||
// could be changed like in Westmint with upgrade from shell -> westmint
|
// could be changed like in Westmint with upgrade from shell -> westmint
|
||||||
const existingViaVersion = this.#registries.find(({ specName, specVersion }) =>
|
const existingViaVersion = this.#registries.find(({ runtimeVersion: { specName, specVersion } }) =>
|
||||||
specName.eq(version.specName) &&
|
specName.eq(version.specName) &&
|
||||||
specVersion.eq(version.specVersion)
|
specVersion.eq(version.specVersion)
|
||||||
);
|
);
|
||||||
@@ -289,7 +289,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
|||||||
|
|
||||||
// setup the data as per the current versions
|
// setup the data as per the current versions
|
||||||
thisRegistry.metadata = metadata;
|
thisRegistry.metadata = metadata;
|
||||||
thisRegistry.specVersion = version.specVersion;
|
thisRegistry.runtimeVersion = version;
|
||||||
|
|
||||||
this._initRegistry(this.registry, this._runtimeChain as Text, version, metadata);
|
this._initRegistry(this.registry, this._runtimeChain as Text, version, metadata);
|
||||||
this._injectMetadata(thisRegistry, true);
|
this._injectMetadata(thisRegistry, true);
|
||||||
@@ -333,7 +333,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
|||||||
|
|
||||||
// setup the initial registry, when we have none
|
// setup the initial registry, when we have none
|
||||||
if (!this.#registries.length) {
|
if (!this.#registries.length) {
|
||||||
this.#registries.push({ isDefault: true, metadata, registry: this.registry, specName: runtimeVersion.specName, specVersion: runtimeVersion.specVersion });
|
this.#registries.push({ isDefault: true, metadata, registry: this.registry, runtimeVersion });
|
||||||
}
|
}
|
||||||
|
|
||||||
// get unique types & validate
|
// get unique types & validate
|
||||||
@@ -362,7 +362,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
|||||||
// Only enable the health keepalive on WS, not needed on HTTP
|
// Only enable the health keepalive on WS, not needed on HTTP
|
||||||
this.#healthTimer = this.hasSubscriptions
|
this.#healthTimer = this.hasSubscriptions
|
||||||
? setInterval((): void => {
|
? setInterval((): void => {
|
||||||
firstValueFrom(this._rpcCore.system.health()).catch(() => undefined);
|
firstValueFrom(this._rpcCore.system.health.raw()).catch(() => undefined);
|
||||||
}, KEEPALIVE_INTERVAL)
|
}, KEEPALIVE_INTERVAL)
|
||||||
: null;
|
: null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
// Copyright 2017-2022 @polkadot/api authors & contributors
|
// Copyright 2017-2022 @polkadot/api authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { Metadata } from '@polkadot/types/metadata';
|
import type { Metadata } from '@polkadot/types';
|
||||||
|
import type { RuntimeVersionPartial } from '@polkadot/types/interfaces';
|
||||||
import type { DecoratedMeta } from '@polkadot/types/metadata/decorate/types';
|
import type { DecoratedMeta } from '@polkadot/types/metadata/decorate/types';
|
||||||
import type { Text } from '@polkadot/types/primitive';
|
|
||||||
import type { Registry } from '@polkadot/types/types';
|
import type { Registry } from '@polkadot/types/types';
|
||||||
import type { BN } from '@polkadot/util';
|
|
||||||
import type { ApiDecoration, ApiTypes } from '../types';
|
import type { ApiDecoration, ApiTypes } from '../types';
|
||||||
|
|
||||||
export interface VersionedRegistry<ApiType extends ApiTypes> {
|
export interface VersionedRegistry<ApiType extends ApiTypes> {
|
||||||
@@ -15,6 +14,5 @@ export interface VersionedRegistry<ApiType extends ApiTypes> {
|
|||||||
lastBlockHash?: Uint8Array | null;
|
lastBlockHash?: Uint8Array | null;
|
||||||
metadata: Metadata;
|
metadata: Metadata;
|
||||||
registry: Registry;
|
registry: Registry;
|
||||||
specName: Text;
|
runtimeVersion: RuntimeVersionPartial;
|
||||||
specVersion: BN;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,19 @@ import { SubmittableResult } from './';
|
|||||||
|
|
||||||
const registry = new TypeRegistry();
|
const registry = new TypeRegistry();
|
||||||
|
|
||||||
|
async function calls (api: ApiPromise): Promise<void> {
|
||||||
|
// it allows defaults
|
||||||
|
const testSetId = await api.call.grandpaApi.currentSetId();
|
||||||
|
|
||||||
|
// it allows type overrides (generally shouldn't be used, but available)
|
||||||
|
const testSetIdO = await api.call.grandpaApi.currentSetId<AccountId>();
|
||||||
|
|
||||||
|
// it allows actual params
|
||||||
|
const nonce = await api.call.accountNonceApi.accountNonce('5Test');
|
||||||
|
|
||||||
|
console.log(testSetId.toNumber(), testSetIdO.isAscii, nonce.toNumber());
|
||||||
|
}
|
||||||
|
|
||||||
function consts (api: ApiPromise): void {
|
function consts (api: ApiPromise): void {
|
||||||
// constants has actual value & metadata
|
// constants has actual value & metadata
|
||||||
console.log(
|
console.log(
|
||||||
@@ -57,14 +70,33 @@ function events (api: ApiPromise): void {
|
|||||||
// existing
|
// existing
|
||||||
if (api.events.balances.Transfer.is(event)) {
|
if (api.events.balances.Transfer.is(event)) {
|
||||||
// the types are correctly expanded
|
// the types are correctly expanded
|
||||||
const [from, to, amount] = event.data;
|
const [afrom, ato, aamount] = event.data;
|
||||||
|
|
||||||
console.log(from.toHuman(), to.toHuman(), amount.toBn());
|
console.log(
|
||||||
|
afrom.toHuman(),
|
||||||
|
ato.toHuman(),
|
||||||
|
aamount.toBn()
|
||||||
|
);
|
||||||
|
|
||||||
|
// the types have getters
|
||||||
|
const { amount, from, to } = event.data;
|
||||||
|
|
||||||
|
console.log(
|
||||||
|
from.toHuman(),
|
||||||
|
to.toHuman(),
|
||||||
|
amount.toBn()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// something random
|
// something with only tuple data
|
||||||
|
if (api.events.staking.Bonded.is(event)) {
|
||||||
|
const [account, amount] = event.data;
|
||||||
|
|
||||||
|
console.log(account.toHuman(), amount.toBn());
|
||||||
|
}
|
||||||
|
|
||||||
|
// something random, just codec[]
|
||||||
if (api.events.something.Random.is(event)) {
|
if (api.events.something.Random.is(event)) {
|
||||||
// the types are just codec
|
|
||||||
const [a, b] = event.data;
|
const [a, b] = event.data;
|
||||||
|
|
||||||
console.log(a.toHuman(), b.toHuman());
|
console.log(a.toHuman(), b.toHuman());
|
||||||
@@ -194,12 +226,15 @@ function types (api: ApiPromise): void {
|
|||||||
const balance = registry.createType('Balance', 2);
|
const balance = registry.createType('Balance', 2);
|
||||||
const gas = registry.createType('Gas', 2);
|
const gas = registry.createType('Gas', 2);
|
||||||
const compact = registry.createType('Compact<u32>', 2);
|
const compact = registry.createType('Compact<u32>', 2);
|
||||||
|
const f32 = registry.createType('f32');
|
||||||
|
const u32 = registry.createType('u32');
|
||||||
|
const raw = registry.createType('Raw');
|
||||||
// const random = registry.createType('RandomType', 2); // This one should deliberately show a TS error
|
// const random = registry.createType('RandomType', 2); // This one should deliberately show a TS error
|
||||||
|
|
||||||
const gasUnsafe = createTypeUnsafe(registry, 'Gas', [2]);
|
const gasUnsafe = createTypeUnsafe(registry, 'Gas', [2]);
|
||||||
const overriddenUnsafe = createTypeUnsafe<Header>(registry, 'Gas', [2]);
|
const overriddenUnsafe = createTypeUnsafe<Header>(registry, 'Gas', [2]);
|
||||||
|
|
||||||
console.log(balance, gas, compact, gasUnsafe, overriddenUnsafe, api.createType('AccountData'));
|
console.log(balance, gas, compact, gasUnsafe, overriddenUnsafe, u32.toNumber(), f32.toNumber(), api.createType('AccountData'), raw.subarray(0, 10));
|
||||||
}
|
}
|
||||||
|
|
||||||
async function tx (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
|
async function tx (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
|
||||||
@@ -268,6 +303,7 @@ async function main (): Promise<void> {
|
|||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||||
Promise.all([
|
Promise.all([
|
||||||
|
calls(api),
|
||||||
consts(api),
|
consts(api),
|
||||||
derive(api),
|
derive(api),
|
||||||
errors(api),
|
errors(api),
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
export * from './index';
|
||||||
@@ -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: '8.6.2' };
|
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '8.11.1' };
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import type { DecorateFn, DecorateMethodOptions, ObsInnerType, StorageEntryPromi
|
|||||||
|
|
||||||
import { catchError, EMPTY, Subscription, tap } from 'rxjs';
|
import { catchError, EMPTY, Subscription, tap } from 'rxjs';
|
||||||
|
|
||||||
import { assert, isFunction } from '@polkadot/util';
|
import { assert, isFunction, nextTick } from '@polkadot/util';
|
||||||
|
|
||||||
interface Tracker<T> {
|
interface Tracker<T> {
|
||||||
reject: (value: Error) => Observable<never>;
|
reject: (value: Error) => Observable<never>;
|
||||||
@@ -75,7 +75,8 @@ function decorateCall<M extends DecorateFn<CodecReturnType<M>>> (method: M, args
|
|||||||
)
|
)
|
||||||
.subscribe((result): void => {
|
.subscribe((result): void => {
|
||||||
tracker.resolve(result);
|
tracker.resolve(result);
|
||||||
setTimeout(() => subscription.unsubscribe(), 0);
|
|
||||||
|
nextTick(() => subscription.unsubscribe());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -94,7 +95,7 @@ function decorateSubscribe<M extends DecorateFn<CodecReturnType<M>>> (method: M,
|
|||||||
)
|
)
|
||||||
.subscribe((result): void => {
|
.subscribe((result): void => {
|
||||||
// queue result (back of queue to clear current)
|
// queue result (back of queue to clear current)
|
||||||
setTimeout(() => resultCb(result) as void, 0);
|
nextTick(() => resultCb(result));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import type { AddressOrPair, SignerOptions, SubmittableDryRunResult, Submittable
|
|||||||
|
|
||||||
import { catchError, first, map, mapTo, mergeMap, of, switchMap, tap } from 'rxjs';
|
import { catchError, first, map, mapTo, mergeMap, of, switchMap, tap } from 'rxjs';
|
||||||
|
|
||||||
import { assert, isBn, isFunction, isNumber, isString, isU8a, objectSpread } from '@polkadot/util';
|
import { assert, isBn, isFunction, isNumber, isString, isU8a, isUndefined, objectSpread } from '@polkadot/util';
|
||||||
|
|
||||||
import { ApiBase } from '../base';
|
import { ApiBase } from '../base';
|
||||||
import { filterEvents, isKeyringPair } from '../util';
|
import { filterEvents, isKeyringPair } from '../util';
|
||||||
@@ -34,6 +34,8 @@ const identity = <T> (input: T): T => input;
|
|||||||
|
|
||||||
function makeEraOptions (api: ApiInterfaceRx, registry: Registry, partialOptions: Partial<SignerOptions>, { header, mortalLength, nonce }: { header: Header | null; mortalLength: number; nonce: Index }): SignatureOptions {
|
function makeEraOptions (api: ApiInterfaceRx, registry: Registry, partialOptions: Partial<SignerOptions>, { header, mortalLength, nonce }: { header: Header | null; mortalLength: number; nonce: Index }): SignatureOptions {
|
||||||
if (!header) {
|
if (!header) {
|
||||||
|
assert(partialOptions.era === 0 || !isUndefined(partialOptions.blockHash), 'Expected blockHash to be passed alongside non-immortal era options');
|
||||||
|
|
||||||
if (isNumber(partialOptions.era)) {
|
if (isNumber(partialOptions.era)) {
|
||||||
// since we have no header, it is immortal, remove any option overrides
|
// since we have no header, it is immortal, remove any option overrides
|
||||||
// so we only supply the genesisHash and no era to the construction
|
// so we only supply the genesisHash and no era to the construction
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
export * from '@polkadot/api-base/types/calls';
|
||||||
@@ -3,14 +3,15 @@
|
|||||||
|
|
||||||
import type { ApiTypes, DeriveCustom, QueryableStorageMulti } from '@polkadot/api-base/types';
|
import type { ApiTypes, DeriveCustom, QueryableStorageMulti } from '@polkadot/api-base/types';
|
||||||
import type { ApiInterfaceRx as ApiInterfaceBase } from '@polkadot/api-base/types/api';
|
import type { ApiInterfaceRx as ApiInterfaceBase } from '@polkadot/api-base/types/api';
|
||||||
|
import type { QueryableCalls } from '@polkadot/api-base/types/calls';
|
||||||
import type { QueryableConsts } from '@polkadot/api-base/types/consts';
|
import type { QueryableConsts } from '@polkadot/api-base/types/consts';
|
||||||
import type { DecoratedErrors } from '@polkadot/api-base/types/errors';
|
import type { DecoratedErrors } from '@polkadot/api-base/types/errors';
|
||||||
import type { DecoratedEvents } from '@polkadot/api-base/types/events';
|
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 { Call, Extrinsic, Hash } from '@polkadot/types/interfaces';
|
import type { Call, Extrinsic, Hash, RuntimeVersionPartial } from '@polkadot/types/interfaces';
|
||||||
import type { CallFunction, DefinitionRpc, DefinitionRpcSub, RegisteredTypes, Registry, RegistryError, SignatureOptions, Signer } from '@polkadot/types/types';
|
import type { CallFunction, DefinitionRpc, DefinitionRpcSub, DefinitionsCall, 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';
|
||||||
@@ -18,6 +19,7 @@ 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';
|
||||||
|
export * from '@polkadot/api/types/calls';
|
||||||
export * from '@polkadot/api/types/consts';
|
export * from '@polkadot/api/types/consts';
|
||||||
export * from '@polkadot/api/types/errors';
|
export * from '@polkadot/api/types/errors';
|
||||||
export * from '@polkadot/api/types/events';
|
export * from '@polkadot/api/types/events';
|
||||||
@@ -60,6 +62,10 @@ export interface ApiOptions extends RegisteredTypes {
|
|||||||
* @description User-defined RPC methods
|
* @description User-defined RPC methods
|
||||||
*/
|
*/
|
||||||
rpc?: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>>;
|
rpc?: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>>;
|
||||||
|
/**
|
||||||
|
* @description Overrides for state_call usage (this will be removed in some future version)
|
||||||
|
*/
|
||||||
|
runtime?: DefinitionsCall;
|
||||||
/**
|
/**
|
||||||
* @description Any chain-specific signed extensions that are now well-known
|
* @description Any chain-specific signed extensions that are now well-known
|
||||||
*/
|
*/
|
||||||
@@ -90,11 +96,13 @@ export interface SignerOptions extends SignatureOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ApiDecoration<ApiType extends ApiTypes> {
|
export interface ApiDecoration<ApiType extends ApiTypes> {
|
||||||
|
call: QueryableCalls<ApiType>;
|
||||||
consts: QueryableConsts<ApiType>;
|
consts: QueryableConsts<ApiType>;
|
||||||
errors: DecoratedErrors<ApiType>;
|
errors: DecoratedErrors<ApiType>;
|
||||||
events: DecoratedEvents<ApiType>;
|
events: DecoratedEvents<ApiType>;
|
||||||
query: QueryableStorage<ApiType>;
|
query: QueryableStorage<ApiType>;
|
||||||
registry: Registry;
|
registry: Registry;
|
||||||
|
runtimeVersion: RuntimeVersionPartial;
|
||||||
rx: {
|
rx: {
|
||||||
query: QueryableStorage<'rxjs'>;
|
query: QueryableStorage<'rxjs'>;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,13 +20,13 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "8.6.2",
|
"version": "8.11.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.3",
|
"@babel/runtime": "^7.18.6",
|
||||||
"@polkadot/rpc-core": "8.6.2",
|
"@polkadot/rpc-core": "8.11.1",
|
||||||
"@polkadot/types": "8.6.2",
|
"@polkadot/types": "8.11.1",
|
||||||
"@polkadot/types-codec": "8.6.2",
|
"@polkadot/types-codec": "8.11.1",
|
||||||
"@polkadot/util": "^9.3.1"
|
"@polkadot/util": "^9.7.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import type { AugmentedRpc } from '@polkadot/rpc-core/types';
|
import type { AugmentedRpc } from '@polkadot/rpc-core/types';
|
||||||
import type { Metadata, StorageKey } from '@polkadot/types';
|
import type { Metadata, StorageKey } from '@polkadot/types';
|
||||||
import type { Bytes, HashMap, Json, Null, Option, Text, U256, U64, Vec, bool, u32, u64 } from '@polkadot/types-codec';
|
import type { Bytes, HashMap, Json, Null, Option, Text, U256, U64, Vec, bool, f64, u32, u64 } from '@polkadot/types-codec';
|
||||||
import type { AnyNumber, Codec } from '@polkadot/types-codec/types';
|
import type { AnyNumber, Codec } from '@polkadot/types-codec/types';
|
||||||
import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
|
import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
|
||||||
import type { EpochAuthorship } from '@polkadot/types/interfaces/babe';
|
import type { EpochAuthorship } from '@polkadot/types/interfaces/babe';
|
||||||
@@ -14,7 +14,7 @@ import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
|||||||
import type { CodeUploadRequest, CodeUploadResult, ContractCallRequest, ContractExecResult, ContractInstantiateResult, InstantiateRequest } from '@polkadot/types/interfaces/contracts';
|
import type { CodeUploadRequest, CodeUploadResult, ContractCallRequest, ContractExecResult, ContractInstantiateResult, InstantiateRequest } from '@polkadot/types/interfaces/contracts';
|
||||||
import type { BlockStats } from '@polkadot/types/interfaces/dev';
|
import type { BlockStats } from '@polkadot/types/interfaces/dev';
|
||||||
import type { CreatedBlock } from '@polkadot/types/interfaces/engine';
|
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, EthFeeHistory, 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 { MmrLeafBatchProof, MmrLeafProof } from '@polkadot/types/interfaces/mmr';
|
import type { MmrLeafBatchProof, MmrLeafProof } from '@polkadot/types/interfaces/mmr';
|
||||||
@@ -56,11 +56,11 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
|
|||||||
/**
|
/**
|
||||||
* Submit and subscribe to watch an extrinsic until unsubscribed
|
* Submit and subscribe to watch an extrinsic until unsubscribed
|
||||||
**/
|
**/
|
||||||
submitAndWatchExtrinsic: AugmentedRpc<(extrinsic: IExtrinsic) => Observable<ExtrinsicStatus>>;
|
submitAndWatchExtrinsic: AugmentedRpc<(extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<ExtrinsicStatus>>;
|
||||||
/**
|
/**
|
||||||
* Submit a fully formatted extrinsic for block inclusion
|
* Submit a fully formatted extrinsic for block inclusion
|
||||||
**/
|
**/
|
||||||
submitExtrinsic: AugmentedRpc<(extrinsic: IExtrinsic) => Observable<Hash>>;
|
submitExtrinsic: AugmentedRpc<(extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<Hash>>;
|
||||||
};
|
};
|
||||||
babe: {
|
babe: {
|
||||||
/**
|
/**
|
||||||
@@ -197,6 +197,10 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
|
|||||||
* Estimate gas needed for execution of given contract.
|
* Estimate gas needed for execution of given contract.
|
||||||
**/
|
**/
|
||||||
estimateGas: AugmentedRpc<(request: EthCallRequest | { from?: any; to?: any; gasPrice?: any; gas?: any; value?: any; data?: any; nonce?: any } | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;
|
estimateGas: AugmentedRpc<(request: EthCallRequest | { from?: any; to?: any; gasPrice?: any; gas?: any; value?: any; data?: any; nonce?: any } | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;
|
||||||
|
/**
|
||||||
|
* Returns fee history for given block count & reward percentiles
|
||||||
|
**/
|
||||||
|
feeHistory: AugmentedRpc<(blockCount: U256 | AnyNumber | Uint8Array, newestBlock: BlockNumber | AnyNumber | Uint8Array, rewardPercentiles: Option<Vec<f64>> | null | object | string | Uint8Array) => Observable<EthFeeHistory>>;
|
||||||
/**
|
/**
|
||||||
* Returns current gas price.
|
* Returns current gas price.
|
||||||
**/
|
**/
|
||||||
@@ -289,6 +293,10 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
|
|||||||
* Returns the number of hashes per second that the node is mining with.
|
* Returns the number of hashes per second that the node is mining with.
|
||||||
**/
|
**/
|
||||||
hashrate: AugmentedRpc<() => Observable<U256>>;
|
hashrate: AugmentedRpc<() => Observable<U256>>;
|
||||||
|
/**
|
||||||
|
* Returns max priority fee per gas
|
||||||
|
**/
|
||||||
|
maxPriorityFeePerGas: AugmentedRpc<() => Observable<U256>>;
|
||||||
/**
|
/**
|
||||||
* Returns true if client is actively mining new blocks.
|
* Returns true if client is actively mining new blocks.
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/rpc-augment authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
export * from './index';
|
||||||
@@ -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: '8.6.2' };
|
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '8.11.1' };
|
||||||
|
|||||||
@@ -20,18 +20,18 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "8.6.2",
|
"version": "8.11.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.3",
|
"@babel/runtime": "^7.18.6",
|
||||||
"@polkadot/rpc-augment": "8.6.2",
|
"@polkadot/rpc-augment": "8.11.1",
|
||||||
"@polkadot/rpc-provider": "8.6.2",
|
"@polkadot/rpc-provider": "8.11.1",
|
||||||
"@polkadot/types": "8.6.2",
|
"@polkadot/types": "8.11.1",
|
||||||
"@polkadot/util": "^9.3.1",
|
"@polkadot/util": "^9.7.1",
|
||||||
"rxjs": "^7.5.5"
|
"rxjs": "^7.5.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/keyring": "^9.3.1",
|
"@polkadot/keyring": "^9.7.1",
|
||||||
"@polkadot/rpc-augment": "8.6.2"
|
"@polkadot/rpc-augment": "8.11.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, u8aConcat, u8aToU8a } from '@polkadot/util';
|
import { hexToU8a, isFunction, isNull, isUndefined, lazyMethod, logger, memoize, objectSpread, u8aConcat, u8aToU8a } from '@polkadot/util';
|
||||||
|
|
||||||
import { drr, refCountDelay } from './util';
|
import { drr, refCountDelay } from './util';
|
||||||
|
|
||||||
@@ -42,7 +42,11 @@ const EMPTY_META = {
|
|||||||
|
|
||||||
// utility method to create a nicely-formatted error
|
// utility method to create a nicely-formatted error
|
||||||
/** @internal */
|
/** @internal */
|
||||||
function logErrorMessage (method: string, { params, type }: DefinitionRpc, error: Error): void {
|
function logErrorMessage (method: string, { noErrorLog, params, type }: DefinitionRpc, error: Error): void {
|
||||||
|
if (noErrorLog) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const inputs = params.map(({ isOptional, name, type }): string =>
|
const inputs = params.map(({ isOptional, name, type }): string =>
|
||||||
`${name}${isOptional ? '?' : ''}: ${type}`
|
`${name}${isOptional ? '?' : ''}: ${type}`
|
||||||
).join(', ');
|
).join(', ');
|
||||||
@@ -87,7 +91,7 @@ export class RpcCore {
|
|||||||
#getBlockRegistry?: (blockHash: Uint8Array) => Promise<{ registry: Registry }>;
|
#getBlockRegistry?: (blockHash: Uint8Array) => Promise<{ registry: Registry }>;
|
||||||
#getBlockHash?: (blockNumber: AnyNumber) => Promise<Uint8Array>;
|
#getBlockHash?: (blockNumber: AnyNumber) => Promise<Uint8Array>;
|
||||||
|
|
||||||
readonly #storageCache = new Map<string, string | null>();
|
readonly #storageCache = new Map<string, Codec>();
|
||||||
|
|
||||||
public readonly mapping = new Map<string, DefinitionRpcExt>();
|
public readonly mapping = new Map<string, DefinitionRpcExt>();
|
||||||
|
|
||||||
@@ -102,7 +106,9 @@ export class RpcCore {
|
|||||||
*/
|
*/
|
||||||
constructor (instanceId: string, registry: Registry, provider: ProviderInterface, userRpc: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>> = {}) {
|
constructor (instanceId: string, registry: Registry, provider: ProviderInterface, userRpc: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>> = {}) {
|
||||||
// eslint-disable-next-line @typescript-eslint/unbound-method
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
||||||
assert(provider && isFunction(provider.send), 'Expected Provider to API create');
|
if (!provider || !isFunction(provider.send)) {
|
||||||
|
throw new Error('Expected Provider to API create');
|
||||||
|
}
|
||||||
|
|
||||||
this.#instanceId = instanceId;
|
this.#instanceId = instanceId;
|
||||||
this.#registryDefault = registry;
|
this.#registryDefault = registry;
|
||||||
@@ -356,7 +362,9 @@ export class RpcCore {
|
|||||||
? ''
|
? ''
|
||||||
: ` (${def.params.length - reqArgCount} optional)`;
|
: ` (${def.params.length - reqArgCount} optional)`;
|
||||||
|
|
||||||
assert(inputs.length >= reqArgCount && inputs.length <= def.params.length, () => `Expected ${def.params.length} parameters${optText}, ${inputs.length} found instead`);
|
if (inputs.length < reqArgCount || inputs.length > def.params.length) {
|
||||||
|
throw new Error(`Expected ${def.params.length} parameters${optText}, ${inputs.length} found instead`);
|
||||||
|
}
|
||||||
|
|
||||||
return inputs.map((input, index): Codec =>
|
return inputs.map((input, index): Codec =>
|
||||||
registry.createTypeUnsafe(def.params[index].type, [input], { blockHash })
|
registry.createTypeUnsafe(def.params[index].type, [input], { blockHash })
|
||||||
@@ -418,28 +426,38 @@ export class RpcCore {
|
|||||||
}, []);
|
}, []);
|
||||||
}
|
}
|
||||||
|
|
||||||
private _formatStorageSetEntry (registry: Registry, blockHash: string, key: StorageKey, changes: [string, string | null][], witCache: boolean, entryIndex: number): Codec {
|
private _formatStorageSetEntry (registry: Registry, blockHash: string, key: StorageKey, changes: [string, string | null][], withCache: boolean, entryIndex: number): Codec {
|
||||||
const hexKey = key.toHex();
|
const hexKey = key.toHex();
|
||||||
const found = changes.find(([key]) => key === hexKey);
|
const found = changes.find(([key]) => key === hexKey);
|
||||||
|
const isNotFound = isUndefined(found);
|
||||||
|
|
||||||
// if we don't find the value, this is our fallback
|
// if we don't find the value, this is our fallback
|
||||||
// - in the case of an array of values, fill the hole from the cache
|
// - in the case of an array of values, fill the hole from the cache
|
||||||
// - if a single result value, don't fill - it is not an update hole
|
// - if a single result value, don't fill - it is not an update hole
|
||||||
// - fallback to an empty option in all cases
|
// - fallback to an empty option in all cases
|
||||||
const value = isUndefined(found)
|
if (isNotFound && withCache) {
|
||||||
? (witCache && this.#storageCache.get(hexKey)) || null
|
const cached = this.#storageCache.get(hexKey);
|
||||||
|
|
||||||
|
if (cached) {
|
||||||
|
return cached;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const value = isNotFound
|
||||||
|
? null
|
||||||
: found[1];
|
: found[1];
|
||||||
const isEmpty = isNull(value);
|
const isEmpty = isNull(value);
|
||||||
const input = isEmpty || isTreatAsHex(key)
|
const input = isEmpty || isTreatAsHex(key)
|
||||||
? value
|
? value
|
||||||
: u8aToU8a(value);
|
: u8aToU8a(value);
|
||||||
|
const codec = this._newType(registry, blockHash, key, input, isEmpty, entryIndex);
|
||||||
|
|
||||||
// store the retrieved result - the only issue with this cache is that there is no
|
// store the retrieved result - the only issue with this cache is that there is no
|
||||||
// clearing of it, so very long running processes (not just a couple of hours, longer)
|
// clearing of it, so very long running processes (not just a couple of hours, longer)
|
||||||
// will increase memory beyond what is allowed.
|
// will increase memory beyond what is allowed.
|
||||||
this.#storageCache.set(hexKey, value);
|
this.#storageCache.set(hexKey, codec);
|
||||||
|
|
||||||
return this._newType(registry, blockHash, key, input, isEmpty, entryIndex);
|
return codec;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _newType (registry: Registry, blockHash: Uint8Array | string | null | undefined, key: StorageKey, input: string | Uint8Array | null, isEmpty: boolean, entryIndex = -1): Codec {
|
private _newType (registry: Registry, blockHash: Uint8Array | string | null | undefined, key: StorageKey, input: string | Uint8Array | null, isEmpty: boolean, entryIndex = -1): Codec {
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/rpc-core authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
export * from './index';
|
||||||
@@ -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: '8.6.2' };
|
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '8.11.1' };
|
||||||
|
|||||||
@@ -20,21 +20,21 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "8.6.2",
|
"version": "8.11.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.3",
|
"@babel/runtime": "^7.18.6",
|
||||||
"@polkadot/keyring": "^9.3.1",
|
"@polkadot/keyring": "^9.7.1",
|
||||||
"@polkadot/types": "8.6.2",
|
"@polkadot/types": "8.11.1",
|
||||||
"@polkadot/types-support": "8.6.2",
|
"@polkadot/types-support": "8.11.1",
|
||||||
"@polkadot/util": "^9.3.1",
|
"@polkadot/util": "^9.7.1",
|
||||||
"@polkadot/util-crypto": "^9.3.1",
|
"@polkadot/util-crypto": "^9.7.1",
|
||||||
"@polkadot/x-fetch": "^9.3.1",
|
"@polkadot/x-fetch": "^9.7.1",
|
||||||
"@polkadot/x-global": "^9.3.1",
|
"@polkadot/x-global": "^9.7.1",
|
||||||
"@polkadot/x-ws": "^9.3.1",
|
"@polkadot/x-ws": "^9.7.1",
|
||||||
"@substrate/connect": "0.7.5",
|
"@substrate/connect": "0.7.7",
|
||||||
"eventemitter3": "^4.0.7",
|
"eventemitter3": "^4.0.7",
|
||||||
"mock-socket": "^9.1.4",
|
"mock-socket": "^9.1.5",
|
||||||
"nock": "^13.2.4"
|
"nock": "^13.2.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import type { JsonRpcRequest, JsonRpcResponse, JsonRpcResponseBaseError } from '../types';
|
import type { JsonRpcRequest, JsonRpcResponse, JsonRpcResponseBaseError } from '../types';
|
||||||
|
|
||||||
import { assert, isNumber, isString, isUndefined, stringify } from '@polkadot/util';
|
import { isNumber, isString, isUndefined, stringify } from '@polkadot/util';
|
||||||
|
|
||||||
import RpcError from './error';
|
import RpcError from './error';
|
||||||
|
|
||||||
@@ -36,15 +36,29 @@ export class RpcCoder {
|
|||||||
#id = 0;
|
#id = 0;
|
||||||
|
|
||||||
public decodeResponse (response?: JsonRpcResponse): unknown {
|
public decodeResponse (response?: JsonRpcResponse): unknown {
|
||||||
assert(response && response.jsonrpc === '2.0', 'Invalid jsonrpc field in decoded object');
|
if (!response || response.jsonrpc !== '2.0') {
|
||||||
|
throw new Error('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');
|
if (
|
||||||
|
!isNumber(response.id) &&
|
||||||
|
(
|
||||||
|
!isSubscription || (
|
||||||
|
!isNumber(response.params.subscription) &&
|
||||||
|
!isString(response.params.subscription)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
throw new Error('Invalid id field in decoded object');
|
||||||
|
}
|
||||||
|
|
||||||
checkError(response.error);
|
checkError(response.error);
|
||||||
|
|
||||||
assert(!isUndefined(response.result) || isSubscription, 'No result found in jsonrpc response');
|
if (response.result === undefined && !isSubscription) {
|
||||||
|
throw new Error('No result found in jsonrpc response');
|
||||||
|
}
|
||||||
|
|
||||||
if (isSubscription) {
|
if (isSubscription) {
|
||||||
checkError(response.params.error);
|
checkError(response.params.error);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import type { JsonRpcResponse, ProviderInterface, ProviderInterfaceCallback, ProviderInterfaceEmitCb, ProviderInterfaceEmitted, ProviderStats } from '../types';
|
import type { JsonRpcResponse, ProviderInterface, ProviderInterfaceCallback, ProviderInterfaceEmitCb, ProviderInterfaceEmitted, ProviderStats } from '../types';
|
||||||
|
|
||||||
import { assert, logger } from '@polkadot/util';
|
import { logger } from '@polkadot/util';
|
||||||
import { fetch } from '@polkadot/x-fetch';
|
import { fetch } from '@polkadot/x-fetch';
|
||||||
|
|
||||||
import { RpcCoder } from '../coder';
|
import { RpcCoder } from '../coder';
|
||||||
@@ -49,14 +49,16 @@ export class HttpProvider implements ProviderInterface {
|
|||||||
* @param {string} endpoint The endpoint url starting with http://
|
* @param {string} endpoint The endpoint url starting with http://
|
||||||
*/
|
*/
|
||||||
constructor (endpoint: string = defaults.HTTP_URL, headers: Record<string, string> = {}) {
|
constructor (endpoint: string = defaults.HTTP_URL, headers: Record<string, string> = {}) {
|
||||||
assert(/^(https|http):\/\//.test(endpoint), () => `Endpoint should start with 'http://', received '${endpoint}'`);
|
if (!/^(https|http):\/\//.test(endpoint)) {
|
||||||
|
throw new Error(`Endpoint should start with 'http://' or 'https://', received '${endpoint}'`);
|
||||||
|
}
|
||||||
|
|
||||||
this.#coder = new RpcCoder();
|
this.#coder = new RpcCoder();
|
||||||
this.#endpoint = endpoint;
|
this.#endpoint = endpoint;
|
||||||
this.#headers = headers;
|
this.#headers = headers;
|
||||||
this.#stats = {
|
this.#stats = {
|
||||||
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, errors: 0, requests: 0, subscriptions: 0, timeout: 0 }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,7 +158,9 @@ export class HttpProvider implements ProviderInterface {
|
|||||||
method: 'POST'
|
method: 'POST'
|
||||||
});
|
});
|
||||||
|
|
||||||
assert(response.ok, () => `[${response.status}]: ${response.statusText}`);
|
if (!response.ok) {
|
||||||
|
throw new Error(`[${response.status}]: ${response.statusText}`);
|
||||||
|
}
|
||||||
|
|
||||||
const result = await response.text();
|
const result = await response.text();
|
||||||
|
|
||||||
@@ -169,6 +173,7 @@ export class HttpProvider implements ProviderInterface {
|
|||||||
return decoded;
|
return decoded;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.#stats.active.requests--;
|
this.#stats.active.requests--;
|
||||||
|
this.#stats.total.errors++;
|
||||||
|
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import jsonrpc from '@polkadot/types/interfaces/jsonrpc';
|
|||||||
import rpcHeader from '@polkadot/types-support/json/Header.004.json';
|
import rpcHeader from '@polkadot/types-support/json/Header.004.json';
|
||||||
import rpcSignedBlock from '@polkadot/types-support/json/SignedBlock.004.immortal.json';
|
import rpcSignedBlock from '@polkadot/types-support/json/SignedBlock.004.immortal.json';
|
||||||
import rpcMetadata from '@polkadot/types-support/metadata/static-substrate';
|
import rpcMetadata from '@polkadot/types-support/metadata/static-substrate';
|
||||||
import { assert, BN, bnToU8a, logger, u8aToHex } from '@polkadot/util';
|
import { BN, bnToU8a, logger, u8aToHex } from '@polkadot/util';
|
||||||
import { randomAsU8a } from '@polkadot/util-crypto';
|
import { randomAsU8a } from '@polkadot/util-crypto';
|
||||||
|
|
||||||
const INTERVAL = 1000;
|
const INTERVAL = 1000;
|
||||||
@@ -130,7 +130,9 @@ export class MockProvider implements ProviderInterface {
|
|||||||
public async send <T = any> (method: string, params: unknown[]): Promise<T> {
|
public async send <T = any> (method: string, params: unknown[]): Promise<T> {
|
||||||
l.debug(() => ['send', method, params]);
|
l.debug(() => ['send', method, params]);
|
||||||
|
|
||||||
assert(this.requests[method], () => `provider.send: Invalid method '${method}'`);
|
if (!this.requests[method]) {
|
||||||
|
throw new Error(`provider.send: Invalid method '${method}'`);
|
||||||
|
}
|
||||||
|
|
||||||
return this.requests[method](this.db, params) as T;
|
return this.requests[method](this.db, params) as T;
|
||||||
}
|
}
|
||||||
@@ -139,7 +141,9 @@ export class MockProvider implements ProviderInterface {
|
|||||||
public async subscribe (type: string, method: string, ...params: unknown[]): Promise<number> {
|
public async subscribe (type: string, method: string, ...params: unknown[]): Promise<number> {
|
||||||
l.debug(() => ['subscribe', method, params]);
|
l.debug(() => ['subscribe', method, params]);
|
||||||
|
|
||||||
assert(this.subscriptions[method], () => `provider.subscribe: Invalid method '${method}'`);
|
if (!this.subscriptions[method]) {
|
||||||
|
throw new Error(`provider.subscribe: Invalid method '${method}'`);
|
||||||
|
}
|
||||||
|
|
||||||
const callback = params.pop() as MockStateSubscriptionCallback;
|
const callback = params.pop() as MockStateSubscriptionCallback;
|
||||||
const id = ++this.subscriptionId;
|
const id = ++this.subscriptionId;
|
||||||
@@ -160,7 +164,9 @@ export class MockProvider implements ProviderInterface {
|
|||||||
|
|
||||||
l.debug(() => ['unsubscribe', id, sub]);
|
l.debug(() => ['unsubscribe', id, sub]);
|
||||||
|
|
||||||
assert(sub, () => `Unable to find subscription for ${id}`);
|
if (!sub) {
|
||||||
|
throw new Error(`Unable to find subscription for ${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
delete this.subscriptionMap[id];
|
delete this.subscriptionMap[id];
|
||||||
delete this.subscriptions[sub].callbacks[id];
|
delete this.subscriptions[sub].callbacks[id];
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/rpc-provider authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
export * from './index';
|
||||||
@@ -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: '8.6.2' };
|
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '8.11.1' };
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
// 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 { assert } from '@polkadot/util';
|
|
||||||
|
|
||||||
export interface SmoldotHealth {
|
export interface SmoldotHealth {
|
||||||
isSyncing: boolean
|
isSyncing: boolean
|
||||||
peers: number
|
peers: number
|
||||||
@@ -63,10 +61,9 @@ export function healthChecker (): HealthChecker {
|
|||||||
return checker.responsePassThrough(jsonRpcResponse);
|
return checker.responsePassThrough(jsonRpcResponse);
|
||||||
},
|
},
|
||||||
sendJsonRpc: (request) => {
|
sendJsonRpc: (request) => {
|
||||||
assert(
|
if (!sendJsonRpc) {
|
||||||
sendJsonRpc,
|
throw new Error('setSendJsonRpc must be called before sending requests');
|
||||||
'setSendJsonRpc must be called before sending requests'
|
}
|
||||||
);
|
|
||||||
|
|
||||||
if (checker === null) {
|
if (checker === null) {
|
||||||
sendJsonRpc(request);
|
sendJsonRpc(request);
|
||||||
@@ -78,14 +75,12 @@ export function healthChecker (): HealthChecker {
|
|||||||
sendJsonRpc = cb;
|
sendJsonRpc = cb;
|
||||||
},
|
},
|
||||||
start: (healthCallback) => {
|
start: (healthCallback) => {
|
||||||
assert(
|
if (checker !== null) {
|
||||||
checker === null,
|
throw new Error("Can't start the health checker multiple times in parallel");
|
||||||
"Can't start the health checker multiple times in parallel"
|
} else if (!sendJsonRpc) {
|
||||||
);
|
throw new Error('setSendJsonRpc must be called before starting the health checks');
|
||||||
assert(
|
}
|
||||||
sendJsonRpc,
|
|
||||||
'setSendJsonRpc must be called before starting the health checks'
|
|
||||||
);
|
|
||||||
checker = new InnerChecker(healthCallback, sendJsonRpc);
|
checker = new InnerChecker(healthCallback, sendJsonRpc);
|
||||||
checker.update(true);
|
checker.update(true);
|
||||||
},
|
},
|
||||||
@@ -216,7 +211,9 @@ class InnerChecker {
|
|||||||
const id: string = parsedResponse.id;
|
const id: string = parsedResponse.id;
|
||||||
|
|
||||||
// Need to remove the `extern:` prefix.
|
// Need to remove the `extern:` prefix.
|
||||||
assert(id.startsWith('extern:'), 'State inconsistency in health checker');
|
if (!id.startsWith('extern:')) {
|
||||||
|
throw new Error('State inconsistency in health checker');
|
||||||
|
}
|
||||||
|
|
||||||
const newId = JSON.parse(id.slice('extern:'.length)) as string;
|
const newId = JSON.parse(id.slice('extern:'.length)) as string;
|
||||||
|
|
||||||
@@ -283,10 +280,9 @@ class InnerChecker {
|
|||||||
};
|
};
|
||||||
|
|
||||||
startSubscription = (): void => {
|
startSubscription = (): void => {
|
||||||
assert(
|
if (this.#currentSubunsubRequestId || this.#currentSubscriptionId) {
|
||||||
!this.#currentSubunsubRequestId && !this.#currentSubscriptionId,
|
throw new Error('Internal error in health checker');
|
||||||
'Internal error in health checker'
|
}
|
||||||
);
|
|
||||||
|
|
||||||
this.#currentSubunsubRequestId = 'health-checker:'.concat(
|
this.#currentSubunsubRequestId = 'health-checker:'.concat(
|
||||||
this.#nextRequestId.toString()
|
this.#nextRequestId.toString()
|
||||||
@@ -303,10 +299,9 @@ class InnerChecker {
|
|||||||
};
|
};
|
||||||
|
|
||||||
endSubscription = (): void => {
|
endSubscription = (): void => {
|
||||||
assert(
|
if (this.#currentSubunsubRequestId || !this.#currentSubscriptionId) {
|
||||||
!this.#currentSubunsubRequestId && this.#currentSubscriptionId,
|
throw new Error('Internal error in health checker');
|
||||||
'Internal error in health checker'
|
}
|
||||||
);
|
|
||||||
|
|
||||||
this.#currentSubunsubRequestId = 'health-checker:'.concat(
|
this.#currentSubunsubRequestId = 'health-checker:'.concat(
|
||||||
this.#nextRequestId.toString()
|
this.#nextRequestId.toString()
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import type { JsonRpcResponse, ProviderInterface, ProviderInterfaceCallback, Pro
|
|||||||
import { Chain, createScClient, ScClient, WellKnownChain } from '@substrate/connect';
|
import { Chain, createScClient, ScClient, WellKnownChain } from '@substrate/connect';
|
||||||
import EventEmitter from 'eventemitter3';
|
import EventEmitter from 'eventemitter3';
|
||||||
|
|
||||||
import { assert, isError } from '@polkadot/util';
|
import { isError } from '@polkadot/util';
|
||||||
|
|
||||||
import { RpcCoder } from '../coder';
|
import { RpcCoder } from '../coder';
|
||||||
import { healthChecker } from './Health';
|
import { healthChecker } from './Health';
|
||||||
@@ -71,7 +71,9 @@ export class ScProvider implements ProviderInterface {
|
|||||||
// Config details can be found in @substrate/connect repo following the link:
|
// 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
|
// https://github.com/paritytech/substrate-connect/blob/main/packages/connect/src/connector/index.ts
|
||||||
async connect (config?: ScConfig): Promise<void> {
|
async connect (config?: ScConfig): Promise<void> {
|
||||||
assert(!this.isConnected, 'Already connected!');
|
if (this.isConnected) {
|
||||||
|
throw new Error('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
|
||||||
// smoldot is syncing, the consumer tries to reconnect after a certain amount
|
// smoldot is syncing, the consumer tries to reconnect after a certain amount
|
||||||
@@ -91,7 +93,10 @@ export class ScProvider implements ProviderInterface {
|
|||||||
? scClients.get(this.#sharedSandbox)
|
? scClients.get(this.#sharedSandbox)
|
||||||
: createScClient(config);
|
: createScClient(config);
|
||||||
|
|
||||||
assert(client, 'Unkown ScProvider!');
|
if (!client) {
|
||||||
|
throw new Error('Unkown ScProvider!');
|
||||||
|
}
|
||||||
|
|
||||||
scClients.set(this, client);
|
scClients.set(this, client);
|
||||||
|
|
||||||
const hc = healthChecker();
|
const hc = healthChecker();
|
||||||
@@ -156,7 +161,9 @@ export class ScProvider implements ProviderInterface {
|
|||||||
|
|
||||||
const stale = staleSubscriptions.pop();
|
const stale = staleSubscriptions.pop();
|
||||||
|
|
||||||
assert(stale, 'Unable to get stale subscription');
|
if (!stale) {
|
||||||
|
throw new Error('Unable to get stale subscription');
|
||||||
|
}
|
||||||
|
|
||||||
const { id, unsubscribeMethod } = stale;
|
const { id, unsubscribeMethod } = stale;
|
||||||
|
|
||||||
@@ -264,7 +271,9 @@ 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 && this.#chain, 'Provider is not connected');
|
if (!this.isConnected || !this.#chain) {
|
||||||
|
throw new Error('Provider is not connected');
|
||||||
|
}
|
||||||
|
|
||||||
const chain = await this.#chain;
|
const chain = await this.#chain;
|
||||||
const [id, json] = this.#coder.encodeJson(method, params);
|
const [id, json] = this.#coder.encodeJson(method, params);
|
||||||
@@ -302,10 +311,9 @@ export class ScProvider implements ProviderInterface {
|
|||||||
params: any[],
|
params: any[],
|
||||||
callback: ProviderInterfaceCallback
|
callback: ProviderInterfaceCallback
|
||||||
): Promise<number | string> {
|
): Promise<number | string> {
|
||||||
assert(
|
if (!subscriptionUnsubscriptionMethods.has(method)) {
|
||||||
subscriptionUnsubscriptionMethods.has(method),
|
throw new Error(`Unsupported subscribe method: ${method}`);
|
||||||
`Unsupported subscribe method: ${method}`
|
}
|
||||||
);
|
|
||||||
|
|
||||||
const id = await this.send<number | string>(method, params);
|
const id = await this.send<number | string>(method, params);
|
||||||
const subscriptionId = `${type}::${id}`;
|
const subscriptionId = `${type}::${id}`;
|
||||||
@@ -320,7 +328,9 @@ export class ScProvider implements ProviderInterface {
|
|||||||
|
|
||||||
const unsubscribeMethod = subscriptionUnsubscriptionMethods.get(method);
|
const unsubscribeMethod = subscriptionUnsubscriptionMethods.get(method);
|
||||||
|
|
||||||
assert(unsubscribeMethod, 'Invalid unsubscribe method found');
|
if (!unsubscribeMethod) {
|
||||||
|
throw new Error('Invalid unsubscribe method found');
|
||||||
|
}
|
||||||
|
|
||||||
this.#subscriptions.set(subscriptionId, [cb, { id, unsubscribeMethod }]);
|
this.#subscriptions.set(subscriptionId, [cb, { id, unsubscribeMethod }]);
|
||||||
|
|
||||||
@@ -332,10 +342,9 @@ export class ScProvider implements ProviderInterface {
|
|||||||
method: string,
|
method: string,
|
||||||
id: number | string
|
id: number | string
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
assert(
|
if (!this.isConnected) {
|
||||||
this.isConnected,
|
throw new Error('Provider is not connected');
|
||||||
'Provider is not connected'
|
}
|
||||||
);
|
|
||||||
|
|
||||||
const subscriptionId = `${type}::${id}`;
|
const subscriptionId = `${type}::${id}`;
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ export interface ProviderStats {
|
|||||||
bytesRecv: number;
|
bytesRecv: number;
|
||||||
bytesSent: number;
|
bytesSent: number;
|
||||||
cached: number;
|
cached: number;
|
||||||
|
errors: number;
|
||||||
requests: number;
|
requests: number;
|
||||||
subscriptions: number;
|
subscriptions: number;
|
||||||
timeout: number;
|
timeout: number;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user