Compare commits

..
413 Commits
Author SHA1 Message Date
github-actions[bot] 8649c17dd7 [CI Skip] release/stable 8.5.1
skip-checks: true
2022-05-22 16:24:12 +00:00
Jaco 9b794e963d 8.5.1 (#4847) 2022-05-22 19:14:37 +03:00
github-actions[bot] ad9a162b01 [CI Skip] release/beta 8.4.3-7
skip-checks: true
2022-05-22 08:52:56 +00:00
Jaco 82c16e2aed Bump deps (#4846) 2022-05-22 11:41:52 +03:00
github-actions[bot] e6a432049c [CI Skip] release/beta 8.4.3-6
skip-checks: true
2022-05-21 11:47:18 +00:00
Jaco 84c70a850b Bump static metadata (#4844) 2022-05-21 14:38:22 +03:00
github-actions[bot] 937efb631b [CI Skip] release/beta 8.4.3-5
skip-checks: true
2022-05-21 11:23:32 +00:00
Jaco 99898e3310 Handle Vec<Option> in typegen (#4843) 2022-05-21 14:15:09 +03:00
github-actions[bot] d540355729 [CI Skip] release/beta 8.4.3-4
skip-checks: true
2022-05-19 18:31:09 +00:00
Jaco 5fac4d9398 Add additional isCodec checks to error/event .is (#4840) 2022-05-19 21:21:23 +03:00
github-actions[bot] baa2caae68 [CI Skip] release/beta 8.4.3-3
skip-checks: true
2022-05-18 06:11:53 +00:00
Nikos Kontakis 62d9889737 Update substrate connect to 0.7.5 (#4835)
* Update substrate connect to 0.7.5; Add optional configuration to connect()

* Address PR's comments
2022-05-18 09:03:10 +03:00
github-actions[bot] 7c0e9831c3 [CI Skip] release/beta 8.4.3-2
skip-checks: true
2022-05-17 15:11:10 +00:00
Jaco c601e4163a Bump deps (#4834) 2022-05-17 17:59:56 +03:00
github-actions[bot] 1404994792 [CI Skip] release/beta 8.4.3-1
skip-checks: true
2022-05-17 12:32:44 +00:00
Jaco a95d36d67a Support mmr_generateBatchProof RPC (#4831) 2022-05-17 15:23:11 +03:00
github-actions[bot] 48b43b9129 [CI Skip] release/beta 8.4.3-0
skip-checks: true
2022-05-17 06:03:12 +00:00
Jaco c60c1efd46 Adjust extrinsic inspect for signed/unsigned (#4830) 2022-05-17 08:54:41 +03:00
github-actions[bot] ef54cfb29b [CI Skip] release/stable 8.4.2
skip-checks: true
2022-05-15 08:53:15 +00:00
Jaco 23c23a81b3 8.4.2 (#4828) 2022-05-15 11:45:18 +03:00
github-actions[bot] 3d8ba0f1bf [CI Skip] release/stable 8.4.1
skip-checks: true
2022-05-14 12:37:18 +00:00
Jaco b39efbeaf2 8.4.1 (#4827) 2022-05-14 15:28:45 +03:00
github-actions[bot] b305caee6e [CI Skip] release/beta 8.3.3-16
skip-checks: true
2022-05-13 19:41:22 +00:00
Jaco 143a149628 Bump common (#4825) 2022-05-13 22:33:31 +03:00
github-actions[bot] 8f80c0391d [CI Skip] release/beta 8.3.3-15
skip-checks: true
2022-05-13 14:51:31 +00:00
Jaco 1364cb8264 Upgrade blocks (#4824) 2022-05-13 17:42:56 +03:00
github-actions[bot] 0e12ebad1d [CI Skip] release/beta 8.3.3-14
skip-checks: true
2022-05-13 14:03:36 +00:00
Jaco 8dc0f0486d Small decoding cleanups (#4823)
* Small decoding cleanups

* isHex

* Adjust struct

* Additional
2022-05-13 16:55:13 +03:00
github-actions[bot] 6159270465 [CI Skip] release/beta 8.3.3-13
skip-checks: true
2022-05-13 11:33:21 +00:00
Jaco 40b3c54916 Bump common (#4822) 2022-05-13 14:24:45 +03:00
github-actions[bot] 85e7e3c11c [CI Skip] release/beta 8.3.3-12
skip-checks: true
2022-05-12 12:33:11 +00:00
Jaco 3ad01d27b2 Add Vote override for conviction-voting (#4821) 2022-05-12 15:24:39 +03:00
github-actions[bot] 05b0ff2aba [CI Skip] release/beta 8.3.3-11
skip-checks: true
2022-05-12 09:39:49 +00:00
Jaco 84c9da8374 Bump beta @polkadot/util (#4820)
* Bump beta @polkadot/util

* Bump common
2022-05-12 12:28:27 +03:00
github-actions[bot] 6222672faa [CI Skip] release/beta 8.3.3-10
skip-checks: true
2022-05-12 05:22:23 +00:00
Jaco 96f2f83cd5 Bump deps (#4819) 2022-05-12 08:13:00 +03:00
github-actions[bot] f444d9ed75 [CI Skip] release/beta 8.3.3-9
skip-checks: true
2022-05-11 08:36:53 +00:00
Jaco d93a127d88 Create linkage compatible types in V14 conversion (#4816)
* Create linkage compatible types in V14 conversion

* Handle Linkage in extractTypes

* Linkage fallback type

* CHANGELOG
2022-05-11 11:25:30 +03:00
github-actions[bot] 3a9a35a392 [CI Skip] release/beta 8.3.3-8
skip-checks: true
2022-05-10 11:47:01 +00:00
Jaco 5c655ca029 Use I* interfaces for extrinsic payload getters (#4814)
* Use `I*` interfaces for extrinsic payload getters

* Adjust with IText

* Text extends IText

* Adjust
2022-05-10 14:38:58 +03:00
github-actions[bot] 1808cb0a9d [CI Skip] release/beta 8.3.3-7
skip-checks: true
2022-05-10 07:48:04 +00:00
Jaco 54e94ec6bc Change all usages of .substr to .substring (#4809) 2022-05-10 10:39:15 +03:00
github-actions[bot] 22db4f1c3d [CI Skip] release/beta 8.3.3-6
skip-checks: true
2022-05-10 07:35:27 +00:00
Jaco e514a59e63 Bump deps (#4812) 2022-05-10 10:27:03 +03:00
github-actions[bot] 3318a7566f [CI Skip] release/beta 8.3.3-5
skip-checks: true
2022-05-09 10:27:35 +00:00
Jaco fd568c0341 Optimize Compact decoding in Uint8Array streams (#4808)
* Optimize Compact decoding in Uint8Array streams

* Adjust test

* Adjust
2022-05-09 13:19:05 +03:00
github-actions[bot] 2edcef6ff5 [CI Skip] release/beta 8.3.3-4
skip-checks: true
2022-05-09 08:05:51 +00:00
Jaco 264cc9365e Bump metadata (#4806) 2022-05-09 10:55:51 +03:00
github-actions[bot] 6e23a27ce1 [CI Skip] release/beta 8.3.3-3
skip-checks: true
2022-05-09 06:59:58 +00:00
Jaco 38d39a4d13 Allow for optional definitions in typegen (#4805)
* Allow for optional definitions in typegen

* Adjust

* Adjust
2022-05-09 09:51:35 +03:00
github-actions[bot] 6954ec794c [CI Skip] release/beta 8.3.3-2
skip-checks: true
2022-05-09 06:11:08 +00:00
Jaco 3ee6eb5a13 Dedupe wss:// handling in polkadot-types-from-{chain, defs} (#4804) 2022-05-09 09:01:07 +03:00
github-actions[bot] 9d1c848f28 [CI Skip] release/beta 8.3.3-1
skip-checks: true
2022-05-09 05:42:43 +00:00
Jaco 1d3258f537 Add explicit support for Call typegen (inclusive of non-defaults) (#4803) 2022-05-09 08:31:48 +03:00
github-actions[bot] e8d7013172 [CI Skip] release/beta 8.3.3-0
skip-checks: true
2022-05-09 05:14:07 +00:00
Jaco 55ccdd2fbc Add support for Range/RangeInclusive typegen (#4802) 2022-05-09 08:03:17 +03:00
github-actions[bot] 0449dd7b51 [CI Skip] release/stable 8.3.2
skip-checks: true
2022-05-08 16:23:38 +00:00
Jaco 4d44c1187b 8.3.2 (#4800) 2022-05-08 19:15:30 +03:00
github-actions[bot] f2eff6628b [CI Skip] release/beta 8.3.2-2
skip-checks: true
2022-05-06 11:22:58 +00:00
Nikos KontakisandPierre Krieger 4923bc3e35 Bump @substrate/connect in rpc-provider to 0.7.4 (#4796)
* Bump @substrate/connect in rpc-provider to 0.7.4

* Add new optional param config in ScProvider's connect() where user can alter the log level

* Satisfy linter

* Update packages/rpc-provider/src/substrate-connect/ScProvider.ts

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>

* Address PRs comments

* Fix build error

* remove config feature

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2022-05-06 14:11:37 +03:00
github-actions[bot] 47da005bee [CI Skip] release/beta 8.3.2-1
skip-checks: true
2022-05-06 03:51:19 +00:00
Jaco 7e82ab3d43 Adjust BTreeSet in typegen top-level generation (#4794) 2022-05-06 06:42:22 +03:00
github-actions[bot] 8df9642e04 [CI Skip] release/beta 8.3.2-0
skip-checks: true
2022-05-05 06:17:33 +00:00
Jaco 6f76e1c4cc Bump @polkadot/dev (#4792) 2022-05-05 09:07:55 +03:00
github-actions[bot] 1d65cc5642 [CI Skip] release/stable 8.3.1
skip-checks: true
2022-05-01 07:01:27 +00:00
Jaco 722bb5222e 8.3.1 (#4789) 2022-05-01 09:52:47 +03:00
github-actions[bot] 49e2daf8f2 [CI Skip] release/beta 8.2.2-11
skip-checks: true
2022-05-01 06:43:57 +00:00
Jaco 88e3c900b7 Bump metadata (#4788) 2022-05-01 09:35:49 +03:00
github-actions[bot] a127dea5e4 [CI Skip] release/beta 8.2.2-10
skip-checks: true
2022-04-30 19:44:53 +00:00
Jaco d29660dc4e Adjust size-assert for U8Fixed (#4787) 2022-04-30 22:35:23 +03:00
github-actions[bot] 1870ad26d5 [CI Skip] release/beta 8.2.2-9
skip-checks: true
2022-04-30 11:29:05 +00:00
Jaco 558a42c6ed Correct BTreeSet extraction (#4785) 2022-04-30 14:18:45 +03:00
github-actions[bot] 6708264688 [CI Skip] release/beta 8.2.2-8
skip-checks: true
2022-04-30 06:09:26 +00:00
Jaco abac14f983 Bump @polkadot/util (#4784) 2022-04-30 09:01:02 +03:00
github-actions[bot] 3cf9040115 [CI Skip] release/beta 8.2.2-7
skip-checks: true
2022-04-29 11:47:32 +00:00
Jaco 37dcd78c4a Bump TS (#4782) 2022-04-29 14:37:50 +03:00
github-actions[bot] 6b3e4cc90e [CI Skip] release/beta 8.2.2-6
skip-checks: true
2022-04-27 09:54:17 +00:00
Jaco 79ab347cbe Westend 9200 upgrade block (#4777) 2022-04-27 12:43:28 +03:00
github-actions[bot] bc302c5cb7 [CI Skip] release/beta 8.2.2-5
skip-checks: true
2022-04-27 07:05:38 +00:00
Jaco 9972776afb Bump @polkadot/dev (#4776) 2022-04-27 09:56:13 +03:00
github-actions[bot] 0b2a3c4e74 [CI Skip] release/beta 8.2.2-4
skip-checks: true
2022-04-26 17:36:22 +00:00
Jaco ccac72fece Remove outdated contract docs (#4774) 2022-04-26 20:27:48 +03:00
github-actions[bot] 8d5209d7dc [CI Skip] release/beta 8.2.2-3
skip-checks: true
2022-04-26 17:23:03 +00:00
Alex DandAlex D 5c2bd9dfa7 fetch metadata via websocket in polkadot-types-from-defs (#4773)
* add ability to fetch metadata from websocket connection as stated in usage https://github.com/polkadot-js/api/blob/master/packages/typegen/src/fromDefs.ts\#L20

* exit after websocket

Co-authored-by: Alex D <pr0fedt@gmail.com>
2022-04-26 20:13:29 +03:00
github-actions[bot] b2e71be983 [CI Skip] release/beta 8.2.2-2
skip-checks: true
2022-04-26 14:59:52 +00:00
Jaco d2f3672f2c Metadata for nomination pools (#4753)
* Metadata for nomination pools

* Update

* Adjust

* Bump meta

* Re-add pool meta

* Latest pools metadata

* Rerun
2022-04-26 17:48:49 +03:00
github-actions[bot] 6fb7849091 [CI Skip] release/beta 8.2.2-1
skip-checks: true
2022-04-26 13:23:48 +00:00
Jaco 983c77fe61 Adjustment for paymentInfo (#4771)
* Adjustment for paymentInfo

* Bump dev
2022-04-26 16:12:17 +03:00
github-actions[bot] 256e35386a [CI Skip] release/beta 8.2.2-0
skip-checks: true
2022-04-25 09:08:14 +00:00
Jaco 8beb03b177 Kusama 9190 upgrade block (#4769) 2022-04-25 12:00:39 +03:00
github-actions[bot] 967f5e980a [CI Skip] release/stable 8.2.1
skip-checks: true
2022-04-24 08:59:23 +00:00
Jaco 00a27efaee 8.2.1 (#4766) 2022-04-24 11:51:42 +03:00
github-actions[bot] a7163fb1ba [CI Skip] release/beta 8.1.2-6
skip-checks: true
2022-04-24 07:32:16 +00:00
Jaco 4c6dd53c3b Bump dev (w/ lint fixes) (#4765) 2022-04-24 10:23:58 +03:00
github-actions[bot] 61199ffb2b [CI Skip] release/beta 8.1.2-5
skip-checks: true
2022-04-24 07:11:13 +00:00
Jaco dbfb03760c Bump static metadata (#4764)
* Bump static metadata

* Redo Kusama
2022-04-24 10:02:48 +03:00
github-actions[bot] c9b1fcdb0a [CI Skip] release/beta 8.1.2-4
skip-checks: true
2022-04-22 13:30:54 +00:00
Jaco 29953edd24 api.derive.balances.fees (#4761)
* api.derive.balances.fees

* Adjust for removal

* Adjust
2022-04-22 16:22:36 +03:00
github-actions[bot] 96a23bda50 [CI Skip] release/beta 8.1.2-3
skip-checks: true
2022-04-22 05:14:41 +00:00
serge 09a8d80144 make WS provider timeout configurable (#4758)
* make WS provider timeout configurable

* minor
2022-04-22 08:05:42 +03:00
github-actions[bot] 5637579879 [CI Skip] release/beta 8.1.2-2
skip-checks: true
2022-04-21 19:43:07 +00:00
Jaco 448ce0a76e Re-bump dev 2022-04-21 22:34:33 +03:00
Jaco a6a062378d Bump dev (#4763) 2022-04-21 22:26:03 +03:00
github-actions[bot] 40c78f95d2 [CI Skip] release/beta 8.1.2-1
skip-checks: true
2022-04-19 14:10:30 +00:00
Jaco b0e135c5ca Bump deps (#4757) 2022-04-19 16:59:27 +03:00
github-actions[bot] 22218bd9b0 [CI Skip] release/beta 8.1.2-0
skip-checks: true
2022-04-19 10:10:08 +00:00
Jaco 149b7d9ee6 Don't fake sign if already signed (#4756) 2022-04-19 13:02:20 +03:00
github-actions[bot] 9a7b91a6f5 [CI Skip] release/stable 8.1.1
skip-checks: true
2022-04-17 11:40:27 +00:00
Jaco 80b165ba34 8.1.1 (#4750)
* 8.1.1

* CHANGELOG
2022-04-17 14:31:59 +03:00
github-actions[bot] 95a4512530 [CI Skip] release/beta 8.0.3-6
skip-checks: true
2022-04-17 10:52:54 +00:00
Jaco 15a315dede Bump static metadata (#4749) 2022-04-17 13:44:21 +03:00
github-actions[bot] 32548a34a4 [CI Skip] release/beta 8.0.3-5
skip-checks: true
2022-04-17 05:39:22 +00:00
Jaco 50142d7e63 Pull typegen __dirname from packageInfo (#4748)
* Pull ty[pegen __dirname from packageInfo

* CHANGELOG
2022-04-17 08:31:04 +03:00
github-actions[bot] 1ed6117e3f [CI Skip] release/beta 8.0.3-4
skip-checks: true
2022-04-14 13:51:48 +00:00
Jaco a392025a15 Adjust default "no RPC response" timeout to 60s (#4746) 2022-04-14 16:43:53 +03:00
github-actions[bot] fbeb478602 [CI Skip] release/beta 8.0.3-3
skip-checks: true
2022-04-14 12:17:31 +00:00
Jaco 2cdd24445c Adjust entriesPages w/ & w/o at (#4745)
* Adjust entriesPages w/ & w/o at

* Adjust

* Update packages/api/src/base/Decorate.ts

* s/keyset/keys/

* CHANGELOG
2022-04-14 15:07:55 +03:00
github-actions[bot] e545f6f2b3 [CI Skip] release/beta 8.0.3-2
skip-checks: true
2022-04-14 09:51:19 +00:00
Zannis Kalampoukis 1aa2b7e1ff fix: Typegen handles structs and vectors of structs without erroring (#4743) 2022-04-14 12:39:57 +03:00
github-actions[bot] 677d0c9969 [CI Skip] release/beta 8.0.3-1
skip-checks: true
2022-04-14 05:22:37 +00:00
Jaco 775fff5333 Apply wildcard type matches (renamed pallets) (#4741)
* Apply wildcard type matches (renamed pallets)

* typo
2022-04-14 08:14:04 +03:00
github-actions[bot] 9345a18de0 [CI Skip] release/beta 8.0.3-0
skip-checks: true
2022-04-12 05:07:29 +00:00
Jaco a4256396ee Bump deps (#4739) 2022-04-12 07:59:13 +03:00
github-actions[bot] 776600ef00 [CI Skip] release/stable 8.0.2
skip-checks: true
2022-04-11 18:09:09 +00:00
Jaco 1a31043cc4 Detect typegen template location for commonjs execution (#4738) 2022-04-11 21:01:00 +03:00
github-actions[bot] 66159955ac [CI Skip] release/stable 8.0.1
skip-checks: true
2022-04-10 10:34:25 +00:00
Jaco 03c725f637 8.0.1 (#4734) 2022-04-10 13:26:19 +03:00
github-actions[bot] e5708a7e7e [CI Skip] release/beta 7.15.2-15
skip-checks: true
2022-04-09 13:13:27 +00:00
Jaco fb5ce83f74 Add support for apiAt.tx(...) (#4696)
* Add support for apiAt.tx(...)

* CHANGELOG
2022-04-09 16:05:36 +03:00
github-actions[bot] 6c3bd2f408 [CI Skip] release/beta 7.15.2-14
skip-checks: true
2022-04-09 10:11:21 +00:00
Jaco 66e01afe26 Bump metadata (#4732) 2022-04-09 13:02:46 +03:00
github-actions[bot] 71f9bdf368 [CI Skip] release/beta 7.15.2-13
skip-checks: true
2022-04-09 09:26:26 +00:00
Jaco 7af9330026 Add bagList expand(bag: Bag) (#4731) 2022-04-09 12:17:58 +03:00
github-actions[bot] d5aff171e4 [CI Skip] release/beta 7.15.2-12
skip-checks: true
2022-04-09 09:15:46 +00:00
Jaco 543de63af8 Re-use bagList types (#4730) 2022-04-09 12:05:33 +03:00
github-actions[bot] cdcdf589dd [CI Skip] release/beta 7.15.2-11
skip-checks: true
2022-04-09 08:49:12 +00:00
Jaco 1330b58afd Align derive.bagsList.all with multi (#4729) 2022-04-09 11:40:48 +03:00
github-actions[bot] 0b2ec65e88 [CI Skip] release/beta 7.15.2-10
skip-checks: true
2022-04-09 08:37:51 +00:00
Jaco 8840e29063 Bump util to 9.0.1 (#4728) 2022-04-09 11:29:42 +03:00
github-actions[bot] b9925b569d [CI Skip] release/beta 7.15.2-9
skip-checks: true
2022-04-09 06:41:34 +00:00
Jaco 2640b65be9 Fix typegen for cjs imports (#4727) 2022-04-09 09:33:05 +03:00
github-actions[bot] d64a0ca295 [CI Skip] release/beta 7.15.2-8
skip-checks: true
2022-04-08 18:54:24 +00:00
Jaco 79eeed3f9a Return sorted names for api.registry.lookup.names (#4726) 2022-04-08 21:46:03 +03:00
github-actions[bot] d154b535e6 [CI Skip] release/beta 7.15.2-7
skip-checks: true
2022-04-08 15:43:31 +00:00
Jaco 87c2690fc2 Bagslist derive sorted (#4725) 2022-04-08 18:35:14 +03:00
github-actions[bot] 8f0ca37c60 [CI Skip] release/beta 7.15.2-6
skip-checks: true
2022-04-08 13:04:36 +00:00
Jaco f7dd4a3552 Add basic derive.bagsList support (#4723) 2022-04-08 15:56:14 +03:00
github-actions[bot] abcad05a91 [CI Skip] release/beta 7.15.2-5
skip-checks: true
2022-04-08 05:59:53 +00:00
Jaco ba188dcc0d JSONRPC request/response handler opts (#4722)
* JSONRPC request/response handler opts

* Fix test

* CHANGELOG
2022-04-08 08:51:44 +03:00
github-actions[bot] ae2422f350 [CI Skip] release/beta 7.15.2-4
skip-checks: true
2022-04-08 05:45:27 +00:00
Zannis KalampoukisandJaco 576efc0239 fix: typegen supports vectors of slices (#4720)
* fix: typegen supports vectors of slices

* fix linting

* Update packages/typegen/src/util/derived.ts

Co-authored-by: Jaco <jacogr@gmail.com>
2022-04-08 08:37:31 +03:00
github-actions[bot] 111540177f [CI Skip] release/beta 7.15.2-3
skip-checks: true
2022-04-06 10:54:35 +00:00
Josep M Sobrepere 43ee566669 docs: improve rpc-provider README (#4719) 2022-04-06 13:44:56 +03:00
github-actions[bot] 39299188b0 [CI Skip] release/beta 7.15.2-2
skip-checks: true
2022-04-06 09:15:26 +00:00
Jaco 5d13bfb925 Bump @polkadot/* (#4718)
* Bump @polkadot/*

* Bump @substrate/connect

* Adjust
2022-04-06 12:06:42 +03:00
github-actions[bot] c759ff0c12 [CI Skip] release/beta 7.15.2-1
skip-checks: true
2022-04-05 12:29:28 +00:00
Jaco 0cc34dff85 Polkadot 9180 block (#4717) 2022-04-05 15:20:36 +03:00
github-actions[bot] 1682a8f096 [CI Skip] release/beta 7.15.2-0
skip-checks: true
2022-04-05 06:22:59 +00:00
Jaco be572aabf0 Bump @polkadot/dev (#4715) 2022-04-05 09:14:32 +03:00
github-actions[bot] 7a6d19d241 [CI Skip] release/stable 7.15.1
skip-checks: true
2022-04-03 06:07:54 +00:00
Jaco f4a590d7f8 7.15.1 (#4714) 2022-04-03 08:59:31 +03:00
github-actions[bot] 771e5f3bcf [CI Skip] release/beta 7.14.4-9
skip-checks: true
2022-04-02 16:32:54 +00:00
Jaco 1ba427356d Kusama & Westend upgrade blocks (#4713) 2022-04-02 19:24:34 +03:00
github-actions[bot] aad497e9d2 [CI Skip] release/beta 7.14.4-8
skip-checks: true
2022-04-02 10:38:12 +00:00
Jaco 95fc2b2c99 Bump static metadata (#4712) 2022-04-02 13:28:40 +03:00
github-actions[bot] b7b707249b [CI Skip] release/beta 7.14.4-7
skip-checks: true
2022-04-01 08:00:13 +00:00
Jaco ce95e305f3 Bump dev deps (#4711) 2022-04-01 10:50:46 +03:00
github-actions[bot] 4ea793f55e [CI Skip] release/beta 7.14.4-6
skip-checks: true
2022-03-31 13:52:55 +00:00
Jaco bb0b365dfe Lazy crypto init (#4709) 2022-03-31 16:45:09 +03:00
github-actions[bot] 756f817d93 [CI Skip] release/beta 7.14.4-5
skip-checks: true
2022-03-31 07:56:48 +00:00
Jaco df4bda1fc8 Promise cache for metadata from version (improves parallel) (#4708)
* Cache for metadata from version (improves parallel)

* Ordering

* Single waiting placeholder

* Dedupe

* Sprinkle in await

* Tighten up with HexString

* CHANGELOG
2022-03-31 10:46:46 +03:00
github-actions[bot] a98e9543b8 [CI Skip] release/beta 7.14.4-4
skip-checks: true
2022-03-30 15:07:08 +00:00
Jaco 84abaff414 DispatchError.error as [u8; 4] (#4570)
* DispatchError.error as [u8; 4]

* Adjust Error.is

* Adjust

* Adjust

* U8a applies to error only

* CHANGELOG
2022-03-30 17:57:41 +03:00
github-actions[bot] 29d5460cdd [CI Skip] release/beta 7.14.4-3
skip-checks: true
2022-03-30 14:51:41 +00:00
HackFisher e2d0de4f6c Update maxExtrinsic definition (#4703)
Related https://github.com/polkadot-js/api/pull/4702

Sorry thatI shouldn't modify the auto-generated file `types.ts` which was later get reverted by `[CI Skip] release/beta 7.14.4-1`:

https://github.com/polkadot-js/api/commit/6fb6c40c7dd073b7715f9a7fa7628f4b62ab99a8
2022-03-30 17:41:28 +03:00
github-actions[bot] 8e32777efa [CI Skip] release/beta 7.14.4-2
skip-checks: true
2022-03-30 08:26:59 +00:00
Xiliang Chen 39b1de326c implement entriesPaged and keysPages for query at (#4701)
* implement entriesPaged and keysPages for query at

* remove redudent declaration
2022-03-30 11:17:54 +03:00
github-actions[bot] 6fb6c40c7d [CI Skip] release/beta 7.14.4-1
skip-checks: true
2022-03-30 05:02:17 +00:00
HackFisher badb10bdd9 Fix types for maxExtrinsic (#4702)
Ref: https://github.com/paritytech/substrate/blob/41567c30da77a2546a90c1049042ebd7b0b09bc4/frame/system/src/limits.rs#L99-L102
2022-03-30 07:52:05 +03:00
github-actions[bot] 235a7b1aa9 [CI Skip] release/beta 7.14.4-0
skip-checks: true
2022-03-29 04:34:42 +00:00
Josep M Sobrepere b7d65fb506 fix: export substrate-connect WellKnownChain (#4700) 2022-03-29 07:24:57 +03:00
github-actions[bot] 8eb0524fed [CI Skip] release/stable 7.14.3
skip-checks: true
2022-03-28 10:10:02 +00:00
Jaco bab50b2d74 7.14.3 (#4699) 2022-03-28 13:02:22 +03:00
github-actions[bot] bb75b42273 [CI Skip] release/stable 7.14.2
skip-checks: true
2022-03-28 05:23:21 +00:00
Jaco 949e429d04 Don't export ScProvider top-level in @polkadot/rpc-provider (#4694)
* Don't export `ScProvider` top-level in `@polkadot/rpc-provider`

* 7.14.2
2022-03-28 08:12:33 +03:00
github-actions[bot] 0b1c20efd7 [CI Skip] release/stable 7.14.1
skip-checks: true
2022-03-27 08:29:36 +00:00
Jaco 0536998766 Correct release to 7.14.1 (#4691) 2022-03-27 11:19:58 +03:00
Jaco 22651eb4b8 8.14.1 (#4690) 2022-03-27 11:00:19 +03:00
github-actions[bot] 48414bdb34 [CI Skip] release/beta 7.13.2-10
skip-checks: true
2022-03-27 06:34:39 +00:00
Jaco 2ff6a85fb3 Bump TypeScript (#4689) 2022-03-27 09:27:11 +03:00
github-actions[bot] 8be1f337a8 [CI Skip] release/beta 7.13.2-9
skip-checks: true
2022-03-25 16:31:07 +00:00
Jaco 2c7056da25 Bump dev (& update CHANGELOG) (#4687) 2022-03-25 18:20:15 +02:00
github-actions[bot] b53c22d6d3 [CI Skip] release/beta 7.13.2-8
skip-checks: true
2022-03-25 15:56:15 +00:00
Josep M SobrepereandJaco 17f316b7c7 Add smoldot rpc provider (#4672)
* Add smoldot rpc provider

* remove smoldot references and fix lint issues

* fix wrong export

* Update packages/rpc-provider/src/substrate-connect/createScClient.ts

Co-authored-by: Jaco <jacogr@gmail.com>

* Update packages/rpc-provider/src/substrate-connect/createScClient.ts

Co-authored-by: Jaco <jacogr@gmail.com>

* Update packages/rpc-provider/src/substrate-connect/Health.ts

Co-authored-by: Jaco <jacogr@gmail.com>

* fix linting on `createScClient.ts`

* fix linting on `Health.ts`

* use @polkadotjs/utils

* remove @substrate/connect

* add @substrate/connect

* fixt linting issues

* export `ScProvider` class

* fix connecting to dependency

* make ScProvider lazy

* dendency -> sharedSandbox

* use @substrate/connect@0.7.0-alpha.0

* fix bundle.ts export

Co-authored-by: Jaco <jacogr@gmail.com>
2022-03-25 17:46:24 +02:00
github-actions[bot] b44fcc90b2 [CI Skip] release/beta 7.13.2-7
skip-checks: true
2022-03-24 18:19:20 +00:00
Jaco b4e477a8c1 Remove all README links (#4685) 2022-03-24 20:09:16 +02:00
github-actions[bot] 4b921c8a55 [CI Skip] release/beta 7.13.2-6
skip-checks: true
2022-03-24 10:13:45 +00:00
Yaroslav Bolyukin e53231b70a Support BTreeMap/BTreeSet in typegen (#4682) 2022-03-24 12:04:14 +02:00
github-actions[bot] afd1db58ac [CI Skip] release/beta 7.13.2-5
skip-checks: true
2022-03-23 14:18:04 +00:00
Jaco 63ba84a641 Clear connection timeout on disconnect (#4681) 2022-03-23 16:09:25 +02:00
github-actions[bot] 044aecbfc3 [CI Skip] release/beta 7.13.2-4
skip-checks: true
2022-03-23 05:29:10 +00:00
Jaco e573c26df3 Bump dev (#4679) 2022-03-23 07:19:33 +02:00
github-actions[bot] 31e7de31f3 [CI Skip] release/beta 7.13.2-3
skip-checks: true
2022-03-22 14:26:51 +00:00
Jaco 7cd9c16eae Add dev_getBlockStats RPC (#4677)
* Add dev_getBlockStats RPC

* CHANGELOG
2022-03-22 16:18:13 +02:00
github-actions[bot] 2b1a7da446 [CI Skip] release/beta 7.13.2-2
skip-checks: true
2022-03-22 07:49:36 +00:00
Jaco 9399c8d24f Output BitVec toHuman to LSB (limit support) (#4676) 2022-03-22 09:41:17 +02:00
github-actions[bot] 798e5fcc78 [CI Skip] release/beta 7.13.2-1
skip-checks: true
2022-03-22 07:05:38 +00:00
Jaco d8ad237b00 Add total.bytes{Recv, Sent} to provider stats (#4671) 2022-03-22 08:54:42 +02:00
github-actions[bot] 550cb10766 [CI Skip] release/beta 7.13.2-0
skip-checks: true
2022-03-22 06:52:53 +00:00
Jaco a44108c3f3 Exatra BitVec namespaces top-level (#4674) 2022-03-22 08:43:08 +02:00
github-actions[bot] 2f28ea0ea8 [CI Skip] release/stable 7.13.1
skip-checks: true
2022-03-19 11:41:58 +00:00
Jaco 488d078b9c 7.13.1 (#4670)
* 7.13.1

* typo
2022-03-19 13:33:35 +02:00
github-actions[bot] ba384cee78 [CI Skip] release/beta 7.12.2-9
skip-checks: true
2022-03-19 09:06:14 +00:00
Jaco 4f95f33cbb Bump util (#4668) 2022-03-19 10:58:21 +02:00
github-actions[bot] 368cb8314c [CI Skip] release/beta 7.12.2-8
skip-checks: true
2022-03-19 07:51:35 +00:00
Jaco c01896d24f Bump babel & dev (#4667) 2022-03-19 09:43:03 +02:00
github-actions[bot] 983043bd1e [CI Skip] release/beta 7.12.2-7
skip-checks: true
2022-03-18 15:17:52 +00:00
MOZGIII 9c2ed6297a Follow-up fix after #4665 (#4666)
* Fix a small nit

* Correct a newly discovered type issue
2022-03-18 17:09:41 +02:00
github-actions[bot] 8a7fee5903 [CI Skip] release/beta 7.12.2-6
skip-checks: true
2022-03-18 14:41:33 +00:00
MOZGIII b0e8a8512a Allow generic Data param at RpcError (#4665)
* Allow generic Data param at RpcError

* Ensure that unless `Data` is specified, the field can't be accessed
2022-03-18 16:33:14 +02:00
github-actions[bot] f83d23d0f6 [CI Skip] release/beta 7.12.2-5
skip-checks: true
2022-03-18 07:50:30 +00:00
Jaco 9dfb5cb237 state_trieMigrationStatus RPC (#4664) 2022-03-18 09:40:37 +02:00
github-actions[bot] 8c87b16924 [CI Skip] release/beta 7.12.2-4
skip-checks: true
2022-03-17 19:01:11 +00:00
Jaco 0d5dce002d Bump static metadata (#4663) 2022-03-17 20:51:10 +02:00
github-actions[bot] 4d0c777a8f [CI Skip] release/beta 7.12.2-3
skip-checks: true
2022-03-17 15:41:45 +00:00
Jaco d63108a4b4 Add basic provider stats (#4662)
* Add basic provider stats

* Add timeout counter

* Make stats() optional for providers (don't break what is out there)

* Update packages/rpc-provider/src/types.ts
2022-03-17 17:33:40 +02:00
github-actions[bot] 5898ac335e [CI Skip] release/beta 7.12.2-2
skip-checks: true
2022-03-17 08:24:12 +00:00
Jaco f108d16d1b RPC timeouts (#4661)
* RPC timeouts

* for loop
2022-03-17 10:14:26 +02:00
github-actions[bot] 32f1495993 [CI Skip] release/beta 7.12.2-1
skip-checks: true
2022-03-17 05:45:53 +00:00
Jaco 2527497e4a Bump dev deps (#4658)
* Bump dev deps

* trigger
2022-03-17 07:37:40 +02:00
github-actions[bot] e50209da0d [CI Skip] release/beta 7.12.2-0
skip-checks: true
2022-03-15 06:28:29 +00:00
Noah Corona cccd512d70 Add rpc error fields (#4637)
* [WIP] Add RpcError

Currently located in rpc-core at request of maintainer. However unclear as to how it should be used, because the error
needs to be thrown in rpc-provider, and depending on it causes a dependency loop.

* Move `RpcError` to `rpc-provider`

Also add tests
2022-03-15 08:20:16 +02:00
github-actions[bot] 1db2136a3d [CI Skip] release/stable 7.12.1
skip-checks: true
2022-03-13 09:50:36 +00:00
Jaco 466485d5aa 7.12.1 (#4653) 2022-03-13 11:39:47 +02:00
github-actions[bot] c9ea333add [CI Skip] release/beta 7.11.2-8
skip-checks: true
2022-03-12 10:15:28 +00:00
Jaco dca62cf3ba Bump common (#4652) 2022-03-12 12:06:50 +02:00
github-actions[bot] 2d9e667d01 [CI Skip] release/beta 7.11.2-7
skip-checks: true
2022-03-11 12:02:08 +00:00
Jaco 67679f34e9 Align CHANGELOG (#4650)
* Align CHANGELOG

* Typos
2022-03-11 13:54:11 +02:00
github-actions[bot] d646fa03af [CI Skip] release/beta 7.11.2-6
skip-checks: true
2022-03-11 06:17:48 +00:00
Jaco 6c33e98553 Ensure Option<None> of different type evaluates to None (#4647) 2022-03-11 08:09:21 +02:00
github-actions[bot] e8cdbf9e80 [CI Skip] release/beta 7.11.2-5
skip-checks: true
2022-03-10 18:51:25 +00:00
Jaco 5016e12ae4 Fix conversion of metadata prior to <= V11 to V14 (#4646) 2022-03-10 20:41:09 +02:00
github-actions[bot] ac09179768 [CI Skip] release/beta 7.11.2-4
skip-checks: true
2022-03-10 08:08:05 +00:00
Jaco 8cc1663bd8 Bump deps (#4644) 2022-03-10 09:57:55 +02:00
github-actions[bot] 34d090c9b3 [CI Skip] release/beta 7.11.2-3
skip-checks: true
2022-03-09 11:37:47 +00:00
Jaco cb1d13e04c Add lookup types to the registry (#4642)
* Add lookup types to the registry

* Adjust
2022-03-09 13:29:31 +02:00
github-actions[bot] 022d79c4cd [CI Skip] release/beta 7.11.2-2
skip-checks: true
2022-03-09 09:53:38 +00:00
Jaco ed079a6acb Adjust registry augment location (#4641) 2022-03-09 11:44:54 +02:00
github-actions[bot] 01d023d141 [CI Skip] release/beta 7.11.2-1
skip-checks: true
2022-03-08 11:08:05 +00:00
Jaco 0b03f73975 Allow for (ab)use of Option<Null>/Option<()> as a boolean (#4639)
* Allow for (ab)use of Option<Null> as a boolean

* Additional test for ()

* Adjust
2022-03-08 12:58:33 +02:00
github-actions[bot] e4cae64187 [CI Skip] release/beta 7.11.2-0
skip-checks: true
2022-03-07 08:22:49 +00:00
Jaco f13989d712 Support bundlers where import.meta.url is undefined (#4634) 2022-03-07 10:13:02 +02:00
github-actions[bot] 05c3f12cd7 [CI Skip] release/stable 7.11.1
skip-checks: true
2022-03-06 16:38:04 +00:00
Jaco 9f6f33844a 7.11.1 (#4631)
* 7.11.1

* packageInfo

* Robustness
2022-03-06 18:30:20 +02:00
github-actions[bot] 895f82920d [CI Skip] release/beta 7.10.2-10
skip-checks: true
2022-03-06 09:24:51 +00:00
Jaco 06fa4aa6eb Allow use of options.signer for status updates (#4615)
* Allow use of options.signer for status updates

* Use isFunction as applicable

* Use UpdateInfo

* CHANGELOG
2022-03-06 11:14:50 +02:00
github-actions[bot] 1e5002fb5e [CI Skip] release/beta 7.10.2-9
skip-checks: true
2022-03-06 08:36:08 +00:00
Jaco 8be52dec13 Apply chunking to era{Exposure, Prefs, Slashes} (#4620)
* Apply chunking to era{Exposure, Prefs, Slashes}

* CHANGELOG

* Failsafe return location

* typo
2022-03-06 10:26:43 +02:00
github-actions[bot] 8fcda8cd54 [CI Skip] release/beta 7.10.2-8
skip-checks: true
2022-03-06 08:02:44 +00:00
Jaco d08c306887 Bump metadata (#4630) 2022-03-06 09:54:02 +02:00
github-actions[bot] eb6b0232c3 [CI Skip] release/beta 7.10.2-7
skip-checks: true
2022-03-06 06:50:29 +00:00
Jaco e5fbaeb7cd Bump deps (#4629) 2022-03-06 08:42:51 +02:00
github-actions[bot] 8e61ea1b8b [CI Skip] release/beta 7.10.2-6
skip-checks: true
2022-03-04 10:32:35 +00:00
Jaco 9fe202a4d3 Add Polkadot 9170 upgrade block (#4627) 2022-03-04 12:24:43 +02:00
github-actions[bot] 6e62d03652 [CI Skip] release/beta 7.10.2-5
skip-checks: true
2022-03-04 07:51:56 +00:00
Jaco 49dc66f7d4 Adjust auto actions (#4626)
* Adjust auto actions

* Adjust
2022-03-04 09:43:58 +02:00
github-actions[bot] 22320f9995 [CI Skip] release/beta 7.10.2-4
skip-checks: true
2022-03-03 09:39:17 +00:00
Jaco 7603bad434 Remove checkout from auto-{approve, merge} actions (#4624) 2022-03-03 11:29:15 +02:00
github-actions[bot] e82f0f35ad [CI Skip] release/beta 7.10.2-3
skip-checks: true
2022-03-02 05:22:27 +00:00
Jaco ae0aa14eb8 Replace mergify with action (#4619) 2022-03-02 07:14:42 +02:00
github-actions[bot] 4875bb9990 [CI Skip] release/beta 7.10.2-2
skip-checks: true
2022-03-01 11:16:01 +00:00
Jacoandmergify[bot] a0308dd25a Bump TS (#4616)
* Bump TS

* Adjust

* Adjust Observable Codec returns

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-01 11:08:20 +00:00
github-actions[bot] edb06d971a [CI Skip] release/beta 7.10.2-1
skip-checks: true
2022-02-28 10:44:59 +00:00
Jacoandmergify[bot] 271a4d8fd7 Kusama 9170 upgrade block (#4613)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-28 10:26:56 +00:00
github-actions[bot] a71e5ad95c [CI Skip] release/beta 7.10.2-0
skip-checks: true
2022-02-28 07:34:42 +00:00
Jaco edcdb70e8a Adjust approve workflow (#4612) 2022-02-28 07:13:43 +00:00
github-actions[bot] 17357f6b99 [CI Skip] release/stable 7.10.1
skip-checks: true
2022-02-27 08:04:03 +00:00
Jaco c596a8cb51 7.10.1 (#4609) 2022-02-27 09:42:16 +02:00
github-actions[bot] bdf13b10e5 [CI Skip] release/beta 7.9.2-12
skip-checks: true
2022-02-27 07:15:02 +00:00
coolcorexixandphat.itern 519a12f19a Investigate 4559 v2 (#4608)
* first build

* second build, area of defect found

* third build, fixed the problem successfully

* cleaning up after receving maintainer's response

Co-authored-by: phat.itern <phatNfqAsia>
2022-02-27 08:50:54 +02:00
github-actions[bot] beffc7b754 [CI Skip] release/beta 7.9.2-11
skip-checks: true
2022-02-26 08:51:00 +00:00
Jaco d5ae7031cd Metadata bump (#4606)
* Metadata bump

* Detect BitSequence order

* Adjust
2022-02-26 10:29:41 +02:00
github-actions[bot] 8aff13b827 [CI Skip] release/beta 7.9.2-10
skip-checks: true
2022-02-25 11:03:13 +00:00
Jaco a23b3f953b Retrieve named reserves (#4602) 2022-02-25 12:40:35 +02:00
github-actions[bot] 1249c46019 [CI Skip] release/beta 7.9.2-9
skip-checks: true
2022-02-24 18:44:58 +00:00
Jaco 2aaf52bb92 Use assertUnreachable from @polkadot/util (#4600) 2022-02-24 18:28:34 +00:00
github-actions[bot] 3372898f82 [CI Skip] release/beta 7.9.2-8
skip-checks: true
2022-02-24 06:38:41 +00:00
Jacoandmergify[bot] ed2f512cfc Don't auto-attach lookup to registry (#4599)
* Don't auto-attach lookup to registry

* CHANGELOG

* Add base u* types

* s/compatTypes/specs/

* CHANGELOG

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-24 06:31:06 +00:00
github-actions[bot] 00147df500 [CI Skip] release/beta 7.9.2-7
skip-checks: true
2022-02-24 05:52:26 +00:00
Jacoandmergify[bot] 3b0c8887d7 Add chain.getBlockByNumber (#4598)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-24 05:42:58 +00:00
github-actions[bot] 16452233b2 [CI Skip] release/beta 7.9.2-6
skip-checks: true
2022-02-23 10:43:52 +00:00
Jaco 5bf87262bc Skip job on non-local repo 2022-02-23 12:33:41 +02:00
github-actions[bot] b8e01fd674 [CI Skip] release/beta 7.9.2-5
skip-checks: true
2022-02-23 10:09:24 +00:00
Jaco f8378ba0f7 Use jacogr/action-approve (#4595) 2022-02-23 12:00:15 +02:00
github-actions[bot] afc105400c [CI Skip] release/beta 7.9.2-4
skip-checks: true
2022-02-22 17:27:21 +00:00
Jaco cca1f10563 XcmV2TraitsOutcome test (#4593)
* XcmV2TraitsOutcome test

* Cleanup build with correct references
2022-02-22 17:19:28 +00:00
github-actions[bot] 6cdbbf5372 [CI Skip] release/beta 7.9.2-3
skip-checks: true
2022-02-22 10:06:24 +00:00
Jaco 8c89732eb7 Decoded storage hashers with primary lookup (#4591) 2022-02-22 09:58:36 +00:00
github-actions[bot] ab3ad6b2ca [CI Skip] release/beta 7.9.2-2
skip-checks: true
2022-02-22 09:01:10 +00:00
Jaco 72f427a250 Map initialU8aLength test (#4590) 2022-02-22 08:51:40 +00:00
github-actions[bot] 5b0bd9d4b7 [CI Skip] release/beta 7.9.2-1
skip-checks: true
2022-02-21 18:14:49 +00:00
Jacoandmergify[bot] cd9662ab4c Ensure BTreeSet has the correct decoded length (#4588)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-21 18:07:11 +00:00
github-actions[bot] 13751b6fdf [CI Skip] release/beta 7.9.2-0
skip-checks: true
2022-02-21 10:38:39 +00:00
Jaco 652f8c28a4 Bump dev (#4585) 2022-02-21 10:30:49 +00:00
github-actions[bot] 0bae9138b8 [CI Skip] release/stable 7.9.1
skip-checks: true
2022-02-20 15:23:37 +00:00
Jaco 98e8cac424 7.9.1 (#4580) 2022-02-20 17:15:17 +02:00
github-actions[bot] dca7f208bc [CI Skip] release/beta 7.8.2-9
skip-checks: true
2022-02-20 06:44:31 +00:00
Jacoandmergify[bot] 67ff12885a Align CHANGELOG (#4579)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-20 06:35:03 +00:00
github-actions[bot] 08c53032eb [CI Skip] release/beta 7.8.2-8
skip-checks: true
2022-02-20 06:00:20 +00:00
Scott TwinameandJaco 5da8f21947 Add support for historical BlockNumber rpc methods (#4574)
* Add support for historical BlockNumber rpc methods

* Update function description

* Apply suggestions from code review

Co-authored-by: Jaco <jacogr@gmail.com>
2022-02-20 07:50:41 +02:00
github-actions[bot] 5080b266a0 [CI Skip] release/beta 7.8.2-7
skip-checks: true
2022-02-19 06:51:06 +00:00
Jaco 0186848936 Convert ExactDerive to interface (#4578) 2022-02-19 06:41:12 +00:00
github-actions[bot] d0de35b05b [CI Skip] release/beta 7.8.2-6
skip-checks: true
2022-02-18 08:42:41 +00:00
Jaco 3ded30a0f3 Bump static metadata (#4575)
* Bump static metadata

* previous incarnation of trieIndex
2022-02-18 08:30:55 +00:00
github-actions[bot] 9fef78c5e1 [CI Skip] release/beta 7.8.2-5
skip-checks: true
2022-02-17 10:28:47 +00:00
Jaco b2a7c453c4 Align grandpa_proveFinality with Substrate (#4573) 2022-02-17 10:19:24 +00:00
github-actions[bot] 030258a671 [CI Skip] release/beta 7.8.2-4
skip-checks: true
2022-02-17 06:12:57 +00:00
Scott Twiname 0a85b4839d Fix getting block registry when historical type isn't BlockHash (#4571)
* Fix getting block registry when historical type isn't BlockHash

* Revert change, remove isHistoric from historical BlockNumber fields
2022-02-17 08:05:06 +02:00
github-actions[bot] ad363bac09 [CI Skip] release/beta 7.8.2-3
skip-checks: true
2022-02-16 08:32:56 +00:00
Jaco e0c0a8c583 Bump deps (#4568) 2022-02-16 08:23:40 +00:00
github-actions[bot] f923a31758 [CI Skip] release/beta 7.8.2-2
skip-checks: true
2022-02-15 18:32:20 +00:00
Jaco 416229d976 Bump deps (#4567) 2022-02-15 18:20:37 +00:00
github-actions[bot] 4380c45f17 [CI Skip] release/beta 7.8.2-1
skip-checks: true
2022-02-15 07:53:05 +00:00
Jaco d481aed8cb Add mergify (#4566) 2022-02-15 09:45:10 +02:00
github-actions[bot] ca25983e3e [CI Skip] release/beta 7.8.2-0
skip-checks: true
2022-02-14 15:08:31 +00:00
Jaco f7caa496e4 Kusama 9160 upgrade block (#4565) 2022-02-14 17:00:05 +02:00
github-actions[bot] 3f8e4ce133 [CI Skip] release/stable 7.8.1
skip-checks: true
2022-02-14 12:55:48 +00:00
Jaco 39c99083bc 7.8.1 (#4564) 2022-02-14 14:46:24 +02:00
github-actions[bot] 46aa427f98 [CI Skip] release/beta 7.7.2-17
skip-checks: true
2022-02-14 05:51:41 +00:00
Jaco 6336fc0787 Bump common (#4563) 2022-02-14 07:43:13 +02:00
github-actions[bot] b0532be7df [CI Skip] release/beta 7.7.2-16
skip-checks: true
2022-02-13 12:55:58 +00:00
Jaco e7a5b015e9 Don't run scripts on CI (#4562) 2022-02-13 14:47:33 +02:00
github-actions[bot] 2f07f18a5a [CI Skip] release/beta 7.7.2-15
skip-checks: true
2022-02-11 07:49:46 +00:00
Jaco c92d5b7eb0 Bump metadata (#4558) 2022-02-11 09:40:07 +02:00
github-actions[bot] e340a99eda [CI Skip] release/beta 7.7.2-14
skip-checks: true
2022-02-10 08:29:28 +00:00
Jaco f169ca08a8 Expose txIndex on extrinsic results (#4556)
* Expose txIndex on extrinsic results

* CHANGELOG

* optional txIndex

* Adjust result
2022-02-10 10:20:57 +02:00
github-actions[bot] 898d1593f3 [CI Skip] release/beta 7.7.2-13
skip-checks: true
2022-02-09 18:38:12 +00:00
Keith Ingram 2c8d9563c4 Update contract types and rpc (#4541)
* Update contract types and rpc

* Corrected InstantiateReturnValue

* enum, set fallbacks

* set definition

* underscore
2022-02-09 20:29:43 +02:00
github-actions[bot] 804c0c4887 [CI Skip] release/beta 7.7.2-12
skip-checks: true
2022-02-09 12:11:11 +00:00
Jaco 3b991ce8c7 Ensure camelCase names appear in inspect (#4554) 2022-02-09 14:01:47 +02:00
github-actions[bot] e66cc0fb45 [CI Skip] release/beta 7.7.2-11
skip-checks: true
2022-02-09 10:20:46 +00:00
Jaco 61daa0f2c8 Adjust inspect inner/outer (#4553) 2022-02-09 12:11:53 +02:00
github-actions[bot] 7af315f278 [CI Skip] release/beta 7.7.2-10
skip-checks: true
2022-02-09 08:29:19 +00:00
Jaco e55661ca34 Bump util (#4552) 2022-02-09 10:20:38 +02:00
github-actions[bot] 097a1748fd [CI Skip] release/beta 7.7.2-9
skip-checks: true
2022-02-09 06:19:32 +00:00
Jaco 9c587d378e Bump dev (#4551) 2022-02-09 08:09:28 +02:00
github-actions[bot] 02f99356aa [CI Skip] release/beta 7.7.2-8
skip-checks: true
2022-02-08 16:27:10 +00:00
Jaco cacacec130 Codec.inspect (#4538)
* Codec.inspect

* Additional

* Adjust

* LookupSource

* Some tests

* All base tests

* Tests for BTree{Map, Set}

* Additional tests

* All extended type tests

* Additional

* Native tests

* Adjust

* Struct with names
2022-02-08 18:18:31 +02:00
github-actions[bot] 6d095a042f [CI Skip] release/beta 7.7.2-7
skip-checks: true
2022-02-08 13:41:15 +00:00
Jaco b022ad3154 Bump dev (#4548) 2022-02-08 15:33:06 +02:00
github-actions[bot] e0129aa02e [CI Skip] release/beta 7.7.2-6
skip-checks: true
2022-02-08 12:28:09 +00:00
Jaco dfc200a25a Wrap storage inspect in hasher function (#4547) 2022-02-08 14:18:17 +02:00
github-actions[bot] 85fdbed227 [CI Skip] release/beta 7.7.2-5
skip-checks: true
2022-02-08 11:16:59 +00:00
Jaco 04a23c0f60 Extract the arg types (#4546) 2022-02-08 13:08:29 +02:00
github-actions[bot] 0bf9eb2f3a [CI Skip] release/beta 7.7.2-4
skip-checks: true
2022-02-08 10:43:13 +00:00
Jaco f13462f7cf Add inspect(...args) to storage (#4545) 2022-02-08 12:34:01 +02:00
github-actions[bot] 0754bc45d3 [CI Skip] release/beta 7.7.2-3
skip-checks: true
2022-02-08 07:52:43 +00:00
Jaco e314f51813 Re-enable BitVec tests (#4543)
* Re-enable BitVec tests

* CHANGELOG
2022-02-08 09:42:24 +02:00
github-actions[bot] 5148bc42ae [CI Skip] release/beta 7.7.2-2
skip-checks: true
2022-02-08 04:50:29 +00:00
Scott Twiname b43c848817 Fix isHistorical to isHistoric (#4540) 2022-02-08 06:42:32 +02:00
github-actions[bot] abd2b58b52 [CI Skip] release/beta 7.7.2-1
skip-checks: true
2022-02-07 21:14:51 +00:00
Scott Twiname 2ce1decd99 Add isHistorical field to relevant eth rpc requests (#4539)
Adds `isHistorical` to `BlockNumber` parameters for eth rpc requests that support querying at a point in time.
2022-02-07 23:04:59 +02:00
github-actions[bot] f8112735af [CI Skip] release/beta 7.7.2-0
skip-checks: true
2022-02-07 10:54:52 +00:00
Jaco 455a8d2a91 Adjust map header output type with lookup (#4536)
* Adjust map header output type with lookup

* Adjust typings
2022-02-07 12:44:17 +02:00
github-actions[bot] ca692cc7c0 [CI Skip] release/stable 7.7.1
skip-checks: true
2022-02-06 07:05:44 +00:00
Jaco f5f5b540af 7.7.1 (#4535) 2022-02-06 08:56:28 +02:00
github-actions[bot] 8b3b1b4611 [CI Skip] release/beta 7.6.2-9
skip-checks: true
2022-02-05 20:05:06 +00:00
Jaco 21cb76e517 Bump dev (#4534) 2022-02-05 21:54:35 +02:00
github-actions[bot] d774a3c2ab [CI Skip] release/beta 7.6.2-8
skip-checks: true
2022-02-04 14:54:50 +00:00
Jaco 0c08e8ba9e Re-decorate all runtime endpoints (#4532) 2022-02-04 16:46:44 +02:00
github-actions[bot] c2549ec166 [CI Skip] release/beta 7.6.2-7
skip-checks: true
2022-02-04 12:28:12 +00:00
Jaco d27fce3b29 Bump deps (#4531) 2022-02-04 14:19:14 +02:00
github-actions[bot] 849588e305 [CI Skip] release/beta 7.6.2-6
skip-checks: true
2022-02-03 14:50:08 +00:00
Jaco 4f3fedc27e beefy_getFinalizedHead (#4530) 2022-02-03 16:42:00 +02:00
github-actions[bot] 57a5892f99 [CI Skip] release/beta 7.6.2-5
skip-checks: true
2022-02-03 10:52:43 +00:00
Jaco f5499ca4ed Don't show Call/Event extract warning pre-v14 (#4528) 2022-02-03 12:44:05 +02:00
github-actions[bot] 37ae595f03 [CI Skip] release/beta 7.6.2-4
skip-checks: true
2022-02-03 10:39:21 +00:00
Jaco 868a4a2964 Bump metadata (#4527) 2022-02-03 12:30:18 +02:00
github-actions[bot] 3656480cff [CI Skip] release/beta 7.6.2-3
skip-checks: true
2022-02-03 09:24:49 +00:00
Jaco 37cf4b5e88 Explicit class cache clear (#4523)
* Explicit class cache clear

* Re-register defaults

* Track knownDefaults in getters

* get ordering
2022-02-03 11:14:43 +02:00
github-actions[bot] 75a4e7b5d7 [CI Skip] release/beta 7.6.2-2
skip-checks: true
2022-02-03 09:02:59 +00:00
Jaco 12d6cf8a5b Don't want on resolvable Lookup* types (#4524) 2022-02-03 10:54:22 +02:00
github-actions[bot] aa7e5ea601 [CI Skip] release/beta 7.6.2-1
skip-checks: true
2022-02-02 14:54:43 +00:00
Gérard Dethier 9f5232019e Fix LRUCache memory leak. (#4520) 2022-02-02 16:46:28 +02:00
github-actions[bot] 3063763a18 [CI Skip] release/beta 7.6.2-0
skip-checks: true
2022-02-02 09:38:40 +00:00
Jaco b76f9e7e21 Adjust runtime upgrade init (#4519) 2022-02-02 11:30:25 +02:00
github-actions[bot] 558636b6b0 [CI Skip] release/stable 7.6.1
skip-checks: true
2022-01-30 05:32:32 +00:00
Jaco 8b92772b2f 7.6.1 (#4515) 2022-01-30 07:21:26 +02:00
github-actions[bot] cf0881f704 [CI Skip] release/beta 7.5.2-11
skip-checks: true
2022-01-29 15:43:58 +00:00
Jaco 1adc17b598 Workaround for regenerator runtime + private callback (#4514)
* Workaround for regenerator runtime + private callback

* CHANGELOG
2022-01-29 17:34:35 +02:00
github-actions[bot] a55256a247 [CI Skip] release/beta 7.5.2-10
skip-checks: true
2022-01-29 11:02:51 +00:00
Jaco faaa4e9480 CHANGELOG update (#4512) 2022-01-29 12:52:53 +02:00
github-actions[bot] ba52ab450e [CI Skip] release/beta 7.5.2-9
skip-checks: true
2022-01-29 10:49:04 +00:00
r0t0r-r0t0r 0660d0cf15 Fix memory leak on raw rpc call (#4505)
* Fix memory leak on raw rpc call

While processing a raw rpc call an observable is removed from the wrong cache. It causes a memory leak.

* Fix memory leak on raw rpc subscription, fix types

Fixed similar memory leak on raw rpc subscription.
Also added proper type declaration for the return value of the _memomize function to address build error.
2022-01-29 12:41:02 +02:00
Jaco fa1a3315f8 Bump deps (#4511) 2022-01-29 12:30:48 +02:00
github-actions[bot] 5f281b07fe [CI Skip] release/beta 7.5.2-8
skip-checks: true
2022-01-27 07:27:58 +00:00
Jaco e5bc2601cc Add support for rpc.contracts.uploadCode (#4508) 2022-01-27 09:18:51 +02:00
github-actions[bot] 6132a34333 [CI Skip] release/beta 7.5.2-7
skip-checks: true
2022-01-26 16:14:58 +00:00
Jaco 697e6d8b8b Exhaustive TypeDefInfo handling in extractType (#4506) 2022-01-26 18:06:18 +02:00
github-actions[bot] 33c4d82293 [CI Skip] release/beta 7.5.2-6
skip-checks: true
2022-01-26 09:00:43 +00:00
Jaco c46e0e9d5b Adjust bounty derive, empty on no {treasury, bounties}.bounties (#4503) 2022-01-26 10:51:24 +02:00
github-actions[bot] 4b9f987203 [CI Skip] release/beta 7.5.2-5
skip-checks: true
2022-01-25 15:13:05 +00:00
Jaco a650ae195e Non-aliased CallEvent type extraction (#4502)
* Non-aliased CallEvent type extraction

* Update packages/types/src/metadata/PortableRegistry/PortableRegistry.ts
2022-01-25 17:01:57 +02:00
github-actions[bot] 0dca7bacc2 [CI Skip] release/beta 7.5.2-4
skip-checks: true
2022-01-25 11:00:20 +00:00
Jaco 87f79151b4 Bump static metadata (#4499) 2022-01-25 12:52:00 +02:00
github-actions[bot] 480ae203b4 [CI Skip] release/beta 7.5.2-3
skip-checks: true
2022-01-25 07:05:28 +00:00
Jaco c4427c0497 Emit decorated event on API (incl. upgrades) (#4497) 2022-01-25 08:57:08 +02:00
github-actions[bot] f130f55167 [CI Skip] release/beta 7.5.2-2
skip-checks: true
2022-01-25 06:20:10 +00:00
Jaco 2009483542 Adjust SlotRange to 36 entries (with older 10-count version) (#4495)
* Adjust SlotRange to 36 entries (with older 10-count version)

* Fix tuple

* Adjust
2022-01-25 08:09:53 +02:00
github-actions[bot] ca50309554 [CI Skip] release/beta 7.5.2-1
skip-checks: true
2022-01-24 06:57:53 +00:00
Jaco db5b0986c4 Align Range/RangeInclusive handling with other definitions (#4489)
* Align Range/RangeInclusive handling with other definitions

* Split RangeInclusive class

* Rnage -> Range TypeDef

* Correct Range wrappers

* CHANGELOG

* Remove extra Range CHANGELOG entry

* Update CHANGELOG.md
2022-01-24 08:46:35 +02:00
github-actions[bot] b94cf566c9 [CI Skip] release/beta 7.5.2-0
skip-checks: true
2022-01-24 06:23:53 +00:00
Jaco ff24cec841 Dedupe WrapperOpaque classes (#4479)
* Dedupe WrapperOpaque classes

* Keep WrapperOpaque in own file
2022-01-24 08:13:08 +02:00
282 changed files with 39318 additions and 18111 deletions
+8 -2
View File
@@ -1,4 +1,4 @@
39 40
1.4.2 1.4.2
1.6.2 1.6.2
@@ -47,4 +47,10 @@
6.10.2 6.10.2
6.10.3 6.10.3
7.0.2 7.0.2
7.14.2
7.14.3
8.0.2
8.3.2
8.4.2
+16
View File
@@ -0,0 +1,16 @@
name: bot
on:
pull_request:
types: [labeled]
jobs:
approve:
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository)"
runs-on: ubuntu-latest
steps:
- uses: jacogr/action-approve@master
with:
authors: jacogr
labels: -auto
token: ${{ secrets.GH_PAT_BOT }}
+16
View File
@@ -0,0 +1,16 @@
name: bot
on:
pull_request:
types: [labeled]
jobs:
merge:
runs-on: ubuntu-latest
steps:
- uses: jacogr/action-merge@master
with:
checks: build,lint,test
labels: -auto
strategy: squash
token: ${{ secrets.GH_PAT_BOT }}
+2
View File
@@ -7,6 +7,8 @@ on:
jobs: jobs:
lock: lock:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
steps: steps:
- uses: dessant/lock-threads@v2 - uses: dessant/lock-threads@v2
with: with:
+2
View File
@@ -8,6 +8,8 @@ jobs:
step: ['lint', 'test', 'build'] step: ['lint', 'test', 'build']
name: ${{ matrix.step }} name: ${{ matrix.step }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: ${{ matrix.step }} - name: ${{ matrix.step }}
+6 -5
View File
@@ -12,17 +12,18 @@ jobs:
step: ['build:release'] step: ['build:release']
name: ${{ matrix.step }} name: ${{ matrix.step }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
GH_PAT: ${{ secrets.GH_PAT }}
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
fetch-depth: 0 fetch-depth: 0
token: ${{ secrets.GH_PAT }} token: ${{ secrets.GH_PAT }}
- name: ${{ matrix.step }} - name: ${{ matrix.step }}
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
GH_PAT: ${{ secrets.GH_PAT }}
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: | run: |
yarn install --immutable | grep -v 'YN0013' yarn install --immutable | grep -v 'YN0013'
yarn ${{ matrix.step }} yarn ${{ matrix.step }}
+2
View File
@@ -9,6 +9,8 @@ jobs:
check: check:
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository)" if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository)"
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: returntocorp/semgrep-action@v1 - uses: returntocorp/semgrep-action@v1
+2
View File
@@ -6,6 +6,8 @@ on:
jobs: jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
steps: steps:
- uses: actions/stale@v3 - uses: actions/stale@v3
with: with:
+3
View File
@@ -1,11 +1,14 @@
_book/ _book/
build/ build/
build-cjs/
build-esm/
build-docs/ build-docs/
coverage/ coverage/
docs/.vuepress/dist/ docs/.vuepress/dist/
docs/substrate/*.md docs/substrate/*.md
node_modules/ node_modules/
tmp/ tmp/
NOTES.md
.DS_Store .DS_Store
.env.local .env.local
.env.development.local .env.development.local
-768
View File
File diff suppressed because one or more lines are too long
+785
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -10,4 +10,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs - path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version" spec: "@yarnpkg/plugin-version"
yarnPath: .yarn/releases/yarn-3.1.1.cjs yarnPath: .yarn/releases/yarn-3.2.0.cjs
+294
View File
@@ -1,5 +1,299 @@
# CHANGELOG # CHANGELOG
## 8.5.1 May 22, 2022
Contributed:
- Bump `@substrate/connect` to 0.7.5 (Thanks to https://github.com/wirednkod)
Changes:
- Adjust extrinsic inspect for signed/unsigned
- Add support for `mmr_generateBatchProof` RPC
- Add additional `isCodec` checks to error/event `.is`
- Add support for `Vec<Option<X>>` in typegen
- Update to latest Substrate, Kusama & Polkadot static metadata
## 8.4.2 May 15, 2022
Changes:
- Expand/fix TS typings for `MortalEra.{birth, death}(...)`
## 8.4.1 May 14, 2022
Changes:
- Added support for typegen over `Range/RangeInclusive` types
- Add explicit support for `Call` typegen (inclusive of non-defaults)
- Deupe `wss://` handling in `polkadot-types-from-{chain, defs}`
- Allow for optional `definitions.ts` in typegen (only use chain)
- Optimize `Compact<*>` decoding in Uint8Array streams
- Use `I*` interfaces for extrinsic payload getters
- Re-add support for historic linked-map queries
- Update to latest Substrate, Kusama & Polkadot static metadata
- Add latest upgrade blocks for Polkadot, Kusama & Westend
## 8.3.2 May 8, 2022
Contributed:
- Bump `@substrate/connect` to 0.7.4 (Thanks to https://github.com/wirednkod)
Changes:
- Adjust `BTreeSet` in typegen top-level generation
## 8.3.1 May 1, 2022
Contributed:
- Fetch metadata via WS for `types-from-defs` (Thanks to https://github.com/alex-nax)
Changes:
- Extract metadata v14 `BTreeSet` types into correct type
- Assert to ensure that `[u8; <size>]` has exact sizes (non-u8a inputs)
- Adjust `tx.paymentInfo` signing process for existing signature
- Add Kusama 9190 upgrade block
- Add Westend 9200 upgrade block
- Update to latest Substrate, Kusama & Polkadot static metadata
## 8.2.1 Apr 24, 2022
Contributed:
- Make WS timeout check configurable (Thanks to https://github.com/isSerge)
Changes:
- Don't fake signature for `paymentInfo` if already signed
- Remove `api.derive.balances.fees` (use direct constants as applicable)
- Add Westend 9190 upgrade block
- Update to latest Substrate, Kusama & Polkadot static metadata
## 8.1.1 Apr 17, 2022
Contributed:
- Adjust typegen for `Vec<{ struct: <type> }>` (Thanks to https://github.com/zannis)
- Adjust typegen __dirname for ESM (Thanks to https://github.com/drewstone)
Changes:
- Fix `entriesPaged` where no `at?: BlockHash` is specified
- Apply windcard matches for `democracy::vote::Vote` and `identity::type::Data`
- Adjust default "no RPC response" timeout to 60s
- Update to latest Substrate, Kusama & Polkadot static metadata
## 8.0.2 Apr 11, 2022
Changes:
- Detect typegen template location for commonjs execution
## 8.0.1 Apr 10, 2022
- **Breaking change** In this major version the commonjs outputs are moved to a sub-folder. Since the export map and main field in package.json does reflect this change, there should be no usage changes. However the packages here will all need to be on the same version for internal linkage.
Contributed:
- Improve `rpc-provider` README (Thanks to https://github.com/josepot)
- Add handling for `Vec<[<Type>;<length>]>` in typegen (Thanks to https://github.com/zannis)
Changes:
- Add support for `apiAt.tx(...)` to construct at a specific point
- Add basic `api.derive.bagsList.*` support
- Return sorted names for `api.registry.lookup.names`
- Optimize JSONRPC requests/response handling
- Output commonjs files under the `cjs/**` root
- Update to latest Substrate, Kusama & Polkadot static metadata
- Add latest Polkadot 9180 upgrade block
- Update to `@polkadot/util` 9.0.1
## 7.15.1 Apr 3, 2022
Contributed:
- Export `WellKnownChain` for `substrate-connect` (Thanks to https://github.com/josepot)
- Add support for `{entries, keys}Paged` in `.at` (Thanks to https://github.com/xlc)
- Align `WeightsPerClass` interface on `maxExtrinsic` (Thanks to https://github.com/HackFisher)
Changes:
- Cater for `DispatchError` with `error` as `[u8; 4]`
- Add in-flight cache for parallel same-version metadata queries
- Cater for lazy `@polkadot/util-crypto` init (adjustment for React Native)
- Update to latest Substrate, Kusama & Polkadot static metadata
- Update latest Westend & Kusama (up to 9180) upgrade blocks
## 7.14.3 Mar 28, 2022
Changes:
- Ensure `BitVec` with MSB does not fail (used in Polkadot `DeliveredMessages`)
## 7.14.2 Mar 28, 2022
Changes:
- Don't export `ScProvider` top-level in `@polkadot/rpc-provider`
## 7.14.1 Mar 27, 2022
Contributed:
- Add `ScProvider` for `@substrate/substrate-connect` (Thanks to https://github.com/josepot)
- Add support for `BTree{Map, Set}` in typegen (Thanks to https://github.com/CertainLach)
Changes:
- Only explicitly support LSB on `BitVec` types
- Change `toHuman()` on `BitVec` to output default LSB
- Add `bytes{Sent, Recv}` to provider stats
- Clear connection timout on provider `disconnect()`
- Add support for `dev_getBlockStats` RPC
## 7.13.1 Mar 19, 2022
**Important** This contains an upgraded version of `@polkadot/wasm-crypto`. For users of asm.js, e.g. React Native, there are some additional upgrade instructions in the release notes for this version https://github.com/polkadot-js/wasm/releases/tag/v5.0.1
Contributed:
- Expose custom RPC error details (Thanks to https://github.com/intendednull)
- Improve custom RPC error typings (Thanks to https://github.com/MOZGIII)
Changes:
- Support for rejection of hanging RPC requests (30s timeout)
- Add `.stats` to provider interfaces with running counters
- Add support for `state_trieMigrationStatus` RPC
- Update to latest Substrate, Kusama & Polkadot static metadata
- Update to `@polkadot/util` 8.6.1
- Additional workaround for Vite bundling
## 7.12.1 Mar 13, 2022
Changes:
- Allow for correct handling of `Option<Null>` types
- Adjust for bundlers where `import.meta.url` is undefined
- Update to `@polkadot/util` 8.5.1
## 7.11.1 Mar 6, 2022
Changes:
- Chunk derive retrieval of `era{Exposure, Prefs, Slashes}`
- Ensure that signer (passed via options) do get updated
- Kusama & Polkadot 9170 upgrade blocks
- Update to latest Substrate, Kusama & Polkadot static metadata
- Adjustments for TypeScript 7.6.2
## 7.10.1 Feb 27, 2022
Contributed:
- Ensure `updateId` is correct in signer callbacks (Thanks to https://github.com/coolcorexix)
Changes:
- Ensure `BTreeSet` has the correct decoded length
- Attach `PortableRegistry` at point of metadata set
- Add `derive.chain.getBlockByNumber`
- Retrieve named reserves in `derive.balances.all`
- Ensure `v13 -> v14` metadata conversion attaches primitives
- Update to latest Substrate, Kusama & Polkadot static metadata
## 7.9.1 Feb 20, 2022
Contributed:
- Support historic queries via blockNumber (Thanks to https://github.com/stwiname)
Changes:
- Align `grandpa_proveFinality` with Substrate
- Allow for derive augmentation (swap base type to interfaces)
- Kusama 9160 upgrade block
- Update to latest Substrate, Kusama & Polkadot static metadata
## 7.8.1 Feb 14, 2022
Contributed:
- Add `isHistoric` flag to ETH RPCs (Thanks to https://github.com/stwiname)
- Align contract instantiate types with Substrate (Thanks to https://github.com/kwingram25)
Changes:
- Adjust map header output type with lookup id
- Re-enable all `BitVec` tests for `toU8a`
- Expose `txIndex` as event index on extrinsic results
- Allow inspection of Codec encoding (experimental)
- Allow inspection of storage key encoding (experimental)
- Update to latest Substrate, Kusama & Polkadot static metadata
- Update `@polkadot/util` to 8.4.1
## 7.7.1 Feb 6, 2022
Upgrade priority: Low. Recommended for users with long-running scripts.
Contributed:
- Fix rpc-provider LRU memory leak (Thanks to https://github.com/gdethier)
Changes:
- Don't warn on `Lookup*` types missing (these are resolvable)
- Don't clear injected `PortableRegistry` types on runtime upgrade
- Clear warning for `Call`/`Event` on non-meta v14 runtimes
- Add `beefy_getFinalizedHead` RPC support
- Update to latest Substrate, Kusama & Polkadot static metadata
## 7.6.1 Jan 30, 2022
Upgdare priority: Low. Recommended for users with long-running scripts and those chains based around the latest Substrate master versions.
Contributed:
- Fix memory leak on `.raw` RPC calls (Thanks to https://github.com/r0t0r-r0t0r)
Changes:
- Adjust extraction of `Call` & `Event` types for metadata v14
- Adjust historic `WinningData` and `SlotRange` types (36-entry variant)
- Emit `decorated` event on API on metadata decoration
- Dedupe and extend `WrapperKeepOpaque/WrapperOpaque`
- Align `Range/RangeInclusive` usage with similar types
- Adjust bounty derive, return empty on no `{treasury, bounties}.bounties`
- Ensure handling of all `TypeDefInfo` keys in extraction
- Add support for `rpc.contracts.uploadCode`
- Workaround for generators where `#private = { this... }` yields undefined
- Update to latest Substrate, Kusama & Polkadot static metadata
## 7.5.1 Jan 23, 2022 ## 7.5.1 Jan 23, 2022
Upgrade priority: Low. Recommended for users of the latest contract pallet and ink! versions. Upgrade priority: Low. Recommended for users of the latest contract pallet and ink! versions.
+16 -5
View File
@@ -1,26 +1,29 @@
2782 Jaco 7.5.1 (#4492) 2966 Jaco 8.5.1 (#4847)
83 Amaury Martiny StatementKind: Regular and Saft (#2303) 83 Amaury Martiny StatementKind: Regular and Saft (#2303)
36 Keith Ingram Storage deposit limit changes (#4370) 37 Keith Ingram Update contract types and rpc (#4541)
35 Stefanie Doll Updated child storage parameters (#1709) 35 Stefanie Doll Updated child storage parameters (#1709)
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970) 20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
16 Xiliang Chen implement entriesPaged and keysPages for query at (#4701)
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054) 15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
15 Xiliang Chen add Authority origin (#3645)
11 Ian He HttpProvider support clone() (#3949) 11 Ian He HttpProvider support clone() (#3949)
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954) 10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
5 Chevdor Fix metadata package link (#3458) 5 Chevdor Fix metadata package link (#3458)
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250) 5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
4 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
4 Alex Wang fix issue that creates duplicate providers (#983) 4 Alex Wang fix issue that creates duplicate providers (#983)
4 Alexander Popiak Add asset id in signing (#4009) 4 Alexander Popiak Add asset id in signing (#4009)
4 Joshy Orndorff spelling; efect -> effect (#2295) 4 Joshy Orndorff spelling; efect -> effect (#2295)
4 Nantian fix bigint type (#3869) 4 Nantian fix bigint type (#3869)
4 Nikos Kontakis Update substrate connect to 0.7.5 (#4835)
4 Scott Twiname Add support for historical BlockNumber rpc methods (#4574)
4 Thibaut Sardan no subscription for http (#3127) 4 Thibaut Sardan no subscription for http (#3127)
3 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
3 André Silva add support for ValidationCodeHash (#3640) 3 André Silva add support for ValidationCodeHash (#3640)
3 Antoine Estienne Adapted to display moonbeam author (#3108) 3 Antoine Estienne Adapted to display moonbeam author (#3108)
3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707) 3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707)
3 Ewa Kowalska Handle no council for bounties proposals (#3062) 3 Ewa Kowalska Handle no council for bounties proposals (#3062)
3 hamidra add support for n key entries for NMaps (#3886) 3 hamidra add support for n key entries for NMaps (#3886)
3 Hamza Tokuchi more typos (#2532) 3 Hamza Tokuchi more typos (#2532)
3 Josep M Sobrepere docs: improve rpc-provider README (#4719)
3 Julien Eluard Fixed typos about module balances (#1402) 3 Julien Eluard Fixed typos about module balances (#1402)
3 KarishmaBothara Backward compatibility thing (#3511) 3 KarishmaBothara Backward compatibility thing (#3511)
3 Miguel Hervas Adding RT4 Types (#3007) 3 Miguel Hervas Adding RT4 Types (#3007)
@@ -29,19 +32,22 @@
2 Alexander Krupenkin Add [u8; 33] type width for U8aFixed type (#2391) 2 Alexander Krupenkin Add [u8; 33] type width for U8aFixed type (#2391)
2 Branan Riley Add proxy type for Centrifuge (#3940) 2 Branan Riley Add proxy type for Centrifuge (#3940)
2 Caio Add `Range` and `RangeInclusive` types (#3791) 2 Caio Add `Range` and `RangeInclusive` types (#3791)
2 HackFisher Update maxExtrinsic definition (#4703)
2 Jakub Pánik All heads subscription (#1899) 2 Jakub Pánik All heads subscription (#1899)
2 James Lefrère Add `.eq()` usage to docs and fix docs typos (#1405) 2 James Lefrère Add `.eq()` usage to docs and fix docs typos (#1405)
2 Keith Yeung Allow keyPrefix to accept an additional argument for double maps (#2230) 2 Keith Yeung Allow keyPrefix to accept an additional argument for double maps (#2230)
2 Nikos Kontakis Add auction in shared types (#4085) 2 MOZGIII Follow-up fix after #4665 (#4666)
2 Paweł Nguyen Fix a minor typo in cookbook blocks docs (#2294) 2 Paweł Nguyen Fix a minor typo in cookbook blocks docs (#2294)
2 sung wu Update tx.md (#2485) 2 sung wu Update tx.md (#2485)
2 Veliko Abi constructor takes different parameters (#3347) 2 Veliko Abi constructor takes different parameters (#3347)
2 Wei Tang Use /usr/bin/env bash instead of /bin/bash (#2053) 2 Wei Tang Use /usr/bin/env bash instead of /bin/bash (#2053)
2 Zannis Kalampoukis fix: Typegen handles structs and vectors of structs without erroring (#4743)
2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594) 2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594)
1 Andreea Eftene Add storage deposit support (#4304) 1 Andreea Eftene Add storage deposit support (#4304)
1 Brad Larson [NEW] Support for custom headers with providers (#2423) 1 Brad Larson [NEW] Support for custom headers with providers (#2423)
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 Dan Forbes Add WeightToFeeCoefficient type (#2296) 1 Dan Forbes Add WeightToFeeCoefficient type (#2296)
1 Daniel Maricic Fixed typo in README (#2402) 1 Daniel Maricic Fixed typo in README (#2402)
1 Daniel Savu fix: Generate custom type definitions (#4224) 1 Daniel Savu fix: Generate custom type definitions (#4224)
@@ -52,6 +58,7 @@
1 Dylan Galea Updated users of the polkadot-js/api (#2027) 1 Dylan Galea Updated users of the polkadot-js/api (#2027)
1 flex Change BeefySignedCommitment signatures type to EcdsaSignature (#4204) 1 flex Change BeefySignedCommitment signatures type to EcdsaSignature (#4204)
1 Furqan A fix: fixed 404 to the docs from the api readme (#3985) 1 Furqan A fix: fixed 404 to the docs from the api readme (#3985)
1 Gérard Dethier Fix LRUCache memory leak. (#4520)
1 Gerben van de Wiel Adding some extra notes on changes in the specname (#2329) 1 Gerben van de Wiel Adding some extra notes on changes in the specname (#2329)
1 HackFisher fix OutboundLaneData types (#3992) 1 HackFisher fix OutboundLaneData types (#3992)
1 Hoani Bryson Multiple Endpoint support for WsProvider (#2234) 1 Hoani Bryson Multiple Endpoint support for WsProvider (#2234)
@@ -75,18 +82,22 @@
1 Nazar Mokrynskyi Performance tweaks (#4143) 1 Nazar Mokrynskyi Performance tweaks (#4143)
1 Nikhil Ranjan add vestingPerBlock and vestingEndBlock in DeriveBalancesAll when doing calcBalances (#2563) 1 Nikhil Ranjan add vestingPerBlock and vestingEndBlock in DeriveBalancesAll when doing calcBalances (#2563)
1 Nikolay Volf Fix typo (#1730) 1 Nikolay Volf Fix typo (#1730)
1 Noah Corona Add rpc error fields (#4637)
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 qiuhao update DeriveCustom type (#2581) 1 qiuhao update DeriveCustom type (#2581)
1 r0t0r-r0t0r Fix memory leak on raw rpc call (#4505)
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)
1 Satyam Agrawal update as per the 0.97.0-beta.38 release (#1617) 1 Satyam Agrawal update as per the 0.97.0-beta.38 release (#1617)
1 Sean Young Solang requires u256 and i256 types (#2752) 1 Sean Young Solang requires u256 and i256 types (#2752)
1 serge make WS provider timeout configurable (#4758)
1 Sergei Pepyakin INK! -> ink! (#1347) 1 Sergei Pepyakin INK! -> ink! (#1347)
1 WoeOm adapt Darwinia, Crab Network types (#3498) 1 WoeOm adapt Darwinia, Crab Network types (#3498)
1 Xat_MassacrE Fix packages/types/src/codec/utils/encodeTypes.ts encodeSubTypes bug (#1544) 1 Xat_MassacrE Fix packages/types/src/codec/utils/encodeTypes.ts encodeSubTypes bug (#1544)
1 Yaroslav Bolyukin Support BTreeMap/BTreeSet in typegen (#4682)
1 yjh fix MetadataVersioned.asV12 (#2983) 1 yjh fix MetadataVersioned.asV12 (#2983)
1 Yuri fixes #3693 Fix uniques return types (#3694) 1 Yuri fixes #3693 Fix uniques return types (#3694)
1 Zeke Mostov fix: Allow sudo for polkadot indexed proxy enum (#3286) 1 Zeke Mostov fix: Allow sudo for polkadot indexed proxy enum (#3286)
-14
View File
@@ -14,17 +14,3 @@ If you are an existing user, please be sure to track the [CHANGELOG](CHANGELOG.m
## tutorials ## tutorials
Looking for tutorials to get started? Look at [examples](https://polkadot.js.org/docs/api/examples/promise/) for guides on how to use the API to make queries and submit transactions. Looking for tutorials to get started? Look at [examples](https://polkadot.js.org/docs/api/examples/promise/) for guides on how to use the API to make queries and submit transactions.
## overview
The API is split up into a number of internal packages -
- [@polkadot/api](packages/api/) The API library, providing both Promise and RxJS Observable-based interfaces. This is the main user-facing entry point.
- [@polkadot/api-derive](packages/api-derive/) Derived results that are injected into the API, allowing for combinations of various query results (only used internally and exposed on the Api instances via `api.derive.*`)
- [@polkadot/metadata](packages/metadata/) Base extrinsic, storage and constant injectors for injection
- [@polkadot/rpc-core](packages/rpc-core/) Wrapper around all [JSON-RPC methods](https://polkadot.js.org/docs/substrate/rpc) exposed by a Polkadot network client
- [@polkadot/rpc-provider](packages/rpc-provider/) Providers for connecting to nodes, including WebSockets and Http
Type definitions for interfaces as exposed by Polkadot & Substrate clients -
- [@polkadot/types](packages/types/) Codecs for all Polkadot and Substrate primitives
+9 -9
View File
@@ -2,8 +2,8 @@
"author": "Jaco Greeff <jacogr@gmail.com>", "author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/api/issues", "bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api#readme", "homepage": "https://github.com/polkadot-js/api#readme",
"license": "Apache-2", "license": "Apache-2.0",
"packageManager": "yarn@3.0.1", "packageManager": "yarn@3.2.0",
"private": true, "private": true,
"repository": { "repository": {
"type": "git", "type": "git",
@@ -11,7 +11,7 @@
}, },
"sideEffects": false, "sideEffects": false,
"type": "commonjs", "type": "commonjs",
"version": "7.5.1", "version": "8.5.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.16.12", "@babel/core": "^7.18.0",
"@babel/register": "^7.16.9", "@babel/register": "^7.17.7",
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.18.0",
"@polkadot/dev": "^0.65.43", "@polkadot/dev": "^0.66.28",
"@polkadot/typegen": "workspace:packages/typegen", "@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^27.4.0", "@types/jest": "^27.5.1",
"copyfiles": "^2.4.1" "copyfiles": "^2.4.1"
}, },
"resolutions": { "resolutions": {
"typescript": "^4.5.5" "typescript": "^4.6.4"
} }
} }
+11 -8
View File
@@ -20,15 +20,18 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "7.5.1", "version": "8.5.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.18.0",
"@polkadot/api-base": "7.5.1", "@polkadot/api-base": "8.5.1",
"@polkadot/rpc-augment": "7.5.1", "@polkadot/rpc-augment": "8.5.1",
"@polkadot/types": "7.5.1", "@polkadot/types": "8.5.1",
"@polkadot/types-augment": "7.5.1", "@polkadot/types-augment": "8.5.1",
"@polkadot/types-codec": "7.5.1", "@polkadot/types-codec": "8.5.1",
"@polkadot/util": "^8.3.3" "@polkadot/util": "^9.2.1"
},
"devDependencies": {
"@polkadot/types-support": "8.5.1"
} }
} }
+147 -88
View File
@@ -2,7 +2,7 @@
/* eslint-disable */ /* eslint-disable */
import type { ApiTypes } from '@polkadot/api-base/types'; import type { ApiTypes } from '@polkadot/api-base/types';
import type { Bytes, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Codec } from '@polkadot/types-codec/types'; import type { Codec } from '@polkadot/types-codec/types';
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime'; import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup'; import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
@@ -63,58 +63,6 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
bagsList: {
/**
* The list of thresholds separating the various bags.
*
* Ids are separated into unsorted bags according to their vote weight. This specifies the
* thresholds separating the bags. An id's bag is the largest bag for which the id's weight
* is less than or equal to its upper threshold.
*
* When ids are iterated, higher bags are iterated completely before lower bags. This means
* that iteration is _semi-sorted_: ids of higher weight tend to come before ids of lower
* weight, but peer ids within a particular bag are sorted in insertion order.
*
* # Expressing the constant
*
* This constant must be sorted in strictly increasing order. Duplicate items are not
* permitted.
*
* There is an implied upper limit of `VoteWeight::MAX`; that value does not need to be
* specified within the bag. For any two threshold lists, if one ends with
* `VoteWeight::MAX`, the other one does not, and they are otherwise equal, the two lists
* will behave identically.
*
* # Calculation
*
* It is recommended to generate the set of thresholds in a geometric series, such that
* there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *
* constant_ratio).max(threshold[k] + 1)` for all `k`.
*
* The helpers in the `/utils/frame/generate-bags` module can simplify this calculation.
*
* # Examples
*
* - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and
* iteration is strictly in insertion order.
* - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to
* the procedure given above, then the constant ratio is equal to 2.
* - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to
* the procedure given above, then the constant ratio is approximately equal to 1.248.
* - If the threshold list begins `[1, 2, 3, ...]`, then an id with weight 0 or 1 will fall
* into bag 0, an id with weight 2 will fall into bag 1, etc.
*
* # Migration
*
* In the event that this list ever changes, a copy of the old bags list must be retained.
* With that `List::migrate` can be called, which will perform the appropriate migration.
**/
bagThresholds: Vec<u64> & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
balances: { balances: {
/** /**
* The minimum amount required to keep an account open. * The minimum amount required to keep an account open.
@@ -135,11 +83,6 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec; [key: string]: Codec;
}; };
bounties: { bounties: {
/**
* Percentage of the curator fee that will be reserved upfront as deposit for bounty
* curator.
**/
bountyCuratorDeposit: Permill & AugmentedConst<ApiType>;
/** /**
* The amount held on deposit for placing a bounty proposal. * The amount held on deposit for placing a bounty proposal.
**/ **/
@@ -156,6 +99,21 @@ declare module '@polkadot/api-base/types/consts' {
* Minimum value for a bounty. * Minimum value for a bounty.
**/ **/
bountyValueMinimum: u128 & AugmentedConst<ApiType>; bountyValueMinimum: u128 & AugmentedConst<ApiType>;
/**
* Maximum amount of funds that should be placed in a deposit for making a proposal.
**/
curatorDepositMax: Option<u128> & AugmentedConst<ApiType>;
/**
* Minimum amount of funds that should be placed in a deposit for making a proposal.
**/
curatorDepositMin: Option<u128> & AugmentedConst<ApiType>;
/**
* The curator deposit is calculated as a percentage of the curator fee.
*
* This deposit has optional upper and lower bounds with `CuratorDepositMax` and
* `CuratorDepositMin`.
**/
curatorDepositMultiplier: Permill & AugmentedConst<ApiType>;
/** /**
* The amount held on deposit per byte within the tip report reason or bounty description. * The amount held on deposit per byte within the tip report reason or bounty description.
**/ **/
@@ -171,6 +129,20 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
childBounties: {
/**
* Minimum value for a child-bounty.
**/
childBountyValueMinimum: u128 & AugmentedConst<ApiType>;
/**
* Maximum number of child bounties that can be added to a parent bounty.
**/
maxActiveChildBountyCount: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
claims: { claims: {
prefix: Bytes & AugmentedConst<ApiType>; prefix: Bytes & AugmentedConst<ApiType>;
/** /**
@@ -261,19 +233,25 @@ declare module '@polkadot/api-base/types/consts' {
}; };
electionProviderMultiPhase: { electionProviderMultiPhase: {
/** /**
* Maximum length (bytes) that the mined solution should consume. * The minimum amount of improvement to the solution score that defines a solution as
* * "better" in the Signed phase.
* The miner will ensure that the total length of the unsigned solution will not exceed
* this value.
**/ **/
minerMaxLength: u32 & AugmentedConst<ApiType>; betterSignedThreshold: Perbill & AugmentedConst<ApiType>;
/** /**
* Maximum weight that the miner should consume. * The minimum amount of improvement to the solution score that defines a solution as
* * "better" in the Unsigned phase.
* The miner will ensure that the total weight of the unsigned solution will not exceed
* this value, based on [`WeightInfo::submit_unsigned`].
**/ **/
minerMaxWeight: u64 & AugmentedConst<ApiType>; betterUnsignedThreshold: Perbill & AugmentedConst<ApiType>;
/**
* The maximum number of electable targets to put in the snapshot.
**/
maxElectableTargets: u16 & AugmentedConst<ApiType>;
/**
* The maximum number of electing voters to put in the snapshot. At the moment, snapshots
* are only over a single block, but once multi-block elections are introduced they will
* take place over multiple blocks.
**/
maxElectingVoters: u32 & AugmentedConst<ApiType>;
/** /**
* The priority of the unsigned transaction submitted in the unsigned-phase * The priority of the unsigned transaction submitted in the unsigned-phase
**/ **/
@@ -297,6 +275,10 @@ declare module '@polkadot/api-base/types/consts' {
* Per-weight deposit for a signed solution. * Per-weight deposit for a signed solution.
**/ **/
signedDepositWeight: u128 & AugmentedConst<ApiType>; signedDepositWeight: u128 & AugmentedConst<ApiType>;
/**
* The maximum amount of unchecked solutions to refund the call fee for.
**/
signedMaxRefunds: u32 & AugmentedConst<ApiType>;
/** /**
* Maximum number of signed submissions that can be queued. * Maximum number of signed submissions that can be queued.
* *
@@ -310,7 +292,9 @@ declare module '@polkadot/api-base/types/consts' {
/** /**
* Maximum weight of a signed solution. * Maximum weight of a signed solution.
* *
* This should probably be similar to [`Config::MinerMaxWeight`]. * If [`Config::MinerConfig`] is being implemented to submit signed solutions (outside of
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
* this value.
**/ **/
signedMaxWeight: u64 & AugmentedConst<ApiType>; signedMaxWeight: u64 & AugmentedConst<ApiType>;
/** /**
@@ -321,24 +305,10 @@ declare module '@polkadot/api-base/types/consts' {
* Base reward for a signed solution * Base reward for a signed solution
**/ **/
signedRewardBase: u128 & AugmentedConst<ApiType>; signedRewardBase: u128 & AugmentedConst<ApiType>;
/**
* The minimum amount of improvement to the solution score that defines a solution as
* "better" (in any phase).
**/
solutionImprovementThreshold: Perbill & AugmentedConst<ApiType>;
/** /**
* Duration of the unsigned phase. * Duration of the unsigned phase.
**/ **/
unsignedPhase: u32 & AugmentedConst<ApiType>; unsignedPhase: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of voters to put in the snapshot. At the moment, snapshots are only
* over a single block, but once multi-block elections are introduced they will take place
* over multiple blocks.
*
* Also, note the data type: If the voters are represented by a `u32` in `type
* CompactSolution`, the same `u32` is used here to ensure bounds are respected.
**/
voterSnapshotPerBlock: u32 & AugmentedConst<ApiType>;
/** /**
* Generic const * Generic const
**/ **/
@@ -485,6 +455,24 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
nominationPools: {
/**
* The minimum pool points-to-balance ratio that must be maintained for it to be `open`.
* This is important in the event slashing takes place and the pool's points-to-balance
* ratio becomes disproportional.
* For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1.
* Such a scenario would also be the equivalent of the pool being 90% slashed.
**/
minPointsToBalance: u32 & AugmentedConst<ApiType>;
/**
* The nomination pool's pallet id.
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
paras: { paras: {
unsignedPriority: u64 & AugmentedConst<ApiType>; unsignedPriority: u64 & AugmentedConst<ApiType>;
/** /**
@@ -592,8 +580,13 @@ declare module '@polkadot/api-base/types/consts' {
friendDepositFactor: u128 & AugmentedConst<ApiType>; friendDepositFactor: u128 & AugmentedConst<ApiType>;
/** /**
* The maximum amount of friends allowed in a recovery configuration. * The maximum amount of friends allowed in a recovery configuration.
*
* NOTE: The threshold programmed in this Pallet uses u16, so it does
* not really make sense to have a limit here greater than u16::MAX.
* But also, that is a lot more than you should probably set this value
* to anyway...
**/ **/
maxFriends: u16 & AugmentedConst<ApiType>; maxFriends: u32 & AugmentedConst<ApiType>;
/** /**
* The base amount of currency needed to reserve for starting a recovery. * The base amount of currency needed to reserve for starting a recovery.
* *
@@ -703,6 +696,9 @@ declare module '@polkadot/api-base/types/consts' {
* Number of eras that staked funds must remain bonded for. * Number of eras that staked funds must remain bonded for.
**/ **/
bondingDuration: u32 & AugmentedConst<ApiType>; bondingDuration: u32 & AugmentedConst<ApiType>;
/**
* Maximum number of nominations per nominator.
**/
maxNominations: u32 & AugmentedConst<ApiType>; maxNominations: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum number of nominators rewarded for each validator. * The maximum number of nominators rewarded for each validator.
@@ -711,6 +707,11 @@ declare module '@polkadot/api-base/types/consts' {
* claim their reward. This used to limit the i/o cost for the nominator payout. * claim their reward. This used to limit the i/o cost for the nominator payout.
**/ **/
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>; maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively
* determines how many unique eras a staker may be unbonding in.
**/
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
/** /**
* Number of sessions per era. * Number of sessions per era.
**/ **/
@@ -803,6 +804,10 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec; [key: string]: Codec;
}; };
transactionPayment: { transactionPayment: {
/**
* The polynomial that is applied in order to derive fee from length.
**/
lengthToFee: Vec<FrameSupportWeightsWeightToFeeCoefficient> & AugmentedConst<ApiType>;
/** /**
* A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their * A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their
* `priority` * `priority`
@@ -827,10 +832,6 @@ declare module '@polkadot/api-base/types/consts' {
* transactions. * transactions.
**/ **/
operationalFeeMultiplier: u8 & AugmentedConst<ApiType>; operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
/**
* The fee to be paid for making a transaction; the per-byte portion.
**/
transactionByteFee: u128 & AugmentedConst<ApiType>;
/** /**
* The polynomial that is applied in order to derive fee from weight. * The polynomial that is applied in order to derive fee from weight.
**/ **/
@@ -847,6 +848,8 @@ declare module '@polkadot/api-base/types/consts' {
burn: Permill & AugmentedConst<ApiType>; burn: Permill & AugmentedConst<ApiType>;
/** /**
* The maximum number of approvals that can wait in the spending queue. * The maximum number of approvals that can wait in the spending queue.
*
* NOTE: This parameter is also used within the Bounties Pallet extension if enabled.
**/ **/
maxApprovals: u32 & AugmentedConst<ApiType>; maxApprovals: u32 & AugmentedConst<ApiType>;
/** /**
@@ -858,6 +861,10 @@ declare module '@polkadot/api-base/types/consts' {
* An accepted proposal gets these back. A rejected proposal does not. * An accepted proposal gets these back. A rejected proposal does not.
**/ **/
proposalBond: Permill & AugmentedConst<ApiType>; proposalBond: Permill & AugmentedConst<ApiType>;
/**
* Maximum amount of funds that should be placed in a deposit for making a proposal.
**/
proposalBondMaximum: Option<u128> & AugmentedConst<ApiType>;
/** /**
* Minimum amount of funds that should be placed in a deposit for making a proposal. * Minimum amount of funds that should be placed in a deposit for making a proposal.
**/ **/
@@ -892,5 +899,57 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
voterList: {
/**
* The list of thresholds separating the various bags.
*
* Ids are separated into unsorted bags according to their score. This specifies the
* thresholds separating the bags. An id's bag is the largest bag for which the id's score
* is less than or equal to its upper threshold.
*
* When ids are iterated, higher bags are iterated completely before lower bags. This means
* that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower
* score, but peer ids within a particular bag are sorted in insertion order.
*
* # Expressing the constant
*
* This constant must be sorted in strictly increasing order. Duplicate items are not
* permitted.
*
* There is an implied upper limit of `Score::MAX`; that value does not need to be
* specified within the bag. For any two threshold lists, if one ends with
* `Score::MAX`, the other one does not, and they are otherwise equal, the two
* lists will behave identically.
*
* # Calculation
*
* It is recommended to generate the set of thresholds in a geometric series, such that
* there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *
* constant_ratio).max(threshold[k] + 1)` for all `k`.
*
* The helpers in the `/utils/frame/generate-bags` module can simplify this calculation.
*
* # Examples
*
* - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and
* iteration is strictly in insertion order.
* - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to
* the procedure given above, then the constant ratio is equal to 2.
* - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to
* the procedure given above, then the constant ratio is approximately equal to 1.248.
* - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall
* into bag 0, an id with score 2 will fall into bag 1, etc.
*
* # Migration
*
* In the event that this list ever changes, a copy of the old bags list must be retained.
* With that `List::migrate` can be called, which will perform the appropriate migration.
**/
bagThresholds: Vec<u64> & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
} // AugmentedConsts } // AugmentedConsts
} // declare module } // declare module
+193 -19
View File
@@ -78,6 +78,10 @@ declare module '@polkadot/api-base/types/errors' {
* A given equivocation report is valid but already previously reported. * A given equivocation report is valid but already previously reported.
**/ **/
DuplicateOffenceReport: AugmentedError<ApiType>; DuplicateOffenceReport: AugmentedError<ApiType>;
/**
* Submitted configuration is invalid.
**/
InvalidConfiguration: AugmentedError<ApiType>;
/** /**
* An equivocation proof provided as part of an equivocation report is invalid. * An equivocation proof provided as part of an equivocation report is invalid.
**/ **/
@@ -91,24 +95,6 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
bagsList: {
/**
* Id not found in list.
**/
IdNotFound: AugmentedError<ApiType>;
/**
* An Id does not have a greater vote weight than another Id.
**/
NotHeavier: AugmentedError<ApiType>;
/**
* Attempted to place node in front of a node in another bag.
**/
NotInSameBag: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
balances: { balances: {
/** /**
* Beneficiary account must pre-exist * Beneficiary account must pre-exist
@@ -149,7 +135,7 @@ declare module '@polkadot/api-base/types/errors' {
}; };
bounties: { bounties: {
/** /**
* The bounty cannot be closed because it has active child-bounties. * The bounty cannot be closed because it has active child bounties.
**/ **/
HasActiveChildBounty: AugmentedError<ApiType>; HasActiveChildBounty: AugmentedError<ApiType>;
/** /**
@@ -185,6 +171,10 @@ declare module '@polkadot/api-base/types/errors' {
* Require bounty curator. * Require bounty curator.
**/ **/
RequireCurator: AugmentedError<ApiType>; RequireCurator: AugmentedError<ApiType>;
/**
* Too many approvals are already queued.
**/
TooManyQueued: AugmentedError<ApiType>;
/** /**
* The bounty status is unexpected. * The bounty status is unexpected.
**/ **/
@@ -194,6 +184,24 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
childBounties: {
/**
* The bounty balance is not enough to add new child-bounty.
**/
InsufficientBountyBalance: AugmentedError<ApiType>;
/**
* The parent bounty is not in active state.
**/
ParentBountyNotActive: AugmentedError<ApiType>;
/**
* Number of child bounties exceeds limit `MaxActiveChildBountyCount`.
**/
TooManyChildBounties: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
claims: { claims: {
/** /**
* Invalid Ethereum signature. * Invalid Ethereum signature.
@@ -503,6 +511,10 @@ declare module '@polkadot/api-base/types/errors' {
* The call is not allowed at this point. * The call is not allowed at this point.
**/ **/
CallNotAllowed: AugmentedError<ApiType>; CallNotAllowed: AugmentedError<ApiType>;
/**
* The fallback failed
**/
FallbackFailed: AugmentedError<ApiType>;
/** /**
* `Self::insert_submission` returned an invalid index. * `Self::insert_submission` returned an invalid index.
**/ **/
@@ -696,6 +708,10 @@ declare module '@polkadot/api-base/types/errors' {
* The requested maximum message size is 0. * The requested maximum message size is 0.
**/ **/
OpenHrmpChannelZeroMessageSize: AugmentedError<ApiType>; OpenHrmpChannelZeroMessageSize: AugmentedError<ApiType>;
/**
* The provided witness data is wrong.
**/
WrongWitness: AugmentedError<ApiType>;
/** /**
* Generic error * Generic error
**/ **/
@@ -873,7 +889,122 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
nominationPools: {
/**
* An account is already delegating in another pool. An account may only belong to one
* pool at a time.
**/
AccountBelongsToOtherPool: AugmentedError<ApiType>;
/**
* The member is already unbonding in this era.
**/
AlreadyUnbonding: AugmentedError<ApiType>;
/**
* The pools state cannot be changed.
**/
CanNotChangeState: AugmentedError<ApiType>;
/**
* None of the funds can be withdrawn yet because the bonding duration has not passed.
**/
CannotWithdrawAny: AugmentedError<ApiType>;
/**
* Some error occurred that should never happen. This should be reported to the
* maintainers.
**/
DefensiveError: AugmentedError<ApiType>;
/**
* The caller does not have adequate permissions.
**/
DoesNotHavePermission: AugmentedError<ApiType>;
/**
* The member is fully unbonded (and thus cannot access the bonded and reward pool
* anymore to, for example, collect rewards).
**/
FullyUnbonding: AugmentedError<ApiType>;
/**
* The pool has insufficient balance to bond as a nominator.
**/
InsufficientBond: AugmentedError<ApiType>;
/**
* Too many members in the pool or system.
**/
MaxPoolMembers: AugmentedError<ApiType>;
/**
* The system is maxed out on pools.
**/
MaxPools: AugmentedError<ApiType>;
/**
* The member cannot unbond further chunks due to reaching the limit.
**/
MaxUnbondingLimit: AugmentedError<ApiType>;
/**
* Metadata exceeds [`Config::MaxMetadataLen`]
**/
MetadataExceedsMaxLen: AugmentedError<ApiType>;
/**
* The amount does not meet the minimum bond to either join or create a pool.
**/
MinimumBondNotMet: AugmentedError<ApiType>;
/**
* A pool must be in [`PoolState::Destroying`] in order for the depositor to unbond or for
* other members to be permissionlessly unbonded.
**/
NotDestroying: AugmentedError<ApiType>;
/**
* Not enough points. Ty unbonding less.
**/
NotEnoughPointsToUnbond: AugmentedError<ApiType>;
/**
* Either a) the caller cannot make a valid kick or b) the pool is not destroying.
**/
NotKickerOrDestroying: AugmentedError<ApiType>;
/**
* The caller does not have nominating permissions for the pool.
**/
NotNominator: AugmentedError<ApiType>;
/**
* The depositor must be the only member in the bonded pool in order to unbond. And the
* depositor must be the only member in the sub pools in order to withdraw unbonded.
**/
NotOnlyPoolMember: AugmentedError<ApiType>;
/**
* The pool is not open to join
**/
NotOpen: AugmentedError<ApiType>;
/**
* The transaction could not be executed due to overflow risk for the pool.
**/
OverflowRisk: AugmentedError<ApiType>;
/**
* Partial unbonding now allowed permissionlessly.
**/
PartialUnbondNotAllowedPermissionlessly: AugmentedError<ApiType>;
/**
* An account is not a member.
**/
PoolMemberNotFound: AugmentedError<ApiType>;
/**
* A (bonded) pool id does not exist.
**/
PoolNotFound: AugmentedError<ApiType>;
/**
* A reward pool does not exist. In all cases this is a system logic error.
**/
RewardPoolNotFound: AugmentedError<ApiType>;
/**
* A sub pool does not exist.
**/
SubPoolsNotFound: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
paraInclusion: { paraInclusion: {
/**
* Bitfield consists of zeros only.
**/
BitfieldAllZeros: AugmentedError<ApiType>;
/** /**
* Multiple bitfields submitted by same validator or validators out of order by index. * Multiple bitfields submitted by same validator or validators out of order by index.
**/ **/
@@ -953,10 +1084,26 @@ declare module '@polkadot/api-base/types/errors' {
* Scheduled cores out of order. * Scheduled cores out of order.
**/ **/
ScheduledOutOfOrder: AugmentedError<ApiType>; ScheduledOutOfOrder: AugmentedError<ApiType>;
/**
* A different relay parent was provided compared to the on-chain stored one.
**/
UnexpectedRelayParent: AugmentedError<ApiType>;
/** /**
* Candidate submitted but para not scheduled. * Candidate submitted but para not scheduled.
**/ **/
UnscheduledCandidate: AugmentedError<ApiType>; UnscheduledCandidate: AugmentedError<ApiType>;
/**
* Backed candidates are out of order (core index) or contain duplicates.
**/
UnsortedOrDuplicateBackedCandidates: AugmentedError<ApiType>;
/**
* Dispute statement sets are out of order or contain duplicates.
**/
UnsortedOrDuplicateDisputeStatementSet: AugmentedError<ApiType>;
/**
* Validator indices are out of order or contains duplicates.
**/
UnsortedOrDuplicateValidatorIndices: AugmentedError<ApiType>;
/** /**
* The validation data hash does not match expected. * The validation data hash does not match expected.
**/ **/
@@ -983,6 +1130,14 @@ declare module '@polkadot/api-base/types/errors' {
* Disputed candidate that was concluded invalid. * Disputed candidate that was concluded invalid.
**/ **/
CandidateConcludedInvalid: AugmentedError<ApiType>; CandidateConcludedInvalid: AugmentedError<ApiType>;
/**
* A dispute statement was invalid.
**/
DisputeInvalid: AugmentedError<ApiType>;
/**
* The ordering of dispute statements was invalid.
**/
DisputeStatementsUnsortedOrDuplicates: AugmentedError<ApiType>;
/** /**
* The data given to the inherent will result in an overweight block. * The data given to the inherent will result in an overweight block.
**/ **/
@@ -1315,6 +1470,11 @@ declare module '@polkadot/api-base/types/errors' {
* Cannot schedule downgrade of parachain to parathread * Cannot schedule downgrade of parachain to parathread
**/ **/
CannotDowngrade: AugmentedError<ApiType>; CannotDowngrade: AugmentedError<ApiType>;
/**
* Cannot perform a parachain slot / lifecycle swap. Check that the state of both paras are
* correct for the swap to work.
**/
CannotSwap: AugmentedError<ApiType>;
/** /**
* Cannot schedule upgrade of parathread to parachain * Cannot schedule upgrade of parathread to parachain
**/ **/
@@ -1739,6 +1899,10 @@ declare module '@polkadot/api-base/types/errors' {
* No proposal or bounty at that index. * No proposal or bounty at that index.
**/ **/
InvalidIndex: AugmentedError<ApiType>; InvalidIndex: AugmentedError<ApiType>;
/**
* Proposal has not been approved.
**/
ProposalNotApproved: AugmentedError<ApiType>;
/** /**
* Too many approvals in the queue. * Too many approvals in the queue.
**/ **/
@@ -1799,6 +1963,16 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
voterList: {
/**
* A error in the list interface implementation.
**/
List: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
xcmPallet: { xcmPallet: {
/** /**
* The location is invalid since it already has a subscription from us. * The location is invalid since it already has a subscription from us.
@@ -0,0 +1,43 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/api-augment/kusama';
import type { PolkadotRuntimeParachainsUmpPalletEvent, XcmV2TraitsOutcome } from '@polkadot/types/lookup';
import { Metadata, TypeRegistry } from '@polkadot/types';
import metadataStatic from '@polkadot/types-support/metadata/static-kusama';
const registry = new TypeRegistry();
const metadata = new Metadata(registry, metadataStatic);
registry.setMetadata(metadata);
describe('correct types', (): void => {
it('correctly creates XcmV2TraitsOutcome', (): void => {
const test = registry.createType<XcmV2TraitsOutcome>('XcmV2TraitsOutcome', {
Incomplete: [3_000_000_000, 'BadOrigin']
});
expect(test.toHuman()).toEqual({
Incomplete: [
'3,000,000,000',
'BadOrigin'
]
});
expect(test.isIncomplete).toEqual(true);
expect(test.asIncomplete.toHuman()).toEqual([
'3,000,000,000',
'BadOrigin'
]);
});
it('correctly creates PolkadotRuntimeParachainsUmpPalletEvent', (): void => {
const test = registry.createType<PolkadotRuntimeParachainsUmpPalletEvent>('PolkadotRuntimeParachainsUmpPalletEvent', '0x02112233445566778811223344556677881122334455667788112233445566778801005ed0b20000000006');
expect(test.asExecutedUpward[1].asIncomplete.toHuman()).toEqual([
'3,000,000,000',
'BadOrigin'
]);
});
});
+114 -32
View File
@@ -6,35 +6,32 @@ import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32,
import type { ITuple } from '@polkadot/types-codec/types'; import type { ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth'; import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, KusamaRuntimeProxyType, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV1CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup'; import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, KusamaRuntimeProxyType, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
declare module '@polkadot/api-base/types/events' { declare module '@polkadot/api-base/types/events' {
export interface AugmentedEvents<ApiType extends ApiTypes> { export interface AugmentedEvents<ApiType extends ApiTypes> {
auctions: { auctions: {
/** /**
* An auction ended. All funds become unreserved. `[auction_index]` * An auction ended. All funds become unreserved.
**/ **/
AuctionClosed: AugmentedEvent<ApiType, [u32]>; AuctionClosed: AugmentedEvent<ApiType, [u32]>;
/** /**
* An auction started. Provides its index and the block number where it will begin to * An auction started. Provides its index and the block number where it will begin to
* close and the first lease period of the quadruplet that is auctioned. * close and the first lease period of the quadruplet that is auctioned.
* `[auction_index, lease_period, ending]`
**/ **/
AuctionStarted: AugmentedEvent<ApiType, [u32, u32, u32]>; AuctionStarted: AugmentedEvent<ApiType, [u32, u32, u32]>;
/** /**
* A new bid has been accepted as the current winner. * A new bid has been accepted as the current winner.
* `[who, para_id, amount, first_slot, last_slot]`
**/ **/
BidAccepted: AugmentedEvent<ApiType, [AccountId32, u32, u128, u32, u32]>; BidAccepted: AugmentedEvent<ApiType, [AccountId32, u32, u128, u32, u32]>;
/** /**
* Someone attempted to lease the same slot twice for a parachain. The amount is held in reserve * Someone attempted to lease the same slot twice for a parachain. The amount is held in reserve
* but no parachain slot has been leased. * but no parachain slot has been leased.
* `[parachain_id, leaser, amount]`
**/ **/
ReserveConfiscated: AugmentedEvent<ApiType, [u32, AccountId32, u128]>; ReserveConfiscated: AugmentedEvent<ApiType, [u32, AccountId32, u128]>;
/** /**
* Funds were reserved for a winning bid. First balance is the extra amount reserved. * Funds were reserved for a winning bid. First balance is the extra amount reserved.
* Second is the total. `[bidder, extra_reserved, total_amount]` * Second is the total.
**/ **/
Reserved: AugmentedEvent<ApiType, [AccountId32, u128, u128]>; Reserved: AugmentedEvent<ApiType, [AccountId32, u128, u128]>;
/** /**
@@ -43,7 +40,6 @@ declare module '@polkadot/api-base/types/events' {
Unreserved: AugmentedEvent<ApiType, [AccountId32, u128]>; Unreserved: AugmentedEvent<ApiType, [AccountId32, u128]>;
/** /**
* The winning offset was chosen for an auction. This will map into the `Winning` storage map. * The winning offset was chosen for an auction. This will map into the `Winning` storage map.
* `[auction_index, block_number]`
**/ **/
WinningOffset: AugmentedEvent<ApiType, [u32, u32]>; WinningOffset: AugmentedEvent<ApiType, [u32, u32]>;
/** /**
@@ -51,16 +47,6 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
bagsList: {
/**
* Moved an account from one bag to another.
**/
Rebagged: AugmentedEvent<ApiType, [AccountId32, u64, u64]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
balances: { balances: {
/** /**
* A balance was set by root. * A balance was set by root.
@@ -143,9 +129,31 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
childBounties: {
/**
* A child-bounty is added.
**/
Added: AugmentedEvent<ApiType, [u32, u32]>;
/**
* A child-bounty is awarded to a beneficiary.
**/
Awarded: AugmentedEvent<ApiType, [u32, u32, AccountId32]>;
/**
* A child-bounty is cancelled.
**/
Canceled: AugmentedEvent<ApiType, [u32, u32]>;
/**
* A child-bounty is claimed by beneficiary.
**/
Claimed: AugmentedEvent<ApiType, [u32, u32, u128, AccountId32]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
claims: { claims: {
/** /**
* Someone claimed some DOTs. `[who, ethereum_address, amount]` * Someone claimed some DOTs.
**/ **/
Claimed: AugmentedEvent<ApiType, [AccountId32, EthereumAddress, u128]>; Claimed: AugmentedEvent<ApiType, [AccountId32, EthereumAddress, u128]>;
/** /**
@@ -195,23 +203,23 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
AddedToNewRaise: AugmentedEvent<ApiType, [u32]>; AddedToNewRaise: AugmentedEvent<ApiType, [u32]>;
/** /**
* All loans in a fund have been refunded. `[fund_index]` * All loans in a fund have been refunded.
**/ **/
AllRefunded: AugmentedEvent<ApiType, [u32]>; AllRefunded: AugmentedEvent<ApiType, [u32]>;
/** /**
* Contributed to a crowd sale. `[who, fund_index, amount]` * Contributed to a crowd sale.
**/ **/
Contributed: AugmentedEvent<ApiType, [AccountId32, u32, u128]>; Contributed: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
/** /**
* Create a new crowdloaning campaign. `[fund_index]` * Create a new crowdloaning campaign.
**/ **/
Created: AugmentedEvent<ApiType, [u32]>; Created: AugmentedEvent<ApiType, [u32]>;
/** /**
* Fund is dissolved. `[fund_index]` * Fund is dissolved.
**/ **/
Dissolved: AugmentedEvent<ApiType, [u32]>; Dissolved: AugmentedEvent<ApiType, [u32]>;
/** /**
* The configuration to a crowdloan has been edited. `[fund_index]` * The configuration to a crowdloan has been edited.
**/ **/
Edited: AugmentedEvent<ApiType, [u32]>; Edited: AugmentedEvent<ApiType, [u32]>;
/** /**
@@ -219,16 +227,16 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
HandleBidResult: AugmentedEvent<ApiType, [u32, Result<Null, SpRuntimeDispatchError>]>; HandleBidResult: AugmentedEvent<ApiType, [u32, Result<Null, SpRuntimeDispatchError>]>;
/** /**
* A memo has been updated. `[who, fund_index, memo]` * A memo has been updated.
**/ **/
MemoUpdated: AugmentedEvent<ApiType, [AccountId32, u32, Bytes]>; MemoUpdated: AugmentedEvent<ApiType, [AccountId32, u32, Bytes]>;
/** /**
* The loans in a fund have been partially dissolved, i.e. there are some left * The loans in a fund have been partially dissolved, i.e. there are some left
* over child keys that still need to be killed. `[fund_index]` * over child keys that still need to be killed.
**/ **/
PartiallyRefunded: AugmentedEvent<ApiType, [u32]>; PartiallyRefunded: AugmentedEvent<ApiType, [u32]>;
/** /**
* Withdrew full balance of a contributor. `[who, fund_index, amount]` * Withdrew full balance of a contributor.
**/ **/
Withdrew: AugmentedEvent<ApiType, [AccountId32, u32, u128]>; Withdrew: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
/** /**
@@ -523,6 +531,51 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
nominationPools: {
/**
* A member has became bonded in a pool.
**/
Bonded: AugmentedEvent<ApiType, [AccountId32, u32, u128, bool]>;
/**
* A pool has been created.
**/
Created: AugmentedEvent<ApiType, [AccountId32, u32]>;
/**
* A pool has been destroyed.
**/
Destroyed: AugmentedEvent<ApiType, [u32]>;
/**
* A member has been removed from a pool.
*
* The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked).
**/
MemberRemoved: AugmentedEvent<ApiType, [u32, AccountId32]>;
/**
* A payout has been made to a member.
**/
PaidOut: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
/**
* The roles of a pool have been updated to the given new roles. Note that the depositor
* can never change.
**/
RolesUpdated: AugmentedEvent<ApiType, [Option<AccountId32>, Option<AccountId32>, Option<AccountId32>]>;
/**
* The state of a pool has changed
**/
StateChanged: AugmentedEvent<ApiType, [u32, PalletNominationPoolsPoolState]>;
/**
* A member has unbonded from their pool.
**/
Unbonded: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
/**
* A member has withdrawn from their pool.
**/
Withdrawn: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
offences: { offences: {
/** /**
* There is an offence reported of the given `kind` happened at the `session_index` and * There is an offence reported of the given `kind` happened at the `session_index` and
@@ -539,15 +592,15 @@ declare module '@polkadot/api-base/types/events' {
/** /**
* A candidate was backed. `[candidate, head_data]` * A candidate was backed. `[candidate, head_data]`
**/ **/
CandidateBacked: AugmentedEvent<ApiType, [PolkadotPrimitivesV1CandidateReceipt, Bytes, u32, u32]>; CandidateBacked: AugmentedEvent<ApiType, [PolkadotPrimitivesV2CandidateReceipt, Bytes, u32, u32]>;
/** /**
* A candidate was included. `[candidate, head_data]` * A candidate was included. `[candidate, head_data]`
**/ **/
CandidateIncluded: AugmentedEvent<ApiType, [PolkadotPrimitivesV1CandidateReceipt, Bytes, u32, u32]>; CandidateIncluded: AugmentedEvent<ApiType, [PolkadotPrimitivesV2CandidateReceipt, Bytes, u32, u32]>;
/** /**
* A candidate timed out. `[candidate, head_data]` * A candidate timed out. `[candidate, head_data]`
**/ **/
CandidateTimedOut: AugmentedEvent<ApiType, [PolkadotPrimitivesV1CandidateReceipt, Bytes, u32]>; CandidateTimedOut: AugmentedEvent<ApiType, [PolkadotPrimitivesV2CandidateReceipt, Bytes, u32]>;
/** /**
* Generic event * Generic event
**/ **/
@@ -575,12 +628,12 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
NewHeadNoted: AugmentedEvent<ApiType, [u32]>; NewHeadNoted: AugmentedEvent<ApiType, [u32]>;
/** /**
* The given validation code was rejected by the PVF pre-checking vote. * The given validation code was accepted by the PVF pre-checking vote.
* `code_hash` `para_id` * `code_hash` `para_id`
**/ **/
PvfCheckAccepted: AugmentedEvent<ApiType, [H256, u32]>; PvfCheckAccepted: AugmentedEvent<ApiType, [H256, u32]>;
/** /**
* The given validation code was accepted by the PVF pre-checking vote. * The given validation code was rejected by the PVF pre-checking vote.
* `code_hash` `para_id` * `code_hash` `para_id`
**/ **/
PvfCheckRejected: AugmentedEvent<ApiType, [H256, u32]>; PvfCheckRejected: AugmentedEvent<ApiType, [H256, u32]>;
@@ -700,6 +753,10 @@ declare module '@polkadot/api-base/types/events' {
* A proxy was executed correctly, with the given. * A proxy was executed correctly, with the given.
**/ **/
ProxyExecuted: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>; ProxyExecuted: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;
/**
* A proxy was removed.
**/
ProxyRemoved: AugmentedEvent<ApiType, [AccountId32, AccountId32, KusamaRuntimeProxyType, u32]>;
/** /**
* Generic event * Generic event
**/ **/
@@ -782,7 +839,6 @@ declare module '@polkadot/api-base/types/events' {
* A para has won the right to a continuous set of lease periods as a parachain. * A para has won the right to a continuous set of lease periods as a parachain.
* First balance is any extra amount reserved on top of the para's existing deposit. * First balance is any extra amount reserved on top of the para's existing deposit.
* Second balance is the total amount reserved. * Second balance is the total amount reserved.
* `[parachain_id, leaser, period_begin, period_count, extra_reserved, total_amount]`
**/ **/
Leased: AugmentedEvent<ApiType, [u32, AccountId32, u32, u32, u128, u128]>; Leased: AugmentedEvent<ApiType, [u32, AccountId32, u32, u32, u128, u128]>;
/** /**
@@ -920,6 +976,10 @@ declare module '@polkadot/api-base/types/events' {
* An account has unbonded this amount. \[stash, amount\] * An account has unbonded this amount. \[stash, amount\]
**/ **/
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>; Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
* A validator has set their preferences.
**/
ValidatorPrefsSet: AugmentedEvent<ApiType, [AccountId32, PalletStakingValidatorPrefs]>;
/** /**
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance` * An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
* from the unlocking queue. \[stash, amount\] * from the unlocking queue. \[stash, amount\]
@@ -1138,6 +1198,10 @@ declare module '@polkadot/api-base/types/events' {
* Batch of dispatches completed fully with no error. * Batch of dispatches completed fully with no error.
**/ **/
BatchCompleted: AugmentedEvent<ApiType, []>; BatchCompleted: AugmentedEvent<ApiType, []>;
/**
* Batch of dispatches completed but has errors.
**/
BatchCompletedWithErrors: AugmentedEvent<ApiType, []>;
/** /**
* Batch of dispatches did not complete fully. Index of first failing dispatch given, as * Batch of dispatches did not complete fully. Index of first failing dispatch given, as
* well as the error. * well as the error.
@@ -1151,6 +1215,10 @@ declare module '@polkadot/api-base/types/events' {
* A single item within a Batch of dispatches has completed with no error. * A single item within a Batch of dispatches has completed with no error.
**/ **/
ItemCompleted: AugmentedEvent<ApiType, []>; ItemCompleted: AugmentedEvent<ApiType, []>;
/**
* A single item within a Batch of dispatches has completed with error.
**/
ItemFailed: AugmentedEvent<ApiType, [SpRuntimeDispatchError]>;
/** /**
* Generic event * Generic event
**/ **/
@@ -1171,6 +1239,20 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
voterList: {
/**
* Moved an account from one bag to another.
**/
Rebagged: AugmentedEvent<ApiType, [AccountId32, u64, u64]>;
/**
* Updated the score of some account to the given amount.
**/
ScoreUpdated: AugmentedEvent<ApiType, [AccountId32, u64]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
xcmPallet: { xcmPallet: {
/** /**
* Some assets have been placed in an asset trap. * Some assets have been placed in an asset trap.
+1
View File
@@ -6,4 +6,5 @@ import './consts';
import './errors'; import './errors';
import './events'; import './events';
import './query'; import './query';
import './registry';
import './tx'; import './tx';
+216 -75
View File
@@ -7,7 +7,7 @@ import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, W
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth'; import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppPublic, PolkadotPrimitivesV1AssignmentAppPublic, PolkadotPrimitivesV1CandidateCommitments, PolkadotPrimitivesV1CoreOccupied, PolkadotPrimitivesV1DisputeState, PolkadotPrimitivesV1ScrapedOnChainVotes, PolkadotPrimitivesV1UpgradeGoAhead, PolkadotPrimitivesV1UpgradeRestriction, PolkadotPrimitivesV2SessionInfo, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup'; import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
import type { Observable } from '@polkadot/types/types'; import type { Observable } from '@polkadot/types/types';
declare module '@polkadot/api-base/types/storage' { declare module '@polkadot/api-base/types/storage' {
@@ -68,7 +68,7 @@ declare module '@polkadot/api-base/types/storage' {
* This field should always be populated during block processing unless * This field should always be populated during block processing unless
* secondary plain slots are enabled (which don't contain a VRF output). * secondary plain slots are enabled (which don't contain a VRF output).
* *
* It is set in `on_initialize`, before it will contain the value from the last block. * It is set in `on_finalize`, before it will contain the value from the last block.
**/ **/
authorVrfRandomness: AugmentedQuery<ApiType, () => Observable<Option<U8aFixed>>, []> & QueryableStorageEntry<ApiType, []>; authorVrfRandomness: AugmentedQuery<ApiType, () => Observable<Option<U8aFixed>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
@@ -101,7 +101,7 @@ declare module '@polkadot/api-base/types/storage' {
* Temporary value (cleared at block finalization) which is `Some` * Temporary value (cleared at block finalization) which is `Some`
* if per-block initialization has already been called for current block. * if per-block initialization has already been called for current block.
**/ **/
initialized: AugmentedQuery<ApiType, () => Observable<Option<Option<U8aFixed>>>, []> & QueryableStorageEntry<ApiType, []>; initialized: AugmentedQuery<ApiType, () => Observable<Option<Option<SpConsensusBabeDigestsPreDigest>>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* How late the current block is compared to its parent. * How late the current block is compared to its parent.
* *
@@ -161,32 +161,31 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
bagsList: {
/**
* Counter for the related counted storage map
**/
counterForListNodes: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* A bag stored in storage.
*
* Stores a `Bag` struct, which stores head and tail pointers to itself.
**/
listBags: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletBagsListListBag>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
/**
* A single node, within some bag.
*
* Nodes store links forward and back within their respective bags.
**/
listNodes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletBagsListListNode>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
balances: { balances: {
/** /**
* The balance of an account. * The Balances pallet example of storing the balance of an account.
* *
* # Example
*
* ```nocompile
* impl pallet_balances::Config for Runtime {
* type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>
* }
* ```
*
* You can also store the balance of an account in the `System` pallet.
*
* # Example
*
* ```nocompile
* impl pallet_balances::Config for Runtime {
* type AccountStore = System
* }
* ```
*
* But this comes with tradeoffs, storing account balances in the system pallet stores
* `frame_system` data alongside the account data contrary to storing account balances in the
* `Balances` pallet, which uses a `StorageMap` to store balances data only.
* NOTE: This is only used in the case that this pallet is used to store balances. * NOTE: This is only used in the case that this pallet is used to store balances.
**/ **/
account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>; account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
@@ -236,6 +235,33 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
childBounties: {
/**
* Child bounties that have been added.
**/
childBounties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletChildBountiesChildBounty>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
/**
* Number of total child bounties.
**/
childBountyCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The description of each child-bounty.
**/
childBountyDescriptions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* The cumulative child-bounty curator fee for each parent bounty.
**/
childrenCuratorFees: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Number of child bounties per parent bounty.
* Map of parent bounty index to number of child bounties.
**/
parentChildBounties: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
claims: { claims: {
claims: AugmentedQuery<ApiType, (arg: EthereumAddress | string | Uint8Array) => Observable<Option<u128>>, [EthereumAddress]> & QueryableStorageEntry<ApiType, [EthereumAddress]>; claims: AugmentedQuery<ApiType, (arg: EthereumAddress | string | Uint8Array) => Observable<Option<u128>>, [EthereumAddress]> & QueryableStorageEntry<ApiType, [EthereumAddress]>;
/** /**
@@ -269,12 +295,6 @@ declare module '@polkadot/api-base/types/storage' {
* is meant to be used only as the last resort. * is meant to be used only as the last resort.
**/ **/
bypassConsistencyCheck: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>; bypassConsistencyCheck: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Pending configuration (if any) for the next session.
*
* DEPRECATED: This is no longer used, and will be removed in the future.
**/
pendingConfig: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Pending configuration changes. * Pending configuration changes.
* *
@@ -335,9 +355,9 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
newRaise: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>; newRaise: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Tracker for the next available trie index * Tracker for the next available fund index
**/ **/
nextTrieIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>; nextFundIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Generic query * Generic query
**/ **/
@@ -364,13 +384,6 @@ declare module '@polkadot/api-base/types/storage' {
* proposal. * proposal.
**/ **/
lastTabledWasExternal: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>; lastTabledWasExternal: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Accounts for which there are locks in action which may be removed at some point in the
* future. The value is the block number at which the lock expires and may be removed.
*
* TWOX-NOTE: OK ― `AccountId` is a secure hash.
**/
locks: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
* The lowest referendum index representing an unbaked referendum. Equal to * The lowest referendum index representing an unbaked referendum. Equal to
* `ReferendumCount` if there isn't a unbaked referendum. * `ReferendumCount` if there isn't a unbaked referendum.
@@ -461,7 +474,7 @@ declare module '@polkadot/api-base/types/storage' {
* *
* Can be set via `set_minimum_untrusted_score`. * Can be set via `set_minimum_untrusted_score`.
**/ **/
minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<Vec<u128>>>, []> & QueryableStorageEntry<ApiType, []>; minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<SpNposElectionsElectionScore>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Current best solution, signed or unsigned, queued to be returned upon `elect`. * Current best solution, signed or unsigned, queued to be returned upon `elect`.
**/ **/
@@ -483,7 +496,7 @@ declare module '@polkadot/api-base/types/storage' {
* can be quite large, so we're willing to pay the cost of multiple database accesses to access * can be quite large, so we're willing to pay the cost of multiple database accesses to access
* them one at a time instead of reading and decoding all of them at once. * them one at a time instead of reading and decoding all of them at once.
**/ **/
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<Vec<u128>, u32>>, []> & QueryableStorageEntry<ApiType, []>; signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<SpNposElectionsElectionScore, u32>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The next index to be assigned to an incoming signed submission. * The next index to be assigned to an incoming signed submission.
* *
@@ -596,13 +609,12 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
hrmpChannelContents: AugmentedQuery<ApiType, (arg: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array) => Observable<Vec<PolkadotCorePrimitivesInboundHrmpMessage>>, [PolkadotParachainPrimitivesHrmpChannelId]> & QueryableStorageEntry<ApiType, [PolkadotParachainPrimitivesHrmpChannelId]>; hrmpChannelContents: AugmentedQuery<ApiType, (arg: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array) => Observable<Vec<PolkadotCorePrimitivesInboundHrmpMessage>>, [PolkadotParachainPrimitivesHrmpChannelId]> & QueryableStorageEntry<ApiType, [PolkadotParachainPrimitivesHrmpChannelId]>;
/** /**
* Maintains a mapping that can be used to answer the question: * Maintains a mapping that can be used to answer the question: What paras sent a message at
* What paras sent a message at the given block number for a given receiver. * the given block number for a given receiver. Invariants:
* Invariants:
* - The inner `Vec<ParaId>` is never empty. * - The inner `Vec<ParaId>` is never empty.
* - The inner `Vec<ParaId>` cannot store two same `ParaId`. * - The inner `Vec<ParaId>` cannot store two same `ParaId`.
* - The outer vector is sorted ascending by block number and cannot store two items with the same * - The outer vector is sorted ascending by block number and cannot store two items with the
* block number. * same block number.
**/ **/
hrmpChannelDigests: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, Vec<u32>]>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; hrmpChannelDigests: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, Vec<u32>]>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
@@ -612,8 +624,8 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
hrmpChannels: AugmentedQuery<ApiType, (arg: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array) => Observable<Option<PolkadotRuntimeParachainsHrmpHrmpChannel>>, [PolkadotParachainPrimitivesHrmpChannelId]> & QueryableStorageEntry<ApiType, [PolkadotParachainPrimitivesHrmpChannelId]>; hrmpChannels: AugmentedQuery<ApiType, (arg: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array) => Observable<Option<PolkadotRuntimeParachainsHrmpHrmpChannel>>, [PolkadotParachainPrimitivesHrmpChannelId]> & QueryableStorageEntry<ApiType, [PolkadotParachainPrimitivesHrmpChannelId]>;
/** /**
* A set of pending HRMP close channel requests that are going to be closed during the session change. * A set of pending HRMP close channel requests that are going to be closed during the session
* Used for checking if a given channel is registered for closure. * change. Used for checking if a given channel is registered for closure.
* *
* The set is accompanied by a list for iteration. * The set is accompanied by a list for iteration.
* *
@@ -624,25 +636,25 @@ declare module '@polkadot/api-base/types/storage' {
hrmpCloseChannelRequestsList: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotParachainPrimitivesHrmpChannelId>>, []> & QueryableStorageEntry<ApiType, []>; hrmpCloseChannelRequestsList: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotParachainPrimitivesHrmpChannelId>>, []> & QueryableStorageEntry<ApiType, []>;
hrmpEgressChannelsIndex: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; hrmpEgressChannelsIndex: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Ingress/egress indexes allow to find all the senders and receivers given the opposite * Ingress/egress indexes allow to find all the senders and receivers given the opposite side.
* side. I.e. * I.e.
* *
* (a) ingress index allows to find all the senders for a given recipient. * (a) ingress index allows to find all the senders for a given recipient.
* (b) egress index allows to find all the recipients for a given sender. * (b) egress index allows to find all the recipients for a given sender.
* *
* Invariants: * Invariants:
* - for each ingress index entry for `P` each item `I` in the index should present in `HrmpChannels` * - for each ingress index entry for `P` each item `I` in the index should present in
* as `(I, P)`. * `HrmpChannels` as `(I, P)`.
* - for each egress index entry for `P` each item `E` in the index should present in `HrmpChannels` * - for each egress index entry for `P` each item `E` in the index should present in
* as `(P, E)`. * `HrmpChannels` as `(P, E)`.
* - there should be no other dangling channels in `HrmpChannels`. * - there should be no other dangling channels in `HrmpChannels`.
* - the vectors are sorted. * - the vectors are sorted.
**/ **/
hrmpIngressChannelsIndex: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; hrmpIngressChannelsIndex: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* This mapping tracks how many open channel requests are initiated by a given sender para. * This mapping tracks how many open channel requests are initiated by a given sender para.
* Invariant: `HrmpOpenChannelRequests` should contain the same number of items that has `(X, _)` * Invariant: `HrmpOpenChannelRequests` should contain the same number of items that has
* as the number of `HrmpOpenChannelRequestCount` for `X`. * `(X, _)` as the number of `HrmpOpenChannelRequestCount` for `X`.
**/ **/
hrmpOpenChannelRequestCount: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; hrmpOpenChannelRequestCount: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
@@ -780,6 +792,95 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
nominationPools: {
/**
* Storage for bonded pools.
**/
bondedPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsBondedPoolInner>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Counter for the related counted storage map
**/
counterForBondedPools: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForMetadata: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForPoolMembers: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForReversePoolIdLookup: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForRewardPools: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForSubPoolsStorage: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Ever increasing number of all pools created so far.
**/
lastPoolId: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Maximum number of members that can exist in the system. If `None`, then the count
* members are not bound on a system wide basis.
**/
maxPoolMembers: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Maximum number of members that may belong to pool. If `None`, then the count of
* members is not bound on a per pool basis.
**/
maxPoolMembersPerPool: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Maximum number of nomination pools that can exist. If `None`, then an unbounded number of
* pools can exist.
**/
maxPools: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Metadata for the pool.
**/
metadata: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Minimum bond required to create a pool.
*
* This is the amount that the depositor must put as their initial stake in the pool, as an
* indication of "skin in the game".
**/
minCreateBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Minimum amount to bond to join a pool.
**/
minJoinBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Active members.
**/
poolMembers: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletNominationPoolsPoolMember>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* A reverse lookup from the pool's account id to its id.
*
* This is only used for slashing. In all other instances, the pool id is used, and the
* accounts are deterministically derived from it.
**/
reversePoolIdLookup: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Reward pools. This is where there rewards for each pool accumulate. When a members payout
* is claimed, the balance comes out fo the reward pool. Keyed by the bonded pools account.
**/
rewardPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsRewardPool>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Groups of unbonding pools. Each group of unbonding pools belongs to a bonded pool,
* hence the name sub-pools. Keyed by the bonded pools account.
**/
subPoolsStorage: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsSubPools>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
offences: { offences: {
/** /**
* A vector of reports of the same kind that happened at the same time slot. * A vector of reports of the same kind that happened at the same time slot.
@@ -815,7 +916,7 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* The commitments of candidates pending availability, by `ParaId`. * The commitments of candidates pending availability, by `ParaId`.
**/ **/
pendingAvailabilityCommitments: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV1CandidateCommitments>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; pendingAvailabilityCommitments: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV2CandidateCommitments>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Generic query * Generic query
**/ **/
@@ -834,7 +935,7 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* Scraped on chain data for extracting resolved disputes as well as backing votes. * Scraped on chain data for extracting resolved disputes as well as backing votes.
**/ **/
onChainVotes: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV1ScrapedOnChainVotes>>, []> & QueryableStorageEntry<ApiType, []>; onChainVotes: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV2ScrapedOnChainVotes>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Generic query * Generic query
**/ **/
@@ -880,6 +981,8 @@ declare module '@polkadot/api-base/types/storage' {
heads: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; heads: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* All parachains. Ordered ascending by `ParaId`. Parathreads are not included. * All parachains. Ordered ascending by `ParaId`. Parathreads are not included.
*
* Consider using the [`ParachainsCache`] type of modifying.
**/ **/
parachains: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>; parachains: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
@@ -950,7 +1053,7 @@ declare module '@polkadot/api-base/types/storage' {
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing * NOTE that this field is used by parachains via merkle storage proofs, therefore changing
* the format will require migration of parachains. * the format will require migration of parachains.
**/ **/
upgradeGoAheadSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV1UpgradeGoAhead>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; upgradeGoAheadSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV2UpgradeGoAhead>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* This is used by the relay-chain to communicate that there are restrictions for performing * This is used by the relay-chain to communicate that there are restrictions for performing
* an upgrade for this parachain. * an upgrade for this parachain.
@@ -962,7 +1065,7 @@ declare module '@polkadot/api-base/types/storage' {
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing * NOTE that this field is used by parachains via merkle storage proofs, therefore changing
* the format will require migration of parachains. * the format will require migration of parachains.
**/ **/
upgradeRestrictionSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV1UpgradeRestriction>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; upgradeRestrictionSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV2UpgradeRestriction>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Generic query * Generic query
**/ **/
@@ -979,7 +1082,7 @@ declare module '@polkadot/api-base/types/storage' {
* * The number of parachains and parathread multiplexers * * The number of parachains and parathread multiplexers
* * The number of validators divided by `configuration.max_validators_per_core`. * * The number of validators divided by `configuration.max_validators_per_core`.
**/ **/
availabilityCores: AugmentedQuery<ApiType, () => Observable<Vec<Option<PolkadotPrimitivesV1CoreOccupied>>>, []> & QueryableStorageEntry<ApiType, []>; availabilityCores: AugmentedQuery<ApiType, () => Observable<Vec<Option<PolkadotPrimitivesV2CoreOccupied>>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* An index used to ensure that only one claim on a parathread exists in the queue or is * An index used to ensure that only one claim on a parathread exists in the queue or is
* currently being handled by an occupied core. * currently being handled by an occupied core.
@@ -1030,7 +1133,7 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* All ongoing or concluded disputes for the last several sessions. * All ongoing or concluded disputes for the last several sessions.
**/ **/
disputes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV1DisputeState>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>; disputes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV2DisputeState>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
/** /**
* Whether the chain is frozen. Starts as `None`. When this is `Some`, * Whether the chain is frozen. Starts as `None`. When this is `Some`,
* the chain will not accept any new parachain blocks for backing or inclusion, * the chain will not accept any new parachain blocks for backing or inclusion,
@@ -1062,12 +1165,16 @@ declare module '@polkadot/api-base/types/storage' {
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
paraSessionInfo: { paraSessionInfo: {
/**
* The validator account keys of the validators actively participating in parachain consensus.
**/
accountKeys: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Vec<AccountId32>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Assignment keys for the current session. * Assignment keys for the current session.
* Note that this API is private due to it being prone to 'off-by-one' at session boundaries. * Note that this API is private due to it being prone to 'off-by-one' at session boundaries.
* When in doubt, use `Sessions` API instead. * When in doubt, use `Sessions` API instead.
**/ **/
assignmentKeysUnsafe: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV1AssignmentAppPublic>>, []> & QueryableStorageEntry<ApiType, []>; assignmentKeysUnsafe: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV2AssignmentAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The earliest session for which previous session info is stored. * The earliest session for which previous session info is stored.
**/ **/
@@ -1093,7 +1200,7 @@ declare module '@polkadot/api-base/types/storage' {
* The parachain attestation keys of the validators actively participating in parachain consensus. * The parachain attestation keys of the validators actively participating in parachain consensus.
* This should be the same length as `ActiveValidatorIndices`. * This should be the same length as `ActiveValidatorIndices`.
**/ **/
activeValidatorKeys: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV0ValidatorAppPublic>>, []> & QueryableStorageEntry<ApiType, []>; activeValidatorKeys: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV2ValidatorAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The current session index. * The current session index.
**/ **/
@@ -1223,12 +1330,6 @@ declare module '@polkadot/api-base/types/storage' {
* Lookup from identity to the block number and index of the task. * Lookup from identity to the block number and index of the task.
**/ **/
lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>; lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
/**
* Storage version of the pallet.
*
* New networks start with last version.
**/
storageVersion: AugmentedQuery<ApiType, () => Observable<PalletSchedulerReleases>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Generic query * Generic query
**/ **/
@@ -1534,7 +1635,22 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
minValidatorBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>; minValidatorBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The map from nominator stash key to the set of stash keys of all validators to nominate. * The map from nominator stash key to their nomination preferences, namely the validators that
* they wish to support.
*
* Note that the keys of this storage map might become non-decodable in case the
* [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators
* are still existent in storage, their key is correct and retrievable (i.e. `contains_key`
* indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable
* nominators will effectively not-exist, until they re-submit their preferences such that it
* is within the bounds of the newly set `Config::MaxNominations`.
*
* This implies that `::iter_keys().count()` and `::iter().count()` might return different
* values for this map. Moreover, the main `::count()` is aligned with the former, namely the
* number of keys that exist.
*
* Lastly, if any of the nominators become non-decodable, they can be chilled immediately via
* [`Call::chill_other`] dispatchable by anyone.
**/ **/
nominators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletStakingNominations>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>; nominators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletStakingNominations>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
@@ -1629,8 +1745,11 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* Events deposited for the current block. * Events deposited for the current block.
* *
* NOTE: This storage item is explicitly unbounded since it is never intended to be read * NOTE: The item is unbound and should therefore never be read on chain.
* from within the runtime. * It could otherwise inflate the PoV size of a block.
*
* Events have a large in-memory size. Box the events to not go out-of-memory
* just in case someone still reads them from within the runtime.
**/ **/
events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>; events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
@@ -1857,6 +1976,28 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
voterList: {
/**
* Counter for the related counted storage map
**/
counterForListNodes: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* A bag stored in storage.
*
* Stores a `Bag` struct, which stores head and tail pointers to itself.
**/
listBags: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletBagsListListBag>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
/**
* A single node, within some bag.
*
* Nodes store links forward and back within their respective bags.
**/
listNodes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletBagsListListNode>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
xcmPallet: { xcmPallet: {
/** /**
* The existing asset traps. * The existing asset traps.
@@ -0,0 +1,6 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/types-augment/registry/substrate';
import '@polkadot/types-augment/registry/polkadot';
import '@polkadot/types-augment/registry/kusama';
+455 -185
View File
@@ -4,10 +4,10 @@
import type { ApiTypes } from '@polkadot/api-base/types'; import type { ApiTypes } from '@polkadot/api-base/types';
import type { Data } from '@polkadot/types'; import type { Data } from '@polkadot/types';
import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth'; import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportScheduleMaybeHashed, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppSignature, PolkadotPrimitivesV1InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup'; import type { FrameSupportScheduleMaybeHashed, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV2ValidatorAppSignature, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
declare module '@polkadot/api-base/types/submittable' { declare module '@polkadot/api-base/types/submittable' {
export interface AugmentedSubmittables<ApiType extends ApiTypes> { export interface AugmentedSubmittables<ApiType extends ApiTypes> {
@@ -91,34 +91,6 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
bagsList: {
/**
* Move the caller's Id directly in front of `lighter`.
*
* The dispatch origin for this call must be _Signed_ and can only be called by the Id of
* the account going in front of `lighter`.
*
* Only works if
* - both nodes are within the same bag,
* - and `origin` has a greater `VoteWeight` than `lighter`.
**/
putInFrontOf: AugmentedSubmittable<(lighter: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* Declare that some `dislocated` account has, through rewards or penalties, sufficiently
* changed its weight that it should properly fall into a different bag than its current
* one.
*
* Anyone can call this function about any potentially dislocated account.
*
* Will never return an error; if `dislocated` does not exist or doesn't need a rebag, then
* it is a noop and fees are still collected from `origin`.
**/
rebag: AugmentedSubmittable<(dislocated: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
balances: { balances: {
/** /**
* Exactly as `transfer`, except the origin must be root and the source account may be * Exactly as `transfer`, except the origin must be root and the source account may be
@@ -334,6 +306,175 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
childBounties: {
/**
* Accept the curator role for the child-bounty.
*
* The dispatch origin for this call must be the curator of this
* child-bounty.
*
* A deposit will be reserved from the curator and refund upon
* successful payout or cancellation.
*
* Fee for curator is deducted from curator fee of parent bounty.
*
* Parent bounty must be in active state, for this child-bounty call to
* work.
*
* Child-bounty must be in "CuratorProposed" state, for processing the
* call. And state of child-bounty is moved to "Active" on successful
* call completion.
*
* - `parent_bounty_id`: Index of parent bounty.
* - `child_bounty_id`: Index of child bounty.
**/
acceptCurator: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
/**
* Add a new child-bounty.
*
* The dispatch origin for this call must be the curator of parent
* bounty and the parent bounty must be in "active" state.
*
* Child-bounty gets added successfully & fund gets transferred from
* parent bounty to child-bounty account, if parent bounty has enough
* funds, else the call fails.
*
* Upper bound to maximum number of active child bounties that can be
* added are managed via runtime trait config
* [`Config::MaxActiveChildBountyCount`].
*
* If the call is success, the status of child-bounty is updated to
* "Added".
*
* - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added.
* - `value`: Value for executing the proposal.
* - `description`: Text description for the child-bounty.
**/
addChildBounty: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array, description: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u128>, Bytes]>;
/**
* Award child-bounty to a beneficiary.
*
* The beneficiary will be able to claim the funds after a delay.
*
* The dispatch origin for this call must be the parent curator or
* curator of this child-bounty.
*
* Parent bounty must be in active state, for this child-bounty call to
* work.
*
* Child-bounty must be in active state, for processing the call. And
* state of child-bounty is moved to "PendingPayout" on successful call
* completion.
*
* - `parent_bounty_id`: Index of parent bounty.
* - `child_bounty_id`: Index of child bounty.
* - `beneficiary`: Beneficiary account.
**/
awardChildBounty: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array, beneficiary: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, MultiAddress]>;
/**
* Claim the payout from an awarded child-bounty after payout delay.
*
* The dispatch origin for this call may be any signed origin.
*
* Call works independent of parent bounty state, No need for parent
* bounty to be in active state.
*
* The Beneficiary is paid out with agreed bounty value. Curator fee is
* paid & curator deposit is unreserved.
*
* Child-bounty must be in "PendingPayout" state, for processing the
* call. And instance of child-bounty is removed from the state on
* successful call completion.
*
* - `parent_bounty_id`: Index of parent bounty.
* - `child_bounty_id`: Index of child bounty.
**/
claimChildBounty: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
/**
* Cancel a proposed or active child-bounty. Child-bounty account funds
* are transferred to parent bounty account. The child-bounty curator
* deposit may be unreserved if possible.
*
* The dispatch origin for this call must be either parent curator or
* `T::RejectOrigin`.
*
* If the state of child-bounty is `Active`, curator deposit is
* unreserved.
*
* If the state of child-bounty is `PendingPayout`, call fails &
* returns `PendingPayout` error.
*
* For the origin other than T::RejectOrigin, parent bounty must be in
* active state, for this child-bounty call to work. For origin
* T::RejectOrigin execution is forced.
*
* Instance of child-bounty is removed from the state on successful
* call completion.
*
* - `parent_bounty_id`: Index of parent bounty.
* - `child_bounty_id`: Index of child bounty.
**/
closeChildBounty: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
/**
* Propose curator for funded child-bounty.
*
* The dispatch origin for this call must be curator of parent bounty.
*
* Parent bounty must be in active state, for this child-bounty call to
* work.
*
* Child-bounty must be in "Added" state, for processing the call. And
* state of child-bounty is moved to "CuratorProposed" on successful
* call completion.
*
* - `parent_bounty_id`: Index of parent bounty.
* - `child_bounty_id`: Index of child bounty.
* - `curator`: Address of child-bounty curator.
* - `fee`: payment fee to child-bounty curator for execution.
**/
proposeCurator: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array, curator: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, fee: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, MultiAddress, Compact<u128>]>;
/**
* Unassign curator from a child-bounty.
*
* The dispatch origin for this call can be either `RejectOrigin`, or
* the curator of the parent bounty, or any signed origin.
*
* For the origin other than T::RejectOrigin and the child-bounty
* curator, parent bounty must be in active state, for this call to
* work. We allow child-bounty curator and T::RejectOrigin to execute
* this call irrespective of the parent bounty state.
*
* If this function is called by the `RejectOrigin` or the
* parent bounty curator, we assume that the child-bounty curator is
* malicious or inactive. As a result, child-bounty curator deposit is
* slashed.
*
* If the origin is the child-bounty curator, we take this as a sign
* that they are unable to do their job, and are willingly giving up.
* We could slash the deposit, but for now we allow them to unreserve
* their deposit and exit without issue. (We may want to change this if
* it is abused.)
*
* Finally, the origin can be anyone iff the child-bounty curator is
* "inactive". Expiry update due of parent bounty is used to estimate
* inactive state of child-bounty curator.
*
* This allows anyone in the community to call out that a child-bounty
* curator is not doing their due diligence, and we should pick a new
* one. In this case the child-bounty curator deposit is slashed.
*
* State of child-bounty is moved to Added state on successful call
* completion.
*
* - `parent_bounty_id`: Index of parent bounty.
* - `child_bounty_id`: Index of child bounty.
**/
unassignCurator: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
claims: { claims: {
/** /**
* Attest to a statement, needed to finalize the claims process. * Attest to a statement, needed to finalize the claims process.
@@ -693,7 +834,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - 1 event * - 1 event
* # </weight> * # </weight>
**/ **/
execute: AugmentedSubmittable<(proposal: Call | { callIndex?: any; args?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Compact<u32>]>; execute: AugmentedSubmittable<(proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Compact<u32>]>;
/** /**
* Add a new proposal to either be voted on or executed directly. * Add a new proposal to either be voted on or executed directly.
* *
@@ -723,7 +864,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - 1 event * - 1 event
* # </weight> * # </weight>
**/ **/
propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | { callIndex?: any; args?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>; propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>;
/** /**
* Set the collective's membership. * Set the collective's membership.
* *
@@ -1198,6 +1339,13 @@ declare module '@polkadot/api-base/types/submittable' {
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
electionProviderMultiPhase: { electionProviderMultiPhase: {
/**
* Trigger the governance fallback.
*
* This can only be called when [`Phase::Emergency`] is enabled, as an alternative to
* calling [`Call::set_emergency_election_result`].
**/
governanceFallback: AugmentedSubmittable<(maybeMaxVoters: Option<u32> | null | object | string | Uint8Array, maybeMaxTargets: Option<u32> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<u32>, Option<u32>]>;
/** /**
* Set a solution in the queue, to be handed out to the client of this pallet in the next * Set a solution in the queue, to be handed out to the client of this pallet in the next
* call to `ElectionProvider::elect`. * call to `ElectionProvider::elect`.
@@ -1216,7 +1364,7 @@ declare module '@polkadot/api-base/types/submittable' {
* *
* This check can be turned off by setting the value to `None`. * This check can be turned off by setting the value to `None`.
**/ **/
setMinimumUntrustedScore: AugmentedSubmittable<(maybeNextScore: Option<Vec<u128>> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<Vec<u128>>]>; setMinimumUntrustedScore: AugmentedSubmittable<(maybeNextScore: Option<SpNposElectionsElectionScore> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<SpNposElectionsElectionScore>]>;
/** /**
* Submit a solution for the signed phase. * Submit a solution for the signed phase.
* *
@@ -1227,12 +1375,8 @@ declare module '@polkadot/api-base/types/submittable' {
* *
* A deposit is reserved and recorded for the solution. Based on the outcome, the solution * A deposit is reserved and recorded for the solution. Based on the outcome, the solution
* might be rewarded, slashed, or get all or a part of the deposit back. * might be rewarded, slashed, or get all or a part of the deposit back.
*
* # <weight>
* Queue size must be provided as witness data.
* # </weight>
**/ **/
submit: AugmentedSubmittable<(rawSolution: PalletElectionProviderMultiPhaseRawSolution | { solution?: any; score?: any; round?: any } | string | Uint8Array, numSignedSubmissions: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletElectionProviderMultiPhaseRawSolution, u32]>; submit: AugmentedSubmittable<(rawSolution: PalletElectionProviderMultiPhaseRawSolution | { solution?: any; score?: any; round?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletElectionProviderMultiPhaseRawSolution]>;
/** /**
* Submit a solution for the unsigned phase. * Submit a solution for the unsigned phase.
* *
@@ -1348,22 +1492,28 @@ declare module '@polkadot/api-base/types/submittable' {
* you to trigger the cleanup immediately for a specific parachain. * you to trigger the cleanup immediately for a specific parachain.
* *
* Origin must be Root. * Origin must be Root.
*
* Number of inbound and outbound channels for `para` must be provided as witness data of weighing.
**/ **/
forceCleanHrmp: AugmentedSubmittable<(para: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; forceCleanHrmp: AugmentedSubmittable<(para: u32 | AnyNumber | Uint8Array, inbound: u32 | AnyNumber | Uint8Array, outbound: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, u32]>;
/** /**
* Force process HRMP close channel requests. * Force process HRMP close channel requests.
* *
* If there are pending HRMP close channel requests, you can use this * If there are pending HRMP close channel requests, you can use this
* function process all of those requests immediately. * function process all of those requests immediately.
*
* Total number of closing channels must be provided as witness data of weighing.
**/ **/
forceProcessHrmpClose: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>; forceProcessHrmpClose: AugmentedSubmittable<(channels: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/** /**
* Force process HRMP open channel requests. * Force process HRMP open channel requests.
* *
* If there are pending HRMP open channel requests, you can use this * If there are pending HRMP open channel requests, you can use this
* function process all of those requests immediately. * function process all of those requests immediately.
*
* Total number of opening channels must be provided as witness data of weighing.
**/ **/
forceProcessHrmpOpen: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>; forceProcessHrmpOpen: AugmentedSubmittable<(channels: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/** /**
* Accept a pending open channel request from the given sender. * Accept a pending open channel request from the given sender.
* *
@@ -1371,13 +1521,16 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
hrmpAcceptOpenChannel: AugmentedSubmittable<(sender: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; hrmpAcceptOpenChannel: AugmentedSubmittable<(sender: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/** /**
* This cancels a pending open channel request. It can be canceled be either of the sender * This cancels a pending open channel request. It can be canceled by either of the sender
* or the recipient for that request. The origin must be either of those. * or the recipient for that request. The origin must be either of those.
* *
* The cancellation happens immediately. It is not possible to cancel the request if it is * The cancellation happens immediately. It is not possible to cancel the request if it is
* already accepted. * already accepted.
*
* Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as
* witness data.
**/ **/
hrmpCancelOpenRequest: AugmentedSubmittable<(channelId: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotParachainPrimitivesHrmpChannelId]>; hrmpCancelOpenRequest: AugmentedSubmittable<(channelId: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array, openRequests: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotParachainPrimitivesHrmpChannelId, u32]>;
/** /**
* Initiate unilateral closing of a channel. The origin must be either the sender or the * Initiate unilateral closing of a channel. The origin must be either the sender or the
* recipient in the channel being closed. * recipient in the channel being closed.
@@ -1921,7 +2074,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Plus Call Weight * - Plus Call Weight
* # </weight> * # </weight>
**/ **/
asMultiThreshold1: AugmentedSubmittable<(otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, Call]>; asMultiThreshold1: AugmentedSubmittable<(otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, Call]>;
/** /**
* Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously
* for this operation will be unreserved on success. * for this operation will be unreserved on success.
@@ -1956,6 +2109,149 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
nominationPools: {
/**
* Bond `extra` more funds from `origin` into the pool to which they already belong.
*
* Additional funds can come from either the free balance of the account, of from the
* accumulated rewards, see [`BondExtra`].
**/
bondExtra: AugmentedSubmittable<(extra: PalletNominationPoolsBondExtra | { FreeBalance: any } | { Rewards: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsBondExtra]>;
/**
* A bonded member can use this to claim their payout based on the rewards that the pool
* has accumulated since their last claimed payout (OR since joining if this is there first
* time claiming rewards). The payout will be transferred to the member's account.
*
* The member will earn rewards pro rata based on the members stake vs the sum of the
* members in the pools stake. Rewards do not "expire".
**/
claimPayout: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* Create a new delegation pool.
*
* # Arguments
*
* * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of
* deposit since the pools creator cannot fully unbond funds until the pool is being
* destroyed.
* * `index` - A disambiguation index for creating the account. Likely only useful when
* creating multiple pools in the same extrinsic.
* * `root` - The account to set as [`PoolRoles::root`].
* * `nominator` - The account to set as the [`PoolRoles::nominator`].
* * `state_toggler` - The account to set as the [`PoolRoles::state_toggler`].
*
* # Note
*
* In addition to `amount`, the caller will transfer the existential deposit; so the caller
* needs at have at least `amount + existential_deposit` transferrable.
**/
create: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: AccountId32 | string | Uint8Array, nominator: AccountId32 | string | Uint8Array, stateToggler: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, AccountId32, AccountId32, AccountId32]>;
/**
* Stake funds with a pool. The amount to bond is transferred from the member to the
* pools account and immediately increases the pools bond.
*
* # Note
*
* * An account can only be a member of a single pool.
* * An account cannot join the same pool multiple times.
* * This call will *not* dust the member account, so the member must have at least
* `existential deposit + amount` in their account.
* * Only a pool with [`PoolState::Open`] can be joined
**/
join: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, poolId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, u32]>;
nominate: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, validators: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<AccountId32>]>;
/**
* Call `withdraw_unbonded` for the pools account. This call can be made by any account.
*
* This is useful if their are too many unlocking chunks to call `unbond`, and some
* can be cleared by withdrawing. In the case there are too many unlocking chunks, the user
* would probably see an error like `NoMoreChunks` emitted from the staking system when
* they attempt to unbond.
**/
poolWithdrawUnbonded: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
/**
* Update configurations for the nomination pools. The origin for this call must be
* Root.
*
* # Arguments
*
* * `min_join_bond` - Set [`MinJoinBond`].
* * `min_create_bond` - Set [`MinCreateBond`].
* * `max_pools` - Set [`MaxPools`].
* * `max_members` - Set [`MaxPoolMembers`].
* * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`].
**/
setConfigs: AugmentedSubmittable<(minJoinBond: PalletNominationPoolsConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minCreateBond: PalletNominationPoolsConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxPools: PalletNominationPoolsConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxMembers: PalletNominationPoolsConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxMembersPerPool: PalletNominationPoolsConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsConfigOpU32, PalletNominationPoolsConfigOpU32]>;
setMetadata: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, metadata: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
setState: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, state: PalletNominationPoolsPoolState | 'Open' | 'Blocked' | 'Destroying' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsPoolState]>;
/**
* Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It
* implicitly collects the rewards one last time, since not doing so would mean some
* rewards would go forfeited.
*
* Under certain conditions, this call can be dispatched permissionlessly (i.e. by any
* account).
*
* # Conditions for a permissionless dispatch.
*
* * The pool is blocked and the caller is either the root or state-toggler. This is
* refereed to as a kick.
* * The pool is destroying and the member is not the depositor.
* * The pool is destroying, the member is the depositor and no other members are in the
* pool.
*
* ## Conditions for permissioned dispatch (i.e. the caller is also the
* `member_account`):
*
* * The caller is not the depositor.
* * The caller is the depositor, the pool is destroying and no other members are in the
* pool.
*
* # Note
*
* If there are too many unlocking chunks to unbond with the pool account,
* [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. If
* there are too many unlocking chunks, the result of this call will likely be the
* `NoMoreChunks` error from the staking system.
**/
unbond: AugmentedSubmittable<(memberAccount: AccountId32 | string | Uint8Array, unbondingPoints: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Compact<u128>]>;
/**
* Update the roles of the pool.
*
* The root is the only entity that can change any of the roles, including itself,
* excluding the depositor, who can never change.
*
* It emits an event, notifying UIs of the role change. This event is quite relevant to
* most pool members and they should be informed of changes to pool roles.
**/
updateRoles: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, newRoot: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, newNominator: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, newStateToggler: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpAccountId32]>;
/**
* Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an
* error is returned.
*
* Under certain conditions, this call can be dispatched permissionlessly (i.e. by any
* account).
*
* # Conditions for a permissionless dispatch
*
* * The pool is in destroy mode and the target is not the depositor.
* * The target is the depositor and they are the only member in the sub pools.
* * The pool is blocked and the caller is either the root or state-toggler.
*
* # Conditions for permissioned dispatch
*
* * The caller is the target and they are not the depositor.
*
* # Note
*
* If the target is the depositor, the pool will be destroyed.
**/
withdrawUnbonded: AugmentedSubmittable<(memberAccount: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
paraInclusion: { paraInclusion: {
/** /**
* Generic tx * Generic tx
@@ -1966,7 +2262,7 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* Enter the paras inherent. This will process bitfields and backed candidates. * Enter the paras inherent. This will process bitfields and backed candidates.
**/ **/
enter: AugmentedSubmittable<(data: PolkadotPrimitivesV1InherentData | { bitfields?: any; backedCandidates?: any; disputes?: any; parentHeader?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV1InherentData]>; enter: AugmentedSubmittable<(data: PolkadotPrimitivesV2InherentData | { bitfields?: any; backedCandidates?: any; disputes?: any; parentHeader?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV2InherentData]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -2015,7 +2311,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and
* enacts the results if that was the last vote before achieving the supermajority. * enacts the results if that was the last vote before achieving the supermajority.
**/ **/
includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV2PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV0ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV0ValidatorAppSignature]>; includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV2PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV2ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV2ValidatorAppSignature]>;
/** /**
* Remove the validation code from the storage iff the reference count is 0. * Remove the validation code from the storage iff the reference count is 0.
* *
@@ -2197,7 +2493,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight is a function of the number of proxies the user has (P). * Weight is a function of the number of proxies the user has (P).
* # </weight> * # </weight>
**/ **/
addProxy: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, KusamaRuntimeProxyType, u32]>; addProxy: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, KusamaRuntimeProxyType, u32]>;
/** /**
* Publish the hash of a proxy-call that will be made in the future. * Publish the hash of a proxy-call that will be made in the future.
* *
@@ -2247,7 +2543,7 @@ declare module '@polkadot/api-base/types/submittable' {
* # </weight> * # </weight>
* TODO: Might be over counting 1 read * TODO: Might be over counting 1 read
**/ **/
anonymous: AugmentedSubmittable<(proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array, index: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [KusamaRuntimeProxyType, u32, u16]>; anonymous: AugmentedSubmittable<(proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array, index: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [KusamaRuntimeProxyType, u32, u16]>;
/** /**
* Removes a previously spawned anonymous proxy. * Removes a previously spawned anonymous proxy.
* *
@@ -2270,7 +2566,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight is a function of the number of proxies the user has (P). * Weight is a function of the number of proxies the user has (P).
* # </weight> * # </weight>
**/ **/
killAnonymous: AugmentedSubmittable<(spawner: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, index: u16 | AnyNumber | Uint8Array, height: Compact<u32> | AnyNumber | Uint8Array, extIndex: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, KusamaRuntimeProxyType, u16, Compact<u32>, Compact<u32>]>; killAnonymous: AugmentedSubmittable<(spawner: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number | Uint8Array, index: u16 | AnyNumber | Uint8Array, height: Compact<u32> | AnyNumber | Uint8Array, extIndex: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, KusamaRuntimeProxyType, u16, Compact<u32>, Compact<u32>]>;
/** /**
* Dispatch the given `call` from an account that the sender is authorised for through * Dispatch the given `call` from an account that the sender is authorised for through
* `add_proxy`. * `add_proxy`.
@@ -2288,7 +2584,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight is a function of the number of proxies the user has (P). * Weight is a function of the number of proxies the user has (P).
* # </weight> * # </weight>
**/ **/
proxy: AugmentedSubmittable<(real: AccountId32 | string | Uint8Array, forceProxyType: Option<KusamaRuntimeProxyType> | null | object | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Option<KusamaRuntimeProxyType>, Call]>; proxy: AugmentedSubmittable<(real: AccountId32 | string | Uint8Array, forceProxyType: Option<KusamaRuntimeProxyType> | null | object | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Option<KusamaRuntimeProxyType>, Call]>;
/** /**
* Dispatch the given `call` from an account that the sender is authorized for through * Dispatch the given `call` from an account that the sender is authorized for through
* `add_proxy`. * `add_proxy`.
@@ -2308,7 +2604,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - P: the number of proxies the user has. * - P: the number of proxies the user has.
* # </weight> * # </weight>
**/ **/
proxyAnnounced: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, real: AccountId32 | string | Uint8Array, forceProxyType: Option<KusamaRuntimeProxyType> | null | object | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32, Option<KusamaRuntimeProxyType>, Call]>; proxyAnnounced: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, real: AccountId32 | string | Uint8Array, forceProxyType: Option<KusamaRuntimeProxyType> | null | object | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32, Option<KusamaRuntimeProxyType>, Call]>;
/** /**
* Remove the given announcement of a delegate. * Remove the given announcement of a delegate.
* *
@@ -2373,7 +2669,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight is a function of the number of proxies the user has (P). * Weight is a function of the number of proxies the user has (P).
* # </weight> * # </weight>
**/ **/
removeProxy: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, KusamaRuntimeProxyType, u32]>; removeProxy: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, KusamaRuntimeProxyType, u32]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -2389,13 +2685,8 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters: * Parameters:
* - `account`: The recovered account you want to make a call on-behalf-of. * - `account`: The recovered account you want to make a call on-behalf-of.
* - `call`: The call you want to make with the recovered account. * - `call`: The call you want to make with the recovered account.
*
* # <weight>
* - The weight of the `call` + 10,000.
* - One storage lookup to check account is recovered by `who`. O(1)
* # </weight>
**/ **/
asRecovered: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Call]>; asRecovered: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Call]>;
/** /**
* Cancel the ability to use `as_recovered` for `account`. * Cancel the ability to use `as_recovered` for `account`.
* *
@@ -2404,10 +2695,6 @@ declare module '@polkadot/api-base/types/submittable' {
* *
* Parameters: * Parameters:
* - `account`: The recovered account you are able to call on-behalf-of. * - `account`: The recovered account you are able to call on-behalf-of.
*
* # <weight>
* - One storage mutation to check account is recovered by `who`. O(1)
* # </weight>
**/ **/
cancelRecovered: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>; cancelRecovered: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/** /**
@@ -2420,17 +2707,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters: * Parameters:
* - `account`: The lost account that you want to claim has been successfully recovered by * - `account`: The lost account that you want to claim has been successfully recovered by
* you. * you.
*
* # <weight>
* Key: F (len of friends in config), V (len of vouching friends)
* - One storage read to get the recovery configuration. O(1), Codec O(F)
* - One storage read to get the active recovery process. O(1), Codec O(V)
* - One storage read to get the current block number. O(1)
* - One storage write. O(1), Codec O(V).
* - One event.
*
* Total Complexity: O(F + V)
* # </weight>
**/ **/
claimRecovery: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>; claimRecovery: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/** /**
@@ -2445,15 +2721,6 @@ declare module '@polkadot/api-base/types/submittable' {
* *
* Parameters: * Parameters:
* - `rescuer`: The account trying to rescue this recoverable account. * - `rescuer`: The account trying to rescue this recoverable account.
*
* # <weight>
* Key: V (len of vouching friends)
* - One storage read/remove to get the active recovery process. O(1), Codec O(V)
* - One balance call to repatriate reserved. O(X)
* - One event.
*
* Total Complexity: O(V + X)
* # </weight>
**/ **/
closeRecovery: AugmentedSubmittable<(rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>; closeRecovery: AugmentedSubmittable<(rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/** /**
@@ -2473,17 +2740,6 @@ declare module '@polkadot/api-base/types/submittable' {
* friends. * friends.
* - `delay_period`: The number of blocks after a recovery attempt is initialized that * - `delay_period`: The number of blocks after a recovery attempt is initialized that
* needs to pass before the account can be recovered. * needs to pass before the account can be recovered.
*
* # <weight>
* - Key: F (len of friends)
* - One storage read to check that account is not already recoverable. O(1).
* - A check that the friends list is sorted and unique. O(F)
* - One currency reserve operation. O(X)
* - One storage write. O(1). Codec O(F).
* - One event.
*
* Total Complexity: O(F + X)
* # </weight>
**/ **/
createRecovery: AugmentedSubmittable<(friends: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], threshold: u16 | AnyNumber | Uint8Array, delayPeriod: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, u16, u32]>; createRecovery: AugmentedSubmittable<(friends: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], threshold: u16 | AnyNumber | Uint8Array, delayPeriod: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, u16, u32]>;
/** /**
@@ -2498,17 +2754,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters: * Parameters:
* - `account`: The lost account that you want to recover. This account needs to be * - `account`: The lost account that you want to recover. This account needs to be
* recoverable (i.e. have a recovery configuration). * recoverable (i.e. have a recovery configuration).
*
* # <weight>
* - One storage read to check that account is recoverable. O(F)
* - One storage read to check that this recovery process hasn't already started. O(1)
* - One currency reserve operation. O(X)
* - One storage read to get the current block number. O(1)
* - One storage write. O(1).
* - One event.
*
* Total Complexity: O(F + X)
* # </weight>
**/ **/
initiateRecovery: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>; initiateRecovery: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/** /**
@@ -2523,16 +2768,6 @@ declare module '@polkadot/api-base/types/submittable' {
* *
* The dispatch origin for this call must be _Signed_ and must be a * The dispatch origin for this call must be _Signed_ and must be a
* recoverable account (i.e. has a recovery configuration). * recoverable account (i.e. has a recovery configuration).
*
* # <weight>
* Key: F (len of friends)
* - One storage read to get the prefix iterator for active recoveries. O(1)
* - One storage read/remove to get the recovery configuration. O(1), Codec O(F)
* - One balance call to unreserved. O(X)
* - One event.
*
* Total Complexity: O(F + X)
* # </weight>
**/ **/
removeRecovery: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>; removeRecovery: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/** /**
@@ -2544,11 +2779,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters: * Parameters:
* - `lost`: The "lost account" to be recovered. * - `lost`: The "lost account" to be recovered.
* - `rescuer`: The "rescuer account" which can call as the lost account. * - `rescuer`: The "rescuer account" which can call as the lost account.
*
* # <weight>
* - One storage write O(1)
* - One event
* # </weight>
**/ **/
setRecovered: AugmentedSubmittable<(lost: AccountId32 | string | Uint8Array, rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32]>; setRecovered: AugmentedSubmittable<(lost: AccountId32 | string | Uint8Array, rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32]>;
/** /**
@@ -2564,18 +2794,6 @@ declare module '@polkadot/api-base/types/submittable' {
* *
* The combination of these two parameters must point to an active recovery * The combination of these two parameters must point to an active recovery
* process. * process.
*
* # <weight>
* Key: F (len of friends in config), V (len of vouching friends)
* - One storage read to get the recovery configuration. O(1), Codec O(F)
* - One storage read to get the active recovery process. O(1), Codec O(V)
* - One binary search to confirm caller is a friend. O(logF)
* - One binary search to confirm caller has not already vouched. O(logV)
* - One storage write. O(1), Codec O(V).
* - One event.
*
* Total Complexity: O(F + logF + V + logV)
* # </weight>
**/ **/
vouchRecovery: AugmentedSubmittable<(lost: AccountId32 | string | Uint8Array, rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32]>; vouchRecovery: AugmentedSubmittable<(lost: AccountId32 | string | Uint8Array, rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32]>;
/** /**
@@ -3140,14 +3358,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Can be called by the `T::SlashCancelOrigin`. * Can be called by the `T::SlashCancelOrigin`.
* *
* Parameters: era and indices of the slashes for that era to kill. * Parameters: era and indices of the slashes for that era to kill.
*
* # <weight>
* Complexity: O(U + S)
* with U unapplied slashes weighted with U=1000
* and S is the number of slash indices to be canceled.
* - Read: Unapplied Slashes
* - Write: Unapplied Slashes
* # </weight>
**/ **/
cancelDeferredSlash: AugmentedSubmittable<(era: u32 | AnyNumber | Uint8Array, slashIndices: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<u32>]>; cancelDeferredSlash: AugmentedSubmittable<(era: u32 | AnyNumber | Uint8Array, slashIndices: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<u32>]>;
/** /**
@@ -3176,6 +3386,11 @@ declare module '@polkadot/api-base/types/submittable' {
* *
* If the caller is different than the controller being targeted, the following conditions * If the caller is different than the controller being targeted, the following conditions
* must be met: * must be met:
*
* * `controller` must belong to a nominator who has become non-decodable,
*
* Or:
*
* * A `ChillThreshold` must be set and checked which defines how close to the max * * A `ChillThreshold` must be set and checked which defines how close to the max
* nominators or validators we must reach before users can start chilling one-another. * nominators or validators we must reach before users can start chilling one-another.
* * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine
@@ -3188,6 +3403,12 @@ declare module '@polkadot/api-base/types/submittable' {
* who do not satisfy these requirements. * who do not satisfy these requirements.
**/ **/
chillOther: AugmentedSubmittable<(controller: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>; chillOther: AugmentedSubmittable<(controller: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* Force a validator to have at least the minimum commission. This will not affect a
* validator who already has a commission greater than or equal to the minimum. Any account
* can call this.
**/
forceApplyMinCommission: AugmentedSubmittable<(validatorStash: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/** /**
* Force there to be a new era at the end of the next session. After this, it will be * Force there to be a new era at the end of the next session. After this, it will be
* reset to normal (non-forced) behaviour. * reset to normal (non-forced) behaviour.
@@ -3217,11 +3438,6 @@ declare module '@polkadot/api-base/types/submittable' {
* The election process starts multiple blocks before the end of the era. * The election process starts multiple blocks before the end of the era.
* If this is called just before a new era is triggered, the election process may not * If this is called just before a new era is triggered, the election process may not
* have enough blocks to get a result. * have enough blocks to get a result.
*
* # <weight>
* - Weight: O(1)
* - Write: ForceEra
* # </weight>
**/ **/
forceNewEraAlways: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>; forceNewEraAlways: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/** /**
@@ -3246,13 +3462,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Force a current staker to become completely unstaked, immediately. * Force a current staker to become completely unstaked, immediately.
* *
* The dispatch origin must be Root. * The dispatch origin must be Root.
*
* # <weight>
* O(S) where S is the number of slashing spans to be removed
* Reads: Bonded, Slashing Spans, Account, Locks
* Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators,
* Account, Locks Writes Each: SpanSlash * S
* # </weight>
**/ **/
forceUnstake: AugmentedSubmittable<(stash: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>; forceUnstake: AugmentedSubmittable<(stash: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
/** /**
@@ -3288,7 +3497,7 @@ declare module '@polkadot/api-base/types/submittable' {
* *
* # <weight> * # <weight>
* - The transaction's complexity is proportional to the size of `targets` (N) * - The transaction's complexity is proportional to the size of `targets` (N)
* which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). * which is capped at CompactAssignments::LIMIT (T::MaxNominations).
* - Both the reads and writes follow a similar pattern. * - Both the reads and writes follow a similar pattern.
* # </weight> * # </weight>
**/ **/
@@ -3339,7 +3548,7 @@ declare module '@polkadot/api-base/types/submittable' {
* *
* # <weight> * # <weight>
* - Time complexity: O(L), where L is unlocking chunks * - Time complexity: O(L), where L is unlocking chunks
* - Bounded by `MAX_UNLOCKING_CHUNKS`. * - Bounded by `MaxUnlockingChunks`.
* - Storage changes: Can't increase storage, only decrease it. * - Storage changes: Can't increase storage, only decrease it.
* # </weight> * # </weight>
**/ **/
@@ -3357,7 +3566,7 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* (Re-)set the controller of a stash. * (Re-)set the controller of a stash.
* *
* Effects will be felt at the beginning of the next era. * Effects will be felt instantly (as soon as this function is completed successfully).
* *
* The dispatch origin for this call must be _Signed_ by the stash, not the controller. * The dispatch origin for this call must be _Signed_ by the stash, not the controller.
* *
@@ -3402,17 +3611,12 @@ declare module '@polkadot/api-base/types/submittable' {
* Set the validators who cannot be slashed (if any). * Set the validators who cannot be slashed (if any).
* *
* The dispatch origin must be Root. * The dispatch origin must be Root.
*
* # <weight>
* - O(V)
* - Write: Invulnerables
* # </weight>
**/ **/
setInvulnerables: AugmentedSubmittable<(invulnerables: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>]>; setInvulnerables: AugmentedSubmittable<(invulnerables: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>]>;
/** /**
* (Re-)set the payment target for a controller. * (Re-)set the payment target for a controller.
* *
* Effects will be felt at the beginning of the next era. * Effects will be felt instantly (as soon as this function is completed successfully).
* *
* The dispatch origin for this call must be _Signed_ by the controller, not the stash. * The dispatch origin for this call must be _Signed_ by the controller, not the stash.
* *
@@ -3447,7 +3651,7 @@ declare module '@polkadot/api-base/types/submittable' {
* NOTE: Existing nominators and validators will not be affected by this update. * NOTE: Existing nominators and validators will not be affected by this update.
* to kick people under the new limits, `chill_other` should be called. * to kick people under the new limits, `chill_other` should be called.
**/ **/
setStakingConfigs: AugmentedSubmittable<(minNominatorBond: u128 | AnyNumber | Uint8Array, minValidatorBond: u128 | AnyNumber | Uint8Array, maxNominatorCount: Option<u32> | null | object | string | Uint8Array, maxValidatorCount: Option<u32> | null | object | string | Uint8Array, chillThreshold: Option<Percent> | null | object | string | Uint8Array, minCommission: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128, u128, Option<u32>, Option<u32>, Option<Percent>, Perbill]>; setStakingConfigs: AugmentedSubmittable<(minNominatorBond: PalletStakingPalletConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minValidatorBond: PalletStakingPalletConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxNominatorCount: PalletStakingPalletConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxValidatorCount: PalletStakingPalletConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, chillThreshold: PalletStakingPalletConfigOpPercent | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minCommission: PalletStakingPalletConfigOpPerbill | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpPerbill]>;
/** /**
* Sets the ideal number of validators. * Sets the ideal number of validators.
* *
@@ -3469,7 +3673,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Once the unlock period is done, you can call `withdraw_unbonded` to actually move * Once the unlock period is done, you can call `withdraw_unbonded` to actually move
* the funds out of management ready for transfer. * the funds out of management ready for transfer.
* *
* No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) * No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)
* can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need
* to be called first to remove some of the chunks (if possible). * to be called first to remove some of the chunks (if possible).
* *
@@ -3538,11 +3742,6 @@ declare module '@polkadot/api-base/types/submittable' {
remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>; remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
/** /**
* Make some on-chain remark and emit event. * Make some on-chain remark and emit event.
*
* # <weight>
* - `O(b)` where b is the length of the remark.
* - 1 event.
* # </weight>
**/ **/
remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>; remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
/** /**
@@ -3651,7 +3850,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - 1 event * - 1 event
* # </weight> * # </weight>
**/ **/
execute: AugmentedSubmittable<(proposal: Call | { callIndex?: any; args?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Compact<u32>]>; execute: AugmentedSubmittable<(proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Compact<u32>]>;
/** /**
* Add a new proposal to either be voted on or executed directly. * Add a new proposal to either be voted on or executed directly.
* *
@@ -3681,7 +3880,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - 1 event * - 1 event
* # </weight> * # </weight>
**/ **/
propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | { callIndex?: any; args?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>; propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>;
/** /**
* Set the collective's membership. * Set the collective's membership.
* *
@@ -3992,6 +4191,24 @@ declare module '@polkadot/api-base/types/submittable' {
* # </weight> * # </weight>
**/ **/
rejectProposal: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>; rejectProposal: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* Force a previously approved proposal to be removed from the approval queue.
* The original deposit will no longer be returned.
*
* May only be called from `T::RejectOrigin`.
* - `proposal_id`: The index of a proposal
*
* # <weight>
* - Complexity: O(A) where `A` is the number of approvals
* - Db reads and writes: `Approvals`
* # </weight>
*
* Errors:
* - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue,
* i.e., the proposal has not been approved. This could also mean the proposal does not
* exist altogether, thus there is no way it would have been approved in the first place.
**/
removeApproval: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -4034,7 +4251,7 @@ declare module '@polkadot/api-base/types/submittable' {
* *
* The dispatch origin for this call must be _Signed_. * The dispatch origin for this call must be _Signed_.
**/ **/
asDerivative: AugmentedSubmittable<(index: u16 | AnyNumber | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Call]>; asDerivative: AugmentedSubmittable<(index: u16 | AnyNumber | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Call]>;
/** /**
* Send a batch of dispatch calls. * Send a batch of dispatch calls.
* *
@@ -4056,7 +4273,7 @@ declare module '@polkadot/api-base/types/submittable' {
* and the error of the failed call. If all were successful, then the `BatchCompleted` * and the error of the failed call. If all were successful, then the `BatchCompleted`
* event is deposited. * event is deposited.
**/ **/
batch: AugmentedSubmittable<(calls: Vec<Call> | (Call | { callIndex?: any; args?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>; batch: AugmentedSubmittable<(calls: Vec<Call> | (Call | IMethod | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
/** /**
* Send a batch of dispatch calls and atomically execute them. * Send a batch of dispatch calls and atomically execute them.
* The whole transaction will rollback and fail if any of the calls failed. * The whole transaction will rollback and fail if any of the calls failed.
@@ -4073,7 +4290,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Complexity: O(C) where C is the number of calls to be batched. * - Complexity: O(C) where C is the number of calls to be batched.
* # </weight> * # </weight>
**/ **/
batchAll: AugmentedSubmittable<(calls: Vec<Call> | (Call | { callIndex?: any; args?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>; batchAll: AugmentedSubmittable<(calls: Vec<Call> | (Call | IMethod | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
/** /**
* Dispatches a function call with a provided origin. * Dispatches a function call with a provided origin.
* *
@@ -4086,7 +4303,24 @@ declare module '@polkadot/api-base/types/submittable' {
* - Weight of derivative `call` execution + T::WeightInfo::dispatch_as(). * - Weight of derivative `call` execution + T::WeightInfo::dispatch_as().
* # </weight> * # </weight>
**/ **/
dispatchAs: AugmentedSubmittable<(asOrigin: KusamaRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { ParachainsOrigin: any } | { XcmPallet: any } | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [KusamaRuntimeOriginCaller, Call]>; dispatchAs: AugmentedSubmittable<(asOrigin: KusamaRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { ParachainsOrigin: any } | { XcmPallet: any } | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [KusamaRuntimeOriginCaller, Call]>;
/**
* Send a batch of dispatch calls.
* Unlike `batch`, it allows errors and won't interrupt.
*
* May be called from any origin.
*
* - `calls`: The calls to be dispatched from the same origin. The number of call must not
* exceed the constant: `batched_calls_limit` (available in constant metadata).
*
* If origin is root then call are dispatch without checking origin filter. (This includes
* bypassing `frame_system::Config::BaseCallFilter`).
*
* # <weight>
* - Complexity: O(C) where C is the number of calls to be batched.
* # </weight>
**/
forceBatch: AugmentedSubmittable<(calls: Vec<Call> | (Call | IMethod | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -4197,6 +4431,36 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
voterList: {
/**
* Move the caller's Id directly in front of `lighter`.
*
* The dispatch origin for this call must be _Signed_ and can only be called by the Id of
* the account going in front of `lighter`.
*
* Only works if
* - both nodes are within the same bag,
* - and `origin` has a greater `Score` than `lighter`.
**/
putInFrontOf: AugmentedSubmittable<(lighter: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* Declare that some `dislocated` account has, through rewards or penalties, sufficiently
* changed its score that it should properly fall into a different bag than its current
* one.
*
* Anyone can call this function about any potentially dislocated account.
*
* Will always update the stored score of `dislocated` to the correct score, based on
* `ScoreProvider`.
*
* If `dislocated` does not exists, it returns an error.
**/
rebag: AugmentedSubmittable<(dislocated: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
xcmPallet: { xcmPallet: {
/** /**
* Execute an XCM message from a local, signed, origin. * Execute an XCM message from a local, signed, origin.
@@ -4246,10 +4510,13 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
forceXcmVersion: AugmentedSubmittable<(location: XcmV1MultiLocation | { parents?: any; interior?: any } | string | Uint8Array, xcmVersion: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmV1MultiLocation, u32]>; forceXcmVersion: AugmentedSubmittable<(location: XcmV1MultiLocation | { parents?: any; interior?: any } | string | Uint8Array, xcmVersion: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmV1MultiLocation, u32]>;
/** /**
* Transfer some assets from the local chain to the sovereign account of a destination chain and forward * Transfer some assets from the local chain to the sovereign account of a destination
* a notification XCM. * chain and forward a notification XCM.
* *
* Fee payment on the destination side is made from the first asset listed in the `assets` vector. * Fee payment on the destination side is made from the asset in the `assets` vector of
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
* is needed than `weight_limit`, then the operation will fail and the assets send may be
* at risk.
* *
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM. * - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
@@ -4266,7 +4533,10 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* Teleport some assets from the local chain to some destination chain. * Teleport some assets from the local chain to some destination chain.
* *
* Fee payment on the destination side is made from the first asset listed in the `assets` vector. * Fee payment on the destination side is made from the asset in the `assets` vector of
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
* is needed than `weight_limit`, then the operation will fail and the assets send may be
* at risk.
* *
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM. * - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
@@ -4281,12 +4551,12 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
limitedTeleportAssets: AugmentedSubmittable<(dest: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, beneficiary: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, assets: XcmVersionedMultiAssets | { V0: any } | { V1: any } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array, weightLimit: XcmV2WeightLimit | { Unlimited: any } | { Limited: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedMultiLocation, XcmVersionedMultiLocation, XcmVersionedMultiAssets, u32, XcmV2WeightLimit]>; limitedTeleportAssets: AugmentedSubmittable<(dest: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, beneficiary: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, assets: XcmVersionedMultiAssets | { V0: any } | { V1: any } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array, weightLimit: XcmV2WeightLimit | { Unlimited: any } | { Limited: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedMultiLocation, XcmVersionedMultiLocation, XcmVersionedMultiAssets, u32, XcmV2WeightLimit]>;
/** /**
* Transfer some assets from the local chain to the sovereign account of a destination chain and forward * Transfer some assets from the local chain to the sovereign account of a destination
* a notification XCM. * chain and forward a notification XCM.
* *
* Fee payment on the destination side is made from the first asset listed in the `assets` vector and * Fee payment on the destination side is made from the asset in the `assets` vector of
* fee-weight is calculated locally and thus remote weights are assumed to be equal to * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,
* local weights. * with all fees taken as needed from the asset.
* *
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM. * - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
@@ -4303,9 +4573,9 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* Teleport some assets from the local chain to some destination chain. * Teleport some assets from the local chain to some destination chain.
* *
* Fee payment on the destination side is made from the first asset listed in the `assets` vector and * Fee payment on the destination side is made from the asset in the `assets` vector of
* fee-weight is calculated locally and thus remote weights are assumed to be equal to * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,
* local weights. * with all fees taken as needed from the asset.
* *
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM. * - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '7.5.1' }; export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '8.5.1' };
+123 -87
View File
@@ -2,7 +2,7 @@
/* eslint-disable */ /* eslint-disable */
import type { ApiTypes } from '@polkadot/api-base/types'; import type { ApiTypes } from '@polkadot/api-base/types';
import type { Bytes, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Codec } from '@polkadot/types-codec/types'; import type { Codec } from '@polkadot/types-codec/types';
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime'; import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup'; import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
@@ -63,58 +63,6 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
bagsList: {
/**
* The list of thresholds separating the various bags.
*
* Ids are separated into unsorted bags according to their vote weight. This specifies the
* thresholds separating the bags. An id's bag is the largest bag for which the id's weight
* is less than or equal to its upper threshold.
*
* When ids are iterated, higher bags are iterated completely before lower bags. This means
* that iteration is _semi-sorted_: ids of higher weight tend to come before ids of lower
* weight, but peer ids within a particular bag are sorted in insertion order.
*
* # Expressing the constant
*
* This constant must be sorted in strictly increasing order. Duplicate items are not
* permitted.
*
* There is an implied upper limit of `VoteWeight::MAX`; that value does not need to be
* specified within the bag. For any two threshold lists, if one ends with
* `VoteWeight::MAX`, the other one does not, and they are otherwise equal, the two lists
* will behave identically.
*
* # Calculation
*
* It is recommended to generate the set of thresholds in a geometric series, such that
* there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *
* constant_ratio).max(threshold[k] + 1)` for all `k`.
*
* The helpers in the `/utils/frame/generate-bags` module can simplify this calculation.
*
* # Examples
*
* - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and
* iteration is strictly in insertion order.
* - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to
* the procedure given above, then the constant ratio is equal to 2.
* - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to
* the procedure given above, then the constant ratio is approximately equal to 1.248.
* - If the threshold list begins `[1, 2, 3, ...]`, then an id with weight 0 or 1 will fall
* into bag 0, an id with weight 2 will fall into bag 1, etc.
*
* # Migration
*
* In the event that this list ever changes, a copy of the old bags list must be retained.
* With that `List::migrate` can be called, which will perform the appropriate migration.
**/
bagThresholds: Vec<u64> & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
balances: { balances: {
/** /**
* The minimum amount required to keep an account open. * The minimum amount required to keep an account open.
@@ -135,11 +83,6 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec; [key: string]: Codec;
}; };
bounties: { bounties: {
/**
* Percentage of the curator fee that will be reserved upfront as deposit for bounty
* curator.
**/
bountyCuratorDeposit: Permill & AugmentedConst<ApiType>;
/** /**
* The amount held on deposit for placing a bounty proposal. * The amount held on deposit for placing a bounty proposal.
**/ **/
@@ -156,6 +99,21 @@ declare module '@polkadot/api-base/types/consts' {
* Minimum value for a bounty. * Minimum value for a bounty.
**/ **/
bountyValueMinimum: u128 & AugmentedConst<ApiType>; bountyValueMinimum: u128 & AugmentedConst<ApiType>;
/**
* Maximum amount of funds that should be placed in a deposit for making a proposal.
**/
curatorDepositMax: Option<u128> & AugmentedConst<ApiType>;
/**
* Minimum amount of funds that should be placed in a deposit for making a proposal.
**/
curatorDepositMin: Option<u128> & AugmentedConst<ApiType>;
/**
* The curator deposit is calculated as a percentage of the curator fee.
*
* This deposit has optional upper and lower bounds with `CuratorDepositMax` and
* `CuratorDepositMin`.
**/
curatorDepositMultiplier: Permill & AugmentedConst<ApiType>;
/** /**
* The amount held on deposit per byte within the tip report reason or bounty description. * The amount held on deposit per byte within the tip report reason or bounty description.
**/ **/
@@ -171,6 +129,20 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
childBounties: {
/**
* Minimum value for a child-bounty.
**/
childBountyValueMinimum: u128 & AugmentedConst<ApiType>;
/**
* Maximum number of child bounties that can be added to a parent bounty.
**/
maxActiveChildBountyCount: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
claims: { claims: {
prefix: Bytes & AugmentedConst<ApiType>; prefix: Bytes & AugmentedConst<ApiType>;
/** /**
@@ -261,19 +233,25 @@ declare module '@polkadot/api-base/types/consts' {
}; };
electionProviderMultiPhase: { electionProviderMultiPhase: {
/** /**
* Maximum length (bytes) that the mined solution should consume. * The minimum amount of improvement to the solution score that defines a solution as
* * "better" in the Signed phase.
* The miner will ensure that the total length of the unsigned solution will not exceed
* this value.
**/ **/
minerMaxLength: u32 & AugmentedConst<ApiType>; betterSignedThreshold: Perbill & AugmentedConst<ApiType>;
/** /**
* Maximum weight that the miner should consume. * The minimum amount of improvement to the solution score that defines a solution as
* * "better" in the Unsigned phase.
* The miner will ensure that the total weight of the unsigned solution will not exceed
* this value, based on [`WeightInfo::submit_unsigned`].
**/ **/
minerMaxWeight: u64 & AugmentedConst<ApiType>; betterUnsignedThreshold: Perbill & AugmentedConst<ApiType>;
/**
* The maximum number of electable targets to put in the snapshot.
**/
maxElectableTargets: u16 & AugmentedConst<ApiType>;
/**
* The maximum number of electing voters to put in the snapshot. At the moment, snapshots
* are only over a single block, but once multi-block elections are introduced they will
* take place over multiple blocks.
**/
maxElectingVoters: u32 & AugmentedConst<ApiType>;
/** /**
* The priority of the unsigned transaction submitted in the unsigned-phase * The priority of the unsigned transaction submitted in the unsigned-phase
**/ **/
@@ -297,6 +275,10 @@ declare module '@polkadot/api-base/types/consts' {
* Per-weight deposit for a signed solution. * Per-weight deposit for a signed solution.
**/ **/
signedDepositWeight: u128 & AugmentedConst<ApiType>; signedDepositWeight: u128 & AugmentedConst<ApiType>;
/**
* The maximum amount of unchecked solutions to refund the call fee for.
**/
signedMaxRefunds: u32 & AugmentedConst<ApiType>;
/** /**
* Maximum number of signed submissions that can be queued. * Maximum number of signed submissions that can be queued.
* *
@@ -310,7 +292,9 @@ declare module '@polkadot/api-base/types/consts' {
/** /**
* Maximum weight of a signed solution. * Maximum weight of a signed solution.
* *
* This should probably be similar to [`Config::MinerMaxWeight`]. * If [`Config::MinerConfig`] is being implemented to submit signed solutions (outside of
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
* this value.
**/ **/
signedMaxWeight: u64 & AugmentedConst<ApiType>; signedMaxWeight: u64 & AugmentedConst<ApiType>;
/** /**
@@ -321,24 +305,10 @@ declare module '@polkadot/api-base/types/consts' {
* Base reward for a signed solution * Base reward for a signed solution
**/ **/
signedRewardBase: u128 & AugmentedConst<ApiType>; signedRewardBase: u128 & AugmentedConst<ApiType>;
/**
* The minimum amount of improvement to the solution score that defines a solution as
* "better" (in any phase).
**/
solutionImprovementThreshold: Perbill & AugmentedConst<ApiType>;
/** /**
* Duration of the unsigned phase. * Duration of the unsigned phase.
**/ **/
unsignedPhase: u32 & AugmentedConst<ApiType>; unsignedPhase: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of voters to put in the snapshot. At the moment, snapshots are only
* over a single block, but once multi-block elections are introduced they will take place
* over multiple blocks.
*
* Also, note the data type: If the voters are represented by a `u32` in `type
* CompactSolution`, the same `u32` is used here to ensure bounds are respected.
**/
voterSnapshotPerBlock: u32 & AugmentedConst<ApiType>;
/** /**
* Generic const * Generic const
**/ **/
@@ -575,6 +545,9 @@ declare module '@polkadot/api-base/types/consts' {
* Number of eras that staked funds must remain bonded for. * Number of eras that staked funds must remain bonded for.
**/ **/
bondingDuration: u32 & AugmentedConst<ApiType>; bondingDuration: u32 & AugmentedConst<ApiType>;
/**
* Maximum number of nominations per nominator.
**/
maxNominations: u32 & AugmentedConst<ApiType>; maxNominations: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum number of nominators rewarded for each validator. * The maximum number of nominators rewarded for each validator.
@@ -583,6 +556,11 @@ declare module '@polkadot/api-base/types/consts' {
* claim their reward. This used to limit the i/o cost for the nominator payout. * claim their reward. This used to limit the i/o cost for the nominator payout.
**/ **/
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>; maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively
* determines how many unique eras a staker may be unbonding in.
**/
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
/** /**
* Number of sessions per era. * Number of sessions per era.
**/ **/
@@ -675,6 +653,10 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec; [key: string]: Codec;
}; };
transactionPayment: { transactionPayment: {
/**
* The polynomial that is applied in order to derive fee from length.
**/
lengthToFee: Vec<FrameSupportWeightsWeightToFeeCoefficient> & AugmentedConst<ApiType>;
/** /**
* A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their * A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their
* `priority` * `priority`
@@ -699,10 +681,6 @@ declare module '@polkadot/api-base/types/consts' {
* transactions. * transactions.
**/ **/
operationalFeeMultiplier: u8 & AugmentedConst<ApiType>; operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
/**
* The fee to be paid for making a transaction; the per-byte portion.
**/
transactionByteFee: u128 & AugmentedConst<ApiType>;
/** /**
* The polynomial that is applied in order to derive fee from weight. * The polynomial that is applied in order to derive fee from weight.
**/ **/
@@ -719,6 +697,8 @@ declare module '@polkadot/api-base/types/consts' {
burn: Permill & AugmentedConst<ApiType>; burn: Permill & AugmentedConst<ApiType>;
/** /**
* The maximum number of approvals that can wait in the spending queue. * The maximum number of approvals that can wait in the spending queue.
*
* NOTE: This parameter is also used within the Bounties Pallet extension if enabled.
**/ **/
maxApprovals: u32 & AugmentedConst<ApiType>; maxApprovals: u32 & AugmentedConst<ApiType>;
/** /**
@@ -730,6 +710,10 @@ declare module '@polkadot/api-base/types/consts' {
* An accepted proposal gets these back. A rejected proposal does not. * An accepted proposal gets these back. A rejected proposal does not.
**/ **/
proposalBond: Permill & AugmentedConst<ApiType>; proposalBond: Permill & AugmentedConst<ApiType>;
/**
* Maximum amount of funds that should be placed in a deposit for making a proposal.
**/
proposalBondMaximum: Option<u128> & AugmentedConst<ApiType>;
/** /**
* Minimum amount of funds that should be placed in a deposit for making a proposal. * Minimum amount of funds that should be placed in a deposit for making a proposal.
**/ **/
@@ -764,5 +748,57 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
voterList: {
/**
* The list of thresholds separating the various bags.
*
* Ids are separated into unsorted bags according to their score. This specifies the
* thresholds separating the bags. An id's bag is the largest bag for which the id's score
* is less than or equal to its upper threshold.
*
* When ids are iterated, higher bags are iterated completely before lower bags. This means
* that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower
* score, but peer ids within a particular bag are sorted in insertion order.
*
* # Expressing the constant
*
* This constant must be sorted in strictly increasing order. Duplicate items are not
* permitted.
*
* There is an implied upper limit of `Score::MAX`; that value does not need to be
* specified within the bag. For any two threshold lists, if one ends with
* `Score::MAX`, the other one does not, and they are otherwise equal, the two
* lists will behave identically.
*
* # Calculation
*
* It is recommended to generate the set of thresholds in a geometric series, such that
* there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *
* constant_ratio).max(threshold[k] + 1)` for all `k`.
*
* The helpers in the `/utils/frame/generate-bags` module can simplify this calculation.
*
* # Examples
*
* - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and
* iteration is strictly in insertion order.
* - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to
* the procedure given above, then the constant ratio is equal to 2.
* - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to
* the procedure given above, then the constant ratio is approximately equal to 1.248.
* - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall
* into bag 0, an id with score 2 will fall into bag 1, etc.
*
* # Migration
*
* In the event that this list ever changes, a copy of the old bags list must be retained.
* With that `List::migrate` can be called, which will perform the appropriate migration.
**/
bagThresholds: Vec<u64> & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
} // AugmentedConsts } // AugmentedConsts
} // declare module } // declare module
+116 -19
View File
@@ -78,6 +78,10 @@ declare module '@polkadot/api-base/types/errors' {
* A given equivocation report is valid but already previously reported. * A given equivocation report is valid but already previously reported.
**/ **/
DuplicateOffenceReport: AugmentedError<ApiType>; DuplicateOffenceReport: AugmentedError<ApiType>;
/**
* Submitted configuration is invalid.
**/
InvalidConfiguration: AugmentedError<ApiType>;
/** /**
* An equivocation proof provided as part of an equivocation report is invalid. * An equivocation proof provided as part of an equivocation report is invalid.
**/ **/
@@ -91,24 +95,6 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
bagsList: {
/**
* Id not found in list.
**/
IdNotFound: AugmentedError<ApiType>;
/**
* An Id does not have a greater vote weight than another Id.
**/
NotHeavier: AugmentedError<ApiType>;
/**
* Attempted to place node in front of a node in another bag.
**/
NotInSameBag: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
balances: { balances: {
/** /**
* Beneficiary account must pre-exist * Beneficiary account must pre-exist
@@ -149,7 +135,7 @@ declare module '@polkadot/api-base/types/errors' {
}; };
bounties: { bounties: {
/** /**
* The bounty cannot be closed because it has active child-bounties. * The bounty cannot be closed because it has active child bounties.
**/ **/
HasActiveChildBounty: AugmentedError<ApiType>; HasActiveChildBounty: AugmentedError<ApiType>;
/** /**
@@ -185,6 +171,10 @@ declare module '@polkadot/api-base/types/errors' {
* Require bounty curator. * Require bounty curator.
**/ **/
RequireCurator: AugmentedError<ApiType>; RequireCurator: AugmentedError<ApiType>;
/**
* Too many approvals are already queued.
**/
TooManyQueued: AugmentedError<ApiType>;
/** /**
* The bounty status is unexpected. * The bounty status is unexpected.
**/ **/
@@ -194,6 +184,24 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
childBounties: {
/**
* The bounty balance is not enough to add new child-bounty.
**/
InsufficientBountyBalance: AugmentedError<ApiType>;
/**
* The parent bounty is not in active state.
**/
ParentBountyNotActive: AugmentedError<ApiType>;
/**
* Number of child bounties exceeds limit `MaxActiveChildBountyCount`.
**/
TooManyChildBounties: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
claims: { claims: {
/** /**
* Invalid Ethereum signature. * Invalid Ethereum signature.
@@ -503,6 +511,10 @@ declare module '@polkadot/api-base/types/errors' {
* The call is not allowed at this point. * The call is not allowed at this point.
**/ **/
CallNotAllowed: AugmentedError<ApiType>; CallNotAllowed: AugmentedError<ApiType>;
/**
* The fallback failed
**/
FallbackFailed: AugmentedError<ApiType>;
/** /**
* `Self::insert_submission` returned an invalid index. * `Self::insert_submission` returned an invalid index.
**/ **/
@@ -657,6 +669,10 @@ declare module '@polkadot/api-base/types/errors' {
* The requested maximum message size is 0. * The requested maximum message size is 0.
**/ **/
OpenHrmpChannelZeroMessageSize: AugmentedError<ApiType>; OpenHrmpChannelZeroMessageSize: AugmentedError<ApiType>;
/**
* The provided witness data is wrong.
**/
WrongWitness: AugmentedError<ApiType>;
/** /**
* Generic error * Generic error
**/ **/
@@ -835,6 +851,10 @@ declare module '@polkadot/api-base/types/errors' {
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
paraInclusion: { paraInclusion: {
/**
* Bitfield consists of zeros only.
**/
BitfieldAllZeros: AugmentedError<ApiType>;
/** /**
* Multiple bitfields submitted by same validator or validators out of order by index. * Multiple bitfields submitted by same validator or validators out of order by index.
**/ **/
@@ -914,10 +934,26 @@ declare module '@polkadot/api-base/types/errors' {
* Scheduled cores out of order. * Scheduled cores out of order.
**/ **/
ScheduledOutOfOrder: AugmentedError<ApiType>; ScheduledOutOfOrder: AugmentedError<ApiType>;
/**
* A different relay parent was provided compared to the on-chain stored one.
**/
UnexpectedRelayParent: AugmentedError<ApiType>;
/** /**
* Candidate submitted but para not scheduled. * Candidate submitted but para not scheduled.
**/ **/
UnscheduledCandidate: AugmentedError<ApiType>; UnscheduledCandidate: AugmentedError<ApiType>;
/**
* Backed candidates are out of order (core index) or contain duplicates.
**/
UnsortedOrDuplicateBackedCandidates: AugmentedError<ApiType>;
/**
* Dispute statement sets are out of order or contain duplicates.
**/
UnsortedOrDuplicateDisputeStatementSet: AugmentedError<ApiType>;
/**
* Validator indices are out of order or contains duplicates.
**/
UnsortedOrDuplicateValidatorIndices: AugmentedError<ApiType>;
/** /**
* The validation data hash does not match expected. * The validation data hash does not match expected.
**/ **/
@@ -944,6 +980,14 @@ declare module '@polkadot/api-base/types/errors' {
* Disputed candidate that was concluded invalid. * Disputed candidate that was concluded invalid.
**/ **/
CandidateConcludedInvalid: AugmentedError<ApiType>; CandidateConcludedInvalid: AugmentedError<ApiType>;
/**
* A dispute statement was invalid.
**/
DisputeInvalid: AugmentedError<ApiType>;
/**
* The ordering of dispute statements was invalid.
**/
DisputeStatementsUnsortedOrDuplicates: AugmentedError<ApiType>;
/** /**
* The data given to the inherent will result in an overweight block. * The data given to the inherent will result in an overweight block.
**/ **/
@@ -1017,6 +1061,40 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
parasDisputes: {
/**
* Ancient dispute statement provided.
**/
AncientDisputeStatement: AugmentedError<ApiType>;
/**
* Duplicate dispute statement sets provided.
**/
DuplicateDisputeStatementSets: AugmentedError<ApiType>;
/**
* Validator vote submitted more than once to dispute.
**/
DuplicateStatement: AugmentedError<ApiType>;
/**
* Invalid signature on statement.
**/
InvalidSignature: AugmentedError<ApiType>;
/**
* Too many spam slots used by some specific validator.
**/
PotentialSpam: AugmentedError<ApiType>;
/**
* A dispute where there are only votes on one side.
**/
SingleSidedDispute: AugmentedError<ApiType>;
/**
* Validator index on statement is out of bounds for session.
**/
ValidatorIndexOutOfBounds: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
phragmenElection: { phragmenElection: {
/** /**
* Duplicated candidate submission. * Duplicated candidate submission.
@@ -1172,6 +1250,11 @@ declare module '@polkadot/api-base/types/errors' {
* Cannot schedule downgrade of parachain to parathread * Cannot schedule downgrade of parachain to parathread
**/ **/
CannotDowngrade: AugmentedError<ApiType>; CannotDowngrade: AugmentedError<ApiType>;
/**
* Cannot perform a parachain slot / lifecycle swap. Check that the state of both paras are
* correct for the swap to work.
**/
CannotSwap: AugmentedError<ApiType>;
/** /**
* Cannot schedule upgrade of parathread to parachain * Cannot schedule upgrade of parathread to parachain
**/ **/
@@ -1518,6 +1601,10 @@ declare module '@polkadot/api-base/types/errors' {
* No proposal or bounty at that index. * No proposal or bounty at that index.
**/ **/
InvalidIndex: AugmentedError<ApiType>; InvalidIndex: AugmentedError<ApiType>;
/**
* Proposal has not been approved.
**/
ProposalNotApproved: AugmentedError<ApiType>;
/** /**
* Too many approvals in the queue. * Too many approvals in the queue.
**/ **/
@@ -1578,6 +1665,16 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
voterList: {
/**
* A error in the list interface implementation.
**/
List: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
xcmPallet: { xcmPallet: {
/** /**
* The location is invalid since it already has a subscription from us. * The location is invalid since it already has a subscription from us.
+96 -32
View File
@@ -6,35 +6,32 @@ import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32,
import type { ITuple } from '@polkadot/types-codec/types'; import type { ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth'; import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV1CandidateReceipt, PolkadotRuntimeProxyType, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup'; import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeProxyType, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
declare module '@polkadot/api-base/types/events' { declare module '@polkadot/api-base/types/events' {
export interface AugmentedEvents<ApiType extends ApiTypes> { export interface AugmentedEvents<ApiType extends ApiTypes> {
auctions: { auctions: {
/** /**
* An auction ended. All funds become unreserved. `[auction_index]` * An auction ended. All funds become unreserved.
**/ **/
AuctionClosed: AugmentedEvent<ApiType, [u32]>; AuctionClosed: AugmentedEvent<ApiType, [u32]>;
/** /**
* An auction started. Provides its index and the block number where it will begin to * An auction started. Provides its index and the block number where it will begin to
* close and the first lease period of the quadruplet that is auctioned. * close and the first lease period of the quadruplet that is auctioned.
* `[auction_index, lease_period, ending]`
**/ **/
AuctionStarted: AugmentedEvent<ApiType, [u32, u32, u32]>; AuctionStarted: AugmentedEvent<ApiType, [u32, u32, u32]>;
/** /**
* A new bid has been accepted as the current winner. * A new bid has been accepted as the current winner.
* `[who, para_id, amount, first_slot, last_slot]`
**/ **/
BidAccepted: AugmentedEvent<ApiType, [AccountId32, u32, u128, u32, u32]>; BidAccepted: AugmentedEvent<ApiType, [AccountId32, u32, u128, u32, u32]>;
/** /**
* Someone attempted to lease the same slot twice for a parachain. The amount is held in reserve * Someone attempted to lease the same slot twice for a parachain. The amount is held in reserve
* but no parachain slot has been leased. * but no parachain slot has been leased.
* `[parachain_id, leaser, amount]`
**/ **/
ReserveConfiscated: AugmentedEvent<ApiType, [u32, AccountId32, u128]>; ReserveConfiscated: AugmentedEvent<ApiType, [u32, AccountId32, u128]>;
/** /**
* Funds were reserved for a winning bid. First balance is the extra amount reserved. * Funds were reserved for a winning bid. First balance is the extra amount reserved.
* Second is the total. `[bidder, extra_reserved, total_amount]` * Second is the total.
**/ **/
Reserved: AugmentedEvent<ApiType, [AccountId32, u128, u128]>; Reserved: AugmentedEvent<ApiType, [AccountId32, u128, u128]>;
/** /**
@@ -43,7 +40,6 @@ declare module '@polkadot/api-base/types/events' {
Unreserved: AugmentedEvent<ApiType, [AccountId32, u128]>; Unreserved: AugmentedEvent<ApiType, [AccountId32, u128]>;
/** /**
* The winning offset was chosen for an auction. This will map into the `Winning` storage map. * The winning offset was chosen for an auction. This will map into the `Winning` storage map.
* `[auction_index, block_number]`
**/ **/
WinningOffset: AugmentedEvent<ApiType, [u32, u32]>; WinningOffset: AugmentedEvent<ApiType, [u32, u32]>;
/** /**
@@ -51,16 +47,6 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
bagsList: {
/**
* Moved an account from one bag to another.
**/
Rebagged: AugmentedEvent<ApiType, [AccountId32, u64, u64]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
balances: { balances: {
/** /**
* A balance was set by root. * A balance was set by root.
@@ -143,9 +129,31 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
childBounties: {
/**
* A child-bounty is added.
**/
Added: AugmentedEvent<ApiType, [u32, u32]>;
/**
* A child-bounty is awarded to a beneficiary.
**/
Awarded: AugmentedEvent<ApiType, [u32, u32, AccountId32]>;
/**
* A child-bounty is cancelled.
**/
Canceled: AugmentedEvent<ApiType, [u32, u32]>;
/**
* A child-bounty is claimed by beneficiary.
**/
Claimed: AugmentedEvent<ApiType, [u32, u32, u128, AccountId32]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
claims: { claims: {
/** /**
* Someone claimed some DOTs. `[who, ethereum_address, amount]` * Someone claimed some DOTs.
**/ **/
Claimed: AugmentedEvent<ApiType, [AccountId32, EthereumAddress, u128]>; Claimed: AugmentedEvent<ApiType, [AccountId32, EthereumAddress, u128]>;
/** /**
@@ -195,23 +203,23 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
AddedToNewRaise: AugmentedEvent<ApiType, [u32]>; AddedToNewRaise: AugmentedEvent<ApiType, [u32]>;
/** /**
* All loans in a fund have been refunded. `[fund_index]` * All loans in a fund have been refunded.
**/ **/
AllRefunded: AugmentedEvent<ApiType, [u32]>; AllRefunded: AugmentedEvent<ApiType, [u32]>;
/** /**
* Contributed to a crowd sale. `[who, fund_index, amount]` * Contributed to a crowd sale.
**/ **/
Contributed: AugmentedEvent<ApiType, [AccountId32, u32, u128]>; Contributed: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
/** /**
* Create a new crowdloaning campaign. `[fund_index]` * Create a new crowdloaning campaign.
**/ **/
Created: AugmentedEvent<ApiType, [u32]>; Created: AugmentedEvent<ApiType, [u32]>;
/** /**
* Fund is dissolved. `[fund_index]` * Fund is dissolved.
**/ **/
Dissolved: AugmentedEvent<ApiType, [u32]>; Dissolved: AugmentedEvent<ApiType, [u32]>;
/** /**
* The configuration to a crowdloan has been edited. `[fund_index]` * The configuration to a crowdloan has been edited.
**/ **/
Edited: AugmentedEvent<ApiType, [u32]>; Edited: AugmentedEvent<ApiType, [u32]>;
/** /**
@@ -219,16 +227,16 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
HandleBidResult: AugmentedEvent<ApiType, [u32, Result<Null, SpRuntimeDispatchError>]>; HandleBidResult: AugmentedEvent<ApiType, [u32, Result<Null, SpRuntimeDispatchError>]>;
/** /**
* A memo has been updated. `[who, fund_index, memo]` * A memo has been updated.
**/ **/
MemoUpdated: AugmentedEvent<ApiType, [AccountId32, u32, Bytes]>; MemoUpdated: AugmentedEvent<ApiType, [AccountId32, u32, Bytes]>;
/** /**
* The loans in a fund have been partially dissolved, i.e. there are some left * The loans in a fund have been partially dissolved, i.e. there are some left
* over child keys that still need to be killed. `[fund_index]` * over child keys that still need to be killed.
**/ **/
PartiallyRefunded: AugmentedEvent<ApiType, [u32]>; PartiallyRefunded: AugmentedEvent<ApiType, [u32]>;
/** /**
* Withdrew full balance of a contributor. `[who, fund_index, amount]` * Withdrew full balance of a contributor.
**/ **/
Withdrew: AugmentedEvent<ApiType, [AccountId32, u32, u128]>; Withdrew: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
/** /**
@@ -517,15 +525,15 @@ declare module '@polkadot/api-base/types/events' {
/** /**
* A candidate was backed. `[candidate, head_data]` * A candidate was backed. `[candidate, head_data]`
**/ **/
CandidateBacked: AugmentedEvent<ApiType, [PolkadotPrimitivesV1CandidateReceipt, Bytes, u32, u32]>; CandidateBacked: AugmentedEvent<ApiType, [PolkadotPrimitivesV2CandidateReceipt, Bytes, u32, u32]>;
/** /**
* A candidate was included. `[candidate, head_data]` * A candidate was included. `[candidate, head_data]`
**/ **/
CandidateIncluded: AugmentedEvent<ApiType, [PolkadotPrimitivesV1CandidateReceipt, Bytes, u32, u32]>; CandidateIncluded: AugmentedEvent<ApiType, [PolkadotPrimitivesV2CandidateReceipt, Bytes, u32, u32]>;
/** /**
* A candidate timed out. `[candidate, head_data]` * A candidate timed out. `[candidate, head_data]`
**/ **/
CandidateTimedOut: AugmentedEvent<ApiType, [PolkadotPrimitivesV1CandidateReceipt, Bytes, u32]>; CandidateTimedOut: AugmentedEvent<ApiType, [PolkadotPrimitivesV2CandidateReceipt, Bytes, u32]>;
/** /**
* Generic event * Generic event
**/ **/
@@ -553,12 +561,12 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
NewHeadNoted: AugmentedEvent<ApiType, [u32]>; NewHeadNoted: AugmentedEvent<ApiType, [u32]>;
/** /**
* The given validation code was rejected by the PVF pre-checking vote. * The given validation code was accepted by the PVF pre-checking vote.
* `code_hash` `para_id` * `code_hash` `para_id`
**/ **/
PvfCheckAccepted: AugmentedEvent<ApiType, [H256, u32]>; PvfCheckAccepted: AugmentedEvent<ApiType, [H256, u32]>;
/** /**
* The given validation code was accepted by the PVF pre-checking vote. * The given validation code was rejected by the PVF pre-checking vote.
* `code_hash` `para_id` * `code_hash` `para_id`
**/ **/
PvfCheckRejected: AugmentedEvent<ApiType, [H256, u32]>; PvfCheckRejected: AugmentedEvent<ApiType, [H256, u32]>;
@@ -572,6 +580,33 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
parasDisputes: {
/**
* A dispute has concluded for or against a candidate.
* `\[para id, candidate hash, dispute result\]`
**/
DisputeConcluded: AugmentedEvent<ApiType, [H256, PolkadotRuntimeParachainsDisputesDisputeResult]>;
/**
* A dispute has been initiated. \[candidate hash, dispute location\]
**/
DisputeInitiated: AugmentedEvent<ApiType, [H256, PolkadotRuntimeParachainsDisputesDisputeLocation]>;
/**
* A dispute has timed out due to insufficient participation.
* `\[para id, candidate hash\]`
**/
DisputeTimedOut: AugmentedEvent<ApiType, [H256]>;
/**
* A dispute has concluded with supermajority against a candidate.
* Block authors should no longer build on top of this head and should
* instead revert the block at the given height. This should be the
* number of the child of the last known valid block in the chain.
**/
Revert: AugmentedEvent<ApiType, [u32]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
phragmenElection: { phragmenElection: {
/** /**
* A candidate was slashed by amount due to failing to obtain a seat as member or * A candidate was slashed by amount due to failing to obtain a seat as member or
@@ -651,6 +686,10 @@ declare module '@polkadot/api-base/types/events' {
* A proxy was executed correctly, with the given. * A proxy was executed correctly, with the given.
**/ **/
ProxyExecuted: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>; ProxyExecuted: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;
/**
* A proxy was removed.
**/
ProxyRemoved: AugmentedEvent<ApiType, [AccountId32, AccountId32, PolkadotRuntimeProxyType, u32]>;
/** /**
* Generic event * Generic event
**/ **/
@@ -703,7 +742,6 @@ declare module '@polkadot/api-base/types/events' {
* A para has won the right to a continuous set of lease periods as a parachain. * A para has won the right to a continuous set of lease periods as a parachain.
* First balance is any extra amount reserved on top of the para's existing deposit. * First balance is any extra amount reserved on top of the para's existing deposit.
* Second balance is the total amount reserved. * Second balance is the total amount reserved.
* `[parachain_id, leaser, period_begin, period_count, extra_reserved, total_amount]`
**/ **/
Leased: AugmentedEvent<ApiType, [u32, AccountId32, u32, u32, u128, u128]>; Leased: AugmentedEvent<ApiType, [u32, AccountId32, u32, u32, u128, u128]>;
/** /**
@@ -768,6 +806,10 @@ declare module '@polkadot/api-base/types/events' {
* An account has unbonded this amount. \[stash, amount\] * An account has unbonded this amount. \[stash, amount\]
**/ **/
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>; Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
* A validator has set their preferences.
**/
ValidatorPrefsSet: AugmentedEvent<ApiType, [AccountId32, PalletStakingValidatorPrefs]>;
/** /**
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance` * An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
* from the unlocking queue. \[stash, amount\] * from the unlocking queue. \[stash, amount\]
@@ -986,6 +1028,10 @@ declare module '@polkadot/api-base/types/events' {
* Batch of dispatches completed fully with no error. * Batch of dispatches completed fully with no error.
**/ **/
BatchCompleted: AugmentedEvent<ApiType, []>; BatchCompleted: AugmentedEvent<ApiType, []>;
/**
* Batch of dispatches completed but has errors.
**/
BatchCompletedWithErrors: AugmentedEvent<ApiType, []>;
/** /**
* Batch of dispatches did not complete fully. Index of first failing dispatch given, as * Batch of dispatches did not complete fully. Index of first failing dispatch given, as
* well as the error. * well as the error.
@@ -999,6 +1045,10 @@ declare module '@polkadot/api-base/types/events' {
* A single item within a Batch of dispatches has completed with no error. * A single item within a Batch of dispatches has completed with no error.
**/ **/
ItemCompleted: AugmentedEvent<ApiType, []>; ItemCompleted: AugmentedEvent<ApiType, []>;
/**
* A single item within a Batch of dispatches has completed with error.
**/
ItemFailed: AugmentedEvent<ApiType, [SpRuntimeDispatchError]>;
/** /**
* Generic event * Generic event
**/ **/
@@ -1019,6 +1069,20 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
voterList: {
/**
* Moved an account from one bag to another.
**/
Rebagged: AugmentedEvent<ApiType, [AccountId32, u64, u64]>;
/**
* Updated the score of some account to the given amount.
**/
ScoreUpdated: AugmentedEvent<ApiType, [AccountId32, u64]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
xcmPallet: { xcmPallet: {
/** /**
* Some assets have been placed in an asset trap. * Some assets have been placed in an asset trap.
@@ -6,4 +6,5 @@ import './consts';
import './errors'; import './errors';
import './events'; import './events';
import './query'; import './query';
import './registry';
import './tx'; import './tx';
+161 -74
View File
@@ -7,7 +7,7 @@ import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, W
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth'; import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppPublic, PolkadotPrimitivesV1AssignmentAppPublic, PolkadotPrimitivesV1CandidateCommitments, PolkadotPrimitivesV1CoreOccupied, PolkadotPrimitivesV1ScrapedOnChainVotes, PolkadotPrimitivesV1UpgradeGoAhead, PolkadotPrimitivesV1UpgradeRestriction, PolkadotPrimitivesV2SessionInfo, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup'; import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerScheduledV3, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
import type { Observable } from '@polkadot/types/types'; import type { Observable } from '@polkadot/types/types';
declare module '@polkadot/api-base/types/storage' { declare module '@polkadot/api-base/types/storage' {
@@ -68,7 +68,7 @@ declare module '@polkadot/api-base/types/storage' {
* This field should always be populated during block processing unless * This field should always be populated during block processing unless
* secondary plain slots are enabled (which don't contain a VRF output). * secondary plain slots are enabled (which don't contain a VRF output).
* *
* It is set in `on_initialize`, before it will contain the value from the last block. * It is set in `on_finalize`, before it will contain the value from the last block.
**/ **/
authorVrfRandomness: AugmentedQuery<ApiType, () => Observable<Option<U8aFixed>>, []> & QueryableStorageEntry<ApiType, []>; authorVrfRandomness: AugmentedQuery<ApiType, () => Observable<Option<U8aFixed>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
@@ -101,7 +101,7 @@ declare module '@polkadot/api-base/types/storage' {
* Temporary value (cleared at block finalization) which is `Some` * Temporary value (cleared at block finalization) which is `Some`
* if per-block initialization has already been called for current block. * if per-block initialization has already been called for current block.
**/ **/
initialized: AugmentedQuery<ApiType, () => Observable<Option<Option<U8aFixed>>>, []> & QueryableStorageEntry<ApiType, []>; initialized: AugmentedQuery<ApiType, () => Observable<Option<Option<SpConsensusBabeDigestsPreDigest>>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* How late the current block is compared to its parent. * How late the current block is compared to its parent.
* *
@@ -161,32 +161,31 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
bagsList: {
/**
* Counter for the related counted storage map
**/
counterForListNodes: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* A bag stored in storage.
*
* Stores a `Bag` struct, which stores head and tail pointers to itself.
**/
listBags: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletBagsListListBag>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
/**
* A single node, within some bag.
*
* Nodes store links forward and back within their respective bags.
**/
listNodes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletBagsListListNode>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
balances: { balances: {
/** /**
* The balance of an account. * The Balances pallet example of storing the balance of an account.
* *
* # Example
*
* ```nocompile
* impl pallet_balances::Config for Runtime {
* type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>
* }
* ```
*
* You can also store the balance of an account in the `System` pallet.
*
* # Example
*
* ```nocompile
* impl pallet_balances::Config for Runtime {
* type AccountStore = System
* }
* ```
*
* But this comes with tradeoffs, storing account balances in the system pallet stores
* `frame_system` data alongside the account data contrary to storing account balances in the
* `Balances` pallet, which uses a `StorageMap` to store balances data only.
* NOTE: This is only used in the case that this pallet is used to store balances. * NOTE: This is only used in the case that this pallet is used to store balances.
**/ **/
account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>; account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
@@ -236,6 +235,33 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
childBounties: {
/**
* Child bounties that have been added.
**/
childBounties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletChildBountiesChildBounty>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
/**
* Number of total child bounties.
**/
childBountyCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The description of each child-bounty.
**/
childBountyDescriptions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* The cumulative child-bounty curator fee for each parent bounty.
**/
childrenCuratorFees: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Number of child bounties per parent bounty.
* Map of parent bounty index to number of child bounties.
**/
parentChildBounties: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
claims: { claims: {
claims: AugmentedQuery<ApiType, (arg: EthereumAddress | string | Uint8Array) => Observable<Option<u128>>, [EthereumAddress]> & QueryableStorageEntry<ApiType, [EthereumAddress]>; claims: AugmentedQuery<ApiType, (arg: EthereumAddress | string | Uint8Array) => Observable<Option<u128>>, [EthereumAddress]> & QueryableStorageEntry<ApiType, [EthereumAddress]>;
/** /**
@@ -269,12 +295,6 @@ declare module '@polkadot/api-base/types/storage' {
* is meant to be used only as the last resort. * is meant to be used only as the last resort.
**/ **/
bypassConsistencyCheck: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>; bypassConsistencyCheck: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Pending configuration (if any) for the next session.
*
* DEPRECATED: This is no longer used, and will be removed in the future.
**/
pendingConfig: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Pending configuration changes. * Pending configuration changes.
* *
@@ -335,9 +355,9 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
newRaise: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>; newRaise: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Tracker for the next available trie index * Tracker for the next available fund index
**/ **/
nextTrieIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>; nextFundIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Generic query * Generic query
**/ **/
@@ -364,13 +384,6 @@ declare module '@polkadot/api-base/types/storage' {
* proposal. * proposal.
**/ **/
lastTabledWasExternal: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>; lastTabledWasExternal: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Accounts for which there are locks in action which may be removed at some point in the
* future. The value is the block number at which the lock expires and may be removed.
*
* TWOX-NOTE: OK ― `AccountId` is a secure hash.
**/
locks: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
* The lowest referendum index representing an unbaked referendum. Equal to * The lowest referendum index representing an unbaked referendum. Equal to
* `ReferendumCount` if there isn't a unbaked referendum. * `ReferendumCount` if there isn't a unbaked referendum.
@@ -461,7 +474,7 @@ declare module '@polkadot/api-base/types/storage' {
* *
* Can be set via `set_minimum_untrusted_score`. * Can be set via `set_minimum_untrusted_score`.
**/ **/
minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<Vec<u128>>>, []> & QueryableStorageEntry<ApiType, []>; minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<SpNposElectionsElectionScore>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Current best solution, signed or unsigned, queued to be returned upon `elect`. * Current best solution, signed or unsigned, queued to be returned upon `elect`.
**/ **/
@@ -483,7 +496,7 @@ declare module '@polkadot/api-base/types/storage' {
* can be quite large, so we're willing to pay the cost of multiple database accesses to access * can be quite large, so we're willing to pay the cost of multiple database accesses to access
* them one at a time instead of reading and decoding all of them at once. * them one at a time instead of reading and decoding all of them at once.
**/ **/
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<Vec<u128>, u32>>, []> & QueryableStorageEntry<ApiType, []>; signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<SpNposElectionsElectionScore, u32>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The next index to be assigned to an incoming signed submission. * The next index to be assigned to an incoming signed submission.
* *
@@ -570,13 +583,12 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
hrmpChannelContents: AugmentedQuery<ApiType, (arg: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array) => Observable<Vec<PolkadotCorePrimitivesInboundHrmpMessage>>, [PolkadotParachainPrimitivesHrmpChannelId]> & QueryableStorageEntry<ApiType, [PolkadotParachainPrimitivesHrmpChannelId]>; hrmpChannelContents: AugmentedQuery<ApiType, (arg: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array) => Observable<Vec<PolkadotCorePrimitivesInboundHrmpMessage>>, [PolkadotParachainPrimitivesHrmpChannelId]> & QueryableStorageEntry<ApiType, [PolkadotParachainPrimitivesHrmpChannelId]>;
/** /**
* Maintains a mapping that can be used to answer the question: * Maintains a mapping that can be used to answer the question: What paras sent a message at
* What paras sent a message at the given block number for a given receiver. * the given block number for a given receiver. Invariants:
* Invariants:
* - The inner `Vec<ParaId>` is never empty. * - The inner `Vec<ParaId>` is never empty.
* - The inner `Vec<ParaId>` cannot store two same `ParaId`. * - The inner `Vec<ParaId>` cannot store two same `ParaId`.
* - The outer vector is sorted ascending by block number and cannot store two items with the same * - The outer vector is sorted ascending by block number and cannot store two items with the
* block number. * same block number.
**/ **/
hrmpChannelDigests: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, Vec<u32>]>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; hrmpChannelDigests: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, Vec<u32>]>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
@@ -586,8 +598,8 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
hrmpChannels: AugmentedQuery<ApiType, (arg: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array) => Observable<Option<PolkadotRuntimeParachainsHrmpHrmpChannel>>, [PolkadotParachainPrimitivesHrmpChannelId]> & QueryableStorageEntry<ApiType, [PolkadotParachainPrimitivesHrmpChannelId]>; hrmpChannels: AugmentedQuery<ApiType, (arg: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array) => Observable<Option<PolkadotRuntimeParachainsHrmpHrmpChannel>>, [PolkadotParachainPrimitivesHrmpChannelId]> & QueryableStorageEntry<ApiType, [PolkadotParachainPrimitivesHrmpChannelId]>;
/** /**
* A set of pending HRMP close channel requests that are going to be closed during the session change. * A set of pending HRMP close channel requests that are going to be closed during the session
* Used for checking if a given channel is registered for closure. * change. Used for checking if a given channel is registered for closure.
* *
* The set is accompanied by a list for iteration. * The set is accompanied by a list for iteration.
* *
@@ -598,25 +610,25 @@ declare module '@polkadot/api-base/types/storage' {
hrmpCloseChannelRequestsList: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotParachainPrimitivesHrmpChannelId>>, []> & QueryableStorageEntry<ApiType, []>; hrmpCloseChannelRequestsList: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotParachainPrimitivesHrmpChannelId>>, []> & QueryableStorageEntry<ApiType, []>;
hrmpEgressChannelsIndex: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; hrmpEgressChannelsIndex: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Ingress/egress indexes allow to find all the senders and receivers given the opposite * Ingress/egress indexes allow to find all the senders and receivers given the opposite side.
* side. I.e. * I.e.
* *
* (a) ingress index allows to find all the senders for a given recipient. * (a) ingress index allows to find all the senders for a given recipient.
* (b) egress index allows to find all the recipients for a given sender. * (b) egress index allows to find all the recipients for a given sender.
* *
* Invariants: * Invariants:
* - for each ingress index entry for `P` each item `I` in the index should present in `HrmpChannels` * - for each ingress index entry for `P` each item `I` in the index should present in
* as `(I, P)`. * `HrmpChannels` as `(I, P)`.
* - for each egress index entry for `P` each item `E` in the index should present in `HrmpChannels` * - for each egress index entry for `P` each item `E` in the index should present in
* as `(P, E)`. * `HrmpChannels` as `(P, E)`.
* - there should be no other dangling channels in `HrmpChannels`. * - there should be no other dangling channels in `HrmpChannels`.
* - the vectors are sorted. * - the vectors are sorted.
**/ **/
hrmpIngressChannelsIndex: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; hrmpIngressChannelsIndex: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* This mapping tracks how many open channel requests are initiated by a given sender para. * This mapping tracks how many open channel requests are initiated by a given sender para.
* Invariant: `HrmpOpenChannelRequests` should contain the same number of items that has `(X, _)` * Invariant: `HrmpOpenChannelRequests` should contain the same number of items that has
* as the number of `HrmpOpenChannelRequestCount` for `X`. * `(X, _)` as the number of `HrmpOpenChannelRequestCount` for `X`.
**/ **/
hrmpOpenChannelRequestCount: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; hrmpOpenChannelRequestCount: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
@@ -789,7 +801,7 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* The commitments of candidates pending availability, by `ParaId`. * The commitments of candidates pending availability, by `ParaId`.
**/ **/
pendingAvailabilityCommitments: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV1CandidateCommitments>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; pendingAvailabilityCommitments: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV2CandidateCommitments>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Generic query * Generic query
**/ **/
@@ -808,7 +820,7 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* Scraped on chain data for extracting resolved disputes as well as backing votes. * Scraped on chain data for extracting resolved disputes as well as backing votes.
**/ **/
onChainVotes: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV1ScrapedOnChainVotes>>, []> & QueryableStorageEntry<ApiType, []>; onChainVotes: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV2ScrapedOnChainVotes>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Generic query * Generic query
**/ **/
@@ -854,6 +866,8 @@ declare module '@polkadot/api-base/types/storage' {
heads: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; heads: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* All parachains. Ordered ascending by `ParaId`. Parathreads are not included. * All parachains. Ordered ascending by `ParaId`. Parathreads are not included.
*
* Consider using the [`ParachainsCache`] type of modifying.
**/ **/
parachains: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>; parachains: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
@@ -924,7 +938,7 @@ declare module '@polkadot/api-base/types/storage' {
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing * NOTE that this field is used by parachains via merkle storage proofs, therefore changing
* the format will require migration of parachains. * the format will require migration of parachains.
**/ **/
upgradeGoAheadSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV1UpgradeGoAhead>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; upgradeGoAheadSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV2UpgradeGoAhead>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* This is used by the relay-chain to communicate that there are restrictions for performing * This is used by the relay-chain to communicate that there are restrictions for performing
* an upgrade for this parachain. * an upgrade for this parachain.
@@ -936,7 +950,7 @@ declare module '@polkadot/api-base/types/storage' {
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing * NOTE that this field is used by parachains via merkle storage proofs, therefore changing
* the format will require migration of parachains. * the format will require migration of parachains.
**/ **/
upgradeRestrictionSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV1UpgradeRestriction>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; upgradeRestrictionSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV2UpgradeRestriction>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Generic query * Generic query
**/ **/
@@ -953,7 +967,7 @@ declare module '@polkadot/api-base/types/storage' {
* * The number of parachains and parathread multiplexers * * The number of parachains and parathread multiplexers
* * The number of validators divided by `configuration.max_validators_per_core`. * * The number of validators divided by `configuration.max_validators_per_core`.
**/ **/
availabilityCores: AugmentedQuery<ApiType, () => Observable<Vec<Option<PolkadotPrimitivesV1CoreOccupied>>>, []> & QueryableStorageEntry<ApiType, []>; availabilityCores: AugmentedQuery<ApiType, () => Observable<Vec<Option<PolkadotPrimitivesV2CoreOccupied>>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* An index used to ensure that only one claim on a parathread exists in the queue or is * An index used to ensure that only one claim on a parathread exists in the queue or is
* currently being handled by an occupied core. * currently being handled by an occupied core.
@@ -1000,13 +1014,52 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
parasDisputes: {
/**
* All ongoing or concluded disputes for the last several sessions.
**/
disputes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV2DisputeState>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
/**
* Whether the chain is frozen. Starts as `None`. When this is `Some`,
* the chain will not accept any new parachain blocks for backing or inclusion,
* and its value indicates the last valid block number in the chain.
* It can only be set back to `None` by governance intervention.
**/
frozen: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* All included blocks on the chain, as well as the block number in this chain that
* should be reverted back to if the candidate is disputed and determined to be invalid.
**/
included: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<u32>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
/**
* The last pruned session, if any. All data stored by this module
* references sessions.
**/
lastPrunedSession: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Maps session indices to a vector indicating the number of potentially-spam disputes
* each validator is participating in. Potentially-spam disputes are remote disputes which have
* fewer than `byzantine_threshold + 1` validators.
*
* The i'th entry of the vector corresponds to the i'th validator in the session.
**/
spamSlots: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Vec<u32>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
paraSessionInfo: { paraSessionInfo: {
/**
* The validator account keys of the validators actively participating in parachain consensus.
**/
accountKeys: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Vec<AccountId32>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Assignment keys for the current session. * Assignment keys for the current session.
* Note that this API is private due to it being prone to 'off-by-one' at session boundaries. * Note that this API is private due to it being prone to 'off-by-one' at session boundaries.
* When in doubt, use `Sessions` API instead. * When in doubt, use `Sessions` API instead.
**/ **/
assignmentKeysUnsafe: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV1AssignmentAppPublic>>, []> & QueryableStorageEntry<ApiType, []>; assignmentKeysUnsafe: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV2AssignmentAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The earliest session for which previous session info is stored. * The earliest session for which previous session info is stored.
**/ **/
@@ -1032,7 +1085,7 @@ declare module '@polkadot/api-base/types/storage' {
* The parachain attestation keys of the validators actively participating in parachain consensus. * The parachain attestation keys of the validators actively participating in parachain consensus.
* This should be the same length as `ActiveValidatorIndices`. * This should be the same length as `ActiveValidatorIndices`.
**/ **/
activeValidatorKeys: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV0ValidatorAppPublic>>, []> & QueryableStorageEntry<ApiType, []>; activeValidatorKeys: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV2ValidatorAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The current session index. * The current session index.
**/ **/
@@ -1139,12 +1192,6 @@ declare module '@polkadot/api-base/types/storage' {
* Lookup from identity to the block number and index of the task. * Lookup from identity to the block number and index of the task.
**/ **/
lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>; lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
/**
* Storage version of the pallet.
*
* New networks start with last version.
**/
storageVersion: AugmentedQuery<ApiType, () => Observable<PalletSchedulerReleases>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Generic query * Generic query
**/ **/
@@ -1379,7 +1426,22 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
minValidatorBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>; minValidatorBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The map from nominator stash key to the set of stash keys of all validators to nominate. * The map from nominator stash key to their nomination preferences, namely the validators that
* they wish to support.
*
* Note that the keys of this storage map might become non-decodable in case the
* [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators
* are still existent in storage, their key is correct and retrievable (i.e. `contains_key`
* indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable
* nominators will effectively not-exist, until they re-submit their preferences such that it
* is within the bounds of the newly set `Config::MaxNominations`.
*
* This implies that `::iter_keys().count()` and `::iter().count()` might return different
* values for this map. Moreover, the main `::count()` is aligned with the former, namely the
* number of keys that exist.
*
* Lastly, if any of the nominators become non-decodable, they can be chilled immediately via
* [`Call::chill_other`] dispatchable by anyone.
**/ **/
nominators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletStakingNominations>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>; nominators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletStakingNominations>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
@@ -1474,8 +1536,11 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* Events deposited for the current block. * Events deposited for the current block.
* *
* NOTE: This storage item is explicitly unbounded since it is never intended to be read * NOTE: The item is unbound and should therefore never be read on chain.
* from within the runtime. * It could otherwise inflate the PoV size of a block.
*
* Events have a large in-memory size. Box the events to not go out-of-memory
* just in case someone still reads them from within the runtime.
**/ **/
events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>; events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
@@ -1702,6 +1767,28 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
voterList: {
/**
* Counter for the related counted storage map
**/
counterForListNodes: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* A bag stored in storage.
*
* Stores a `Bag` struct, which stores head and tail pointers to itself.
**/
listBags: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletBagsListListBag>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
/**
* A single node, within some bag.
*
* Nodes store links forward and back within their respective bags.
**/
listNodes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletBagsListListNode>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
xcmPallet: { xcmPallet: {
/** /**
* The existing asset traps. * The existing asset traps.
@@ -0,0 +1,5 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/types-augment/registry/substrate';
import '@polkadot/types-augment/registry/polkadot';
+314 -102
View File
@@ -4,10 +4,10 @@
import type { ApiTypes } from '@polkadot/api-base/types'; import type { ApiTypes } from '@polkadot/api-base/types';
import type { Data } from '@polkadot/types'; import type { Data } from '@polkadot/types';
import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth'; import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportScheduleMaybeHashed, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppSignature, PolkadotPrimitivesV1InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeOriginCaller, PolkadotRuntimeProxyType, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup'; import type { FrameSupportScheduleMaybeHashed, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV2ValidatorAppSignature, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeOriginCaller, PolkadotRuntimeProxyType, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
declare module '@polkadot/api-base/types/submittable' { declare module '@polkadot/api-base/types/submittable' {
export interface AugmentedSubmittables<ApiType extends ApiTypes> { export interface AugmentedSubmittables<ApiType extends ApiTypes> {
@@ -91,34 +91,6 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
bagsList: {
/**
* Move the caller's Id directly in front of `lighter`.
*
* The dispatch origin for this call must be _Signed_ and can only be called by the Id of
* the account going in front of `lighter`.
*
* Only works if
* - both nodes are within the same bag,
* - and `origin` has a greater `VoteWeight` than `lighter`.
**/
putInFrontOf: AugmentedSubmittable<(lighter: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* Declare that some `dislocated` account has, through rewards or penalties, sufficiently
* changed its weight that it should properly fall into a different bag than its current
* one.
*
* Anyone can call this function about any potentially dislocated account.
*
* Will never return an error; if `dislocated` does not exist or doesn't need a rebag, then
* it is a noop and fees are still collected from `origin`.
**/
rebag: AugmentedSubmittable<(dislocated: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
balances: { balances: {
/** /**
* Exactly as `transfer`, except the origin must be root and the source account may be * Exactly as `transfer`, except the origin must be root and the source account may be
@@ -334,6 +306,175 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
childBounties: {
/**
* Accept the curator role for the child-bounty.
*
* The dispatch origin for this call must be the curator of this
* child-bounty.
*
* A deposit will be reserved from the curator and refund upon
* successful payout or cancellation.
*
* Fee for curator is deducted from curator fee of parent bounty.
*
* Parent bounty must be in active state, for this child-bounty call to
* work.
*
* Child-bounty must be in "CuratorProposed" state, for processing the
* call. And state of child-bounty is moved to "Active" on successful
* call completion.
*
* - `parent_bounty_id`: Index of parent bounty.
* - `child_bounty_id`: Index of child bounty.
**/
acceptCurator: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
/**
* Add a new child-bounty.
*
* The dispatch origin for this call must be the curator of parent
* bounty and the parent bounty must be in "active" state.
*
* Child-bounty gets added successfully & fund gets transferred from
* parent bounty to child-bounty account, if parent bounty has enough
* funds, else the call fails.
*
* Upper bound to maximum number of active child bounties that can be
* added are managed via runtime trait config
* [`Config::MaxActiveChildBountyCount`].
*
* If the call is success, the status of child-bounty is updated to
* "Added".
*
* - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added.
* - `value`: Value for executing the proposal.
* - `description`: Text description for the child-bounty.
**/
addChildBounty: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array, description: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u128>, Bytes]>;
/**
* Award child-bounty to a beneficiary.
*
* The beneficiary will be able to claim the funds after a delay.
*
* The dispatch origin for this call must be the parent curator or
* curator of this child-bounty.
*
* Parent bounty must be in active state, for this child-bounty call to
* work.
*
* Child-bounty must be in active state, for processing the call. And
* state of child-bounty is moved to "PendingPayout" on successful call
* completion.
*
* - `parent_bounty_id`: Index of parent bounty.
* - `child_bounty_id`: Index of child bounty.
* - `beneficiary`: Beneficiary account.
**/
awardChildBounty: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array, beneficiary: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, MultiAddress]>;
/**
* Claim the payout from an awarded child-bounty after payout delay.
*
* The dispatch origin for this call may be any signed origin.
*
* Call works independent of parent bounty state, No need for parent
* bounty to be in active state.
*
* The Beneficiary is paid out with agreed bounty value. Curator fee is
* paid & curator deposit is unreserved.
*
* Child-bounty must be in "PendingPayout" state, for processing the
* call. And instance of child-bounty is removed from the state on
* successful call completion.
*
* - `parent_bounty_id`: Index of parent bounty.
* - `child_bounty_id`: Index of child bounty.
**/
claimChildBounty: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
/**
* Cancel a proposed or active child-bounty. Child-bounty account funds
* are transferred to parent bounty account. The child-bounty curator
* deposit may be unreserved if possible.
*
* The dispatch origin for this call must be either parent curator or
* `T::RejectOrigin`.
*
* If the state of child-bounty is `Active`, curator deposit is
* unreserved.
*
* If the state of child-bounty is `PendingPayout`, call fails &
* returns `PendingPayout` error.
*
* For the origin other than T::RejectOrigin, parent bounty must be in
* active state, for this child-bounty call to work. For origin
* T::RejectOrigin execution is forced.
*
* Instance of child-bounty is removed from the state on successful
* call completion.
*
* - `parent_bounty_id`: Index of parent bounty.
* - `child_bounty_id`: Index of child bounty.
**/
closeChildBounty: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
/**
* Propose curator for funded child-bounty.
*
* The dispatch origin for this call must be curator of parent bounty.
*
* Parent bounty must be in active state, for this child-bounty call to
* work.
*
* Child-bounty must be in "Added" state, for processing the call. And
* state of child-bounty is moved to "CuratorProposed" on successful
* call completion.
*
* - `parent_bounty_id`: Index of parent bounty.
* - `child_bounty_id`: Index of child bounty.
* - `curator`: Address of child-bounty curator.
* - `fee`: payment fee to child-bounty curator for execution.
**/
proposeCurator: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array, curator: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, fee: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, MultiAddress, Compact<u128>]>;
/**
* Unassign curator from a child-bounty.
*
* The dispatch origin for this call can be either `RejectOrigin`, or
* the curator of the parent bounty, or any signed origin.
*
* For the origin other than T::RejectOrigin and the child-bounty
* curator, parent bounty must be in active state, for this call to
* work. We allow child-bounty curator and T::RejectOrigin to execute
* this call irrespective of the parent bounty state.
*
* If this function is called by the `RejectOrigin` or the
* parent bounty curator, we assume that the child-bounty curator is
* malicious or inactive. As a result, child-bounty curator deposit is
* slashed.
*
* If the origin is the child-bounty curator, we take this as a sign
* that they are unable to do their job, and are willingly giving up.
* We could slash the deposit, but for now we allow them to unreserve
* their deposit and exit without issue. (We may want to change this if
* it is abused.)
*
* Finally, the origin can be anyone iff the child-bounty curator is
* "inactive". Expiry update due of parent bounty is used to estimate
* inactive state of child-bounty curator.
*
* This allows anyone in the community to call out that a child-bounty
* curator is not doing their due diligence, and we should pick a new
* one. In this case the child-bounty curator deposit is slashed.
*
* State of child-bounty is moved to Added state on successful call
* completion.
*
* - `parent_bounty_id`: Index of parent bounty.
* - `child_bounty_id`: Index of child bounty.
**/
unassignCurator: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
claims: { claims: {
/** /**
* Attest to a statement, needed to finalize the claims process. * Attest to a statement, needed to finalize the claims process.
@@ -693,7 +834,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - 1 event * - 1 event
* # </weight> * # </weight>
**/ **/
execute: AugmentedSubmittable<(proposal: Call | { callIndex?: any; args?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Compact<u32>]>; execute: AugmentedSubmittable<(proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Compact<u32>]>;
/** /**
* Add a new proposal to either be voted on or executed directly. * Add a new proposal to either be voted on or executed directly.
* *
@@ -723,7 +864,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - 1 event * - 1 event
* # </weight> * # </weight>
**/ **/
propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | { callIndex?: any; args?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>; propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>;
/** /**
* Set the collective's membership. * Set the collective's membership.
* *
@@ -1198,6 +1339,13 @@ declare module '@polkadot/api-base/types/submittable' {
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
electionProviderMultiPhase: { electionProviderMultiPhase: {
/**
* Trigger the governance fallback.
*
* This can only be called when [`Phase::Emergency`] is enabled, as an alternative to
* calling [`Call::set_emergency_election_result`].
**/
governanceFallback: AugmentedSubmittable<(maybeMaxVoters: Option<u32> | null | object | string | Uint8Array, maybeMaxTargets: Option<u32> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<u32>, Option<u32>]>;
/** /**
* Set a solution in the queue, to be handed out to the client of this pallet in the next * Set a solution in the queue, to be handed out to the client of this pallet in the next
* call to `ElectionProvider::elect`. * call to `ElectionProvider::elect`.
@@ -1216,7 +1364,7 @@ declare module '@polkadot/api-base/types/submittable' {
* *
* This check can be turned off by setting the value to `None`. * This check can be turned off by setting the value to `None`.
**/ **/
setMinimumUntrustedScore: AugmentedSubmittable<(maybeNextScore: Option<Vec<u128>> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<Vec<u128>>]>; setMinimumUntrustedScore: AugmentedSubmittable<(maybeNextScore: Option<SpNposElectionsElectionScore> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<SpNposElectionsElectionScore>]>;
/** /**
* Submit a solution for the signed phase. * Submit a solution for the signed phase.
* *
@@ -1227,12 +1375,8 @@ declare module '@polkadot/api-base/types/submittable' {
* *
* A deposit is reserved and recorded for the solution. Based on the outcome, the solution * A deposit is reserved and recorded for the solution. Based on the outcome, the solution
* might be rewarded, slashed, or get all or a part of the deposit back. * might be rewarded, slashed, or get all or a part of the deposit back.
*
* # <weight>
* Queue size must be provided as witness data.
* # </weight>
**/ **/
submit: AugmentedSubmittable<(rawSolution: PalletElectionProviderMultiPhaseRawSolution | { solution?: any; score?: any; round?: any } | string | Uint8Array, numSignedSubmissions: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletElectionProviderMultiPhaseRawSolution, u32]>; submit: AugmentedSubmittable<(rawSolution: PalletElectionProviderMultiPhaseRawSolution | { solution?: any; score?: any; round?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletElectionProviderMultiPhaseRawSolution]>;
/** /**
* Submit a solution for the unsigned phase. * Submit a solution for the unsigned phase.
* *
@@ -1297,22 +1441,28 @@ declare module '@polkadot/api-base/types/submittable' {
* you to trigger the cleanup immediately for a specific parachain. * you to trigger the cleanup immediately for a specific parachain.
* *
* Origin must be Root. * Origin must be Root.
*
* Number of inbound and outbound channels for `para` must be provided as witness data of weighing.
**/ **/
forceCleanHrmp: AugmentedSubmittable<(para: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; forceCleanHrmp: AugmentedSubmittable<(para: u32 | AnyNumber | Uint8Array, inbound: u32 | AnyNumber | Uint8Array, outbound: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, u32]>;
/** /**
* Force process HRMP close channel requests. * Force process HRMP close channel requests.
* *
* If there are pending HRMP close channel requests, you can use this * If there are pending HRMP close channel requests, you can use this
* function process all of those requests immediately. * function process all of those requests immediately.
*
* Total number of closing channels must be provided as witness data of weighing.
**/ **/
forceProcessHrmpClose: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>; forceProcessHrmpClose: AugmentedSubmittable<(channels: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/** /**
* Force process HRMP open channel requests. * Force process HRMP open channel requests.
* *
* If there are pending HRMP open channel requests, you can use this * If there are pending HRMP open channel requests, you can use this
* function process all of those requests immediately. * function process all of those requests immediately.
*
* Total number of opening channels must be provided as witness data of weighing.
**/ **/
forceProcessHrmpOpen: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>; forceProcessHrmpOpen: AugmentedSubmittable<(channels: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/** /**
* Accept a pending open channel request from the given sender. * Accept a pending open channel request from the given sender.
* *
@@ -1320,13 +1470,16 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
hrmpAcceptOpenChannel: AugmentedSubmittable<(sender: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; hrmpAcceptOpenChannel: AugmentedSubmittable<(sender: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/** /**
* This cancels a pending open channel request. It can be canceled be either of the sender * This cancels a pending open channel request. It can be canceled by either of the sender
* or the recipient for that request. The origin must be either of those. * or the recipient for that request. The origin must be either of those.
* *
* The cancellation happens immediately. It is not possible to cancel the request if it is * The cancellation happens immediately. It is not possible to cancel the request if it is
* already accepted. * already accepted.
*
* Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as
* witness data.
**/ **/
hrmpCancelOpenRequest: AugmentedSubmittable<(channelId: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotParachainPrimitivesHrmpChannelId]>; hrmpCancelOpenRequest: AugmentedSubmittable<(channelId: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array, openRequests: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotParachainPrimitivesHrmpChannelId, u32]>;
/** /**
* Initiate unilateral closing of a channel. The origin must be either the sender or the * Initiate unilateral closing of a channel. The origin must be either the sender or the
* recipient in the channel being closed. * recipient in the channel being closed.
@@ -1870,7 +2023,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Plus Call Weight * - Plus Call Weight
* # </weight> * # </weight>
**/ **/
asMultiThreshold1: AugmentedSubmittable<(otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, Call]>; asMultiThreshold1: AugmentedSubmittable<(otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, Call]>;
/** /**
* Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously * Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously
* for this operation will be unreserved on success. * for this operation will be unreserved on success.
@@ -1915,7 +2068,7 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* Enter the paras inherent. This will process bitfields and backed candidates. * Enter the paras inherent. This will process bitfields and backed candidates.
**/ **/
enter: AugmentedSubmittable<(data: PolkadotPrimitivesV1InherentData | { bitfields?: any; backedCandidates?: any; disputes?: any; parentHeader?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV1InherentData]>; enter: AugmentedSubmittable<(data: PolkadotPrimitivesV2InherentData | { bitfields?: any; backedCandidates?: any; disputes?: any; parentHeader?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV2InherentData]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -1964,7 +2117,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and * Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and
* enacts the results if that was the last vote before achieving the supermajority. * enacts the results if that was the last vote before achieving the supermajority.
**/ **/
includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV2PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV0ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV0ValidatorAppSignature]>; includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV2PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV2ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV2ValidatorAppSignature]>;
/** /**
* Remove the validation code from the storage iff the reference count is 0. * Remove the validation code from the storage iff the reference count is 0.
* *
@@ -1978,6 +2131,13 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
parasDisputes: {
forceUnfreeze: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
parasShared: { parasShared: {
/** /**
* Generic tx * Generic tx
@@ -2230,7 +2390,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight is a function of the number of proxies the user has (P). * Weight is a function of the number of proxies the user has (P).
* # </weight> * # </weight>
**/ **/
proxy: AugmentedSubmittable<(real: AccountId32 | string | Uint8Array, forceProxyType: Option<PolkadotRuntimeProxyType> | null | object | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Option<PolkadotRuntimeProxyType>, Call]>; proxy: AugmentedSubmittable<(real: AccountId32 | string | Uint8Array, forceProxyType: Option<PolkadotRuntimeProxyType> | null | object | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Option<PolkadotRuntimeProxyType>, Call]>;
/** /**
* Dispatch the given `call` from an account that the sender is authorized for through * Dispatch the given `call` from an account that the sender is authorized for through
* `add_proxy`. * `add_proxy`.
@@ -2250,7 +2410,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - P: the number of proxies the user has. * - P: the number of proxies the user has.
* # </weight> * # </weight>
**/ **/
proxyAnnounced: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, real: AccountId32 | string | Uint8Array, forceProxyType: Option<PolkadotRuntimeProxyType> | null | object | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32, Option<PolkadotRuntimeProxyType>, Call]>; proxyAnnounced: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, real: AccountId32 | string | Uint8Array, forceProxyType: Option<PolkadotRuntimeProxyType> | null | object | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32, Option<PolkadotRuntimeProxyType>, Call]>;
/** /**
* Remove the given announcement of a delegate. * Remove the given announcement of a delegate.
* *
@@ -2551,14 +2711,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Can be called by the `T::SlashCancelOrigin`. * Can be called by the `T::SlashCancelOrigin`.
* *
* Parameters: era and indices of the slashes for that era to kill. * Parameters: era and indices of the slashes for that era to kill.
*
* # <weight>
* Complexity: O(U + S)
* with U unapplied slashes weighted with U=1000
* and S is the number of slash indices to be canceled.
* - Read: Unapplied Slashes
* - Write: Unapplied Slashes
* # </weight>
**/ **/
cancelDeferredSlash: AugmentedSubmittable<(era: u32 | AnyNumber | Uint8Array, slashIndices: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<u32>]>; cancelDeferredSlash: AugmentedSubmittable<(era: u32 | AnyNumber | Uint8Array, slashIndices: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<u32>]>;
/** /**
@@ -2587,6 +2739,11 @@ declare module '@polkadot/api-base/types/submittable' {
* *
* If the caller is different than the controller being targeted, the following conditions * If the caller is different than the controller being targeted, the following conditions
* must be met: * must be met:
*
* * `controller` must belong to a nominator who has become non-decodable,
*
* Or:
*
* * A `ChillThreshold` must be set and checked which defines how close to the max * * A `ChillThreshold` must be set and checked which defines how close to the max
* nominators or validators we must reach before users can start chilling one-another. * nominators or validators we must reach before users can start chilling one-another.
* * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine * * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine
@@ -2599,6 +2756,12 @@ declare module '@polkadot/api-base/types/submittable' {
* who do not satisfy these requirements. * who do not satisfy these requirements.
**/ **/
chillOther: AugmentedSubmittable<(controller: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>; chillOther: AugmentedSubmittable<(controller: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* Force a validator to have at least the minimum commission. This will not affect a
* validator who already has a commission greater than or equal to the minimum. Any account
* can call this.
**/
forceApplyMinCommission: AugmentedSubmittable<(validatorStash: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/** /**
* Force there to be a new era at the end of the next session. After this, it will be * Force there to be a new era at the end of the next session. After this, it will be
* reset to normal (non-forced) behaviour. * reset to normal (non-forced) behaviour.
@@ -2628,11 +2791,6 @@ declare module '@polkadot/api-base/types/submittable' {
* The election process starts multiple blocks before the end of the era. * The election process starts multiple blocks before the end of the era.
* If this is called just before a new era is triggered, the election process may not * If this is called just before a new era is triggered, the election process may not
* have enough blocks to get a result. * have enough blocks to get a result.
*
* # <weight>
* - Weight: O(1)
* - Write: ForceEra
* # </weight>
**/ **/
forceNewEraAlways: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>; forceNewEraAlways: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/** /**
@@ -2657,13 +2815,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Force a current staker to become completely unstaked, immediately. * Force a current staker to become completely unstaked, immediately.
* *
* The dispatch origin must be Root. * The dispatch origin must be Root.
*
* # <weight>
* O(S) where S is the number of slashing spans to be removed
* Reads: Bonded, Slashing Spans, Account, Locks
* Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators,
* Account, Locks Writes Each: SpanSlash * S
* # </weight>
**/ **/
forceUnstake: AugmentedSubmittable<(stash: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>; forceUnstake: AugmentedSubmittable<(stash: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
/** /**
@@ -2699,7 +2850,7 @@ declare module '@polkadot/api-base/types/submittable' {
* *
* # <weight> * # <weight>
* - The transaction's complexity is proportional to the size of `targets` (N) * - The transaction's complexity is proportional to the size of `targets` (N)
* which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS). * which is capped at CompactAssignments::LIMIT (T::MaxNominations).
* - Both the reads and writes follow a similar pattern. * - Both the reads and writes follow a similar pattern.
* # </weight> * # </weight>
**/ **/
@@ -2750,7 +2901,7 @@ declare module '@polkadot/api-base/types/submittable' {
* *
* # <weight> * # <weight>
* - Time complexity: O(L), where L is unlocking chunks * - Time complexity: O(L), where L is unlocking chunks
* - Bounded by `MAX_UNLOCKING_CHUNKS`. * - Bounded by `MaxUnlockingChunks`.
* - Storage changes: Can't increase storage, only decrease it. * - Storage changes: Can't increase storage, only decrease it.
* # </weight> * # </weight>
**/ **/
@@ -2768,7 +2919,7 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* (Re-)set the controller of a stash. * (Re-)set the controller of a stash.
* *
* Effects will be felt at the beginning of the next era. * Effects will be felt instantly (as soon as this function is completed successfully).
* *
* The dispatch origin for this call must be _Signed_ by the stash, not the controller. * The dispatch origin for this call must be _Signed_ by the stash, not the controller.
* *
@@ -2813,17 +2964,12 @@ declare module '@polkadot/api-base/types/submittable' {
* Set the validators who cannot be slashed (if any). * Set the validators who cannot be slashed (if any).
* *
* The dispatch origin must be Root. * The dispatch origin must be Root.
*
* # <weight>
* - O(V)
* - Write: Invulnerables
* # </weight>
**/ **/
setInvulnerables: AugmentedSubmittable<(invulnerables: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>]>; setInvulnerables: AugmentedSubmittable<(invulnerables: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>]>;
/** /**
* (Re-)set the payment target for a controller. * (Re-)set the payment target for a controller.
* *
* Effects will be felt at the beginning of the next era. * Effects will be felt instantly (as soon as this function is completed successfully).
* *
* The dispatch origin for this call must be _Signed_ by the controller, not the stash. * The dispatch origin for this call must be _Signed_ by the controller, not the stash.
* *
@@ -2858,7 +3004,7 @@ declare module '@polkadot/api-base/types/submittable' {
* NOTE: Existing nominators and validators will not be affected by this update. * NOTE: Existing nominators and validators will not be affected by this update.
* to kick people under the new limits, `chill_other` should be called. * to kick people under the new limits, `chill_other` should be called.
**/ **/
setStakingConfigs: AugmentedSubmittable<(minNominatorBond: u128 | AnyNumber | Uint8Array, minValidatorBond: u128 | AnyNumber | Uint8Array, maxNominatorCount: Option<u32> | null | object | string | Uint8Array, maxValidatorCount: Option<u32> | null | object | string | Uint8Array, chillThreshold: Option<Percent> | null | object | string | Uint8Array, minCommission: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128, u128, Option<u32>, Option<u32>, Option<Percent>, Perbill]>; setStakingConfigs: AugmentedSubmittable<(minNominatorBond: PalletStakingPalletConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minValidatorBond: PalletStakingPalletConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxNominatorCount: PalletStakingPalletConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxValidatorCount: PalletStakingPalletConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, chillThreshold: PalletStakingPalletConfigOpPercent | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minCommission: PalletStakingPalletConfigOpPerbill | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpPerbill]>;
/** /**
* Sets the ideal number of validators. * Sets the ideal number of validators.
* *
@@ -2880,7 +3026,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Once the unlock period is done, you can call `withdraw_unbonded` to actually move * Once the unlock period is done, you can call `withdraw_unbonded` to actually move
* the funds out of management ready for transfer. * the funds out of management ready for transfer.
* *
* No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`) * No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)
* can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need * can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need
* to be called first to remove some of the chunks (if possible). * to be called first to remove some of the chunks (if possible).
* *
@@ -2949,11 +3095,6 @@ declare module '@polkadot/api-base/types/submittable' {
remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>; remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
/** /**
* Make some on-chain remark and emit event. * Make some on-chain remark and emit event.
*
* # <weight>
* - `O(b)` where b is the length of the remark.
* - 1 event.
* # </weight>
**/ **/
remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>; remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
/** /**
@@ -3062,7 +3203,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - 1 event * - 1 event
* # </weight> * # </weight>
**/ **/
execute: AugmentedSubmittable<(proposal: Call | { callIndex?: any; args?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Compact<u32>]>; execute: AugmentedSubmittable<(proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Compact<u32>]>;
/** /**
* Add a new proposal to either be voted on or executed directly. * Add a new proposal to either be voted on or executed directly.
* *
@@ -3092,7 +3233,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - 1 event * - 1 event
* # </weight> * # </weight>
**/ **/
propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | { callIndex?: any; args?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>; propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>;
/** /**
* Set the collective's membership. * Set the collective's membership.
* *
@@ -3403,6 +3544,24 @@ declare module '@polkadot/api-base/types/submittable' {
* # </weight> * # </weight>
**/ **/
rejectProposal: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>; rejectProposal: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* Force a previously approved proposal to be removed from the approval queue.
* The original deposit will no longer be returned.
*
* May only be called from `T::RejectOrigin`.
* - `proposal_id`: The index of a proposal
*
* # <weight>
* - Complexity: O(A) where `A` is the number of approvals
* - Db reads and writes: `Approvals`
* # </weight>
*
* Errors:
* - `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue,
* i.e., the proposal has not been approved. This could also mean the proposal does not
* exist altogether, thus there is no way it would have been approved in the first place.
**/
removeApproval: AugmentedSubmittable<(proposalId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -3445,7 +3604,7 @@ declare module '@polkadot/api-base/types/submittable' {
* *
* The dispatch origin for this call must be _Signed_. * The dispatch origin for this call must be _Signed_.
**/ **/
asDerivative: AugmentedSubmittable<(index: u16 | AnyNumber | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Call]>; asDerivative: AugmentedSubmittable<(index: u16 | AnyNumber | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Call]>;
/** /**
* Send a batch of dispatch calls. * Send a batch of dispatch calls.
* *
@@ -3467,7 +3626,7 @@ declare module '@polkadot/api-base/types/submittable' {
* and the error of the failed call. If all were successful, then the `BatchCompleted` * and the error of the failed call. If all were successful, then the `BatchCompleted`
* event is deposited. * event is deposited.
**/ **/
batch: AugmentedSubmittable<(calls: Vec<Call> | (Call | { callIndex?: any; args?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>; batch: AugmentedSubmittable<(calls: Vec<Call> | (Call | IMethod | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
/** /**
* Send a batch of dispatch calls and atomically execute them. * Send a batch of dispatch calls and atomically execute them.
* The whole transaction will rollback and fail if any of the calls failed. * The whole transaction will rollback and fail if any of the calls failed.
@@ -3484,7 +3643,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Complexity: O(C) where C is the number of calls to be batched. * - Complexity: O(C) where C is the number of calls to be batched.
* # </weight> * # </weight>
**/ **/
batchAll: AugmentedSubmittable<(calls: Vec<Call> | (Call | { callIndex?: any; args?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>; batchAll: AugmentedSubmittable<(calls: Vec<Call> | (Call | IMethod | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
/** /**
* Dispatches a function call with a provided origin. * Dispatches a function call with a provided origin.
* *
@@ -3497,7 +3656,24 @@ declare module '@polkadot/api-base/types/submittable' {
* - Weight of derivative `call` execution + T::WeightInfo::dispatch_as(). * - Weight of derivative `call` execution + T::WeightInfo::dispatch_as().
* # </weight> * # </weight>
**/ **/
dispatchAs: AugmentedSubmittable<(asOrigin: PolkadotRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { ParachainsOrigin: any } | { XcmPallet: any } | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotRuntimeOriginCaller, Call]>; dispatchAs: AugmentedSubmittable<(asOrigin: PolkadotRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { ParachainsOrigin: any } | { XcmPallet: any } | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotRuntimeOriginCaller, Call]>;
/**
* Send a batch of dispatch calls.
* Unlike `batch`, it allows errors and won't interrupt.
*
* May be called from any origin.
*
* - `calls`: The calls to be dispatched from the same origin. The number of call must not
* exceed the constant: `batched_calls_limit` (available in constant metadata).
*
* If origin is root then call are dispatch without checking origin filter. (This includes
* bypassing `frame_system::Config::BaseCallFilter`).
*
* # <weight>
* - Complexity: O(C) where C is the number of calls to be batched.
* # </weight>
**/
forceBatch: AugmentedSubmittable<(calls: Vec<Call> | (Call | IMethod | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -3608,6 +3784,36 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
voterList: {
/**
* Move the caller's Id directly in front of `lighter`.
*
* The dispatch origin for this call must be _Signed_ and can only be called by the Id of
* the account going in front of `lighter`.
*
* Only works if
* - both nodes are within the same bag,
* - and `origin` has a greater `Score` than `lighter`.
**/
putInFrontOf: AugmentedSubmittable<(lighter: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* Declare that some `dislocated` account has, through rewards or penalties, sufficiently
* changed its score that it should properly fall into a different bag than its current
* one.
*
* Anyone can call this function about any potentially dislocated account.
*
* Will always update the stored score of `dislocated` to the correct score, based on
* `ScoreProvider`.
*
* If `dislocated` does not exists, it returns an error.
**/
rebag: AugmentedSubmittable<(dislocated: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
xcmPallet: { xcmPallet: {
/** /**
* Execute an XCM message from a local, signed, origin. * Execute an XCM message from a local, signed, origin.
@@ -3657,10 +3863,13 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
forceXcmVersion: AugmentedSubmittable<(location: XcmV1MultiLocation | { parents?: any; interior?: any } | string | Uint8Array, xcmVersion: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmV1MultiLocation, u32]>; forceXcmVersion: AugmentedSubmittable<(location: XcmV1MultiLocation | { parents?: any; interior?: any } | string | Uint8Array, xcmVersion: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmV1MultiLocation, u32]>;
/** /**
* Transfer some assets from the local chain to the sovereign account of a destination chain and forward * Transfer some assets from the local chain to the sovereign account of a destination
* a notification XCM. * chain and forward a notification XCM.
* *
* Fee payment on the destination side is made from the first asset listed in the `assets` vector. * Fee payment on the destination side is made from the asset in the `assets` vector of
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
* is needed than `weight_limit`, then the operation will fail and the assets send may be
* at risk.
* *
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM. * - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
@@ -3677,7 +3886,10 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* Teleport some assets from the local chain to some destination chain. * Teleport some assets from the local chain to some destination chain.
* *
* Fee payment on the destination side is made from the first asset listed in the `assets` vector. * Fee payment on the destination side is made from the asset in the `assets` vector of
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
* is needed than `weight_limit`, then the operation will fail and the assets send may be
* at risk.
* *
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM. * - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
@@ -3692,12 +3904,12 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
limitedTeleportAssets: AugmentedSubmittable<(dest: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, beneficiary: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, assets: XcmVersionedMultiAssets | { V0: any } | { V1: any } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array, weightLimit: XcmV2WeightLimit | { Unlimited: any } | { Limited: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedMultiLocation, XcmVersionedMultiLocation, XcmVersionedMultiAssets, u32, XcmV2WeightLimit]>; limitedTeleportAssets: AugmentedSubmittable<(dest: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, beneficiary: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, assets: XcmVersionedMultiAssets | { V0: any } | { V1: any } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array, weightLimit: XcmV2WeightLimit | { Unlimited: any } | { Limited: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedMultiLocation, XcmVersionedMultiLocation, XcmVersionedMultiAssets, u32, XcmV2WeightLimit]>;
/** /**
* Transfer some assets from the local chain to the sovereign account of a destination chain and forward * Transfer some assets from the local chain to the sovereign account of a destination
* a notification XCM. * chain and forward a notification XCM.
* *
* Fee payment on the destination side is made from the first asset listed in the `assets` vector and * Fee payment on the destination side is made from the asset in the `assets` vector of
* fee-weight is calculated locally and thus remote weights are assumed to be equal to * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,
* local weights. * with all fees taken as needed from the asset.
* *
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM. * - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
@@ -3714,9 +3926,9 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* Teleport some assets from the local chain to some destination chain. * Teleport some assets from the local chain to some destination chain.
* *
* Fee payment on the destination side is made from the first asset listed in the `assets` vector and * Fee payment on the destination side is made from the asset in the `assets` vector of
* fee-weight is calculated locally and thus remote weights are assumed to be equal to * index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,
* local weights. * with all fees taken as needed from the asset.
* *
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM. * - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send * - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
+163 -57
View File
@@ -2,7 +2,7 @@
/* eslint-disable */ /* eslint-disable */
import type { ApiTypes } from '@polkadot/api-base/types'; import type { ApiTypes } from '@polkadot/api-base/types';
import type { U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Codec } from '@polkadot/types-codec/types'; import type { Codec } from '@polkadot/types-codec/types';
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime'; import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsSchedule, SpVersionRuntimeVersion } from '@polkadot/types/lookup'; import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsSchedule, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
@@ -81,23 +81,23 @@ declare module '@polkadot/api-base/types/consts' {
/** /**
* The list of thresholds separating the various bags. * The list of thresholds separating the various bags.
* *
* Ids are separated into unsorted bags according to their vote weight. This specifies the * Ids are separated into unsorted bags according to their score. This specifies the
* thresholds separating the bags. An id's bag is the largest bag for which the id's weight * thresholds separating the bags. An id's bag is the largest bag for which the id's score
* is less than or equal to its upper threshold. * is less than or equal to its upper threshold.
* *
* When ids are iterated, higher bags are iterated completely before lower bags. This means * When ids are iterated, higher bags are iterated completely before lower bags. This means
* that iteration is _semi-sorted_: ids of higher weight tend to come before ids of lower * that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower
* weight, but peer ids within a particular bag are sorted in insertion order. * score, but peer ids within a particular bag are sorted in insertion order.
* *
* # Expressing the constant * # Expressing the constant
* *
* This constant must be sorted in strictly increasing order. Duplicate items are not * This constant must be sorted in strictly increasing order. Duplicate items are not
* permitted. * permitted.
* *
* There is an implied upper limit of `VoteWeight::MAX`; that value does not need to be * There is an implied upper limit of `Score::MAX`; that value does not need to be
* specified within the bag. For any two threshold lists, if one ends with * specified within the bag. For any two threshold lists, if one ends with
* `VoteWeight::MAX`, the other one does not, and they are otherwise equal, the two lists * `Score::MAX`, the other one does not, and they are otherwise equal, the two
* will behave identically. * lists will behave identically.
* *
* # Calculation * # Calculation
* *
@@ -115,8 +115,8 @@ declare module '@polkadot/api-base/types/consts' {
* the procedure given above, then the constant ratio is equal to 2. * the procedure given above, then the constant ratio is equal to 2.
* - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to * - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to
* the procedure given above, then the constant ratio is approximately equal to 1.248. * the procedure given above, then the constant ratio is approximately equal to 1.248.
* - If the threshold list begins `[1, 2, 3, ...]`, then an id with weight 0 or 1 will fall * - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall
* into bag 0, an id with weight 2 will fall into bag 1, etc. * into bag 0, an id with score 2 will fall into bag 1, etc.
* *
* # Migration * # Migration
* *
@@ -149,11 +149,6 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec; [key: string]: Codec;
}; };
bounties: { bounties: {
/**
* Percentage of the curator fee that will be reserved upfront as deposit for bounty
* curator.
**/
bountyCuratorDeposit: Permill & AugmentedConst<ApiType>;
/** /**
* The amount held on deposit for placing a bounty proposal. * The amount held on deposit for placing a bounty proposal.
**/ **/
@@ -170,6 +165,21 @@ declare module '@polkadot/api-base/types/consts' {
* Minimum value for a bounty. * Minimum value for a bounty.
**/ **/
bountyValueMinimum: u128 & AugmentedConst<ApiType>; bountyValueMinimum: u128 & AugmentedConst<ApiType>;
/**
* Maximum amount of funds that should be placed in a deposit for making a proposal.
**/
curatorDepositMax: Option<u128> & AugmentedConst<ApiType>;
/**
* Minimum amount of funds that should be placed in a deposit for making a proposal.
**/
curatorDepositMin: Option<u128> & AugmentedConst<ApiType>;
/**
* The curator deposit is calculated as a percentage of the curator fee.
*
* This deposit has optional upper and lower bounds with `CuratorDepositMax` and
* `CuratorDepositMin`.
**/
curatorDepositMultiplier: Permill & AugmentedConst<ApiType>;
/** /**
* The amount held on deposit per byte within the tip report reason or bounty description. * The amount held on deposit per byte within the tip report reason or bounty description.
**/ **/
@@ -186,17 +196,12 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec; [key: string]: Codec;
}; };
childBounties: { childBounties: {
/**
* Percentage of child-bounty value to be reserved as curator deposit
* when curator fee is zero.
**/
childBountyCuratorDepositBase: Permill & AugmentedConst<ApiType>;
/** /**
* Minimum value for a child-bounty. * Minimum value for a child-bounty.
**/ **/
childBountyValueMinimum: u128 & AugmentedConst<ApiType>; childBountyValueMinimum: u128 & AugmentedConst<ApiType>;
/** /**
* Maximum number of child-bounties that can be added to a parent bounty. * Maximum number of child bounties that can be added to a parent bounty.
**/ **/
maxActiveChildBountyCount: u32 & AugmentedConst<ApiType>; maxActiveChildBountyCount: u32 & AugmentedConst<ApiType>;
/** /**
@@ -205,6 +210,27 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec; [key: string]: Codec;
}; };
contracts: { contracts: {
/**
* The weight per byte of code that is charged when loading a contract from storage.
*
* Currently, FRAME only charges fees for computation incurred but not for PoV
* consumption caused for storage access. This is usually not exploitable because
* accessing storage carries some substantial weight costs, too. However in case
* of contract code very much PoV consumption can be caused while consuming very little
* computation. This could be used to keep the chain busy without paying the
* proper fee for it. Until this is resolved we charge from the weight meter for
* contract access.
*
* For more information check out: <https://github.com/paritytech/substrate/issues/10301>
*
* [`DefaultContractAccessWeight`] is a safe default to be used for polkadot or kusama
* parachains.
*
* # Note
*
* This is only relevant for parachains. Set to zero in case of a standalone chain.
**/
contractAccessWeight: u64 & AugmentedConst<ApiType>;
/** /**
* The maximum number of contracts that can be pending for deletion. * The maximum number of contracts that can be pending for deletion.
* *
@@ -257,6 +283,26 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
convictionVoting: {
/**
* The maximum number of concurrent votes an account may have.
*
* Also used to compute weight, an overly large value can
* lead to extrinsic with large weight estimation: see `delegate` for instance.
**/
maxVotes: u32 & AugmentedConst<ApiType>;
/**
* The minimum period of vote locking.
*
* It should be no shorter than enactment period to ensure that in the case of an approval,
* those successful voters are locked into the consequences that their votes entail.
**/
voteLockingPeriod: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
democracy: { democracy: {
/** /**
* Period in blocks where an external proposal may not be re-submitted after being vetoed. * Period in blocks where an external proposal may not be re-submitted after being vetoed.
@@ -321,19 +367,25 @@ declare module '@polkadot/api-base/types/consts' {
}; };
electionProviderMultiPhase: { electionProviderMultiPhase: {
/** /**
* Maximum length (bytes) that the mined solution should consume. * The minimum amount of improvement to the solution score that defines a solution as
* * "better" in the Signed phase.
* The miner will ensure that the total length of the unsigned solution will not exceed
* this value.
**/ **/
minerMaxLength: u32 & AugmentedConst<ApiType>; betterSignedThreshold: Perbill & AugmentedConst<ApiType>;
/** /**
* Maximum weight that the miner should consume. * The minimum amount of improvement to the solution score that defines a solution as
* * "better" in the Unsigned phase.
* The miner will ensure that the total weight of the unsigned solution will not exceed
* this value, based on [`WeightInfo::submit_unsigned`].
**/ **/
minerMaxWeight: u64 & AugmentedConst<ApiType>; betterUnsignedThreshold: Perbill & AugmentedConst<ApiType>;
/**
* The maximum number of electable targets to put in the snapshot.
**/
maxElectableTargets: u16 & AugmentedConst<ApiType>;
/**
* The maximum number of electing voters to put in the snapshot. At the moment, snapshots
* are only over a single block, but once multi-block elections are introduced they will
* take place over multiple blocks.
**/
maxElectingVoters: u32 & AugmentedConst<ApiType>;
/** /**
* The priority of the unsigned transaction submitted in the unsigned-phase * The priority of the unsigned transaction submitted in the unsigned-phase
**/ **/
@@ -357,6 +409,10 @@ declare module '@polkadot/api-base/types/consts' {
* Per-weight deposit for a signed solution. * Per-weight deposit for a signed solution.
**/ **/
signedDepositWeight: u128 & AugmentedConst<ApiType>; signedDepositWeight: u128 & AugmentedConst<ApiType>;
/**
* The maximum amount of unchecked solutions to refund the call fee for.
**/
signedMaxRefunds: u32 & AugmentedConst<ApiType>;
/** /**
* Maximum number of signed submissions that can be queued. * Maximum number of signed submissions that can be queued.
* *
@@ -370,7 +426,9 @@ declare module '@polkadot/api-base/types/consts' {
/** /**
* Maximum weight of a signed solution. * Maximum weight of a signed solution.
* *
* This should probably be similar to [`Config::MinerMaxWeight`]. * If [`Config::MinerConfig`] is being implemented to submit signed solutions (outside of
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
* this value.
**/ **/
signedMaxWeight: u64 & AugmentedConst<ApiType>; signedMaxWeight: u64 & AugmentedConst<ApiType>;
/** /**
@@ -381,24 +439,10 @@ declare module '@polkadot/api-base/types/consts' {
* Base reward for a signed solution * Base reward for a signed solution
**/ **/
signedRewardBase: u128 & AugmentedConst<ApiType>; signedRewardBase: u128 & AugmentedConst<ApiType>;
/**
* The minimum amount of improvement to the solution score that defines a solution as
* "better" (in any phase).
**/
solutionImprovementThreshold: Perbill & AugmentedConst<ApiType>;
/** /**
* Duration of the unsigned phase. * Duration of the unsigned phase.
**/ **/
unsignedPhase: u32 & AugmentedConst<ApiType>; unsignedPhase: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of voters to put in the snapshot. At the moment, snapshots are only
* over a single block, but once multi-block elections are introduced they will take place
* over multiple blocks.
*
* Also, note the data type: If the voters are represented by a `u32` in `type
* CompactSolution`, the same `u32` is used here to ensure bounds are respected.
**/
voterSnapshotPerBlock: u32 & AugmentedConst<ApiType>;
/** /**
* Generic const * Generic const
**/ **/
@@ -604,6 +648,24 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
nominationPools: {
/**
* The minimum pool points-to-balance ratio that must be maintained for it to be `open`.
* This is important in the event slashing takes place and the pool's points-to-balance
* ratio becomes disproportional.
* For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1.
* Such a scenario would also be the equivalent of the pool being 90% slashed.
**/
minPointsToBalance: u32 & AugmentedConst<ApiType>;
/**
* The nomination pool's pallet id.
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
proxy: { proxy: {
/** /**
* The base amount of currency needed to reserve for creating an announcement. * The base amount of currency needed to reserve for creating an announcement.
@@ -665,8 +727,13 @@ declare module '@polkadot/api-base/types/consts' {
friendDepositFactor: u128 & AugmentedConst<ApiType>; friendDepositFactor: u128 & AugmentedConst<ApiType>;
/** /**
* The maximum amount of friends allowed in a recovery configuration. * The maximum amount of friends allowed in a recovery configuration.
*
* NOTE: The threshold programmed in this Pallet uses u16, so it does
* not really make sense to have a limit here greater than u16::MAX.
* But also, that is a lot more than you should probably set this value
* to anyway...
**/ **/
maxFriends: u16 & AugmentedConst<ApiType>; maxFriends: u32 & AugmentedConst<ApiType>;
/** /**
* The base amount of currency needed to reserve for starting a recovery. * The base amount of currency needed to reserve for starting a recovery.
* *
@@ -682,6 +749,31 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
referenda: {
/**
* Quantization level for the referendum wakeup scheduler. A higher number will result in
* fewer storage reads/writes needed for smaller voters, but also result in delays to the
* automatic referendum status changes. Explicit servicing instructions are unaffected.
**/
alarmInterval: u32 & AugmentedConst<ApiType>;
/**
* Maximum size of the referendum queue for a single track.
**/
maxQueued: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount to be used as a deposit for a public referendum proposal.
**/
submissionDeposit: u128 & AugmentedConst<ApiType>;
/**
* 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;
};
scheduler: { scheduler: {
/** /**
* The maximum weight that may be scheduled per block for any dispatchables of less * The maximum weight that may be scheduled per block for any dispatchables of less
@@ -747,6 +839,9 @@ declare module '@polkadot/api-base/types/consts' {
* Number of eras that staked funds must remain bonded for. * Number of eras that staked funds must remain bonded for.
**/ **/
bondingDuration: u32 & AugmentedConst<ApiType>; bondingDuration: u32 & AugmentedConst<ApiType>;
/**
* Maximum number of nominations per nominator.
**/
maxNominations: u32 & AugmentedConst<ApiType>; maxNominations: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum number of nominators rewarded for each validator. * The maximum number of nominators rewarded for each validator.
@@ -755,6 +850,11 @@ declare module '@polkadot/api-base/types/consts' {
* claim their reward. This used to limit the i/o cost for the nominator payout. * claim their reward. This used to limit the i/o cost for the nominator payout.
**/ **/
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>; maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively
* determines how many unique eras a staker may be unbonding in.
**/
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
/** /**
* Number of sessions per era. * Number of sessions per era.
**/ **/
@@ -847,6 +947,10 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec; [key: string]: Codec;
}; };
transactionPayment: { transactionPayment: {
/**
* The polynomial that is applied in order to derive fee from length.
**/
lengthToFee: Vec<FrameSupportWeightsWeightToFeeCoefficient> & AugmentedConst<ApiType>;
/** /**
* A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their * A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their
* `priority` * `priority`
@@ -871,10 +975,6 @@ declare module '@polkadot/api-base/types/consts' {
* transactions. * transactions.
**/ **/
operationalFeeMultiplier: u8 & AugmentedConst<ApiType>; operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
/**
* The fee to be paid for making a transaction; the per-byte portion.
**/
transactionByteFee: u128 & AugmentedConst<ApiType>;
/** /**
* The polynomial that is applied in order to derive fee from weight. * The polynomial that is applied in order to derive fee from weight.
**/ **/
@@ -891,6 +991,8 @@ declare module '@polkadot/api-base/types/consts' {
burn: Permill & AugmentedConst<ApiType>; burn: Permill & AugmentedConst<ApiType>;
/** /**
* The maximum number of approvals that can wait in the spending queue. * The maximum number of approvals that can wait in the spending queue.
*
* NOTE: This parameter is also used within the Bounties Pallet extension if enabled.
**/ **/
maxApprovals: u32 & AugmentedConst<ApiType>; maxApprovals: u32 & AugmentedConst<ApiType>;
/** /**
@@ -902,6 +1004,10 @@ declare module '@polkadot/api-base/types/consts' {
* An accepted proposal gets these back. A rejected proposal does not. * An accepted proposal gets these back. A rejected proposal does not.
**/ **/
proposalBond: Permill & AugmentedConst<ApiType>; proposalBond: Permill & AugmentedConst<ApiType>;
/**
* Maximum amount of funds that should be placed in a deposit for making a proposal.
**/
proposalBondMaximum: Option<u128> & AugmentedConst<ApiType>;
/** /**
* Minimum amount of funds that should be placed in a deposit for making a proposal. * Minimum amount of funds that should be placed in a deposit for making a proposal.
**/ **/
@@ -917,28 +1023,28 @@ declare module '@polkadot/api-base/types/consts' {
}; };
uniques: { uniques: {
/** /**
* The basic amount of funds that must be reserved when adding an attribute to an asset. * The basic amount of funds that must be reserved when adding an attribute to an item.
**/ **/
attributeDepositBase: u128 & AugmentedConst<ApiType>; attributeDepositBase: u128 & AugmentedConst<ApiType>;
/** /**
* The basic amount of funds that must be reserved for an asset class. * The basic amount of funds that must be reserved for collection.
**/ **/
classDeposit: u128 & AugmentedConst<ApiType>; collectionDeposit: u128 & AugmentedConst<ApiType>;
/** /**
* The additional funds that must be reserved for the number of bytes store in metadata, * The additional funds that must be reserved for the number of bytes store in metadata,
* either "normal" metadata or attribute metadata. * either "normal" metadata or attribute metadata.
**/ **/
depositPerByte: u128 & AugmentedConst<ApiType>; depositPerByte: u128 & AugmentedConst<ApiType>;
/** /**
* The basic amount of funds that must be reserved for an asset instance. * The basic amount of funds that must be reserved for an item.
**/ **/
instanceDeposit: u128 & AugmentedConst<ApiType>; itemDeposit: u128 & AugmentedConst<ApiType>;
/** /**
* The maximum length of an attribute key. * The maximum length of an attribute key.
**/ **/
keyLimit: u32 & AugmentedConst<ApiType>; keyLimit: u32 & AugmentedConst<ApiType>;
/** /**
* The basic amount of funds that must be reserved when adding metadata to your asset. * The basic amount of funds that must be reserved when adding metadata to your item.
**/ **/
metadataDepositBase: u128 & AugmentedConst<ApiType>; metadataDepositBase: u128 & AugmentedConst<ApiType>;
/** /**
+331 -17
View File
@@ -112,6 +112,10 @@ declare module '@polkadot/api-base/types/errors' {
* A given equivocation report is valid but already previously reported. * A given equivocation report is valid but already previously reported.
**/ **/
DuplicateOffenceReport: AugmentedError<ApiType>; DuplicateOffenceReport: AugmentedError<ApiType>;
/**
* Submitted configuration is invalid.
**/
InvalidConfiguration: AugmentedError<ApiType>;
/** /**
* An equivocation proof provided as part of an equivocation report is invalid. * An equivocation proof provided as part of an equivocation report is invalid.
**/ **/
@@ -127,17 +131,9 @@ declare module '@polkadot/api-base/types/errors' {
}; };
bagsList: { bagsList: {
/** /**
* Id not found in list. * A error in the list interface implementation.
**/ **/
IdNotFound: AugmentedError<ApiType>; List: AugmentedError<ApiType>;
/**
* An Id does not have a greater vote weight than another Id.
**/
NotHeavier: AugmentedError<ApiType>;
/**
* Attempted to place node in front of a node in another bag.
**/
NotInSameBag: AugmentedError<ApiType>;
/** /**
* Generic error * Generic error
**/ **/
@@ -183,7 +179,7 @@ declare module '@polkadot/api-base/types/errors' {
}; };
bounties: { bounties: {
/** /**
* The bounty cannot be closed because it has active child-bounties. * The bounty cannot be closed because it has active child bounties.
**/ **/
HasActiveChildBounty: AugmentedError<ApiType>; HasActiveChildBounty: AugmentedError<ApiType>;
/** /**
@@ -219,6 +215,10 @@ declare module '@polkadot/api-base/types/errors' {
* Require bounty curator. * Require bounty curator.
**/ **/
RequireCurator: AugmentedError<ApiType>; RequireCurator: AugmentedError<ApiType>;
/**
* Too many approvals are already queued.
**/
TooManyQueued: AugmentedError<ApiType>;
/** /**
* The bounty status is unexpected. * The bounty status is unexpected.
**/ **/
@@ -238,7 +238,7 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
ParentBountyNotActive: AugmentedError<ApiType>; ParentBountyNotActive: AugmentedError<ApiType>;
/** /**
* Number of child-bounties exceeds limit `MaxActiveChildBountyCount`. * Number of child bounties exceeds limit `MaxActiveChildBountyCount`.
**/ **/
TooManyChildBounties: AugmentedError<ApiType>; TooManyChildBounties: AugmentedError<ApiType>;
/** /**
@@ -309,6 +309,10 @@ declare module '@polkadot/api-base/types/errors' {
* `seal_call` forwarded this contracts input. It therefore is no longer available. * `seal_call` forwarded this contracts input. It therefore is no longer available.
**/ **/
InputForwarded: AugmentedError<ApiType>; InputForwarded: AugmentedError<ApiType>;
/**
* Invalid combination of flags supplied to `seal_call` or `seal_delegate_call`.
**/
InvalidCallFlags: AugmentedError<ApiType>;
/** /**
* A new schedule must have a greater version than the current one. * A new schedule must have a greater version than the current one.
**/ **/
@@ -381,6 +385,61 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
convictionVoting: {
/**
* The account is already delegating.
**/
AlreadyDelegating: AugmentedError<ApiType>;
/**
* The account currently has votes attached to it and the operation cannot succeed until
* these are removed, either through `unvote` or `reap_vote`.
**/
AlreadyVoting: AugmentedError<ApiType>;
/**
* The class ID supplied is invalid.
**/
BadClass: AugmentedError<ApiType>;
/**
* The class must be supplied since it is not easily determinable from the state.
**/
ClassNeeded: AugmentedError<ApiType>;
/**
* Too high a balance was provided that the account cannot afford.
**/
InsufficientFunds: AugmentedError<ApiType>;
/**
* Maximum number of votes reached.
**/
MaxVotesReached: AugmentedError<ApiType>;
/**
* Delegation to oneself makes no sense.
**/
Nonsense: AugmentedError<ApiType>;
/**
* The actor has no permission to conduct the action.
**/
NoPermission: AugmentedError<ApiType>;
/**
* The actor has no permission to conduct the action right now but will do in the future.
**/
NoPermissionYet: AugmentedError<ApiType>;
/**
* The account is not currently delegating.
**/
NotDelegating: AugmentedError<ApiType>;
/**
* Poll is not ongoing.
**/
NotOngoing: AugmentedError<ApiType>;
/**
* The given account did not vote on the poll.
**/
NotVoter: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
council: { council: {
/** /**
* Members are already initialized! * Members are already initialized!
@@ -551,6 +610,10 @@ declare module '@polkadot/api-base/types/errors' {
* The call is not allowed at this point. * The call is not allowed at this point.
**/ **/
CallNotAllowed: AugmentedError<ApiType>; CallNotAllowed: AugmentedError<ApiType>;
/**
* The fallback failed
**/
FallbackFailed: AugmentedError<ApiType>;
/** /**
* `Self::insert_submission` returned an invalid index. * `Self::insert_submission` returned an invalid index.
**/ **/
@@ -951,6 +1014,117 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
nominationPools: {
/**
* An account is already delegating in another pool. An account may only belong to one
* pool at a time.
**/
AccountBelongsToOtherPool: AugmentedError<ApiType>;
/**
* The member is already unbonding in this era.
**/
AlreadyUnbonding: AugmentedError<ApiType>;
/**
* The pools state cannot be changed.
**/
CanNotChangeState: AugmentedError<ApiType>;
/**
* None of the funds can be withdrawn yet because the bonding duration has not passed.
**/
CannotWithdrawAny: AugmentedError<ApiType>;
/**
* Some error occurred that should never happen. This should be reported to the
* maintainers.
**/
DefensiveError: AugmentedError<ApiType>;
/**
* The caller does not have adequate permissions.
**/
DoesNotHavePermission: AugmentedError<ApiType>;
/**
* The member is fully unbonded (and thus cannot access the bonded and reward pool
* anymore to, for example, collect rewards).
**/
FullyUnbonding: AugmentedError<ApiType>;
/**
* The pool has insufficient balance to bond as a nominator.
**/
InsufficientBond: AugmentedError<ApiType>;
/**
* Too many members in the pool or system.
**/
MaxPoolMembers: AugmentedError<ApiType>;
/**
* The system is maxed out on pools.
**/
MaxPools: AugmentedError<ApiType>;
/**
* The member cannot unbond further chunks due to reaching the limit.
**/
MaxUnbondingLimit: AugmentedError<ApiType>;
/**
* Metadata exceeds [`Config::MaxMetadataLen`]
**/
MetadataExceedsMaxLen: AugmentedError<ApiType>;
/**
* The amount does not meet the minimum bond to either join or create a pool.
**/
MinimumBondNotMet: AugmentedError<ApiType>;
/**
* A pool must be in [`PoolState::Destroying`] in order for the depositor to unbond or for
* other members to be permissionlessly unbonded.
**/
NotDestroying: AugmentedError<ApiType>;
/**
* Not enough points. Ty unbonding less.
**/
NotEnoughPointsToUnbond: AugmentedError<ApiType>;
/**
* Either a) the caller cannot make a valid kick or b) the pool is not destroying.
**/
NotKickerOrDestroying: AugmentedError<ApiType>;
/**
* The caller does not have nominating permissions for the pool.
**/
NotNominator: AugmentedError<ApiType>;
/**
* The depositor must be the only member in the bonded pool in order to unbond. And the
* depositor must be the only member in the sub pools in order to withdraw unbonded.
**/
NotOnlyPoolMember: AugmentedError<ApiType>;
/**
* The pool is not open to join
**/
NotOpen: AugmentedError<ApiType>;
/**
* The transaction could not be executed due to overflow risk for the pool.
**/
OverflowRisk: AugmentedError<ApiType>;
/**
* Partial unbonding now allowed permissionlessly.
**/
PartialUnbondNotAllowedPermissionlessly: AugmentedError<ApiType>;
/**
* An account is not a member.
**/
PoolMemberNotFound: AugmentedError<ApiType>;
/**
* A (bonded) pool id does not exist.
**/
PoolNotFound: AugmentedError<ApiType>;
/**
* A reward pool does not exist. In all cases this is a system logic error.
**/
RewardPoolNotFound: AugmentedError<ApiType>;
/**
* A sub pool does not exist.
**/
SubPoolsNotFound: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
preimage: { preimage: {
/** /**
* Preimage has already been noted on-chain. * Preimage has already been noted on-chain.
@@ -1089,6 +1263,70 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
referenda: {
/**
* 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>;
};
remark: {
/**
* Attempted to call `store` outside of block execution.
**/
BadContext: AugmentedError<ApiType>;
/**
* Attempting to store empty data.
**/
Empty: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
scheduler: { scheduler: {
/** /**
* Failed to schedule a call * Failed to schedule a call
@@ -1321,6 +1559,32 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
stateTrieMigration: {
/**
* bad witness data provided.
**/
BadWitness: AugmentedError<ApiType>;
/**
* max signed limits not respected.
**/
MaxSignedLimits: AugmentedError<ApiType>;
/**
* submitter does not have enough funds.
**/
NotEnoughFunds: AugmentedError<ApiType>;
/**
* Signed migration is not allowed because the maximum limit is not set yet.
**/
SignedMigrationNotAllowed: AugmentedError<ApiType>;
/**
* upper bound of size is exceeded,
**/
SizeUpperBoundExceeded: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
sudo: { sudo: {
/** /**
* Sender must be the Sudo account * Sender must be the Sudo account
@@ -1522,6 +1786,10 @@ declare module '@polkadot/api-base/types/errors' {
* No proposal or bounty at that index. * No proposal or bounty at that index.
**/ **/
InvalidIndex: AugmentedError<ApiType>; InvalidIndex: AugmentedError<ApiType>;
/**
* Proposal has not been approved.
**/
ProposalNotApproved: AugmentedError<ApiType>;
/** /**
* Too many approvals in the queue. * Too many approvals in the queue.
**/ **/
@@ -1533,7 +1801,7 @@ declare module '@polkadot/api-base/types/errors' {
}; };
uniques: { uniques: {
/** /**
* The asset instance ID has already been used for an asset. * The item ID has already been used for an item.
**/ **/
AlreadyExists: AugmentedError<ApiType>; AlreadyExists: AugmentedError<ApiType>;
/** /**
@@ -1541,13 +1809,29 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
BadWitness: AugmentedError<ApiType>; BadWitness: AugmentedError<ApiType>;
/** /**
* The asset instance or class is frozen. * The item or collection is frozen.
**/ **/
Frozen: AugmentedError<ApiType>; Frozen: AugmentedError<ApiType>;
/** /**
* The asset ID is already taken. * The item ID is already taken.
**/ **/
InUse: AugmentedError<ApiType>; InUse: AugmentedError<ApiType>;
/**
* The item is locked.
**/
Locked: AugmentedError<ApiType>;
/**
* The max supply has already been set.
**/
MaxSupplyAlreadySet: AugmentedError<ApiType>;
/**
* All items have been minted.
**/
MaxSupplyReached: AugmentedError<ApiType>;
/**
* The provided max supply is less to the amount of items a collection already has.
**/
MaxSupplyTooSmall: AugmentedError<ApiType>;
/** /**
* There is no delegate approved. * There is no delegate approved.
**/ **/
@@ -1556,14 +1840,18 @@ declare module '@polkadot/api-base/types/errors' {
* The signing account has no permission to do the operation. * The signing account has no permission to do the operation.
**/ **/
NoPermission: AugmentedError<ApiType>; NoPermission: AugmentedError<ApiType>;
/**
* The named owner has not signed ownership of the collection is acceptable.
**/
Unaccepted: AugmentedError<ApiType>;
/** /**
* No approval exists that would allow the transfer. * No approval exists that would allow the transfer.
**/ **/
Unapproved: AugmentedError<ApiType>; Unapproved: AugmentedError<ApiType>;
/** /**
* The given asset ID is unknown. * The given item ID is unknown.
**/ **/
Unknown: AugmentedError<ApiType>; UnknownCollection: AugmentedError<ApiType>;
/** /**
* The delegate turned out to be different to what was expected. * The delegate turned out to be different to what was expected.
**/ **/
@@ -1614,5 +1902,31 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
whitelist: {
/**
* The call was already whitelisted; No-Op.
**/
CallAlreadyWhitelisted: AugmentedError<ApiType>;
/**
* The call was not whitelisted.
**/
CallIsNotWhitelisted: AugmentedError<ApiType>;
/**
* The weight of the decoded call was higher than the witness.
**/
InvalidCallWeightWitness: AugmentedError<ApiType>;
/**
* The preimage of the call hash could not be loaded.
**/
UnavailablePreImage: AugmentedError<ApiType>;
/**
* The call could not be decoded.
**/
UndecodableCall: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
} // AugmentedErrors } // AugmentedErrors
} // declare module } // declare module
+215 -30
View File
@@ -5,7 +5,7 @@ import type { ApiTypes } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types'; import type { ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, NodeRuntimeProxyType, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError } from '@polkadot/types/lookup'; import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPostDispatchInfo, NodeRuntimeProxyType, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationCompute, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo } from '@polkadot/types/lookup';
declare module '@polkadot/api-base/types/events' { declare module '@polkadot/api-base/types/events' {
export interface AugmentedEvents<ApiType extends ApiTypes> { export interface AugmentedEvents<ApiType extends ApiTypes> {
@@ -93,6 +93,10 @@ declare module '@polkadot/api-base/types/events' {
* Moved an account from one bag to another. * Moved an account from one bag to another.
**/ **/
Rebagged: AugmentedEvent<ApiType, [AccountId32, u64, u64]>; Rebagged: AugmentedEvent<ApiType, [AccountId32, u64, u64]>;
/**
* Updated the score of some account to the given amount.
**/
ScoreUpdated: AugmentedEvent<ApiType, [AccountId32, u64]>;
/** /**
* Generic event * Generic event
**/ **/
@@ -211,6 +215,10 @@ declare module '@polkadot/api-base/types/events' {
* Code with the specified hash has been stored. * Code with the specified hash has been stored.
**/ **/
CodeStored: AugmentedEvent<ApiType, [H256]>; CodeStored: AugmentedEvent<ApiType, [H256]>;
/**
* A contract's code was updated.
**/
ContractCodeUpdated: AugmentedEvent<ApiType, [AccountId32, H256, H256]>;
/** /**
* A custom event emitted by the contract. * A custom event emitted by the contract.
**/ **/
@@ -233,6 +241,20 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
convictionVoting: {
/**
* An account has delegated their vote to another account. \[who, target\]
**/
Delegated: AugmentedEvent<ApiType, [AccountId32, AccountId32]>;
/**
* An \[account\] has cancelled a previous delegation operation.
**/
Undelegated: AugmentedEvent<ApiType, [AccountId32]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
council: { council: {
/** /**
* A motion was approved by the required threshold. * A motion was approved by the required threshold.
@@ -597,6 +619,51 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
nominationPools: {
/**
* A member has became bonded in a pool.
**/
Bonded: AugmentedEvent<ApiType, [AccountId32, u32, u128, bool]>;
/**
* A pool has been created.
**/
Created: AugmentedEvent<ApiType, [AccountId32, u32]>;
/**
* A pool has been destroyed.
**/
Destroyed: AugmentedEvent<ApiType, [u32]>;
/**
* A member has been removed from a pool.
*
* The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked).
**/
MemberRemoved: AugmentedEvent<ApiType, [u32, AccountId32]>;
/**
* A payout has been made to a member.
**/
PaidOut: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
/**
* The roles of a pool have been updated to the given new roles. Note that the depositor
* can never change.
**/
RolesUpdated: AugmentedEvent<ApiType, [Option<AccountId32>, Option<AccountId32>, Option<AccountId32>]>;
/**
* The state of a pool has changed
**/
StateChanged: AugmentedEvent<ApiType, [u32, PalletNominationPoolsPoolState]>;
/**
* A member has unbonded from their pool.
**/
Unbonded: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
/**
* A member has withdrawn from their pool.
**/
Withdrawn: AugmentedEvent<ApiType, [AccountId32, u32, u128]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
offences: { offences: {
/** /**
* There is an offence reported of the given `kind` happened at the `session_index` and * There is an offence reported of the given `kind` happened at the `session_index` and
@@ -645,6 +712,10 @@ declare module '@polkadot/api-base/types/events' {
* A proxy was executed correctly, with the given. * A proxy was executed correctly, with the given.
**/ **/
ProxyExecuted: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>; ProxyExecuted: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;
/**
* A proxy was removed.
**/
ProxyRemoved: AugmentedEvent<ApiType, [AccountId32, AccountId32, NodeRuntimeProxyType, u32]>;
/** /**
* Generic event * Generic event
**/ **/
@@ -680,6 +751,68 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
referenda: {
/**
* A referendum has been approved and its proposal has been scheduled.
**/
Approved: AugmentedEvent<ApiType, [u32]>;
/**
* A referendum has been cancelled.
**/
Cancelled: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
ConfirmAborted: AugmentedEvent<ApiType, [u32]>;
/**
* A referendum has ended its confirmation phase and is ready for approval.
**/
Confirmed: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
ConfirmStarted: AugmentedEvent<ApiType, [u32]>;
/**
* The decision deposit has been placed.
**/
DecisionDepositPlaced: AugmentedEvent<ApiType, [u32, AccountId32, u128]>;
/**
* The decision deposit has been refunded.
**/
DecisionDepositRefunded: AugmentedEvent<ApiType, [u32, AccountId32, u128]>;
/**
* A referendum has moved into the deciding phase.
**/
DecisionStarted: AugmentedEvent<ApiType, [u32, u8, H256, PalletConvictionVotingTally]>;
/**
* A deposit has been slashaed.
**/
DepositSlashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
* A referendum has been killed.
**/
Killed: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
/**
* A proposal has been rejected by referendum.
**/
Rejected: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
/**
* A referendum has being submitted.
**/
Submitted: AugmentedEvent<ApiType, [u32, u8, H256]>;
/**
* A referendum has been timed out without being decided.
**/
TimedOut: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
remark: {
/**
* Stored data off chain.
**/
Stored: AugmentedEvent<ApiType, [AccountId32, H256]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
scheduler: { scheduler: {
/** /**
* The call for the provided hash was not found so the task has been aborted. * The call for the provided hash was not found so the task has been aborted.
@@ -839,6 +972,10 @@ declare module '@polkadot/api-base/types/events' {
* An account has unbonded this amount. \[stash, amount\] * An account has unbonded this amount. \[stash, amount\]
**/ **/
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>; Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
* A validator has set their preferences.
**/
ValidatorPrefsSet: AugmentedEvent<ApiType, [AccountId32, PalletStakingValidatorPrefs]>;
/** /**
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance` * An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
* from the unlocking queue. \[stash, amount\] * from the unlocking queue. \[stash, amount\]
@@ -849,6 +986,29 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
stateTrieMigration: {
/**
* The auto migration task finished.
**/
AutoMigrationFinished: AugmentedEvent<ApiType, []>;
/**
* Migration got halted.
**/
Halted: AugmentedEvent<ApiType, []>;
/**
* Given number of `(top, child)` keys were migrated respectively, with the given
* `compute`.
**/
Migrated: AugmentedEvent<ApiType, [u32, u32, PalletStateTrieMigrationMigrationCompute]>;
/**
* Some account got slashed by the given amount.
**/
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
sudo: { sudo: {
/** /**
* The \[sudoer\] just switched identity; the old key is supplied if one existed. * The \[sudoer\] just switched identity; the old key is supplied if one existed.
@@ -1043,73 +1203,77 @@ declare module '@polkadot/api-base/types/events' {
}; };
uniques: { uniques: {
/** /**
* An approval for a `delegate` account to transfer the `instance` of an asset `class` was * An approval for a `delegate` account to transfer the `item` of an item
* cancelled by its `owner`. * `collection` was cancelled by its `owner`.
**/ **/
ApprovalCancelled: AugmentedEvent<ApiType, [u32, u32, AccountId32, AccountId32]>; ApprovalCancelled: AugmentedEvent<ApiType, [u32, u32, AccountId32, AccountId32]>;
/** /**
* An `instance` of an asset `class` has been approved by the `owner` for transfer by a * An `item` of a `collection` has been approved by the `owner` for transfer by
* `delegate`. * a `delegate`.
**/ **/
ApprovedTransfer: AugmentedEvent<ApiType, [u32, u32, AccountId32, AccountId32]>; ApprovedTransfer: AugmentedEvent<ApiType, [u32, u32, AccountId32, AccountId32]>;
/** /**
* An asset `class` has had its attributes changed by the `Force` origin. * Attribute metadata has been cleared for a `collection` or `item`.
**/
AssetStatusChanged: AugmentedEvent<ApiType, [u32]>;
/**
* Attribute metadata has been cleared for an asset class or instance.
**/ **/
AttributeCleared: AugmentedEvent<ApiType, [u32, Option<u32>, Bytes]>; AttributeCleared: AugmentedEvent<ApiType, [u32, Option<u32>, Bytes]>;
/** /**
* New attribute metadata has been set for an asset class or instance. * New attribute metadata has been set for a `collection` or `item`.
**/ **/
AttributeSet: AugmentedEvent<ApiType, [u32, Option<u32>, Bytes, Bytes]>; AttributeSet: AugmentedEvent<ApiType, [u32, Option<u32>, Bytes, Bytes]>;
/** /**
* An asset `instance` was destroyed. * An `item` was destroyed.
**/ **/
Burned: AugmentedEvent<ApiType, [u32, u32, AccountId32]>; Burned: AugmentedEvent<ApiType, [u32, u32, AccountId32]>;
/** /**
* Some asset `class` was frozen. * Some `collection` was frozen.
**/ **/
ClassFrozen: AugmentedEvent<ApiType, [u32]>; CollectionFrozen: AugmentedEvent<ApiType, [u32]>;
/** /**
* Metadata has been cleared for an asset class. * Max supply has been set for a collection.
**/ **/
ClassMetadataCleared: AugmentedEvent<ApiType, [u32]>; CollectionMaxSupplySet: AugmentedEvent<ApiType, [u32, u32]>;
/** /**
* New metadata has been set for an asset class. * Metadata has been cleared for a `collection`.
**/ **/
ClassMetadataSet: AugmentedEvent<ApiType, [u32, Bytes, bool]>; CollectionMetadataCleared: AugmentedEvent<ApiType, [u32]>;
/** /**
* Some asset `class` was thawed. * New metadata has been set for a `collection`.
**/ **/
ClassThawed: AugmentedEvent<ApiType, [u32]>; CollectionMetadataSet: AugmentedEvent<ApiType, [u32, Bytes, bool]>;
/** /**
* An asset class was created. * Some `collection` was thawed.
**/
CollectionThawed: AugmentedEvent<ApiType, [u32]>;
/**
* A `collection` was created.
**/ **/
Created: AugmentedEvent<ApiType, [u32, AccountId32, AccountId32]>; Created: AugmentedEvent<ApiType, [u32, AccountId32, AccountId32]>;
/** /**
* An asset `class` was destroyed. * A `collection` was destroyed.
**/ **/
Destroyed: AugmentedEvent<ApiType, [u32]>; Destroyed: AugmentedEvent<ApiType, [u32]>;
/** /**
* An asset class was force-created. * A `collection` was force-created.
**/ **/
ForceCreated: AugmentedEvent<ApiType, [u32, AccountId32]>; ForceCreated: AugmentedEvent<ApiType, [u32, AccountId32]>;
/** /**
* Some asset `instance` was frozen. * Some `item` was frozen.
**/ **/
Frozen: AugmentedEvent<ApiType, [u32, u32]>; Frozen: AugmentedEvent<ApiType, [u32, u32]>;
/** /**
* An asset `instance` was issued. * An `item` was issued.
**/ **/
Issued: AugmentedEvent<ApiType, [u32, u32, AccountId32]>; Issued: AugmentedEvent<ApiType, [u32, u32, AccountId32]>;
/** /**
* Metadata has been cleared for an asset instance. * A `collection` has had its attributes changed by the `Force` origin.
**/
ItemStatusChanged: AugmentedEvent<ApiType, [u32]>;
/**
* Metadata has been cleared for an item.
**/ **/
MetadataCleared: AugmentedEvent<ApiType, [u32, u32]>; MetadataCleared: AugmentedEvent<ApiType, [u32, u32]>;
/** /**
* New metadata has been set for an asset instance. * New metadata has been set for an item.
**/ **/
MetadataSet: AugmentedEvent<ApiType, [u32, u32, Bytes, bool]>; MetadataSet: AugmentedEvent<ApiType, [u32, u32, Bytes, bool]>;
/** /**
@@ -1117,7 +1281,11 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
OwnerChanged: AugmentedEvent<ApiType, [u32, AccountId32]>; OwnerChanged: AugmentedEvent<ApiType, [u32, AccountId32]>;
/** /**
* Metadata has been cleared for an asset instance. * Ownership acceptance has changed for an account.
**/
OwnershipAcceptanceChanged: AugmentedEvent<ApiType, [AccountId32, Option<u32>]>;
/**
* Metadata has been cleared for an item.
**/ **/
Redeposited: AugmentedEvent<ApiType, [u32, Vec<u32>]>; Redeposited: AugmentedEvent<ApiType, [u32, Vec<u32>]>;
/** /**
@@ -1125,11 +1293,11 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
TeamChanged: AugmentedEvent<ApiType, [u32, AccountId32, AccountId32, AccountId32]>; TeamChanged: AugmentedEvent<ApiType, [u32, AccountId32, AccountId32, AccountId32]>;
/** /**
* Some asset `instance` was thawed. * Some `item` was thawed.
**/ **/
Thawed: AugmentedEvent<ApiType, [u32, u32]>; Thawed: AugmentedEvent<ApiType, [u32, u32]>;
/** /**
* An asset `instance` was transferred. * An `item` was transferred.
**/ **/
Transferred: AugmentedEvent<ApiType, [u32, u32, AccountId32, AccountId32]>; Transferred: AugmentedEvent<ApiType, [u32, u32, AccountId32, AccountId32]>;
/** /**
@@ -1142,6 +1310,10 @@ declare module '@polkadot/api-base/types/events' {
* Batch of dispatches completed fully with no error. * Batch of dispatches completed fully with no error.
**/ **/
BatchCompleted: AugmentedEvent<ApiType, []>; BatchCompleted: AugmentedEvent<ApiType, []>;
/**
* Batch of dispatches completed but has errors.
**/
BatchCompletedWithErrors: AugmentedEvent<ApiType, []>;
/** /**
* Batch of dispatches did not complete fully. Index of first failing dispatch given, as * Batch of dispatches did not complete fully. Index of first failing dispatch given, as
* well as the error. * well as the error.
@@ -1155,6 +1327,10 @@ declare module '@polkadot/api-base/types/events' {
* A single item within a Batch of dispatches has completed with no error. * A single item within a Batch of dispatches has completed with no error.
**/ **/
ItemCompleted: AugmentedEvent<ApiType, []>; ItemCompleted: AugmentedEvent<ApiType, []>;
/**
* A single item within a Batch of dispatches has completed with error.
**/
ItemFailed: AugmentedEvent<ApiType, [SpRuntimeDispatchError]>;
/** /**
* Generic event * Generic event
**/ **/
@@ -1175,5 +1351,14 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
whitelist: {
CallWhitelisted: AugmentedEvent<ApiType, [H256]>;
WhitelistedCallDispatched: AugmentedEvent<ApiType, [H256, Result<FrameSupportWeightsPostDispatchInfo, SpRuntimeDispatchErrorWithPostInfo>]>;
WhitelistedCallRemoved: AugmentedEvent<ApiType, [H256]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
} // AugmentedEvents } // AugmentedEvents
} // declare module } // declare module
@@ -6,4 +6,5 @@ import './consts';
import './errors'; import './errors';
import './events'; import './events';
import './query'; import './query';
import './registry';
import './tx'; import './tx';
+258 -40
View File
@@ -6,7 +6,7 @@ import type { Data } from '@polkadot/types';
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, u32, u64, u8 } from '@polkadot/types-codec'; import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesClassDetails, PalletUniquesClassMetadata, PalletUniquesInstanceDetails, PalletUniquesInstanceMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup'; import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfo, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
import type { Observable } from '@polkadot/types/types'; import type { Observable } from '@polkadot/types/types';
declare module '@polkadot/api-base/types/storage' { declare module '@polkadot/api-base/types/storage' {
@@ -76,7 +76,7 @@ declare module '@polkadot/api-base/types/storage' {
* This field should always be populated during block processing unless * This field should always be populated during block processing unless
* secondary plain slots are enabled (which don't contain a VRF output). * secondary plain slots are enabled (which don't contain a VRF output).
* *
* It is set in `on_initialize`, before it will contain the value from the last block. * It is set in `on_finalize`, before it will contain the value from the last block.
**/ **/
authorVrfRandomness: AugmentedQuery<ApiType, () => Observable<Option<U8aFixed>>, []> & QueryableStorageEntry<ApiType, []>; authorVrfRandomness: AugmentedQuery<ApiType, () => Observable<Option<U8aFixed>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
@@ -109,7 +109,7 @@ declare module '@polkadot/api-base/types/storage' {
* Temporary value (cleared at block finalization) which is `Some` * Temporary value (cleared at block finalization) which is `Some`
* if per-block initialization has already been called for current block. * if per-block initialization has already been called for current block.
**/ **/
initialized: AugmentedQuery<ApiType, () => Observable<Option<Option<U8aFixed>>>, []> & QueryableStorageEntry<ApiType, []>; initialized: AugmentedQuery<ApiType, () => Observable<Option<Option<SpConsensusBabeDigestsPreDigest>>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* How late the current block is compared to its parent. * How late the current block is compared to its parent.
* *
@@ -193,8 +193,29 @@ declare module '@polkadot/api-base/types/storage' {
}; };
balances: { balances: {
/** /**
* The balance of an account. * The Balances pallet example of storing the balance of an account.
* *
* # Example
*
* ```nocompile
* impl pallet_balances::Config for Runtime {
* type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>
* }
* ```
*
* You can also store the balance of an account in the `System` pallet.
*
* # Example
*
* ```nocompile
* impl pallet_balances::Config for Runtime {
* type AccountStore = System
* }
* ```
*
* But this comes with tradeoffs, storing account balances in the system pallet stores
* `frame_system` data alongside the account data contrary to storing account balances in the
* `Balances` pallet, which uses a `StorageMap` to store balances data only.
* NOTE: This is only used in the case that this pallet is used to store balances. * NOTE: This is only used in the case that this pallet is used to store balances.
**/ **/
account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>; account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
@@ -246,7 +267,7 @@ declare module '@polkadot/api-base/types/storage' {
}; };
childBounties: { childBounties: {
/** /**
* Child-bounties that have been added. * Child bounties that have been added.
**/ **/
childBounties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletChildBountiesChildBounty>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>; childBounties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletChildBountiesChildBounty>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
/** /**
@@ -262,7 +283,7 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
childrenCuratorFees: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; childrenCuratorFees: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Number of child-bounties per parent bounty. * Number of child bounties per parent bounty.
* Map of parent bounty index to number of child bounties. * Map of parent bounty index to number of child bounties.
**/ **/
parentChildBounties: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; parentChildBounties: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
@@ -272,10 +293,6 @@ declare module '@polkadot/api-base/types/storage' {
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
contracts: { contracts: {
/**
* The subtrie counter.
**/
accountCounter: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* A mapping between an original code hash and instrumented wasm code, ready for execution. * A mapping between an original code hash and instrumented wasm code, ready for execution.
**/ **/
@@ -293,6 +310,31 @@ declare module '@polkadot/api-base/types/storage' {
* stored in said trie. Therefore this operation is performed lazily in `on_initialize`. * stored in said trie. Therefore this operation is performed lazily in `on_initialize`.
**/ **/
deletionQueue: AugmentedQuery<ApiType, () => Observable<Vec<PalletContractsStorageDeletedContract>>, []> & QueryableStorageEntry<ApiType, []>; deletionQueue: AugmentedQuery<ApiType, () => Observable<Vec<PalletContractsStorageDeletedContract>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* This is a **monotonic** counter incremented on contract instantiation.
*
* This is used in order to generate unique trie ids for contracts.
* The trie id of a new contract is calculated from hash(account_id, nonce).
* The nonce is required because otherwise the following sequence would lead to
* a possible collision of storage:
*
* 1. Create a new contract.
* 2. Terminate the contract.
* 3. Immediately recreate the contract with the same account_id.
*
* This is bad because the contents of a trie are deleted lazily and there might be
* storage of the old instantiation still in it when the new contract is created. Please
* note that we can't replace the counter by the block number because the sequence above
* can happen in the same block. We also can't keep the account counter in memory only
* because storage is the only way to communicate across different extrinsics in the
* same block.
*
* # Note
*
* Do not use it to determine the number of contracts. It won't be decremented if
* a contract is destroyed.
**/
nonce: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* A mapping between an original code hash and its owner information. * A mapping between an original code hash and its owner information.
**/ **/
@@ -306,6 +348,23 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
convictionVoting: {
/**
* The voting classes which have a non-zero lock requirement and the lock amounts which they
* require. The actual amount locked on behalf of this pallet should always be the maximum of
* this list.
**/
classLocksFor: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<ITuple<[u8, u128]>>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* All voting for a particular voter in a particular voting class. We store the balance for the
* 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]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
council: { council: {
/** /**
* The current members of the collective. This is stored sorted (just by value). * The current members of the collective. This is stored sorted (just by value).
@@ -357,13 +416,6 @@ declare module '@polkadot/api-base/types/storage' {
* proposal. * proposal.
**/ **/
lastTabledWasExternal: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>; lastTabledWasExternal: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Accounts for which there are locks in action which may be removed at some point in the
* future. The value is the block number at which the lock expires and may be removed.
*
* TWOX-NOTE: OK ― `AccountId` is a secure hash.
**/
locks: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
* The lowest referendum index representing an unbaked referendum. Equal to * The lowest referendum index representing an unbaked referendum. Equal to
* `ReferendumCount` if there isn't a unbaked referendum. * `ReferendumCount` if there isn't a unbaked referendum.
@@ -434,7 +486,7 @@ declare module '@polkadot/api-base/types/storage' {
* *
* Can be set via `set_minimum_untrusted_score`. * Can be set via `set_minimum_untrusted_score`.
**/ **/
minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<Vec<u128>>>, []> & QueryableStorageEntry<ApiType, []>; minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<SpNposElectionsElectionScore>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Current best solution, signed or unsigned, queued to be returned upon `elect`. * Current best solution, signed or unsigned, queued to be returned upon `elect`.
**/ **/
@@ -456,7 +508,7 @@ declare module '@polkadot/api-base/types/storage' {
* can be quite large, so we're willing to pay the cost of multiple database accesses to access * can be quite large, so we're willing to pay the cost of multiple database accesses to access
* them one at a time instead of reading and decoding all of them at once. * them one at a time instead of reading and decoding all of them at once.
**/ **/
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<Vec<u128>, u32>>, []> & QueryableStorageEntry<ApiType, []>; signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<SpNposElectionsElectionScore, u32>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The next index to be assigned to an incoming signed submission. * The next index to be assigned to an incoming signed submission.
* *
@@ -733,6 +785,95 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
nominationPools: {
/**
* Storage for bonded pools.
**/
bondedPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsBondedPoolInner>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Counter for the related counted storage map
**/
counterForBondedPools: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForMetadata: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForPoolMembers: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForReversePoolIdLookup: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForRewardPools: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForSubPoolsStorage: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Ever increasing number of all pools created so far.
**/
lastPoolId: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Maximum number of members that can exist in the system. If `None`, then the count
* members are not bound on a system wide basis.
**/
maxPoolMembers: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Maximum number of members that may belong to pool. If `None`, then the count of
* members is not bound on a per pool basis.
**/
maxPoolMembersPerPool: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Maximum number of nomination pools that can exist. If `None`, then an unbounded number of
* pools can exist.
**/
maxPools: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Metadata for the pool.
**/
metadata: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Minimum bond required to create a pool.
*
* This is the amount that the depositor must put as their initial stake in the pool, as an
* indication of "skin in the game".
**/
minCreateBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Minimum amount to bond to join a pool.
**/
minJoinBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Active members.
**/
poolMembers: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletNominationPoolsPoolMember>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* A reverse lookup from the pool's account id to its id.
*
* This is only used for slashing. In all other instances, the pool id is used, and the
* accounts are deterministically derived from it.
**/
reversePoolIdLookup: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Reward pools. This is where there rewards for each pool accumulate. When a members payout
* is claimed, the balance comes out fo the reward pool. Keyed by the bonded pools account.
**/
rewardPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsRewardPool>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Groups of unbonding pools. Each group of unbonding pools belongs to a bonded pool,
* hence the name sub-pools. Keyed by the bonded pools account.
**/
subPoolsStorage: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsSubPools>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
offences: { offences: {
/** /**
* A vector of reports of the same kind that happened at the same time slot. * A vector of reports of the same kind that happened at the same time slot.
@@ -820,6 +961,31 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
referenda: {
/**
* The number of referenda being decided currently.
**/
decidingCount: AugmentedQuery<ApiType, (arg: u8 | AnyNumber | Uint8Array) => Observable<u32>, [u8]> & QueryableStorageEntry<ApiType, [u8]>;
/**
* 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<PalletReferendaReferendumInfo>>, [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: u8 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, u128]>>>, [u8]> & QueryableStorageEntry<ApiType, [u8]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
scheduler: { scheduler: {
/** /**
* Items to be executed, indexed by the block number that they should be executed on. * Items to be executed, indexed by the block number that they should be executed on.
@@ -829,12 +995,6 @@ declare module '@polkadot/api-base/types/storage' {
* Lookup from identity to the block number and index of the task. * Lookup from identity to the block number and index of the task.
**/ **/
lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>; lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
/**
* Storage version of the pallet.
*
* New networks start with last version.
**/
storageVersion: AugmentedQuery<ApiType, () => Observable<PalletSchedulerReleases>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Generic query * Generic query
**/ **/
@@ -1115,7 +1275,22 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
minValidatorBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>; minValidatorBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The map from nominator stash key to the set of stash keys of all validators to nominate. * The map from nominator stash key to their nomination preferences, namely the validators that
* they wish to support.
*
* Note that the keys of this storage map might become non-decodable in case the
* [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators
* are still existent in storage, their key is correct and retrievable (i.e. `contains_key`
* indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable
* nominators will effectively not-exist, until they re-submit their preferences such that it
* is within the bounds of the newly set `Config::MaxNominations`.
*
* This implies that `::iter_keys().count()` and `::iter().count()` might return different
* values for this map. Moreover, the main `::count()` is aligned with the former, namely the
* number of keys that exist.
*
* Lastly, if any of the nominators become non-decodable, they can be chilled immediately via
* [`Call::chill_other`] dispatchable by anyone.
**/ **/
nominators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletStakingNominations>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>; nominators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletStakingNominations>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
@@ -1182,6 +1357,31 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
stateTrieMigration: {
/**
* The limits that are imposed on automatic migrations.
*
* If set to None, then no automatic migration happens.
**/
autoLimits: AugmentedQuery<ApiType, () => Observable<Option<PalletStateTrieMigrationMigrationLimits>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Migration progress.
*
* This stores the snapshot of the last migrated keys. It can be set into motion and move
* forward by any of the means provided by this pallet.
**/
migrationProcess: AugmentedQuery<ApiType, () => Observable<PalletStateTrieMigrationMigrationTask>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The maximum limits that the signed migration could use.
*
* If not set, no signed submission is allowed.
**/
signedMigrationMaxLimits: AugmentedQuery<ApiType, () => Observable<Option<PalletStateTrieMigrationMigrationLimits>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
sudo: { sudo: {
/** /**
* The `AccountId` of the sudo key. * The `AccountId` of the sudo key.
@@ -1220,8 +1420,11 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* Events deposited for the current block. * Events deposited for the current block.
* *
* NOTE: This storage item is explicitly unbounded since it is never intended to be read * NOTE: The item is unbound and should therefore never be read on chain.
* from within the runtime. * It could otherwise inflate the PoV size of a block.
*
* Events have a large in-memory size. Box the events to not go out-of-memory
* just in case someone still reads them from within the runtime.
**/ **/
events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>; events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
@@ -1418,35 +1621,43 @@ declare module '@polkadot/api-base/types/storage' {
}; };
uniques: { uniques: {
/** /**
* The assets held by any given account; set out this way so that assets owned by a single * The items held by any given account; set out this way so that items owned by a single
* account can be enumerated. * account can be enumerated.
**/ **/
account: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<Option<Null>>, [AccountId32, u32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32, u32]>; account: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<Option<Null>>, [AccountId32, u32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32, u32]>;
/** /**
* The assets in existence and their ownership details. * The items in existence and their ownership details.
**/ **/
asset: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesInstanceDetails>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>; asset: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesItemDetails>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
/** /**
* Metadata of an asset class. * Attributes of a collection.
**/ **/
attribute: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: Option<u32> | null | object | string | Uint8Array, arg3: Bytes | string | Uint8Array) => Observable<Option<ITuple<[Bytes, u128]>>>, [u32, Option<u32>, Bytes]> & QueryableStorageEntry<ApiType, [u32, Option<u32>, Bytes]>; attribute: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: Option<u32> | null | object | string | Uint8Array, arg3: Bytes | string | Uint8Array) => Observable<Option<ITuple<[Bytes, u128]>>>, [u32, Option<u32>, Bytes]> & QueryableStorageEntry<ApiType, [u32, Option<u32>, Bytes]>;
/** /**
* Details of an asset class. * Details of a collection.
**/ **/
class: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesClassDetails>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; class: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesCollectionDetails>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* The classes owned by any given account; set out this way so that classes owned by a single * The collections owned by any given account; set out this way so that collections owned by
* account can be enumerated. * a single account can be enumerated.
**/ **/
classAccount: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<Null>>, [AccountId32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32]>; classAccount: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<Null>>, [AccountId32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32]>;
/** /**
* Metadata of an asset class. * Metadata of a collection.
**/ **/
classMetadataOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesClassMetadata>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; classMetadataOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesCollectionMetadata>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Metadata of an asset instance. * Keeps track of the number of items a collection might have.
**/ **/
instanceMetadataOf: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesInstanceMetadata>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>; collectionMaxSupply: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Metadata of an item.
**/
instanceMetadataOf: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesItemMetadata>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
/**
* The collection, if any, of which an account is willing to take ownership.
**/
ownershipAcceptance: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
* Generic query * Generic query
**/ **/
@@ -1468,5 +1679,12 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
whitelist: {
whitelistedCall: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Null>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
} // AugmentedQueries } // AugmentedQueries
} // declare module } // declare module
@@ -0,0 +1,4 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/types-augment/registry/substrate';
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -6,6 +6,7 @@
"rootDir": "./src" "rootDir": "./src"
}, },
"exclude": [ "exclude": [
"**/*.spec.ts",
"**/kusama/*.ts", "**/kusama/*.ts",
"**/polkadot/*.ts" "**/polkadot/*.ts"
], ],
@@ -14,6 +15,7 @@
{ "path": "../rpc-augment/tsconfig.build.json" }, { "path": "../rpc-augment/tsconfig.build.json" },
{ "path": "../types/tsconfig.build.json" }, { "path": "../types/tsconfig.build.json" },
{ "path": "../types-codec/tsconfig.build.json" }, { "path": "../types-codec/tsconfig.build.json" },
{ "path": "../types-augment/tsconfig.build.json" } { "path": "../types-augment/tsconfig.build.json" },
{ "path": "../types-support/tsconfig.build.json" }
] ]
} }
@@ -9,6 +9,9 @@
"**/base.ts", "**/base.ts",
"**/kusama/*.ts" "**/kusama/*.ts"
], ],
"exclude": [
"**/kusama/*.spec.ts"
],
"references": [ "references": [
{ "path": "../api-base/tsconfig.build.json" }, { "path": "../api-base/tsconfig.build.json" },
{ "path": "../rpc-augment/tsconfig.build.json" }, { "path": "../rpc-augment/tsconfig.build.json" },
@@ -0,0 +1,22 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src",
"emitDeclarationOnly": false,
"noEmit": true
},
"include": [
"**/kusama/*.spec.ts"
],
"references": [
{ "path": "../api-augment/tsconfig.build.json" },
{ "path": "../api-augment/tsconfig.kusama.json" },
{ "path": "../api-base/tsconfig.build.json" },
{ "path": "../rpc-augment/tsconfig.build.json" },
{ "path": "../types/tsconfig.build.json" },
{ "path": "../types-augment/tsconfig.build.json" },
{ "path": "../types-support/tsconfig.build.json" }
]
}
@@ -9,6 +9,9 @@
"**/base.ts", "**/base.ts",
"**/polkadot/*.ts" "**/polkadot/*.ts"
], ],
"exclude": [
"**/polkadot/*.spec.ts"
],
"references": [ "references": [
{ "path": "../api-base/tsconfig.build.json" }, { "path": "../api-base/tsconfig.build.json" },
{ "path": "../rpc-augment/tsconfig.build.json" }, { "path": "../rpc-augment/tsconfig.build.json" },
+6 -6
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "7.5.1", "version": "8.5.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.18.0",
"@polkadot/rpc-core": "7.5.1", "@polkadot/rpc-core": "8.5.1",
"@polkadot/types": "7.5.1", "@polkadot/types": "8.5.1",
"@polkadot/util": "^8.3.3", "@polkadot/util": "^9.2.1",
"rxjs": "^7.5.2" "rxjs": "^7.5.5"
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '7.5.1' }; export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '8.5.1' };
+2 -2
View File
@@ -74,12 +74,10 @@ export interface StorageEntryBase<ApiType extends ApiTypes, F extends AnyFunctio
* @deprecated Use api.at(<blockHash>) * @deprecated Use api.at(<blockHash>)
*/ */
entriesAt: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(hash: Hash | Uint8Array | string, ...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>; entriesAt: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(hash: Hash | Uint8Array | string, ...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
entriesPaged: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
/** /**
* @deprecated Use api.at(<blockHash>) * @deprecated Use api.at(<blockHash>)
*/ */
keysAt: <K extends AnyTuple = A> (hash: Hash | Uint8Array | string, ...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, StorageKey<K>[]>; keysAt: <K extends AnyTuple = A> (hash: Hash | Uint8Array | string, ...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
keysPaged: <K extends AnyTuple = A> (opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
/** /**
* @deprecated The underlying RPC this been marked unsafe and is generally not exposed * @deprecated The underlying RPC this been marked unsafe and is generally not exposed
*/ */
@@ -95,11 +93,13 @@ export interface StorageEntryBase<ApiType extends ApiTypes, F extends AnyFunctio
export interface StorageEntryBaseAt<ApiType extends ApiTypes, F extends AnyFunction, A extends AnyTuple = AnyTuple> { export interface StorageEntryBaseAt<ApiType extends ApiTypes, F extends AnyFunction, A extends AnyTuple = AnyTuple> {
entries: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>; entries: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
entriesPaged: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
hash: (...args: Parameters<F>) => PromiseOrObs<ApiType, Hash>; hash: (...args: Parameters<F>) => PromiseOrObs<ApiType, Hash>;
is: (key: IStorageKey<AnyTuple>) => key is IStorageKey<A>; is: (key: IStorageKey<AnyTuple>) => key is IStorageKey<A>;
key: (...args: Parameters<F>) => string; key: (...args: Parameters<F>) => string;
keyPrefix: (...args: DropLast<Parameters<F>>) => string; keyPrefix: (...args: DropLast<Parameters<F>>) => string;
keys: <K extends AnyTuple = A> (...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, StorageKey<K>[]>; keys: <K extends AnyTuple = A> (...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
keysPaged: <K extends AnyTuple = A> (opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
size: (...args: Parameters<F>) => PromiseOrObs<ApiType, u64>; size: (...args: Parameters<F>) => PromiseOrObs<ApiType, u64>;
} }
@@ -66,6 +66,7 @@ export interface SubmittableResultValue {
internalError?: Error; internalError?: Error;
status: ExtrinsicStatus; status: ExtrinsicStatus;
txHash: Hash; txHash: Hash;
txIndex?: number;
} }
export interface SubmittableExtrinsic<ApiType extends ApiTypes, R extends ISubmittableResult = ISubmittableResult> extends Extrinsic { export interface SubmittableExtrinsic<ApiType extends ApiTypes, R extends ISubmittableResult = ISubmittableResult> extends Extrinsic {
-13
View File
@@ -1,16 +1,3 @@
# @polkadot/api-contract # @polkadot/api-contract
Interfaces to allow for the encoding and decoding of Substrate contract ABIs. Interfaces to allow for the encoding and decoding of Substrate contract ABIs.
```js
import {ApiPromise, WsProvider } from '@polkadot/api';
import { Abi } from '@polkadot/api-contract';
const wsProvider = new WsProvider(<...Node Url...>);
const api = await ApiPromise.create({ provider: wsProvider });
const abi = new Abi(<...JSON ABI...>, api.registry.getChainProperties());
api.tx.contracts
.call(<contract addr>, <value>, <max gas>, abi.messages.<method name>(<...params...>))
.signAndSend(<keyring pair>, (result: SubmittableResult) => { ... });
```
+11 -11
View File
@@ -20,20 +20,20 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "7.5.1", "version": "8.5.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.18.0",
"@polkadot/api": "7.5.1", "@polkadot/api": "8.5.1",
"@polkadot/types": "7.5.1", "@polkadot/types": "8.5.1",
"@polkadot/types-codec": "7.5.1", "@polkadot/types-codec": "8.5.1",
"@polkadot/types-create": "7.5.1", "@polkadot/types-create": "8.5.1",
"@polkadot/util": "^8.3.3", "@polkadot/util": "^9.2.1",
"@polkadot/util-crypto": "^8.3.3", "@polkadot/util-crypto": "^9.2.1",
"rxjs": "^7.5.2" "rxjs": "^7.5.5"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/api-augment": "7.5.1", "@polkadot/api-augment": "8.5.1",
"@polkadot/keyring": "^8.3.3" "@polkadot/keyring": "^9.2.1"
} }
} }
+1 -1
View File
@@ -44,7 +44,7 @@ function parseJson (json: Record<string, unknown>, chainProperties?: ChainProper
const registry = new TypeRegistry(); const registry = new TypeRegistry();
const info = registry.createType('ContractProjectInfo', json) as unknown as ContractProjectInfo; const info = registry.createType('ContractProjectInfo', json) as unknown as ContractProjectInfo;
const latest = getLatestMeta(registry, json); const latest = getLatestMeta(registry, json);
const lookup = registry.createType('PortableRegistry', { types: latest.types }); const lookup = registry.createType('PortableRegistry', { types: latest.types }, true);
// attach the lookup to the registry - now the types are known // attach the lookup to the registry - now the types are known
registry.setLookup(lookup); registry.setLookup(lookup);
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '7.5.1' }; export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '8.5.1' };
+16 -16
View File
@@ -20,25 +20,25 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "7.5.1", "version": "8.5.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.18.0",
"@polkadot/api": "7.5.1", "@polkadot/api": "8.5.1",
"@polkadot/api-augment": "7.5.1", "@polkadot/api-augment": "8.5.1",
"@polkadot/api-base": "7.5.1", "@polkadot/api-base": "8.5.1",
"@polkadot/rpc-core": "7.5.1", "@polkadot/rpc-core": "8.5.1",
"@polkadot/types": "7.5.1", "@polkadot/types": "8.5.1",
"@polkadot/types-codec": "7.5.1", "@polkadot/types-codec": "8.5.1",
"@polkadot/util": "^8.3.3", "@polkadot/util": "^9.2.1",
"@polkadot/util-crypto": "^8.3.3", "@polkadot/util-crypto": "^9.2.1",
"rxjs": "^7.5.2" "rxjs": "^7.5.5"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/api": "7.5.1", "@polkadot/api": "8.5.1",
"@polkadot/api-augment": "7.5.1", "@polkadot/api-augment": "8.5.1",
"@polkadot/rpc-augment": "7.5.1", "@polkadot/rpc-augment": "8.5.1",
"@polkadot/rpc-provider": "7.5.1", "@polkadot/rpc-provider": "8.5.1",
"@polkadot/types-support": "7.5.1" "@polkadot/types-support": "8.5.1"
} }
} }
+1 -1
View File
@@ -21,7 +21,7 @@ function retrieveNick (api: DeriveApi, accountId?: AccountId): Observable<string
) as Observable<Option<ITuple<[Bytes, Balance]>> | undefined>).pipe( ) as Observable<Option<ITuple<[Bytes, Balance]>> | undefined>).pipe(
map((nameOf): string | undefined => map((nameOf): string | undefined =>
nameOf?.isSome nameOf?.isSome
? u8aToString(nameOf.unwrap()[0]).substr(0, (api.consts.nicks.maxLength as u32).toNumber()) ? u8aToString(nameOf.unwrap()[0]).substring(0, (api.consts.nicks.maxLength as u32).toNumber())
: undefined : undefined
) )
); );
+72
View File
@@ -0,0 +1,72 @@
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { Option } from '@polkadot/types';
import type { PalletBagsListListBag } from '@polkadot/types/lookup';
import type { BN } from '@polkadot/util';
import type { DeriveApi } from '../types';
import type { Bag } from './types';
import { map, of, switchMap } from 'rxjs';
import { BN_ZERO, bnToBn } from '@polkadot/util';
import { memo } from '../util';
function orderBags (ids: BN[], bags: Option<PalletBagsListListBag>[]): Bag[] {
const sorted = ids
.map((id, index) => ({
bag: bags[index].unwrapOr(null),
id,
key: id.toString()
}))
.sort((a, b) => b.id.cmp(a.id))
.map((base, index): Bag => ({
...base,
bagLower: BN_ZERO,
bagUpper: base.id,
index
}));
const max = sorted.length - 1;
return sorted.map((entry, index) =>
index === max
? entry
// We could probably use a .add(BN_ONE) here
: { ...entry, bagLower: sorted[index + 1].bagUpper }
);
}
export function _getIds (instanceId: string, api: DeriveApi): (ids: (BN | number)[]) => Observable<Bag[]> {
return memo(instanceId, (_ids: (BN | number)[]): Observable<Bag[]> => {
const ids = _ids.map((id) => bnToBn(id));
return ids.length
? api.query.listBags.multi<Option<PalletBagsListListBag>[]>(ids).pipe(
map((bags) => orderBags(ids, bags))
)
: of([]);
});
}
export function all (instanceId: string, api: DeriveApi): () => Observable<Bag[]> {
return memo(instanceId, (): Observable<Bag[]> =>
api.query.bagsList.listBags.keys().pipe(
switchMap((keys) =>
api.derive.bagsList._getIds(keys.map(({ args: [id] }) => id))
),
map((list) =>
list.filter(({ bag }) => bag)
)
)
);
}
export function get (instanceId: string, api: DeriveApi): (id: BN | number) => Observable<Bag> {
return memo(instanceId, (id: BN | number): Observable<Bag> =>
api.derive.bagsList._getIds([bnToBn(id)]).pipe(
map((bags) => bags[0])
)
);
}
@@ -0,0 +1,29 @@
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { BN } from '@polkadot/util';
import type { DeriveApi } from '../types';
import type { Bag, BagExpanded } from './types';
import { map, switchMap } from 'rxjs';
import { memo } from '../util';
export function expand (instanceId: string, api: DeriveApi): (bag: Bag) => Observable<BagExpanded> {
return memo(instanceId, (bag: Bag): Observable<BagExpanded> =>
api.derive.bagsList.listNodes(bag.bag).pipe(
map((nodes) => ({ ...bag, nodes }))
)
);
}
export function getExpanded (instanceId: string, api: DeriveApi): (id: BN | number) => Observable<BagExpanded> {
return memo(instanceId, (id: BN | number): Observable<BagExpanded> =>
api.derive.bagsList.get(id).pipe(
switchMap((bag) =>
api.derive.bagsList.expand(bag)
)
)
);
}
@@ -0,0 +1,6 @@
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './get';
export * from './getExpanded';
export * from './listNodes';
@@ -0,0 +1,41 @@
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { Option } from '@polkadot/types';
import type { AccountId32 } from '@polkadot/types/interfaces';
import type { PalletBagsListListBag, PalletBagsListListNode } from '@polkadot/types/lookup';
import type { DeriveApi } from '../types';
import { BehaviorSubject, map, of, switchMap, tap, toArray } from 'rxjs';
import { memo } from '../util';
function traverseLinks (api: DeriveApi, head: AccountId32 | string): Observable<PalletBagsListListNode[]> {
const subject = new BehaviorSubject<AccountId32 | string>(head);
return subject.pipe(
switchMap((account) =>
api.query.bagsList.listNodes(account)
),
tap((node: Option<PalletBagsListListNode>): void => {
setTimeout((): void => {
node.isSome && (node.value as PalletBagsListListNode).next.isSome
? subject.next(node.unwrap().next.unwrap())
: subject.complete();
}, 0);
}),
toArray(), // toArray since we want to startSubject to be completed
map((all: Option<PalletBagsListListNode>[]) =>
all.map((o) => o.unwrap())
)
);
}
export function listNodes (instanceId: string, api: DeriveApi): (bag: PalletBagsListListBag | null) => Observable<PalletBagsListListNode[]> {
return memo(instanceId, (bag: PalletBagsListListBag | null): Observable<PalletBagsListListNode[]> =>
bag && bag.head.isSome
? traverseLinks(api, bag.head.unwrap())
: of([])
);
}
+18
View File
@@ -0,0 +1,18 @@
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { PalletBagsListListBag, PalletBagsListListNode } from '@polkadot/types/lookup';
import type { BN } from '@polkadot/util';
export interface Bag {
bag: PalletBagsListListBag | null;
bagUpper: BN;
bagLower: BN;
id: BN;
index: number;
key: string;
}
export interface BagExpanded extends Bag {
nodes: PalletBagsListListNode[];
}
+53 -26
View File
@@ -5,7 +5,7 @@ import type { Observable } from 'rxjs';
import type { QueryableStorageMultiArg } from '@polkadot/api-base/types'; 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, AccountIndex, Address, Balance, BalanceLockTo212, BlockNumber, VestingSchedule } from '@polkadot/types/interfaces';
import type { PalletBalancesBalanceLock, 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';
import { combineLatest, map, of, switchMap } from 'rxjs'; import { combineLatest, map, of, switchMap } from 'rxjs';
@@ -14,9 +14,7 @@ import { BN, BN_ZERO, bnMax, bnMin, isFunction } from '@polkadot/util';
import { memo } from '../util'; import { memo } from '../util';
type BalanceLocksEntry = Vec<PalletBalancesBalanceLock | BalanceLockTo212>; type ResultBalance = [PalletVestingVestingInfo[] | null, ((PalletBalancesBalanceLock | BalanceLockTo212)[])[], PalletBalancesReserveData[][]];
type BalanceLocks = BalanceLocksEntry[];
type ResultBalance = [PalletVestingVestingInfo[] | null, ((PalletBalancesBalanceLock | BalanceLockTo212)[])[]];
type Result = [DeriveBalancesAccount, BlockNumber, ResultBalance]; type Result = [DeriveBalancesAccount, BlockNumber, ResultBalance];
interface AllLocked { interface AllLocked {
@@ -86,7 +84,9 @@ function calcVesting (bestNumber: BlockNumber, shared: DeriveBalancesAllAccountD
return { return {
isVesting, isVesting,
vestedBalance, vestedBalance,
vestedClaimable: isVesting ? shared.vestingLocked.sub(vestingTotal.sub(vestedBalance)) : BN_ZERO, vestedClaimable: isVesting
? shared.vestingLocked.sub(vestingTotal.sub(vestedBalance))
: BN_ZERO,
vesting: vesting vesting: vesting
.map(({ locked, perBlock, startingBlock }, index) => ({ .map(({ locked, perBlock, startingBlock }, index) => ({
endBlock: locked.div(perBlock).iadd(startingBlock), endBlock: locked.div(perBlock).iadd(startingBlock),
@@ -100,7 +100,7 @@ function calcVesting (bestNumber: BlockNumber, shared: DeriveBalancesAllAccountD
}; };
} }
function calcBalances (api: DeriveApi, [data, bestNumber, [vesting, allLocks]]: Result): DeriveBalancesAll { function calcBalances (api: DeriveApi, [data, bestNumber, [vesting, allLocks, namedReserves]]: Result): DeriveBalancesAll {
const shared = calcShared(api, bestNumber, data, allLocks[0]); const shared = calcShared(api, bestNumber, data, allLocks[0]);
return { return {
@@ -110,7 +110,8 @@ function calcBalances (api: DeriveApi, [data, bestNumber, [vesting, allLocks]]:
accountNonce: data.accountNonce, accountNonce: data.accountNonce,
additional: allLocks additional: allLocks
.filter((_, index) => index !== 0) .filter((_, index) => index !== 0)
.map((l, index) => calcShared(api, bestNumber, data.additional[index], l)) .map((l, index) => calcShared(api, bestNumber, data.additional[index], l)),
namedReserves
}; };
} }
@@ -133,7 +134,8 @@ function queryOld (api: DeriveApi, accountId: AccountId): Observable<ResultBalan
vestingNew vestingNew
? [vestingNew] ? [vestingNew]
: null, : null,
[locks] [locks],
[]
]; ];
}) })
); );
@@ -141,33 +143,58 @@ 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'>[]] {
return [
calls.map((c) => !c),
calls
.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, balanceInstances: string[] = ['balances']): Observable<ResultBalance> {
const calls = balanceInstances.map((m): DeriveApi['query']['balances']['locks'] | undefined => const [lockEmpty, lockQueries] = createCalls(
(api.derive as DeriveCustomLocks)[m]?.customLocks || api.query[m as 'balances']?.locks accountId,
balanceInstances.map((m): DeriveApi['query']['balances']['locks'] | undefined =>
(api.derive as DeriveCustomLocks)[m]?.customLocks || api.query[m as 'balances']?.locks
)
);
const [reserveEmpty, reserveQueries] = createCalls(
accountId,
balanceInstances.map((m): DeriveApi['query']['balances']['reserves'] | undefined =>
api.query[m as 'balances']?.reserves
)
); );
const lockEmpty = calls.map((c) => !c);
const queries = calls.filter(isNonNullable).map((c): QueryableStorageMultiArg<'rxjs'> => [c, accountId]);
return ( return combineLatest([
api.query.vesting?.vesting api.query.vesting?.vesting
? api.queryMulti<[Option<PalletVestingVestingInfo> | Option<Vec<PalletVestingVestingInfo>>, ...BalanceLocks]>([[api.query.vesting.vesting, accountId], ...queries]) ? api.query.vesting.vesting(accountId)
// TODO We need to check module instances here as well, not only the balances module : of(api.registry.createType('Option<VestingInfo>')),
: queries.length lockQueries.length
? api.queryMulti<[...(Vec<PalletBalancesBalanceLock>)[]]>(queries).pipe( ? api.queryMulti<[...(Vec<PalletBalancesBalanceLock>)[]]>(lockQueries)
map((r): [Option<PalletVestingVestingInfo>, ...BalanceLocks] => [api.registry.createType('Option<VestingInfo>'), ...r]) : of([] as Vec<PalletBalancesBalanceLock>[]),
) reserveQueries.length
: of([api.registry.createType('Option<VestingInfo>')] as [Option<PalletVestingVestingInfo>]) ? api.queryMulti<[...(Vec<PalletBalancesReserveData>)[]]>(reserveQueries)
).pipe( : of([] as Vec<PalletBalancesReserveData>[])
map(([opt, ...locks]): ResultBalance => { ]).pipe(
let offset = -1; map(([opt, locks, reserves]): ResultBalance => {
let offsetLock = -1;
let offsetReserve = -1;
const vesting = opt.unwrapOr(null); const vesting = opt.unwrapOr(null);
return [ return [
vesting vesting
? Array.isArray(vesting) ? vesting : [vesting] ? Array.isArray(vesting)
? vesting
: [vesting as PalletVestingVestingInfo]
: null, : null,
lockEmpty.map((e) => e ? api.registry.createType<Vec<PalletBalancesBalanceLock>>('Vec<BalanceLock>') : locks[++offset]) lockEmpty.map((e) =>
e ? api.registry.createType<Vec<PalletBalancesBalanceLock>>('Vec<BalanceLock>') : locks[++offsetLock]
),
reserveEmpty.map((e) =>
e ? api.registry.createType<Vec<PalletBalancesReserveData>>('Vec<PalletBalancesReserveData>') : reserves[++offsetReserve]
)
]; ];
}) })
); );
@@ -202,7 +229,7 @@ export function all (instanceId: string, api: DeriveApi): (address: AccountIndex
? queryCurrent(api, account.accountId, balanceInstances) ? queryCurrent(api, account.accountId, balanceInstances)
: queryOld(api, account.accountId) : queryOld(api, account.accountId)
]) ])
: of([account, api.registry.createType('BlockNumber'), [null, []]]) : of([account, api.registry.createType('BlockNumber'), [null, [], []]])
) )
), ),
map((result): DeriveBalancesAll => calcBalances(api, result)) map((result): DeriveBalancesAll => calcBalances(api, result))
-45
View File
@@ -1,45 +0,0 @@
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { Balance } from '@polkadot/types/interfaces';
import type { DeriveApi, DeriveFees } from '../types';
import { map, of } from 'rxjs';
import { memo } from '../util';
/**
* @name fees
* @returns An object containing the combined results of the storage queries for
* all relevant fees as declared in the substrate chain spec.
* @example
* <BR>
*
* ```javascript
* api.derive.balances.fees(({ creationFee, transferFee }) => {
* console.log(`The fee for creating a new account on this chain is ${creationFee} units. The fee required for making a transfer is ${transferFee} units.`);
* });
* ```
*/
export function fees (instanceId: string, api: DeriveApi): () => Observable<DeriveFees> {
return memo(instanceId, (): Observable<DeriveFees> =>
of([
// deprecated - remove
(api.consts.balances?.creationFee as unknown as Balance) || api.registry.createType('Balance'),
(api.consts.balances?.transferFee as unknown as Balance) || api.registry.createType('Balance'),
// current
(api.consts.balances?.existentialDeposit as Balance) || api.registry.createType('Balance'),
(api.consts.transactionPayment?.transactionBaseFee as unknown as Balance) || api.registry.createType('Balance'),
(api.consts.transactionPayment?.transactionByteFee as Balance) || api.registry.createType('Balance')
]).pipe(
map(([creationFee, transferFee, existentialDeposit, transactionBaseFee, transactionByteFee]): DeriveFees => ({
creationFee,
existentialDeposit,
transactionBaseFee,
transactionByteFee,
transferFee
}))
));
}
@@ -4,7 +4,6 @@
import { all } from './all'; import { all } from './all';
export * from './account'; export * from './account';
export * from './fees';
export * from './votingBalances'; export * from './votingBalances';
const votingBalance = all; const votingBalance = all;
+2 -1
View File
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import type { AccountId, Balance, BalanceLockTo212, Index } from '@polkadot/types/interfaces'; import type { AccountId, Balance, BalanceLockTo212, Index } from '@polkadot/types/interfaces';
import type { PalletBalancesBalanceLock } from '@polkadot/types/lookup'; import type { PalletBalancesBalanceLock, PalletBalancesReserveData } from '@polkadot/types/lookup';
import type { BN } from '@polkadot/util'; import type { BN } from '@polkadot/util';
export interface DeriveBalancesAccountData { export interface DeriveBalancesAccountData {
@@ -44,6 +44,7 @@ export interface DeriveBalancesAllVesting {
export interface DeriveBalancesAll extends DeriveBalancesAccount, DeriveBalancesAllAccountData, DeriveBalancesAllVesting { export interface DeriveBalancesAll extends DeriveBalancesAccount, DeriveBalancesAllAccountData, DeriveBalancesAllVesting {
additional: DeriveBalancesAllAccountData[]; additional: DeriveBalancesAllAccountData[];
namedReserves: PalletBalancesReserveData[][];
} }
export type DeriveBalancesMap = Record<string, DeriveBalancesAll>; export type DeriveBalancesMap = Record<string, DeriveBalancesAll>;
+25 -23
View File
@@ -35,29 +35,31 @@ export function bounties (instanceId: string, api: DeriveApi): () => Observable<
const bountyBase = api.query.bounties || api.query.treasury; const bountyBase = api.query.bounties || api.query.treasury;
return memo(instanceId, (): Observable<DeriveBounties> => return memo(instanceId, (): Observable<DeriveBounties> =>
combineLatest([ bountyBase.bounties
bountyBase.bountyCount(), ? combineLatest([
api.query.council bountyBase.bountyCount(),
? api.query.council.proposalCount() api.query.council
: of(0) ? api.query.council.proposalCount()
]).pipe( : of(0)
switchMap(() => combineLatest([ ]).pipe(
bountyBase.bounties.keys(), switchMap(() => combineLatest([
api.derive.council bountyBase.bounties.keys(),
? api.derive.council.proposals() api.derive.council
: of([]) ? api.derive.council.proposals()
])), : of([])
switchMap(([keys, proposals]): Observable<Result> => { ])),
const ids = keys.map(({ args: [id] }) => id); switchMap(([keys, proposals]): Observable<Result> => {
const ids = keys.map(({ args: [id] }) => id);
return combineLatest([ return combineLatest([
bountyBase.bounties.multi(ids), bountyBase.bounties.multi(ids),
bountyBase.bountyDescriptions.multi(ids), bountyBase.bountyDescriptions.multi(ids),
of(ids), of(ids),
of(filterBountiesProposals(api, proposals)) of(filterBountiesProposals(api, proposals))
]); ]);
}), }),
map(parseResult) map(parseResult)
) )
: of(parseResult([[], [], [], []]))
); );
} }
+4
View File
@@ -22,6 +22,10 @@ export { lazyDeriveSection };
// Enable derive only if some of these modules are available // Enable derive only if some of these modules are available
const checks: Record<string, Avail> = { const checks: Record<string, Avail> = {
bagsList: {
instances: ['bagsList'],
methods: []
},
contracts: { contracts: {
instances: ['contracts'], instances: ['contracts'],
methods: [] methods: []
@@ -0,0 +1,19 @@
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { AnyNumber } from '@polkadot/types/types';
import type { SignedBlockExtended } from '../type/types';
import type { DeriveApi } from '../types';
import { switchMap } from 'rxjs';
import { memo } from '../util';
export function getBlockByNumber (instanceId: string, api: DeriveApi): (blockNumber: AnyNumber) => Observable<SignedBlockExtended | undefined> {
return memo(instanceId, (blockNumber: AnyNumber): Observable<SignedBlockExtended | undefined> =>
api.rpc.chain.getBlockHash(blockNumber).pipe(
switchMap((h) => api.derive.chain.getBlock(h))
)
);
}
+1
View File
@@ -6,5 +6,6 @@ export * from './bestNumberFinalized';
export * from './bestNumberLag'; export * from './bestNumberLag';
export * from './getHeader'; export * from './getHeader';
export * from './getBlock'; export * from './getBlock';
export * from './getBlockByNumber';
export * from './subscribeNewBlocks'; export * from './subscribeNewBlocks';
export * from './subscribeNewHeads'; export * from './subscribeNewHeads';
+11 -3
View File
@@ -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, u32 } from '@polkadot/types';
import type { PolkadotRuntimeCommonCrowdloanFundInfo } from '@polkadot/types/lookup'; import type { PolkadotRuntimeCommonCrowdloanFundInfo } 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';
@@ -14,12 +14,20 @@ import { blake2AsU8a } from '@polkadot/util-crypto';
import { memo } from '../util'; import { memo } from '../util';
function createChildKey ({ trieIndex }: PolkadotRuntimeCommonCrowdloanFundInfo): string { interface AllInfo extends PolkadotRuntimeCommonCrowdloanFundInfo {
// previously it was named trieIndex
trieIndex?: u32;
}
function createChildKey (info: AllInfo): string {
return u8aToHex( return u8aToHex(
u8aConcat( u8aConcat(
':child_storage:default:', ':child_storage:default:',
blake2AsU8a( blake2AsU8a(
u8aConcat('crowdloan', trieIndex.toU8a()) u8aConcat(
'crowdloan',
(info.fundIndex || info.trieIndex).toU8a()
)
) )
) )
); );
@@ -60,17 +60,17 @@ function _eventTriggerAll (api: DeriveApi, paraId: string | number | BN): Observ
} }
function _getKeysPaged (api: DeriveApi, childKey: string): Observable<StorageKey[]> { function _getKeysPaged (api: DeriveApi, childKey: string): Observable<StorageKey[]> {
const startSubject = new BehaviorSubject<string | undefined>(undefined); const subject = new BehaviorSubject<string | undefined>(undefined);
return startSubject.pipe( return subject.pipe(
switchMap((startKey) => switchMap((startKey) =>
api.rpc.childstate.getKeysPaged(childKey, '0x', PAGE_SIZE_K, startKey) api.rpc.childstate.getKeysPaged(childKey, '0x', PAGE_SIZE_K, startKey)
), ),
tap((keys): void => { tap((keys): void => {
setTimeout((): void => { setTimeout((): void => {
keys.length === PAGE_SIZE_K keys.length === PAGE_SIZE_K
? startSubject.next(keys[PAGE_SIZE_K - 1].toHex()) ? subject.next(keys[PAGE_SIZE_K - 1].toHex())
: startSubject.complete(); : subject.complete();
}, 0); }, 0);
}), }),
toArray(), // toArray since we want to startSubject to be completed toArray(), // toArray since we want to startSubject to be completed
+6 -2
View File
@@ -4,6 +4,7 @@
import type { AnyFunction } from '@polkadot/types/types'; import type { AnyFunction } from '@polkadot/types/types';
import * as accounts from './accounts'; import * as accounts from './accounts';
import * as bagsList from './bagsList';
import * as balances from './balances'; import * as balances from './balances';
import * as bounties from './bounties'; import * as bounties from './bounties';
import * as chain from './chain'; import * as chain from './chain';
@@ -22,7 +23,7 @@ import * as technicalCommittee from './technicalCommittee';
import * as treasury from './treasury'; import * as treasury from './treasury';
import * as tx from './tx'; import * as tx from './tx';
export const derive = { accounts, balances, bounties, chain, contracts, council, crowdloan, democracy, elections, imOnline, membership, parachains, session, society, staking, technicalCommittee, treasury, tx }; export const derive = { accounts, bagsList, balances, bounties, chain, contracts, council, crowdloan, democracy, elections, imOnline, membership, parachains, session, society, staking, technicalCommittee, treasury, tx };
type DeriveSection<Section> = { type DeriveSection<Section> = {
[M in keyof Section]: Section[M] extends AnyFunction [M in keyof Section]: Section[M] extends AnyFunction
@@ -33,4 +34,7 @@ type DeriveAllSections<AllSections> = {
[S in keyof AllSections]: DeriveSection<AllSections[S]> [S in keyof AllSections]: DeriveSection<AllSections[S]>
}; };
export type ExactDerive = DeriveAllSections<typeof derive>; // eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ExactDerive extends DeriveAllSections<typeof derive> {
// keep empty, allows for augmentation
}
-1
View File
@@ -47,7 +47,6 @@ describe('derive', (): void => {
testFunction(api)('accounts', 'indexToId', []); testFunction(api)('accounts', 'indexToId', []);
testFunction(api)('balances', 'all', []); testFunction(api)('balances', 'all', []);
testFunction(api)('balances', 'fees', []);
testFunction(api)('balances', 'votingBalance', []); testFunction(api)('balances', 'votingBalance', []);
testFunction(api)('balances', 'votingBalances', []); testFunction(api)('balances', 'votingBalances', []);
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '7.5.1' }; export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '8.5.1' };
+2 -3
View File
@@ -2,10 +2,9 @@
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs'; import type { Observable } from 'rxjs';
import type { Option, Vec } from '@polkadot/types'; import type { Option } from '@polkadot/types';
import type { AccountId } from '@polkadot/types/interfaces'; import type { AccountId } from '@polkadot/types/interfaces';
import type { NodeRuntimeSessionKeys } from '@polkadot/types/lookup'; import type { NodeRuntimeSessionKeys } from '@polkadot/types/lookup';
import type { ITuple } from '@polkadot/types/types';
import type { DeriveApi } from '../types'; import type { DeriveApi } from '../types';
import type { DeriveStakingKeys } from './types'; import type { DeriveStakingKeys } from './types';
@@ -36,7 +35,7 @@ export function keysMulti (instanceId: string, api: DeriveApi): (stashIds: (Uint
return memo(instanceId, (stashIds: (Uint8Array | string)[]): Observable<DeriveStakingKeys[]> => return memo(instanceId, (stashIds: (Uint8Array | string)[]): Observable<DeriveStakingKeys[]> =>
stashIds.length stashIds.length
? api.query.session.queuedKeys().pipe( ? api.query.session.queuedKeys().pipe(
switchMap((queuedKeys): Observable<[Vec<ITuple<[AccountId, NodeRuntimeSessionKeys]>>, Option<NodeRuntimeSessionKeys>[]]> => switchMap((queuedKeys) =>
combineLatest([ combineLatest([
of(queuedKeys), of(queuedKeys),
api.consts.session?.dedupKeyPrefix api.consts.session?.dedupKeyPrefix
@@ -5,7 +5,7 @@ import type { Observable } from 'rxjs';
import type { AccountId, EraIndex } from '@polkadot/types/interfaces'; import type { AccountId, EraIndex } from '@polkadot/types/interfaces';
import type { PalletStakingStakingLedger } from '@polkadot/types/lookup'; import type { PalletStakingStakingLedger } from '@polkadot/types/lookup';
import type { BN } from '@polkadot/util'; import type { BN } from '@polkadot/util';
import type { DeriveApi, DeriveEraPoints, DeriveEraPrefs, DeriveEraRewards, DeriveEraValPrefs, DeriveStakerExposure, DeriveStakerReward, DeriveStakerRewardValidator } from '../types'; import type { DeriveApi, DeriveEraPoints, DeriveEraPrefs, DeriveEraRewards, DeriveEraValPoints, DeriveEraValPrefs, DeriveStakerExposure, DeriveStakerReward, DeriveStakerRewardValidator } from '../types';
import type { DeriveStakingQuery } from './types'; import type { DeriveStakingQuery } from './types';
import { combineLatest, map, of, switchMap } from 'rxjs'; import { combineLatest, map, of, switchMap } from 'rxjs';
@@ -18,7 +18,7 @@ type ErasResult = [DeriveEraPoints[], DeriveEraPrefs[], DeriveEraRewards[]];
function parseRewards (api: DeriveApi, stashId: AccountId, [erasPoints, erasPrefs, erasRewards]: ErasResult, exposures: DeriveStakerExposure[]): DeriveStakerReward[] { function parseRewards (api: DeriveApi, stashId: AccountId, [erasPoints, erasPrefs, erasRewards]: ErasResult, exposures: DeriveStakerExposure[]): DeriveStakerReward[] {
return exposures.map(({ era, isEmpty, isValidator, nominating, validators: eraValidators }): DeriveStakerReward => { return exposures.map(({ era, isEmpty, isValidator, nominating, validators: eraValidators }): DeriveStakerReward => {
const { eraPoints, validators: allValPoints } = erasPoints.find((p) => p.era.eq(era)) || { eraPoints: BN_ZERO, validators: {} }; const { eraPoints, validators: allValPoints } = erasPoints.find((p) => p.era.eq(era)) || { eraPoints: BN_ZERO, validators: {} as DeriveEraValPoints };
const { eraReward } = erasRewards.find((r) => r.era.eq(era)) || { eraReward: api.registry.createType('Balance') }; const { eraReward } = erasRewards.find((r) => r.era.eq(era)) || { eraReward: api.registry.createType('Balance') };
const { validators: allValPrefs } = erasPrefs.find((p) => p.era.eq(era)) || { validators: {} as DeriveEraValPrefs }; const { validators: allValPrefs } = erasPrefs.find((p) => p.era.eq(era)) || { validators: {} as DeriveEraValPrefs };
const validators: Record<string, DeriveStakerRewardValidator> = {}; const validators: Record<string, DeriveStakerRewardValidator> = {};
+36 -5
View File
@@ -7,12 +7,40 @@ import type { EraIndex } from '@polkadot/types/interfaces';
import type { ExactDerive } from '../derive'; import type { ExactDerive } from '../derive';
import type { DeriveApi } from '../types'; import type { DeriveApi } from '../types';
import { combineLatest, of, switchMap } from 'rxjs'; import { BehaviorSubject, combineLatest, map, of, switchMap, tap, toArray } from 'rxjs';
import { arrayChunk, arrayFlatten } from '@polkadot/util';
import { memo } from '../util'; import { memo } from '../util';
type ApplyReturn<T extends keyof ExactDerive['staking']> = ReturnType<ExactDerive['staking'][T]>; type ApplyReturn<T extends keyof ExactDerive['staking']> = ReturnType<ExactDerive['staking'][T]>;
// only retrieve a maximum of 14 eras (84 / 6) at a time
// (This is not empirically calculated. Rather smaller sizes take longer
// time due to the serial nature, large sizes may tie up the RPCs)
const ERA_CHUNK_SIZE = 14;
function chunkEras <T> (eras: EraIndex[], fn: (eras: EraIndex[]) => Observable<T[]>): Observable<T[]> {
const chunked = arrayChunk(eras, ERA_CHUNK_SIZE);
let index = 0;
const subject = new BehaviorSubject<EraIndex[]>(chunked[index]);
return subject.pipe(
switchMap(fn),
tap((): void => {
setTimeout((): void => {
index++;
index === chunked.length
? subject.complete()
: subject.next(chunked[index]);
}, 0);
}),
toArray(),
map(arrayFlatten)
);
}
export function filterEras <T extends { era: EraIndex }> (eras: EraIndex[], list: T[]): EraIndex[] { export function filterEras <T extends { era: EraIndex }> (eras: EraIndex[], list: T[]): EraIndex[] {
return eras.filter((e) => !list.some(({ era }) => e.eq(era))); return eras.filter((e) => !list.some(({ era }) => e.eq(era)));
} }
@@ -53,9 +81,12 @@ export function combineEras <F extends '_eraExposure' | '_eraPrefs' | '_eraSlash
// Cannot quite get the typing right, but it is right in the code // Cannot quite get the typing right, but it is right in the code
// eslint-disable-next-line @typescript-eslint/no-unsafe-return // eslint-disable-next-line @typescript-eslint/no-unsafe-return
memo(instanceId, (eras: EraIndex[], withActive: boolean) => memo(instanceId, (eras: EraIndex[], withActive: boolean) =>
// eslint-disable-next-line @typescript-eslint/no-unsafe-return !eras.length
eras.length ? of([])
? combineLatest(eras.map((e) => api.derive.staking[fn](e, withActive))) : chunkEras(eras, (eras) =>
: of([]) combineLatest(
eras.map((e) => api.derive.staking[fn](e, withActive))
)
)
) as any; ) as any;
} }
+1
View File
@@ -10,6 +10,7 @@ import type { ExactDerive } from './derive';
export * from './accounts/types'; export * from './accounts/types';
export * from './balances/types'; export * from './balances/types';
export * from './bagsList/types';
export * from './council/types'; export * from './council/types';
export * from './crowdloan/types'; export * from './crowdloan/types';
export * from './democracy/types'; export * from './democracy/types';
+19 -19
View File
@@ -20,29 +20,29 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "7.5.1", "version": "8.5.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.18.0",
"@polkadot/api-augment": "7.5.1", "@polkadot/api-augment": "8.5.1",
"@polkadot/api-base": "7.5.1", "@polkadot/api-base": "8.5.1",
"@polkadot/api-derive": "7.5.1", "@polkadot/api-derive": "8.5.1",
"@polkadot/keyring": "^8.3.3", "@polkadot/keyring": "^9.2.1",
"@polkadot/rpc-augment": "7.5.1", "@polkadot/rpc-augment": "8.5.1",
"@polkadot/rpc-core": "7.5.1", "@polkadot/rpc-core": "8.5.1",
"@polkadot/rpc-provider": "7.5.1", "@polkadot/rpc-provider": "8.5.1",
"@polkadot/types": "7.5.1", "@polkadot/types": "8.5.1",
"@polkadot/types-augment": "7.5.1", "@polkadot/types-augment": "8.5.1",
"@polkadot/types-codec": "7.5.1", "@polkadot/types-codec": "8.5.1",
"@polkadot/types-create": "7.5.1", "@polkadot/types-create": "8.5.1",
"@polkadot/types-known": "7.5.1", "@polkadot/types-known": "8.5.1",
"@polkadot/util": "^8.3.3", "@polkadot/util": "^9.2.1",
"@polkadot/util-crypto": "^8.3.3", "@polkadot/util-crypto": "^9.2.1",
"eventemitter3": "^4.0.7", "eventemitter3": "^4.0.7",
"rxjs": "^7.5.2" "rxjs": "^7.5.5"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/api-augment": "7.5.1", "@polkadot/api-augment": "8.5.1",
"@polkadot/types-support": "7.5.1" "@polkadot/types-support": "8.5.1"
} }
} }
+47 -35
View File
@@ -199,21 +199,26 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
return this._rpcCore.provider.hasSubscriptions || !!this._rpcCore.state.queryStorageAt; return this._rpcCore.provider.hasSubscriptions || !!this._rpcCore.state.queryStorageAt;
} }
protected _emptyDecorated (registry: Registry, blockHash?: Uint8Array): ApiDecoration<ApiType> {
return {
consts: {},
errors: {},
events: {},
query: {},
registry,
rx: {
query: {}
},
tx: createSubmittable(this._type, this._rx, this._decorateMethod, registry, blockHash)
} as ApiDecoration<ApiType>;
}
protected _createDecorated (registry: VersionedRegistry<ApiType>, fromEmpty: boolean, decoratedApi: ApiDecoration<ApiType> | null, blockHash?: Uint8Array): FullDecoration<ApiType> { protected _createDecorated (registry: VersionedRegistry<ApiType>, fromEmpty: boolean, decoratedApi: ApiDecoration<ApiType> | null, blockHash?: Uint8Array): FullDecoration<ApiType> {
if (!decoratedApi) { if (!decoratedApi) {
decoratedApi = { decoratedApi = this._emptyDecorated(registry.registry, blockHash);
consts: {},
errors: {},
events: {},
query: {},
registry: registry.registry,
rx: {
query: {}
}
} as ApiDecoration<ApiType>;
} }
if (!registry.decoratedMeta) { if (fromEmpty || !registry.decoratedMeta) {
registry.decoratedMeta = expandMetadata(registry.registry, registry.metadata); registry.decoratedMeta = expandMetadata(registry.registry, registry.metadata);
} }
@@ -243,16 +248,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
protected _injectMetadata (registry: VersionedRegistry<ApiType>, fromEmpty = false): void { protected _injectMetadata (registry: VersionedRegistry<ApiType>, fromEmpty = false): void {
// clear the decoration, we are redoing it here // clear the decoration, we are redoing it here
if (fromEmpty || !registry.decoratedApi) { if (fromEmpty || !registry.decoratedApi) {
registry.decoratedApi = { registry.decoratedApi = this._emptyDecorated(registry.registry);
consts: {},
errors: {},
events: {},
query: {},
registry: registry.registry,
rx: {
query: {}
}
} as ApiDecoration<ApiType>;
} }
const { decoratedApi, decoratedMeta } = this._createDecorated(registry, fromEmpty, registry.decoratedApi); const { decoratedApi, decoratedMeta } = this._createDecorated(registry, fromEmpty, registry.decoratedApi);
@@ -275,6 +271,8 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
} }
augmentObject(null, decoratedMeta.consts, this._rx.consts, fromEmpty); augmentObject(null, decoratedMeta.consts, this._rx.consts, fromEmpty);
this.emit('decorated');
} }
/** /**
@@ -541,7 +539,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
decorated.entriesPaged = decorateMethod( decorated.entriesPaged = decorateMethod(
memo(this.#instanceId, (opts: PaginationOptions): Observable<[StorageKey, Codec][]> => memo(this.#instanceId, (opts: PaginationOptions): Observable<[StorageKey, Codec][]> =>
this._retrieveMapEntriesPaged(creator, opts))); this._retrieveMapEntriesPaged(creator, undefined, opts)));
decorated.keys = decorateMethod( decorated.keys = decorateMethod(
memo(this.#instanceId, (...args: unknown[]): Observable<StorageKey[]> => memo(this.#instanceId, (...args: unknown[]): Observable<StorageKey[]> =>
@@ -554,7 +552,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
decorated.keysPaged = decorateMethod( decorated.keysPaged = decorateMethod(
memo(this.#instanceId, (opts: PaginationOptions): Observable<StorageKey[]> => memo(this.#instanceId, (opts: PaginationOptions): Observable<StorageKey[]> =>
this._retrieveMapKeysPaged(creator, opts))); this._retrieveMapKeysPaged(creator, undefined, opts)));
} }
if (this.supportMulti && creator.meta.type.isMap) { if (this.supportMulti && creator.meta.type.isMap) {
@@ -608,9 +606,17 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
memo(this.#instanceId, (...args: unknown[]): Observable<[StorageKey, Codec][]> => memo(this.#instanceId, (...args: unknown[]): Observable<[StorageKey, Codec][]> =>
this._retrieveMapEntries(creator, blockHash, args))); this._retrieveMapEntries(creator, blockHash, args)));
decorated.entriesPaged = decorateMethod(
memo(this.#instanceId, (opts: PaginationOptions): Observable<[StorageKey, Codec][]> =>
this._retrieveMapEntriesPaged(creator, blockHash, opts)));
decorated.keys = decorateMethod( decorated.keys = decorateMethod(
memo(this.#instanceId, (...args: unknown[]): Observable<StorageKey[]> => memo(this.#instanceId, (...args: unknown[]): Observable<StorageKey[]> =>
this._retrieveMapKeys(creator, blockHash, args))); this._retrieveMapKeys(creator, blockHash, args)));
decorated.keysPaged = decorateMethod(
memo(this.#instanceId, (opts: PaginationOptions): Observable<StorageKey[]> =>
this._retrieveMapKeysPaged(creator, blockHash, opts)));
} }
if (this.supportMulti && creator.meta.type.isMap) { if (this.supportMulti && creator.meta.type.isMap) {
@@ -681,13 +687,13 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
const headKey = iterKey(...args).toHex(); const headKey = iterKey(...args).toHex();
const startSubject = new BehaviorSubject<string>(headKey); const startSubject = new BehaviorSubject<string>(headKey);
const queryCall = at const getKeysPaged = at
? (startKey: string) => this._rpcCore.state.getKeysPaged(headKey, PAGE_SIZE_K, startKey, at) ? (startKey: string) => this._rpcCore.state.getKeysPaged(headKey, PAGE_SIZE_K, startKey, at)
: (startKey: string) => this._rpcCore.state.getKeysPaged(headKey, PAGE_SIZE_K, startKey); : (startKey: string) => this._rpcCore.state.getKeysPaged(headKey, PAGE_SIZE_K, startKey);
const setMeta = (key: StorageKey) => key.setMeta(meta, section, method); const setMeta = (key: StorageKey) => key.setMeta(meta, section, method);
return startSubject.pipe( return startSubject.pipe(
switchMap(queryCall), switchMap(getKeysPaged),
map((keys) => keys.map(setMeta)), map((keys) => keys.map(setMeta)),
tap((keys): void => { tap((keys): void => {
setTimeout((): void => { setTimeout((): void => {
@@ -701,26 +707,28 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
); );
} }
private _retrieveMapKeysPaged ({ iterKey, meta, method, section }: StorageEntry, opts: PaginationOptions): Observable<StorageKey[]> { private _retrieveMapKeysPaged ({ iterKey, meta, method, section }: StorageEntry, at: Hash | Uint8Array | string | undefined, opts: PaginationOptions): Observable<StorageKey[]> {
assert(iterKey && meta.type.isMap, 'keys can only be retrieved on maps'); assert(iterKey && meta.type.isMap, 'keys can only be retrieved on maps');
const headKey = iterKey(...opts.args).toHex();
const setMeta = (key: StorageKey) => key.setMeta(meta, section, method); const setMeta = (key: StorageKey) => key.setMeta(meta, section, method);
const getKeysPaged = at
? (headKey: string) => this._rpcCore.state.getKeysPaged(headKey, opts.pageSize, opts.startKey || headKey, at)
: (headKey: string) => this._rpcCore.state.getKeysPaged(headKey, opts.pageSize, opts.startKey || headKey);
return this._rpcCore.state.getKeysPaged(headKey, opts.pageSize, opts.startKey || headKey).pipe( return getKeysPaged(iterKey(...opts.args).toHex()).pipe(
map((keys) => keys.map(setMeta)) map((keys) => keys.map(setMeta))
); );
} }
private _retrieveMapEntries (entry: StorageEntry, at: Hash | Uint8Array | string | null, args: unknown[]): Observable<[StorageKey, Codec][]> { private _retrieveMapEntries (entry: StorageEntry, at: Hash | Uint8Array | string | null, args: unknown[]): Observable<[StorageKey, Codec][]> {
const query = at const queryStorageAt = at
? (keyset: StorageKey[]) => this._rpcCore.state.queryStorageAt(keyset, at) ? (keys: StorageKey[]) => this._rpcCore.state.queryStorageAt(keys, at)
: (keyset: StorageKey[]) => this._rpcCore.state.queryStorageAt(keyset); : (keys: StorageKey[]) => this._rpcCore.state.queryStorageAt(keys);
return this._retrieveMapKeys(entry, at, args).pipe( return this._retrieveMapKeys(entry, at, args).pipe(
switchMap((keys) => switchMap((keys) =>
keys.length keys.length
? combineLatest(arrayChunk(keys, PAGE_SIZE_V).map(query)).pipe( ? combineLatest(arrayChunk(keys, PAGE_SIZE_V).map(queryStorageAt)).pipe(
map((valsArr) => map((valsArr) =>
arrayFlatten(valsArr).map((value, index): [StorageKey, Codec] => [keys[index], value]) arrayFlatten(valsArr).map((value, index): [StorageKey, Codec] => [keys[index], value])
) )
@@ -730,11 +738,15 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
); );
} }
private _retrieveMapEntriesPaged (entry: StorageEntry, opts: PaginationOptions): Observable<[StorageKey, Codec][]> { private _retrieveMapEntriesPaged (entry: StorageEntry, at: Hash | Uint8Array | string | undefined, opts: PaginationOptions): Observable<[StorageKey, Codec][]> {
return this._retrieveMapKeysPaged(entry, opts).pipe( const queryStorageAt = at
? (keys: StorageKey[]) => this._rpcCore.state.queryStorageAt(keys, at)
: (keys: StorageKey[]) => this._rpcCore.state.queryStorageAt(keys);
return this._retrieveMapKeysPaged(entry, at, opts).pipe(
switchMap((keys) => switchMap((keys) =>
keys.length keys.length
? this._rpcCore.state.queryStorageAt(keys).pipe( ? queryStorageAt(keys).pipe(
map((valsArr) => map((valsArr) =>
valsArr.map((value, index): [StorageKey, Codec] => [keys[index], value]) valsArr.map((value, index): [StorageKey, Codec] => [keys[index], value])
) )
+73 -69
View File
@@ -4,7 +4,7 @@
import type { Observable, Subscription } from 'rxjs'; import type { Observable, Subscription } from 'rxjs';
import type { Text } from '@polkadot/types'; import type { Text } from '@polkadot/types';
import type { ExtDef } from '@polkadot/types/extrinsic/signedExtensions/types'; import type { ExtDef } from '@polkadot/types/extrinsic/signedExtensions/types';
import type { ChainProperties, Hash, RuntimeVersion, RuntimeVersionPartial } from '@polkadot/types/interfaces'; import type { ChainProperties, Hash, HeaderPartial, RuntimeVersion, RuntimeVersionPartial } from '@polkadot/types/interfaces';
import type { Registry } from '@polkadot/types/types'; import type { Registry } from '@polkadot/types/types';
import type { BN } from '@polkadot/util'; import type { BN } from '@polkadot/util';
import type { HexString } from '@polkadot/util/types'; import type { HexString } from '@polkadot/util/types';
@@ -35,7 +35,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
#updateSub?: Subscription | null = null; #updateSub?: Subscription | null = null;
#waitingRegistries: Record<string, Promise<VersionedRegistry<ApiType>>> = {}; #waitingRegistries: Record<HexString, Promise<VersionedRegistry<ApiType>>> = {};
constructor (options: ApiOptions, type: ApiTypes, decorateMethod: DecorateMethod<ApiType>) { constructor (options: ApiOptions, type: ApiTypes, decorateMethod: DecorateMethod<ApiType>) {
super(options, type, decorateMethod); super(options, type, decorateMethod);
@@ -64,10 +64,12 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
this._rpcCore.setRegistrySwap((blockHash: Uint8Array) => this.getBlockRegistry(blockHash)); this._rpcCore.setRegistrySwap((blockHash: Uint8Array) => this.getBlockRegistry(blockHash));
this._rpcCore.setResolveBlockHash((blockNumber) => firstValueFrom(this._rpcCore.chain.getBlockHash(blockNumber)));
if (this.hasSubscriptions) { if (this.hasSubscriptions) {
this._rpcCore.provider.on('disconnected', this.#onProviderDisconnect); this._rpcCore.provider.on('disconnected', () => this.#onProviderDisconnect());
this._rpcCore.provider.on('error', this.#onProviderError); this._rpcCore.provider.on('error', (e: Error) => this.#onProviderError(e));
this._rpcCore.provider.on('connected', this.#onProviderConnect); this._rpcCore.provider.on('connected', () => this.#onProviderConnect());
} else { } else {
l.warn('Api will be available in a limited mode since the provider does not support subscriptions'); l.warn('Api will be available in a limited mode since the provider does not support subscriptions');
} }
@@ -85,6 +87,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
* @description Decorates a registry based on the runtime version * @description Decorates a registry based on the runtime version
*/ */
private _initRegistry (registry: Registry, chain: Text, version: { specName: Text, specVersion: BN }, metadata: Metadata, chainProps?: ChainProperties): void { private _initRegistry (registry: Registry, chain: Text, version: { specName: Text, specVersion: BN }, metadata: Metadata, chainProps?: ChainProperties): void {
registry.clearCache();
registry.setChainProperties(chainProps || this.registry.getChainProperties()); registry.setChainProperties(chainProps || this.registry.getChainProperties());
registry.setKnownTypes(this._options); registry.setKnownTypes(this._options);
registry.register(getSpecTypes(registry, chain, version.specName, version.specVersion)); registry.register(getSpecTypes(registry, chain, version.specName, version.specVersion));
@@ -117,6 +120,44 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
return this._createDecorated(registry, true, null, u8aHash).decoratedApi; return this._createDecorated(registry, true, null, u8aHash).decoratedApi;
} }
private async _createBlockRegistry (blockHash: Uint8Array, header: HeaderPartial, version: RuntimeVersionPartial): Promise<VersionedRegistry<ApiType>> {
const registry = new TypeRegistry(blockHash);
const metadata = new Metadata(registry,
await firstValueFrom(this._rpcCore.state.getMetadata.raw<HexString>(header.parentHash))
);
this._initRegistry(registry, this._runtimeChain as Text, version, metadata);
// add our new registry
const result = { lastBlockHash: blockHash, metadata, registry, specName: version.specName, specVersion: version.specVersion };
this.#registries.push(result);
return result;
}
private _cacheBlockRegistryProgress (key: HexString, creator: () => Promise<VersionedRegistry<ApiType>>): Promise<VersionedRegistry<ApiType>> {
// look for waiting resolves
let waiting = this.#waitingRegistries[key];
if (isUndefined(waiting)) {
// nothing waiting, construct new
waiting = this.#waitingRegistries[key] = new Promise<VersionedRegistry<ApiType>>((resolve, reject): void => {
creator()
.then((registry): void => {
delete this.#waitingRegistries[key];
resolve(registry);
})
.catch((error): void => {
delete this.#waitingRegistries[key];
reject(error);
});
});
}
return waiting;
}
private _getBlockRegistryViaVersion (blockHash: Uint8Array, version?: RuntimeVersionPartial): VersionedRegistry<ApiType> | null { private _getBlockRegistryViaVersion (blockHash: Uint8Array, version?: RuntimeVersionPartial): VersionedRegistry<ApiType> | null {
if (version) { if (version) {
// check for pre-existing registries. We also check specName, e.g. it // check for pre-existing registries. We also check specName, e.g. it
@@ -136,7 +177,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
return null; return null;
} }
private async _getBlockRegistry (blockHash: Uint8Array): Promise<VersionedRegistry<ApiType>> { private async _getBlockRegistryViaHash (blockHash: Uint8Array): Promise<VersionedRegistry<ApiType>> {
// ensure we have everything required // ensure we have everything required
assert(this._genesisHash && this._runtimeVersion, 'Cannot retrieve data on an uninitialized chain'); assert(this._genesisHash && this._runtimeVersion, 'Cannot retrieve data on an uninitialized chain');
@@ -158,62 +199,28 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
: await firstValueFrom(this._rpcCore.state.getRuntimeVersion.raw(header.parentHash)) : await firstValueFrom(this._rpcCore.state.getRuntimeVersion.raw(header.parentHash))
); );
const existingViaVersion = this._getBlockRegistryViaVersion(blockHash, version); return (
// try to find via version
if (existingViaVersion) { this._getBlockRegistryViaVersion(blockHash, version) ||
return existingViaVersion; // return new or in-flight result
} await this._cacheBlockRegistryProgress(version.toHex(), () => this._createBlockRegistry(blockHash, header, version))
// nothing has been found, construct new
const registry = new TypeRegistry(blockHash);
const metadata = new Metadata(registry,
await firstValueFrom(this._rpcCore.state.getMetadata.raw<HexString>(header.parentHash))
); );
this._initRegistry(registry, this._runtimeChain as Text, version, metadata);
// add our new registry
const result = { lastBlockHash: blockHash, metadata, registry, specName: version.specName, specVersion: version.specVersion };
this.#registries.push(result);
return result;
} }
/** /**
* @description Sets up a registry based on the block hash defined * @description Sets up a registry based on the block hash defined
*/ */
public async getBlockRegistry (blockHash: Uint8Array, knownVersion?: RuntimeVersion): Promise<VersionedRegistry<ApiType>> { public async getBlockRegistry (blockHash: Uint8Array, knownVersion?: RuntimeVersion): Promise<VersionedRegistry<ApiType>> {
const existingViaHash = this.#registries.find(({ lastBlockHash }) => return (
lastBlockHash && u8aEq(lastBlockHash, blockHash) // try to find via blockHash
this.#registries.find(({ lastBlockHash }) =>
lastBlockHash && u8aEq(lastBlockHash, blockHash)
) ||
// try to find via version
this._getBlockRegistryViaVersion(blockHash, knownVersion) ||
// return new or in-flight result
await this._cacheBlockRegistryProgress(u8aToHex(blockHash), () => this._getBlockRegistryViaHash(blockHash))
); );
if (existingViaHash) {
return existingViaHash;
}
const existingViaVersion = this._getBlockRegistryViaVersion(blockHash, knownVersion);
if (existingViaVersion) {
return existingViaVersion;
}
const blockHashHex = u8aToHex(blockHash);
let waiting = this.#waitingRegistries[blockHashHex];
if (isUndefined(waiting)) {
waiting = this._getBlockRegistry(blockHash);
this.#waitingRegistries[blockHashHex] = waiting;
// when we have resolved, remove this from the waiting list
waiting
.then((): void => {
delete this.#waitingRegistries[blockHashHex];
})
.catch(() => undefined);
}
return waiting;
} }
protected async _loadMeta (): Promise<boolean> { protected async _loadMeta (): Promise<boolean> {
@@ -284,9 +291,8 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
thisRegistry.metadata = metadata; thisRegistry.metadata = metadata;
thisRegistry.specVersion = version.specVersion; thisRegistry.specVersion = version.specVersion;
// clear the registry types to ensure that we override correctly this._initRegistry(this.registry, this._runtimeChain as Text, version, metadata);
this._initRegistry(thisRegistry.registry.init(), this._runtimeChain as Text, version, metadata); this._injectMetadata(thisRegistry, true);
this._injectMetadata(thisRegistry, false);
return true; return true;
}) })
@@ -380,17 +386,15 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
this._unsubscribeUpdates(); this._unsubscribeUpdates();
} }
#onProviderConnect = async (): Promise<void> => { async #onProviderConnect (): Promise<void> {
this._isConnected.next(true); this._isConnected.next(true);
this.emit('connected'); this.emit('connected');
try { try {
const [hasMeta, cryptoReady] = await Promise.all([ const cryptoReady = this._options.initWasm === false
this._loadMeta(), ? true
this._options.initWasm === false : await cryptoWaitReady();
? Promise.resolve(true) const hasMeta = await this._loadMeta();
: cryptoWaitReady()
]);
this._subscribeHealth(); this._subscribeHealth();
@@ -406,15 +410,15 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
this.emit('error', error); this.emit('error', error);
} }
}; }
#onProviderDisconnect = (): void => { #onProviderDisconnect (): void {
this._isConnected.next(false); this._isConnected.next(false);
this._unsubscribeHealth(); this._unsubscribeHealth();
this.emit('disconnected'); this.emit('disconnected');
}; }
#onProviderError = (error: Error): void => { #onProviderError (error: Error): void {
this.emit('error', error); this.emit('error', error);
}; }
} }
+2 -2
View File
@@ -33,9 +33,9 @@ async function derive (api: ApiPromise): Promise<void> {
console.log('current author:', header.author); console.log('current author:', header.author);
}); });
const fees = await api.derive.balances.fees(); const info = await api.derive.balances.account('0x1234');
console.log('fees', fees); console.log('info', info);
} }
function errors (api: ApiPromise): void { function errors (api: ApiPromise): void {
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '7.5.1' }; export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '8.5.1' };
+16 -9
View File
@@ -14,7 +14,15 @@ interface Tracker<T> {
resolve: (value: T) => void; resolve: (value: T) => void;
} }
// a Promise completion tracker, wrapping an isComplete variable that ensures the promise only resolves once type CodecReturnType<T extends (...args: unknown[]) => Observable<Codec>> =
T extends (...args: any) => infer R
? R extends Observable<Codec>
? ObsInnerType<R>
: never
: never;
// a Promise completion tracker, wrapping an isComplete variable that ensures
// that the promise only resolves once
export function promiseTracker<T> (resolve: (value: T) => void, reject: (value: Error) => void): Tracker<T> { export function promiseTracker<T> (resolve: (value: T) => void, reject: (value: Error) => void): Tracker<T> {
let isCompleted = false; let isCompleted = false;
@@ -40,14 +48,13 @@ export function promiseTracker<T> (resolve: (value: T) => void, reject: (value:
// extract the arguments and callback params from a value array possibly containing a callback // extract the arguments and callback params from a value array possibly containing a callback
function extractArgs (args: unknown[], needsCallback: boolean): [unknown[], Callback<Codec> | undefined] { function extractArgs (args: unknown[], needsCallback: boolean): [unknown[], Callback<Codec> | undefined] {
let callback: Callback<Codec> | undefined;
const actualArgs = args.slice(); const actualArgs = args.slice();
// If the last arg is a function, we pop it, put it into callback. // If the last arg is a function, we pop it, put it into callback.
// actualArgs will then hold the actual arguments to be passed to `method` // actualArgs will then hold the actual arguments to be passed to `method`
if (args.length && isFunction(args[args.length - 1])) { const callback = (args.length && isFunction(args[args.length - 1]))
callback = actualArgs.pop() as Callback<Codec>; ? actualArgs.pop() as Callback<Codec>
} : undefined;
// When we need a subscription, ensure that a valid callback is actually passed // When we need a subscription, ensure that a valid callback is actually passed
assert(!needsCallback || isFunction(callback), 'Expected a callback to be passed with subscriptions'); assert(!needsCallback || isFunction(callback), 'Expected a callback to be passed with subscriptions');
@@ -56,7 +63,7 @@ function extractArgs (args: unknown[], needsCallback: boolean): [unknown[], Call
} }
// Decorate a call for a single-shot result - retrieve and then immediate unsubscribe // Decorate a call for a single-shot result - retrieve and then immediate unsubscribe
function decorateCall<M extends DecorateFn<ObsInnerType<ReturnType<M>>>> (method: M, args: unknown[]): Promise<ObsInnerType<ReturnType<M>>> { function decorateCall<M extends DecorateFn<CodecReturnType<M>>> (method: M, args: unknown[]): Promise<CodecReturnType<M>> {
return new Promise((resolve, reject): void => { return new Promise((resolve, reject): void => {
// single result tracker - either reject with Error or resolve with Codec result // single result tracker - either reject with Error or resolve with Codec result
const tracker = promiseTracker(resolve, reject); const tracker = promiseTracker(resolve, reject);
@@ -74,7 +81,7 @@ function decorateCall<M extends DecorateFn<ObsInnerType<ReturnType<M>>>> (method
} }
// Decorate a subscription where we have a result callback specified // Decorate a subscription where we have a result callback specified
function decorateSubscribe<M extends DecorateFn<ObsInnerType<ReturnType<M>>>> (method: M, args: unknown[], resultCb: Callback<Codec>): UnsubscribePromise { function decorateSubscribe<M extends DecorateFn<CodecReturnType<M>>> (method: M, args: unknown[], resultCb: Callback<Codec>): UnsubscribePromise {
return new Promise<VoidFn>((resolve, reject): void => { return new Promise<VoidFn>((resolve, reject): void => {
// either reject with error or resolve with unsubscribe callback // either reject with error or resolve with unsubscribe callback
const tracker = promiseTracker(resolve, reject); const tracker = promiseTracker(resolve, reject);
@@ -95,10 +102,10 @@ function decorateSubscribe<M extends DecorateFn<ObsInnerType<ReturnType<M>>>> (m
/** /**
* @description Decorate method for ApiPromise, where the results are converted to the Promise equivalent * @description Decorate method for ApiPromise, where the results are converted to the Promise equivalent
*/ */
export function toPromiseMethod<M extends DecorateFn<ObsInnerType<ReturnType<M>>>> (method: M, options?: DecorateMethodOptions): StorageEntryPromiseOverloads { export function toPromiseMethod<M extends DecorateFn<CodecReturnType<M>>> (method: M, options?: DecorateMethodOptions): StorageEntryPromiseOverloads {
const needsCallback = !!(options && options.methodName && options.methodName.includes('subscribe')); const needsCallback = !!(options && options.methodName && options.methodName.includes('subscribe'));
return function (...args: unknown[]): Promise<ObsInnerType<ReturnType<M>>> | UnsubscribePromise { return function (...args: unknown[]): Promise<CodecReturnType<M>> | UnsubscribePromise {
const [actualArgs, resultCb] = extractArgs(args, needsCallback); const [actualArgs, resultCb] = extractArgs(args, needsCallback);
return resultCb return resultCb
+4 -1
View File
@@ -47,13 +47,16 @@ export class SubmittableResult implements ISubmittableResult {
public readonly txHash: Hash; public readonly txHash: Hash;
constructor ({ dispatchError, dispatchInfo, events, internalError, status, txHash }: SubmittableResultValue) { public readonly txIndex?: number;
constructor ({ dispatchError, dispatchInfo, events, internalError, status, txHash, txIndex }: SubmittableResultValue) {
this.dispatchError = dispatchError || extractError(events); this.dispatchError = dispatchError || extractError(events);
this.dispatchInfo = dispatchInfo || extractInfo(events); this.dispatchInfo = dispatchInfo || extractInfo(events);
this.events = events || []; this.events = events || [];
this.internalError = internalError; this.internalError = internalError;
this.status = status; this.status = status;
this.txHash = txHash; this.txHash = txHash;
this.txIndex = txIndex;
} }
public get isCompleted (): boolean { public get isCompleted (): boolean {
+43 -28
View File
@@ -3,7 +3,7 @@
/* eslint-disable no-dupe-class-members */ /* eslint-disable no-dupe-class-members */
import type { Observable, OperatorFunction } from 'rxjs'; import type { Observable } from 'rxjs';
import type { Address, ApplyExtrinsicResult, Call, Extrinsic, ExtrinsicEra, ExtrinsicStatus, Hash, Header, Index, RuntimeDispatchInfo, SignerPayload } from '@polkadot/types/interfaces'; import type { Address, ApplyExtrinsicResult, Call, Extrinsic, ExtrinsicEra, ExtrinsicStatus, Hash, Header, Index, RuntimeDispatchInfo, SignerPayload } from '@polkadot/types/interfaces';
import type { Callback, Codec, Constructor, IKeyringPair, ISubmittableResult, SignatureOptions } from '@polkadot/types/types'; import type { Callback, Codec, Constructor, IKeyringPair, ISubmittableResult, SignatureOptions } from '@polkadot/types/types';
import type { Registry } from '@polkadot/types-codec/types'; import type { Registry } from '@polkadot/types-codec/types';
@@ -21,9 +21,15 @@ import { SubmittableResult } from './Result';
interface SubmittableOptions<ApiType extends ApiTypes> { interface SubmittableOptions<ApiType extends ApiTypes> {
api: ApiInterfaceRx; api: ApiInterfaceRx;
apiType: ApiTypes; apiType: ApiTypes;
blockHash?: Uint8Array;
decorateMethod: ApiBase<ApiType>['_decorateMethod']; decorateMethod: ApiBase<ApiType>['_decorateMethod'];
} }
interface UpdateInfo {
options: SignatureOptions;
updateId: number;
}
const identity = <T> (input: T): T => input; 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 {
@@ -75,7 +81,7 @@ function optionsOrNonce (partialOptions: Partial<SignerOptions> = {}): Partial<S
: partialOptions; : partialOptions;
} }
export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorateMethod }: SubmittableOptions<ApiType>): Constructor<SubmittableExtrinsic<ApiType>> { export function createClass <ApiType extends ApiTypes> ({ api, apiType, blockHash, decorateMethod }: SubmittableOptions<ApiType>): Constructor<SubmittableExtrinsic<ApiType>> {
// an instance of the base extrinsic for us to extend // an instance of the base extrinsic for us to extend
const ExtrinsicBase = api.registry.createClass('Extrinsic'); const ExtrinsicBase = api.registry.createClass('Extrinsic');
@@ -92,10 +98,10 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
// dry run an extrinsic // dry run an extrinsic
public dryRun (account: AddressOrPair, optionsOrHash?: Partial<SignerOptions> | Uint8Array | string): SubmittableDryRunResult<ApiType> { public dryRun (account: AddressOrPair, optionsOrHash?: Partial<SignerOptions> | Uint8Array | string): SubmittableDryRunResult<ApiType> {
if (isString(optionsOrHash) || isU8a(optionsOrHash)) { if (blockHash || isString(optionsOrHash) || isU8a(optionsOrHash)) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return // eslint-disable-next-line @typescript-eslint/no-unsafe-return
return decorateMethod( return decorateMethod(
() => api.rpc.system.dryRun(this.toHex(), optionsOrHash) () => api.rpc.system.dryRun(this.toHex(), blockHash || optionsOrHash as string)
); );
} }
@@ -110,10 +116,11 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
// calculate the payment info for this transaction (if signed and submitted) // calculate the payment info for this transaction (if signed and submitted)
public paymentInfo (account: AddressOrPair, optionsOrHash?: Partial<SignerOptions> | Uint8Array | string): SubmittablePaymentResult<ApiType> { public paymentInfo (account: AddressOrPair, optionsOrHash?: Partial<SignerOptions> | Uint8Array | string): SubmittablePaymentResult<ApiType> {
if (isString(optionsOrHash) || isU8a(optionsOrHash)) { if (blockHash || isString(optionsOrHash) || isU8a(optionsOrHash)) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return // eslint-disable-next-line @typescript-eslint/no-unsafe-return
return decorateMethod( return decorateMethod(
(): Observable<RuntimeDispatchInfo> => api.rpc.payment.queryInfo(this.toHex(), optionsOrHash) (): Observable<RuntimeDispatchInfo> =>
api.rpc.payment.queryInfo(this.toHex(), blockHash || optionsOrHash as string)
); );
} }
@@ -130,9 +137,11 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
const eraOptions = makeEraOptions(api, this.registry, allOptions, signingInfo); const eraOptions = makeEraOptions(api, this.registry, allOptions, signingInfo);
const signOptions = makeSignOptions(api, eraOptions, {}); const signOptions = makeSignOptions(api, eraOptions, {});
this.signFake(address, signOptions); return api.rpc.payment.queryInfo(
this.isSigned
return api.rpc.payment.queryInfo(this.toHex()); ? api.tx(this).signFake(address, signOptions).toHex()
: this.signFake(address, signOptions).toHex()
);
}) })
) )
)(); )();
@@ -174,7 +183,7 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
return decorateMethod( return decorateMethod(
(): Observable<this> => (): Observable<this> =>
this.#observeSign(account, partialOptions).pipe( this.#observeSign(account, partialOptions).pipe(
mapTo<number | undefined, this>(this) mapTo(this)
) )
)(); )();
} }
@@ -197,10 +206,10 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
return decorateMethod( return decorateMethod(
(): Observable<Codec> => ( (): Observable<Codec> => (
this.#observeSign(account, options).pipe( this.#observeSign(account, options).pipe(
switchMap((updateId: number | undefined): Observable<ISubmittableResult> | Observable<Hash> => switchMap((info): Observable<ISubmittableResult> | Observable<Hash> =>
isSubscription isSubscription
? this.#observeSubscribe(updateId) ? this.#observeSubscribe(info)
: this.#observeSend(updateId) : this.#observeSend(info)
) )
) as Observable<Codec>) // FIXME This is wrong, SubmittableResult is _not_ a codec ) as Observable<Codec>) // FIXME This is wrong, SubmittableResult is _not_ a codec
)(statusCb); )(statusCb);
@@ -213,23 +222,24 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
return this; return this;
} }
#observeSign = (account: AddressOrPair, partialOptions?: Partial<SignerOptions>): Observable<number | undefined> => { #observeSign = (account: AddressOrPair, partialOptions?: Partial<SignerOptions>): Observable<UpdateInfo> => {
const address = isKeyringPair(account) ? account.address : account.toString(); const address = isKeyringPair(account) ? account.address : account.toString();
const options = optionsOrNonce(partialOptions); const options = optionsOrNonce(partialOptions);
let updateId: number | undefined;
return api.derive.tx.signingInfo(address, options.nonce, options.era).pipe( return api.derive.tx.signingInfo(address, options.nonce, options.era).pipe(
first(), first(),
mergeMap(async (signingInfo): Promise<void> => { mergeMap(async (signingInfo): Promise<UpdateInfo> => {
const eraOptions = makeEraOptions(api, this.registry, options, signingInfo); const eraOptions = makeEraOptions(api, this.registry, options, signingInfo);
let updateId = -1;
if (isKeyringPair(account)) { if (isKeyringPair(account)) {
this.sign(account, eraOptions); this.sign(account, eraOptions);
} else { } else {
updateId = await this.#signViaSigner(address, eraOptions, signingInfo.header); updateId = await this.#signViaSigner(address, eraOptions, signingInfo.header);
} }
}),
mapTo(updateId) as OperatorFunction<void, number | undefined> return { options: eraOptions, updateId };
})
); );
}; };
@@ -248,7 +258,7 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
return api.derive.tx.events(blockHash).pipe( return api.derive.tx.events(blockHash).pipe(
map(({ block, events }): ISubmittableResult => map(({ block, events }): ISubmittableResult =>
this.#transformResult(new SubmittableResult({ this.#transformResult(new SubmittableResult({
events: filterEvents(txHash, block, events, status), ...filterEvents(txHash, block, events, status),
status, status,
txHash txHash
})) }))
@@ -263,15 +273,15 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
); );
}; };
#observeSend = (updateId = -1): Observable<Hash> => { #observeSend = (info: UpdateInfo): Observable<Hash> => {
return api.rpc.author.submitExtrinsic(this).pipe( return api.rpc.author.submitExtrinsic(this).pipe(
tap((hash): void => { tap((hash): void => {
this.#updateSigner(updateId, hash); this.#updateSigner(hash, info);
}) })
); );
}; };
#observeSubscribe = (updateId = -1): Observable<ISubmittableResult> => { #observeSubscribe = (info: UpdateInfo): Observable<ISubmittableResult> => {
const txHash = this.hash; const txHash = this.hash;
return api.rpc.author.submitAndWatchExtrinsic(this).pipe( return api.rpc.author.submitAndWatchExtrinsic(this).pipe(
@@ -279,7 +289,7 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
this.#observeStatus(txHash, status) this.#observeStatus(txHash, status)
), ),
tap((status): void => { tap((status): void => {
this.#updateSigner(updateId, status); this.#updateSigner(status, info);
}) })
); );
}; };
@@ -296,9 +306,9 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
})]); })]);
let result: SignerResult; let result: SignerResult;
if (signer.signPayload) { if (isFunction(signer.signPayload)) {
result = await signer.signPayload(payload.toPayload()); result = await signer.signPayload(payload.toPayload());
} else if (signer.signRaw) { } else if (isFunction(signer.signRaw)) {
result = await signer.signRaw(payload.toRaw()); result = await signer.signRaw(payload.toRaw());
} else { } else {
throw new Error('Invalid signer interface, it should implement either signPayload or signRaw (or both)'); throw new Error('Invalid signer interface, it should implement either signPayload or signRaw (or both)');
@@ -312,9 +322,14 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
return result.id; return result.id;
}; };
#updateSigner = (updateId: number, status: Hash | ISubmittableResult): void => { #updateSigner = (status: Hash | ISubmittableResult, info?: UpdateInfo): void => {
if ((updateId !== -1) && api.signer && api.signer.update) { if (info && (info.updateId !== -1)) {
api.signer.update(updateId, status); const { options, updateId } = info;
const signer = options.signer || api.signer;
if (signer && isFunction(signer.update)) {
signer.update(updateId, status);
}
} }
}; };
} }
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import type { Call, Extrinsic } from '@polkadot/types/interfaces'; import type { Call, Extrinsic } from '@polkadot/types/interfaces';
import type { Registry } from '@polkadot/types-codec/types';
import type { ApiInterfaceRx, ApiTypes } from '../types'; import type { ApiInterfaceRx, ApiTypes } from '../types';
import type { SubmittableExtrinsic } from './types'; import type { SubmittableExtrinsic } from './types';
@@ -10,9 +11,9 @@ import { createClass } from './createClass';
type Creator<ApiType extends ApiTypes> = (extrinsic: Call | Uint8Array | string) => SubmittableExtrinsic<ApiType>; type Creator<ApiType extends ApiTypes> = (extrinsic: Call | Uint8Array | string) => SubmittableExtrinsic<ApiType>;
export function createSubmittable<ApiType extends ApiTypes> (apiType: ApiTypes, api: ApiInterfaceRx, decorateMethod: ApiBase<ApiType>['_decorateMethod']): Creator<ApiType> { export function createSubmittable<ApiType extends ApiTypes> (apiType: ApiTypes, api: ApiInterfaceRx, decorateMethod: ApiBase<ApiType>['_decorateMethod'], registry?: Registry, blockHash?: Uint8Array): Creator<ApiType> {
const Submittable = createClass<ApiType>({ api, apiType, decorateMethod }); const Submittable = createClass<ApiType>({ api, apiType, blockHash, decorateMethod });
return (extrinsic: Call | Extrinsic | Uint8Array | string): SubmittableExtrinsic<ApiType> => return (extrinsic: Call | Extrinsic | Uint8Array | string): SubmittableExtrinsic<ApiType> =>
new Submittable(api.registry, extrinsic); new Submittable(registry || api.registry, extrinsic);
} }
+5 -3
View File
@@ -9,11 +9,12 @@ import type { DecoratedEvents } from '@polkadot/api-base/types/events';
import type { QueryableStorage } from '@polkadot/api-base/types/storage'; import type { QueryableStorage } from '@polkadot/api-base/types/storage';
import type { ProviderInterface, ProviderInterfaceEmitted } from '@polkadot/rpc-provider/types'; import type { ProviderInterface, ProviderInterfaceEmitted } from '@polkadot/rpc-provider/types';
import type { ExtDef } from '@polkadot/types/extrinsic/signedExtensions/types'; import type { ExtDef } from '@polkadot/types/extrinsic/signedExtensions/types';
import type { Hash } from '@polkadot/types/interfaces'; import type { Call, Extrinsic, Hash } from '@polkadot/types/interfaces';
import type { CallFunction, DefinitionRpc, DefinitionRpcSub, RegisteredTypes, Registry, RegistryError, SignatureOptions, Signer } from '@polkadot/types/types'; import type { CallFunction, DefinitionRpc, DefinitionRpcSub, RegisteredTypes, Registry, RegistryError, SignatureOptions, Signer } from '@polkadot/types/types';
import type { BN } from '@polkadot/util'; import type { BN } from '@polkadot/util';
import type { HexString } from '@polkadot/util/types'; import type { HexString } from '@polkadot/util/types';
import type { ApiBase } from '../base'; import type { ApiBase } from '../base';
import type { SubmittableExtrinsic } from '../types/submittable';
import type { AllDerives } from '../util/decorate'; import type { AllDerives } from '../util/decorate';
export * from '@polkadot/api-base/types'; export * from '@polkadot/api-base/types';
@@ -81,7 +82,7 @@ export interface ApiOptions extends RegisteredTypes {
throwOnUnknown?: boolean; throwOnUnknown?: boolean;
} }
export type ApiInterfaceEvents = ProviderInterfaceEmitted | 'ready'; export type ApiInterfaceEvents = ProviderInterfaceEmitted | 'ready' | 'decorated';
export interface SignerOptions extends SignatureOptions { export interface SignerOptions extends SignatureOptions {
blockNumber: BN; blockNumber: BN;
@@ -96,7 +97,8 @@ export interface ApiDecoration<ApiType extends ApiTypes> {
registry: Registry; registry: Registry;
rx: { rx: {
query: QueryableStorage<'rxjs'>; query: QueryableStorage<'rxjs'>;
} };
tx: (extrinsic: Call | Extrinsic | Uint8Array | string) => SubmittableExtrinsic<ApiType>;
findCall (callIndex: Uint8Array | string): CallFunction; findCall (callIndex: Uint8Array | string): CallFunction;
findError (errorIndex: Uint8Array | string): RegistryError; findError (errorIndex: Uint8Array | string): RegistryError;
+10 -7
View File
@@ -5,14 +5,17 @@ import type { EventRecord, ExtrinsicStatus, H256, SignedBlock } from '@polkadot/
import { l } from './logging'; import { l } from './logging';
export function filterEvents (txHash: H256, { block: { extrinsics, header } }: SignedBlock, allEvents: EventRecord[], status: ExtrinsicStatus): EventRecord[] | undefined { export function filterEvents (txHash: H256, { block: { extrinsics, header } }: SignedBlock, allEvents: EventRecord[], status: ExtrinsicStatus): { events?: EventRecord[], txIndex?: number } {
// extrinsics to hashes // extrinsics to hashes
for (const [index, x] of extrinsics.entries()) { for (const [txIndex, x] of extrinsics.entries()) {
if (x.hash.eq(txHash)) { if (x.hash.eq(txHash)) {
return allEvents.filter(({ phase }) => return {
// only ApplyExtrinsic has the extrinsic index events: allEvents.filter(({ phase }) =>
phase.isApplyExtrinsic && phase.asApplyExtrinsic.eqn(index) phase.isApplyExtrinsic &&
); phase.asApplyExtrinsic.eqn(txIndex)
),
txIndex
};
} }
} }
@@ -24,5 +27,5 @@ export function filterEvents (txHash: H256, { block: { extrinsics, header } }: S
l.warn(`block ${header.hash.toHex()}: Unable to find extrinsic ${txHash.toHex()} inside ${allHashes.join(', ')}`); l.warn(`block ${header.hash.toHex()}: Unable to find extrinsic ${txHash.toHex()} inside ${allHashes.join(', ')}`);
} }
return undefined; return {};
} }
+6 -6
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "7.5.1", "version": "8.5.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.18.0",
"@polkadot/rpc-core": "7.5.1", "@polkadot/rpc-core": "8.5.1",
"@polkadot/types": "7.5.1", "@polkadot/types": "8.5.1",
"@polkadot/types-codec": "7.5.1", "@polkadot/types-codec": "8.5.1",
"@polkadot/util": "^8.3.3" "@polkadot/util": "^9.2.1"
} }
} }
+29 -6
View File
@@ -11,17 +11,18 @@ import type { BeefySignedCommitment } from '@polkadot/types/interfaces/beefy';
import type { BlockHash } from '@polkadot/types/interfaces/chain'; import type { BlockHash } from '@polkadot/types/interfaces/chain';
import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate'; import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
import type { AuthorityId } from '@polkadot/types/interfaces/consensus'; import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
import type { 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 { 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, EthFilter, EthFilterChanges, EthLog, EthReceipt, EthRichBlock, EthSubKind, EthSubParams, EthSyncStatus, EthTransaction, EthTransactionRequest, EthWork } from '@polkadot/types/interfaces/eth';
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics'; import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
import type { EncodedFinalityProofs, JustificationNotification, ReportedRoundStates } from '@polkadot/types/interfaces/grandpa'; import type { EncodedFinalityProofs, JustificationNotification, ReportedRoundStates } from '@polkadot/types/interfaces/grandpa';
import type { MmrLeafProof } from '@polkadot/types/interfaces/mmr'; import type { MmrLeafBatchProof, MmrLeafProof } from '@polkadot/types/interfaces/mmr';
import type { StorageKind } from '@polkadot/types/interfaces/offchain'; import type { StorageKind } from '@polkadot/types/interfaces/offchain';
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment'; import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { RpcMethods } from '@polkadot/types/interfaces/rpc'; import type { RpcMethods } from '@polkadot/types/interfaces/rpc';
import type { AccountId, BlockNumber, H160, H256, H64, Hash, Header, Index, Justification, KeyValue, SignedBlock, StorageData } from '@polkadot/types/interfaces/runtime'; import type { AccountId, BlockNumber, H160, H256, H64, Hash, Header, Index, Justification, KeyValue, SignedBlock, StorageData } from '@polkadot/types/interfaces/runtime';
import type { ReadProof, RuntimeVersion, TraceBlockResponse } from '@polkadot/types/interfaces/state'; import type { MigrationStatusResult, ReadProof, RuntimeVersion, TraceBlockResponse } from '@polkadot/types/interfaces/state';
import type { ApplyExtrinsicResult, ChainProperties, ChainType, Health, NetworkState, NodeRole, PeerInfo, SyncState } from '@polkadot/types/interfaces/system'; import type { ApplyExtrinsicResult, ChainProperties, ChainType, Health, NetworkState, NodeRole, PeerInfo, SyncState } from '@polkadot/types/interfaces/system';
import type { IExtrinsic, Observable } from '@polkadot/types/types'; import type { IExtrinsic, Observable } from '@polkadot/types/types';
@@ -68,6 +69,10 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
epochAuthorship: AugmentedRpc<() => Observable<HashMap<AuthorityId, EpochAuthorship>>>; epochAuthorship: AugmentedRpc<() => Observable<HashMap<AuthorityId, EpochAuthorship>>>;
}; };
beefy: { beefy: {
/**
* Returns hash of the latest BEEFY finalized block as seen by this client.
**/
getFinalizedHead: AugmentedRpc<() => Observable<H256>>;
/** /**
* Returns the block most recently finalized by BEEFY, alongside side its justification. * Returns the block most recently finalized by BEEFY, alongside side its justification.
**/ **/
@@ -146,6 +151,16 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
* Returns the projected time a given contract will be able to sustain paying its rent * Returns the projected time a given contract will be able to sustain paying its rent
**/ **/
rentProjection: AugmentedRpc<(address: AccountId | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<BlockNumber>>>; rentProjection: AugmentedRpc<(address: AccountId | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<BlockNumber>>>;
/**
* Upload new code without instantiating a contract from it
**/
uploadCode: AugmentedRpc<(uploadRequest: CodeUploadRequest | { origin?: any; code?: any; storageDepositLimit?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<CodeUploadResult>>;
};
dev: {
/**
* Reexecute the specified `block_hash` and gather statistics while doing so
**/
getBlockStats: AugmentedRpc<(at: Hash | string | Uint8Array) => Observable<Option<BlockStats>>>;
}; };
engine: { engine: {
/** /**
@@ -325,9 +340,9 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
}; };
grandpa: { grandpa: {
/** /**
* Prove finality for the range (begin; end] hash. * Prove finality for the given block number, returning the Justification for the last block in the set.
**/ **/
proveFinality: AugmentedRpc<(begin: BlockHash | string | Uint8Array, end: BlockHash | string | Uint8Array, authoritiesSetId?: u64 | AnyNumber | Uint8Array) => Observable<Option<EncodedFinalityProofs>>>; proveFinality: AugmentedRpc<(blockNumber: BlockNumber | AnyNumber | Uint8Array) => Observable<Option<EncodedFinalityProofs>>>;
/** /**
* Returns the state of the current best round state as well as the ongoing background rounds * Returns the state of the current best round state as well as the ongoing background rounds
**/ **/
@@ -338,10 +353,14 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
subscribeJustifications: AugmentedRpc<() => Observable<JustificationNotification>>; subscribeJustifications: AugmentedRpc<() => Observable<JustificationNotification>>;
}; };
mmr: { mmr: {
/**
* Generate MMR proof for the given leaf indices.
**/
generateBatchProof: AugmentedRpc<(leafIndices: Vec<u64> | (u64 | AnyNumber | Uint8Array)[], at?: BlockHash | string | Uint8Array) => Observable<MmrLeafProof>>;
/** /**
* Generate MMR proof for given leaf index. * Generate MMR proof for given leaf index.
**/ **/
generateProof: AugmentedRpc<(leafIndex: u64 | AnyNumber | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<MmrLeafProof>>; generateProof: AugmentedRpc<(leafIndex: u64 | AnyNumber | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<MmrLeafBatchProof>>;
}; };
net: { net: {
/** /**
@@ -464,6 +483,10 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
* Provides a way to trace the re-execution of a single block * Provides a way to trace the re-execution of a single block
**/ **/
traceBlock: AugmentedRpc<(block: Hash | string | Uint8Array, targets: Option<Text> | null | object | string | Uint8Array, storageKeys: Option<Text> | null | object | string | Uint8Array, methods: Option<Text> | null | object | string | Uint8Array) => Observable<TraceBlockResponse>>; traceBlock: AugmentedRpc<(block: Hash | string | Uint8Array, targets: Option<Text> | null | object | string | Uint8Array, storageKeys: Option<Text> | null | object | string | Uint8Array, methods: Option<Text> | null | object | string | Uint8Array) => Observable<TraceBlockResponse>>;
/**
* Check current migration state
**/
trieMigrationStatus: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<MigrationStatusResult>>;
}; };
syncstate: { syncstate: {
/** /**
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '7.5.1' }; export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '8.5.1' };
+9 -9
View File
@@ -20,18 +20,18 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "7.5.1", "version": "8.5.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.18.0",
"@polkadot/rpc-augment": "7.5.1", "@polkadot/rpc-augment": "8.5.1",
"@polkadot/rpc-provider": "7.5.1", "@polkadot/rpc-provider": "8.5.1",
"@polkadot/types": "7.5.1", "@polkadot/types": "8.5.1",
"@polkadot/util": "^8.3.3", "@polkadot/util": "^9.2.1",
"rxjs": "^7.5.2" "rxjs": "^7.5.5"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/keyring": "^8.3.3", "@polkadot/keyring": "^9.2.1",
"@polkadot/rpc-augment": "7.5.1" "@polkadot/rpc-augment": "8.5.1"
} }
} }
+43 -11
View File
@@ -5,14 +5,14 @@ import type { Observer } from 'rxjs';
import type { ProviderInterface, ProviderInterfaceCallback } from '@polkadot/rpc-provider/types'; import type { ProviderInterface, ProviderInterfaceCallback } from '@polkadot/rpc-provider/types';
import type { StorageKey, Vec } from '@polkadot/types'; import type { StorageKey, Vec } from '@polkadot/types';
import type { Hash } from '@polkadot/types/interfaces'; import type { Hash } from '@polkadot/types/interfaces';
import type { AnyJson, Codec, DefinitionRpc, DefinitionRpcExt, DefinitionRpcSub, Registry } from '@polkadot/types/types'; import type { AnyJson, AnyNumber, Codec, DefinitionRpc, DefinitionRpcExt, DefinitionRpcSub, Registry } from '@polkadot/types/types';
import type { Memoized } from '@polkadot/util/types'; import type { Memoized } from '@polkadot/util/types';
import type { RpcInterfaceMethod } from './types'; import type { RpcInterfaceMethod } from './types';
import { Observable, publishReplay, refCount } from 'rxjs'; import { Observable, publishReplay, refCount } from 'rxjs';
import { rpcDefinitions } from '@polkadot/types'; import { rpcDefinitions } from '@polkadot/types';
import { assert, hexToU8a, isFunction, isNull, isUndefined, lazyMethod, logger, memoize, objectSpread, u8aToU8a } from '@polkadot/util'; import { assert, hexToU8a, isFunction, isNull, isUndefined, lazyMethod, logger, memoize, objectSpread, u8aConcat, u8aToU8a } from '@polkadot/util';
import { drr, refCountDelay } from './util'; import { drr, refCountDelay } from './util';
@@ -24,6 +24,11 @@ interface StorageChangeSetJSON {
changes: [string, string | null][]; changes: [string, string | null][];
} }
type MemoizedRpcInterfaceMethod = Memoized<RpcInterfaceMethod> & {
raw: Memoized<RpcInterfaceMethod>;
meta: DefinitionRpc;
}
const l = logger('rpc-core'); const l = logger('rpc-core');
const EMPTY_META = { const EMPTY_META = {
@@ -80,6 +85,7 @@ export class RpcCore {
#registryDefault: Registry; #registryDefault: Registry;
#getBlockRegistry?: (blockHash: Uint8Array) => Promise<{ registry: Registry }>; #getBlockRegistry?: (blockHash: Uint8Array) => Promise<{ registry: Registry }>;
#getBlockHash?: (blockNumber: AnyNumber) => Promise<Uint8Array>;
readonly #storageCache = new Map<string, string | null>(); readonly #storageCache = new Map<string, string | null>();
@@ -141,6 +147,15 @@ export class RpcCore {
}); });
} }
/**
* @description Sets a function to resolve block hash from block number
*/
public setResolveBlockHash (resolveBlockHash: (blockNumber: AnyNumber) => Promise<Uint8Array>): void {
this.#getBlockHash = memoize(resolveBlockHash, {
getInstanceId: () => this.#instanceId
});
}
public addUserInterfaces (userRpc: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>>): void { public addUserInterfaces (userRpc: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>>): void {
// add any extra user-defined sections // add any extra user-defined sections
this.sections.push(...Object.keys(userRpc).filter((k) => !this.sections.includes(k))); this.sections.push(...Object.keys(userRpc).filter((k) => !this.sections.includes(k)));
@@ -174,14 +189,14 @@ export class RpcCore {
} }
} }
private _memomize (creator: <T> (isScale: boolean) => (...values: unknown[]) => Observable<T>, def: DefinitionRpc): Memoized<RpcInterfaceMethod> { private _memomize (creator: <T> (isScale: boolean) => (...values: unknown[]) => Observable<T>, def: DefinitionRpc): MemoizedRpcInterfaceMethod {
const memoOpts = { getInstanceId: () => this.#instanceId }; const memoOpts = { getInstanceId: () => this.#instanceId };
const memoized = memoize(creator(true) as RpcInterfaceMethod, memoOpts); const memoized = memoize(creator(true) as RpcInterfaceMethod, memoOpts);
memoized.raw = memoize(creator(false), memoOpts); memoized.raw = memoize(creator(false), memoOpts);
memoized.meta = def; memoized.meta = def;
return memoized; return memoized as MemoizedRpcInterfaceMethod;
} }
private _formatResult <T> (isScale: boolean, registry: Registry, blockHash: string | Uint8Array | null | undefined, method: string, def: DefinitionRpc, params: Codec[], result: unknown): T { private _formatResult <T> (isScale: boolean, registry: Registry, blockHash: string | Uint8Array | null | undefined, method: string, def: DefinitionRpc, params: Codec[], result: unknown): T {
@@ -193,16 +208,22 @@ export class RpcCore {
private _createMethodSend (section: string, method: string, def: DefinitionRpc): RpcInterfaceMethod { private _createMethodSend (section: string, method: string, def: DefinitionRpc): RpcInterfaceMethod {
const rpcName = def.endpoint || `${section}_${method}`; const rpcName = def.endpoint || `${section}_${method}`;
const hashIndex = def.params.findIndex(({ isHistoric }) => isHistoric); const hashIndex = def.params.findIndex(({ isHistoric }) => isHistoric);
let memoized: null | Memoized<RpcInterfaceMethod> = null; let memoized: null | MemoizedRpcInterfaceMethod = null;
// execute the RPC call, doing a registry swap for historic as applicable // execute the RPC call, doing a registry swap for historic as applicable
const callWithRegistry = async <T> (isScale: boolean, values: unknown[]): Promise<T> => { const callWithRegistry = async <T> (isScale: boolean, values: unknown[]): Promise<T> => {
const blockHash = hashIndex === -1 const blockId = hashIndex === -1
? null ? null
: values[hashIndex] as (Uint8Array | string | null | undefined); : values[hashIndex];
const blockHash = blockId && def.params[hashIndex].type === 'BlockNumber'
? await this.#getBlockHash?.(blockId as AnyNumber)
: blockId as (Uint8Array | string | null | undefined);
const { registry } = isScale && blockHash && this.#getBlockRegistry const { registry } = isScale && blockHash && this.#getBlockRegistry
? await this.#getBlockRegistry(u8aToU8a(blockHash)) ? await this.#getBlockRegistry(u8aToU8a(blockHash))
: { registry: this.#registryDefault }; : { registry: this.#registryDefault };
const params = this._formatInputs(registry, null, def, values); const params = this._formatInputs(registry, null, def, values);
// only cache .at(<blockHash>) queries, e.g. where valid blockHash was supplied // only cache .at(<blockHash>) queries, e.g. where valid blockHash was supplied
@@ -229,7 +250,11 @@ export class RpcCore {
return (): void => { return (): void => {
// delete old results from cache // delete old results from cache
memoized?.unmemoize(...values); if (isScale) {
memoized?.unmemoize(...values);
} else {
memoized?.raw.unmemoize(...values);
}
}; };
}).pipe( }).pipe(
publishReplay(1), // create a Replay(1) publishReplay(1), // create a Replay(1)
@@ -262,7 +287,7 @@ export class RpcCore {
const subName = `${section}_${subMethod}`; const subName = `${section}_${subMethod}`;
const unsubName = `${section}_${unsubMethod}`; const unsubName = `${section}_${unsubMethod}`;
const subType = `${section}_${updateType}`; const subType = `${section}_${updateType}`;
let memoized: null | Memoized<RpcInterfaceMethod> = null; let memoized: null | MemoizedRpcInterfaceMethod = null;
const creator = <T> (isScale: boolean) => (...values: unknown[]): Observable<T> => { const creator = <T> (isScale: boolean) => (...values: unknown[]): Observable<T> => {
return new Observable((observer: Observer<T>): () => void => { return new Observable((observer: Observer<T>): () => void => {
@@ -302,7 +327,11 @@ export class RpcCore {
// Teardown logic // Teardown logic
return (): void => { return (): void => {
// Delete from cache, so old results don't hang around // Delete from cache, so old results don't hang around
memoized?.unmemoize(...values); if (isScale) {
memoized?.unmemoize(...values);
} else {
memoized?.raw.unmemoize(...values);
}
// Unsubscribe from provider // Unsubscribe from provider
subscriptionPromise subscriptionPromise
@@ -426,7 +455,10 @@ export class RpcCore {
return registry.createTypeUnsafe(type, [ return registry.createTypeUnsafe(type, [
isEmpty isEmpty
? meta.fallback ? meta.fallback
? hexToU8a(meta.fallback.toHex()) // For old-style Linkage, we add an empty linkage at the end
? type.includes('Linkage<')
? u8aConcat(hexToU8a(meta.fallback.toHex()), new Uint8Array(2))
: hexToU8a(meta.fallback.toHex())
: undefined : undefined
: meta.modifier.isOptional : meta.modifier.isOptional
? registry.createTypeUnsafe(type, [input], { blockHash, isPedantic: true }) ? registry.createTypeUnsafe(type, [input], { blockHash, isPedantic: true })
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '7.5.1' }; export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '8.5.1' };
+3 -1
View File
@@ -36,7 +36,9 @@ describe('replay', (): void => {
const observable = rpc.system.chain(); const observable = rpc.system.chain();
let a: any | undefined; let a: any | undefined;
observable.subscribe((value?: unknown): void => { a = value; }); observable.subscribe((value?: unknown): void => {
a = value;
});
setTimeout((): void => { setTimeout((): void => {
// Subscribe again to the same observable, it should fire value immediately // Subscribe again to the same observable, it should fire value immediately
+3 -1
View File
@@ -14,7 +14,9 @@ describe('drr', (): void => {
it('should not fire twice the same value', (done): void => { it('should not fire twice the same value', (done): void => {
let count = 0; let count = 0;
const sub = of(1, 1).pipe(drr({ delay: 500 })).subscribe((): void => { ++count; }); const sub = of(1, 1).pipe(drr({ delay: 500 })).subscribe((): void => {
++count;
});
setTimeout((): void => { setTimeout((): void => {
expect(count).toBe(1); expect(count).toBe(1);
+23 -2
View File
@@ -4,9 +4,9 @@ Generic transport providers to handle the transport of method calls to and from
## Provider Selection ## Provider Selection
There are two flavours of the providers provided, one allowing for using HTTP as a transport mechanism, the other using WebSockets. It is generally recommended to use the [[WsProvider]] since in addition to standard calls, it allows for subscriptions where all changes to state can be pushed from the node to the client. There are three flavours of the providers provided, one allowing for using HTTP as a transport mechanism, the other using WebSockets, and the third one uses substrate light-client through @substrate/connect. It is generally recommended to use the [[WsProvider]] since in addition to standard calls, it allows for subscriptions where all changes to state can be pushed from the node to the client.
Both providers are usable (as is the API), in both browser-based and Node.js environments. Polyfills for unsupported functionality are automatically applied based on feature-detection. All providers are usable (as is the API), in both browser-based and Node.js environments. Polyfills for unsupported functionality are automatically applied based on feature-detection.
## Usage ## Usage
@@ -39,3 +39,24 @@ const version = await provider.send('chain_getBlockHash', []);
console.log('latest block Hash', hash); console.log('latest block Hash', hash);
``` ```
@substrate/connect Initialization -
Instantiating a Provider for the Polkadot Relay Chain:
```javascript
import { ScProvider, WellKnownChain } from '@polkadot/rpc-provider/substrate-connect';
const provider = new ScProvider(WellKnownChain.polkadot);
await provider.connect();
const version = await provider.send('chain_getBlockHash', []);
```
Instantiating a Provider for a Polkadot parachain:
```javascript
import { ScProvider, WellKnownChain } from '@polkadot/rpc-provider/substrate-connect';
const polkadotProvider = new ScProvider(WellKnownChain.polkadot);
const parachainProvider = new ScProvider(parachainSpec, polkadotProvider);
await parachainProvider.connect();
const version = await parachainProvider.send('chain_getBlockHash', []);
```
+13 -12
View File
@@ -20,20 +20,21 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "7.5.1", "version": "8.5.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.16.7", "@babel/runtime": "^7.18.0",
"@polkadot/keyring": "^8.3.3", "@polkadot/keyring": "^9.2.1",
"@polkadot/types": "7.5.1", "@polkadot/types": "8.5.1",
"@polkadot/types-support": "7.5.1", "@polkadot/types-support": "8.5.1",
"@polkadot/util": "^8.3.3", "@polkadot/util": "^9.2.1",
"@polkadot/util-crypto": "^8.3.3", "@polkadot/util-crypto": "^9.2.1",
"@polkadot/x-fetch": "^8.3.3", "@polkadot/x-fetch": "^9.2.1",
"@polkadot/x-global": "^8.3.3", "@polkadot/x-global": "^9.2.1",
"@polkadot/x-ws": "^8.3.3", "@polkadot/x-ws": "^9.2.1",
"@substrate/connect": "0.7.5",
"eventemitter3": "^4.0.7", "eventemitter3": "^4.0.7",
"mock-socket": "^9.1.0", "mock-socket": "^9.1.3",
"nock": "^13.2.2" "nock": "^13.2.4"
} }
} }
+3
View File
@@ -4,3 +4,6 @@
export { HttpProvider } from './http'; export { HttpProvider } from './http';
export { packageInfo } from './packageInfo'; export { packageInfo } from './packageInfo';
export { WsProvider } from './ws'; export { WsProvider } from './ws';
// ESM-only, only export top-level when we have dual versions
// export { ScProvider } from './substrate-connect';
@@ -15,7 +15,7 @@ describe('decodeResponse', (): void => {
it('expects a non-empty input object', (): void => { it('expects a non-empty input object', (): void => {
expect( expect(
() => coder.decodeResponse(undefined as unknown as JsonRpcResponse) () => coder.decodeResponse(undefined as unknown as JsonRpcResponse)
).toThrow(/Empty response/); ).toThrow(/Invalid jsonrpc/);
}); });
it('expects a valid jsonrpc field', (): void => { it('expects a valid jsonrpc field', (): void => {
@@ -13,6 +13,6 @@ describe('encodeJson', (): void => {
it('encodes a valid JsonRPC JSON string', (): void => { it('encodes a valid JsonRPC JSON string', (): void => {
expect( expect(
coder.encodeJson('method', ['params']) coder.encodeJson('method', ['params'])
).toEqual('{"id":1,"jsonrpc":"2.0","method":"method","params":["params"]}'); ).toEqual([1, '{"id":1,"jsonrpc":"2.0","method":"method","params":["params"]}']);
}); });
}); });

Some files were not shown because too many files have changed in this diff Show More