Compare commits

...
97 Commits
Author SHA1 Message Date
github-actions[bot] 3887f6f836 [CI Skip] release/stable 10.1.1
skip-checks: true
2023-03-11 08:50:06 +00:00
Jaco fcdb31dc3c Bump metadata (#5534)
* Bump metadata

* Adjust with rebuild & runtime bumps

* Remove root babel deps

* 10.1.1
2023-03-11 10:30:55 +02:00
github-actions[bot] f4ee507a17 [CI Skip] bump/beta 10.0.2-8-x
skip-checks: true
2023-03-10 08:07:40 +00:00
Jaco 58881bc317 Bump dev deps (& swap to using build:before) (#5533) 2023-03-10 09:48:16 +02:00
github-actions[bot] 42d39a81e4 [CI Skip] bump/beta 10.0.2-7-x
skip-checks: true
2023-03-10 06:54:48 +00:00
Jaco f818e334eb Update GH actions (#5532) 2023-03-10 08:35:04 +02:00
github-actions[bot] e861a0a4eb [CI Skip] bump/beta 10.0.2-6-x
skip-checks: true
2023-03-09 18:30:18 +00:00
Jaco 611ff12a3d Align tsconfig to allow moduleResolution: nodenext (#5530)
* Align tsconfig to allow moduleResolution: nodenext

* Small adjustments (revert nodenext req. changes)

* Adjust for current compilation

* Read metadata compare from file

* Adjust

* Fix assertions
2023-03-09 20:10:53 +02:00
github-actions[bot] 9ac9d72082 [CI Skip] bump/beta 10.0.2-5-x
skip-checks: true
2023-03-09 17:35:35 +00:00
Jeeyong Um aa30b39525 Fix inaccessible yargs instance error (#5531) 2023-03-09 19:16:11 +02:00
github-actions[bot] 91161b95c3 [CI Skip] bump/beta 10.0.2-4-x
skip-checks: true
2023-03-09 10:38:39 +00:00
Jaco 9fe2798b70 Use .js imports in src (#5526)
* Use .js imports in src

* Adjust

* Fix imports

* Bump dev

* Adjust with .js imports for typegen

* Adjust

* Adjust

* Remove target override
2023-03-09 12:19:12 +02:00
github-actions[bot] f233671c27 [CI Skip] bump/beta 10.0.2-3-x
skip-checks: true
2023-03-07 08:57:48 +00:00
Jaco 29244d211b Adjust BeefyApi to latest (#5523)
* Adjust BeefyApi to latest

* Rebuild
2023-03-07 10:38:25 +02:00
github-actions[bot] 73b226b30b [CI Skip] bump/beta 10.0.2-2-x
skip-checks: true
2023-03-07 07:09:01 +00:00
Jaco 97c7625557 Align runtime APIs with latest Substrate (#5521) 2023-03-07 08:49:10 +02:00
github-actions[bot] 0e96488024 [CI Skip] bump/beta 10.0.2-1-x
skip-checks: true
2023-03-06 12:47:31 +00:00
Jaco baf681e98d Bump dev deps (#5520) 2023-03-06 14:28:28 +02:00
github-actions[bot] 32c9580bfc [CI Skip] bump/beta 10.0.2-0-x
skip-checks: true
2023-03-05 12:20:02 +00:00
Jaco aa09601e88 jg-rm-babel-config (#5519) 2023-03-05 13:57:21 +02:00
github-actions[bot] b9805cdc94 [CI Skip] release/stable 10.0.1
skip-checks: true
2023-03-05 08:50:27 +00:00
Jaco feb36d43a4 10.0.1 (#5518)
* 10.0.1

* Drop extra websocket dep

* Drop extra babel deps
2023-03-05 10:30:54 +02:00
github-actions[bot] 92c88d7c13 [CI Skip] bump/beta 9.14.3-11-x
skip-checks: true
2023-03-04 15:33:05 +00:00
Jaco 033fc4f480 Adjust x-ws usage (#5511) 2023-03-04 17:13:41 +02:00
Jaco 4ca9670e4e Bump deps (#5517)
* Bump deps

* Bump dev
2023-03-04 16:52:54 +02:00
github-actions[bot] 8fee66c0fa [CI Skip] bump/beta 9.14.3-10-x
skip-checks: true
2023-03-03 11:01:16 +00:00
Jaco 9a3b5d7a2c Ensure that provider disconnect clears all subscriptions (#5516)
* Ensure that provider disconnect clears all subscriptions

* Update CHANGELOG
2023-03-03 12:53:08 +02:00
github-actions[bot] f166431b02 [CI Skip] bump/beta 9.14.3-9-x
skip-checks: true
2023-03-03 09:32:25 +00:00
Jaco 088fdc6171 Bump dev & update gh workflows (#5515) 2023-03-03 11:24:27 +02:00
github-actions[bot] 910c77fd39 [CI Skip] bump/beta 9.14.3-8-x
skip-checks: true
2023-03-03 06:32:46 +00:00
Julien dacf2875b7 General WsProvider extensibility improvements (#5467)
* Make endpoints index selection extensible

* Expose endpoint

* Ensure events happen last

* Added endpoint stats
2023-03-03 08:23:25 +02:00
github-actions[bot] cbcc79972a [CI Skip] bump/beta 9.14.3-7-x
skip-checks: true
2023-03-01 11:24:48 +00:00
Jaco 0faddf1df6 Remove done callback usage from it(...) (#5514)
* Remove done callback usage from it(...)

* Bump deps

* continue-on-error: true
2023-03-01 13:13:38 +02:00
github-actions[bot] 697c8b8e7a [CI Skip] bump/beta 9.14.3-6-x
skip-checks: true
2023-02-28 09:01:36 +00:00
Jaco 99403b8246 Adjust loading of user-specified metadata (#5513) 2023-02-28 10:53:37 +02:00
github-actions[bot] 4b7e1003e0 [CI Skip] bump/beta 9.14.3-5-x
skip-checks: true
2023-02-27 15:02:40 +00:00
Jaco 5fd6d39aed Replace require(...) with import(...) in typegen (#5495)
* Replace require(...) with import(...) in typegen

* Update metadata

* Adjust & actual run

* Bump API

* Rebuild

* Bump build
2023-02-27 16:54:06 +02:00
github-actions[bot] cedb1afe6f [CI Skip] bump/beta 9.14.3-4-x
skip-checks: true
2023-02-27 09:48:05 +00:00
Jaco 4bff8e5158 Bump dev deps (#5510)
* Bump dev deps

* Bump dev
2023-02-27 11:39:47 +02:00
github-actions[bot] 474aedde34 [CI Skip] bump/beta 9.14.3-3-x
skip-checks: true
2023-02-25 09:56:39 +00:00
Jaco a8d7566186 Adjust tests for node:test env (#5509) 2023-02-25 11:48:26 +02:00
github-actions[bot] beb7b54e4a [CI Skip] bump/beta 9.14.3-2-x
skip-checks: true
2023-02-24 15:56:28 +00:00
Andreea Eftene d08cc74aad add type overrides (#5506) 2023-02-24 17:46:07 +02:00
github-actions[bot] 27e4279c55 [CI Skip] bump/beta 9.14.3-1-x
skip-checks: true
2023-02-22 07:26:08 +00:00
Jaco 6cd2f3b386 Bump deps (#5505)
* Bump deps

* Bump dev
2023-02-22 09:14:43 +02:00
github-actions[bot] 472c971c5b [CI Skip] bump/beta 9.14.3-0-x
skip-checks: true
2023-02-20 15:45:24 +00:00
Jaco d8756455c2 Bump dev deps (#5502) 2023-02-20 17:37:11 +02:00
github-actions[bot] 5aae48cc28 [CI Skip] release/stable 9.14.2
skip-checks: true
2023-02-19 11:19:41 +00:00
Jaco 4ab3b55383 9.14.2 (#5500) 2023-02-19 13:10:43 +02:00
github-actions[bot] 6ea6b90e03 [CI Skip] bump/beta 9.14.2-8-x
skip-checks: true
2023-02-19 10:45:23 +00:00
Jaco eb5c888cb8 Update metadata (#5499)
* Updata metadata

* Rebuild

* Adjust generation
2023-02-19 12:36:41 +02:00
github-actions[bot] cda07dfa0b [CI Skip] bump/beta 9.14.2-7-x
skip-checks: true
2023-02-18 10:50:26 +00:00
Jaco 4abae3200b Remove extraneous jest.mock usage (unused, no impact) (#5498) 2023-02-18 12:42:11 +02:00
github-actions[bot] b60895beb4 [CI Skip] bump/beta 9.14.2-6-x
skip-checks: true
2023-02-18 07:58:29 +00:00
Jaco 855d70a3b3 Remove __dirname usage in typegen (#5496) 2023-02-18 09:48:07 +02:00
github-actions[bot] 583d9bfe36 [CI Skip] bump/beta 9.14.2-5-x
skip-checks: true
2023-02-17 18:30:43 +00:00
Jaco d519611a25 Adjust test expectations (#5494) 2023-02-17 20:22:12 +02:00
github-actions[bot] 9a9bace8e8 [CI Skip] bump/beta 9.14.2-4-x
skip-checks: true
2023-02-17 10:08:40 +00:00
Jaco 40810f2fdb Cleanup tests (& fix ws.connect()) (#5493)
* Cleanup tests (& fix ws.connect())

* Await mock

* Adjust sc connect ordering
2023-02-17 11:57:34 +02:00
github-actions[bot] 361a77580e [CI Skip] bump/beta 9.14.2-3-x
skip-checks: true
2023-02-17 06:29:52 +00:00
Jaco ea45c7e689 Remove __dirname usages in tests (#5492) 2023-02-17 08:20:29 +02:00
github-actions[bot] cc1d51a6ca [CI Skip] bump/beta 9.14.2-2-x
skip-checks: true
2023-02-16 19:18:36 +00:00
Jaco b8233fb7b8 Adjust test expectations (#5490) 2023-02-16 21:10:17 +02:00
github-actions[bot] 5cbe80066d [CI Skip] bump/beta 9.14.2-1-x
skip-checks: true
2023-02-15 10:07:50 +00:00
Jaco 3f6c10256c Bump deps (#5486) 2023-02-15 11:56:46 +02:00
github-actions[bot] 609b2830b0 [CI Skip] bump/beta 9.14.2-0-x
skip-checks: true
2023-02-15 07:26:32 +00:00
Jaco b7bbd2d615 Fix CI release workflow (#5485) 2023-02-15 09:16:35 +02:00
Jaco 41d6429782 Use latest LTS for CI scripts (#5482) 2023-02-14 10:49:33 +02:00
github-actions[bot] ae168a00a9 [CI Skip] release/stable 9.14.1
skip-checks: true
2023-02-12 13:31:21 +00:00
Jaco 79694d8a95 9.14.1 (#5481)
* 9.14.1

* Rebuild metadata
2023-02-12 15:22:48 +02:00
github-actions[bot] 95be64cbd7 [CI Skip] bump/beta 9.13.7-1-x
skip-checks: true
2023-02-07 12:26:53 +00:00
Jaco 76bf7a0079 Alias for Runtime{Call, Event} types (#5477)
* Alias for Runtime{Call, Event} types

* CHANGELOG
2023-02-07 14:17:29 +02:00
github-actions[bot] 142390f27d [CI Skip] bump/beta 9.13.7-0-x
skip-checks: true
2023-02-05 12:18:54 +00:00
Jaco d0145ce58c Bump dev (#5476) 2023-02-05 14:10:25 +02:00
github-actions[bot] 9217f83870 [CI Skip] release/stable 9.13.6
skip-checks: true
2023-02-05 11:35:16 +00:00
Jaco cf261724c3 9.13.6 (#5475) 2023-02-05 13:26:52 +02:00
github-actions[bot] 375afb5dff [CI Skip] bump/beta 9.13.6-5-x
skip-checks: true
2023-02-05 08:08:53 +00:00
Jaco 9e5779644c Bump dev (#5474) 2023-02-05 09:57:56 +02:00
github-actions[bot] a6a92837e4 [CI Skip] bump/beta 9.13.6-4-x
skip-checks: true
2023-02-04 15:40:31 +00:00
Aleš Ferlan d84f40dd77 fix: use H160 for address in getTransactionCount (#5472) 2023-02-04 17:31:53 +02:00
github-actions[bot] 5183c28d5e [CI Skip] bump/beta 9.13.6-3-x
skip-checks: true
2023-02-03 22:30:29 +00:00
Jaco 5ed3ea51d3 Add script to retrieve local meta/rpc/version (#5471)
* Add script to retrieve local meta/rpc/version

* Filter _unknown_

* Cleanup

* Additional
2023-02-04 00:22:36 +02:00
github-actions[bot] 39d76c969d [CI Skip] bump/beta 9.13.6-2-x
skip-checks: true
2023-02-03 13:08:35 +00:00
Jaco 5cf4c4edbe Overrides for deployed Weight 1.5 chains (#5469) 2023-02-03 15:00:46 +02:00
github-actions[bot] f6c376a3e7 [CI Skip] bump/beta 9.13.6-1-x
skip-checks: true
2023-02-03 08:58:09 +00:00
Jaco d9a2265b0f Bump deps (incl. TS) (#5468) 2023-02-03 10:48:46 +02:00
github-actions[bot] 0c1b1c48f2 [CI Skip] bump/beta 9.13.6-0-x
skip-checks: true
2023-02-02 11:11:44 +00:00
Jaco 7c24998e28 Adjust PortableRegistry aliases (w/o any Weight) (#5466) 2023-02-02 13:03:48 +02:00
github-actions[bot] bf442a4bd4 [CI Skip] release/stable 9.13.5
skip-checks: true
2023-02-02 09:52:22 +00:00
Jaco 40f432badb Adjust for aliasses for Weight 1.5 (#5465)
* Adjust for aliasses for Weight 1.5

* 9.13.5
2023-02-02 11:43:24 +02:00
github-actions[bot] 15a8681ba0 [CI Skip] release/stable 9.13.4
skip-checks: true
2023-02-01 07:48:32 +00:00
Jaco 61ed6e97f4 9.13.4 (#5463) 2023-02-01 09:37:31 +02:00
github-actions[bot] eee4bf51d6 [CI Skip] release/stable 9.13.3
skip-checks: true
2023-02-01 06:28:13 +00:00
Jaco b9cbb9e2e8 Adjust Weight alias for WeightV0 injection (#5462)
* Adjust Weight alias for WeightV0 injection

* 9.13.3
2023-02-01 08:20:06 +02:00
github-actions[bot] ed426108f2 [CI Skip] release/stable 9.13.2
skip-checks: true
2023-01-29 07:25:40 +00:00
Jaco c168615305 Allow null as valid param to Int/UInt (#5458) 2023-01-29 09:17:21 +02:00
Jaco 680ae0222a Bump eventemitter 3 (#5457) 2023-01-29 09:14:57 +02:00
899 changed files with 23820 additions and 23635 deletions
+2 -1
View File
@@ -6,7 +6,8 @@ const base = require('@polkadot/dev/config/eslint.cjs');
module.exports = { module.exports = {
...base, ...base,
ignorePatterns: [ ignorePatterns: [
...base.ignorePatterns ...base.ignorePatterns,
'/scripts'
], ],
parserOptions: { parserOptions: {
...base.parserOptions, ...base.parserOptions,
+1 -1
View File
@@ -10,7 +10,7 @@ jobs:
steps: steps:
- uses: jacogr/action-merge@d2d64b4545acd93b0a9575177d3d215ae3f92029 - uses: jacogr/action-merge@d2d64b4545acd93b0a9575177d3d215ae3f92029
with: with:
checks: build,lint,test checks: pr (build),pr (lint),pr (test)
labels: -auto labels: -auto
strategy: squash strategy: squash
token: ${{ secrets.GH_PAT_BOT }} token: ${{ secrets.GH_PAT_BOT }}
+1 -1
View File
@@ -10,7 +10,7 @@ jobs:
env: env:
YARN_ENABLE_SCRIPTS: false YARN_ENABLE_SCRIPTS: false
steps: steps:
- uses: dessant/lock-threads@f1a42f0f44eb83361d617a014663e1a76cf282d2 - uses: dessant/lock-threads@c1b35aecc5cdb1a34539d14196df55838bb2f836
with: with:
github-token: ${{ secrets.GH_PAT_BOT }} github-token: ${{ secrets.GH_PAT_BOT }}
issue-lock-inactive-days: '7' issue-lock-inactive-days: '7'
+6 -3
View File
@@ -3,16 +3,19 @@ on: [pull_request]
jobs: jobs:
pr: pr:
continue-on-error: true
strategy: strategy:
matrix: matrix:
step: ['lint', 'test', 'build', 'deno'] step: ['lint', 'test', 'build', 'deno']
name: ${{ matrix.step }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
YARN_ENABLE_SCRIPTS: false YARN_ENABLE_SCRIPTS: false
steps: steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - uses: actions/checkout@v3
- uses: denoland/setup-deno@004814556e37c54a2f6e31384c9e18e983317366 - uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- uses: denoland/setup-deno@v1
with: with:
deno-version: vx.x.x deno-version: vx.x.x
- name: ${{ matrix.step }} - name: ${{ matrix.step }}
+4 -2
View File
@@ -10,7 +10,6 @@ jobs:
strategy: strategy:
matrix: matrix:
step: ['build:release'] step: ['build:release']
name: ${{ matrix.step }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
YARN_ENABLE_SCRIPTS: false YARN_ENABLE_SCRIPTS: false
@@ -19,10 +18,13 @@ jobs:
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT_BOT }} GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT_BOT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps: steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
token: ${{ secrets.GH_PAT_BOT }} token: ${{ secrets.GH_PAT_BOT }}
- uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- name: ${{ matrix.step }} - name: ${{ matrix.step }}
run: | run: |
yarn install --immutable | grep -v 'YN0013' yarn install --immutable | grep -v 'YN0013'
+3 -3
View File
@@ -9,11 +9,11 @@ jobs:
env: env:
YARN_ENABLE_SCRIPTS: false YARN_ENABLE_SCRIPTS: false
steps: steps:
- uses: actions/stale@98ed4cb500039dbcccf4bd9bedada4d0187f2757 - uses: actions/stale@v7
with: with:
repo-token: ${{ secrets.GH_PAT_BOT }} repo-token: ${{ secrets.GH_PAT_BOT }}
stale-issue-message: 'This issue has been open for 21 days with no activity and is not labelled as an enhancement. It will be closed in 7 days.' stale-issue-message: 'This issue has been open for 365 days with no activity and is not labelled as an enhancement. It will be closed in 7 days.'
stale-issue-label: 'stale' stale-issue-label: 'stale'
exempt-issue-labels: '-size-l,-size-m,-size-s,-size-xl,-size-xs,[bug]' exempt-issue-labels: '-size-l,-size-m,-size-s,-size-xl,-size-xs,[bug]'
days-before-stale: 21 days-before-stale: 365
days-before-close: 7 days-before-close: 7
+87
View File
@@ -1,5 +1,92 @@
# CHANGELOG # CHANGELOG
## 10.1.1 Mar 11, 2023
Contributed:
- Fix yargs usage inside ESM modules (Thanks to https://github.com/conr2d)
Changes:
- Align runtime APIs with latest Substrate
- Update to latest Polkadot, Kusama & Substrate metadata
- Use consistent `.js` imports in source files (TS moduleResolution)
## 10.0.1 Mar 4, 2023
Contributed:
- Expose per-endpoint stats for providers (Thanks to https://github.com/jeluard)
- Adjust ink! primitive extraction for v4 (Thanks to https://github.com/statictype)
Changes:
- Ensure that provider disconnect clears all subscriptions
- Adjust typegen to internally use `import()` (catering for ESM provided types)
- Swap TS -> JS compiler to use tsc (from babel)
- Adjust all tests to use `node:test` runner (ESM variants)
- Update to latest Polkadot, Kusama & Substrate metadata
## 9.14.2 Feb 19, 2023
Changes:
- Don't allow `WsProvider.connect()` on an open connection (creates resource leaks)
- Adjust typegen to use metadata-defined aliases in query return decoration
- Update to latest Polkadot, Kusama & Substrate metadata
## 9.14.1 Feb 12, 2023
Changes:
- Extract aliases for `*_runtime::Runtime{Call, Event}` from metadata
- Update to latest Polkadot, Kusama & Substrate metadata
## 9.13.6 Feb 5, 2023
Contributed:
- Align `eth_getTransactionCount` with frontier (Thanks to https://github.com/alko89)
Changes:
- Additional override for `Compact<{ refTime: u64 }>` chains
- Add script to retrieve local rpc, version & metadata for typegen
## 9.13.5 Feb 2, 2023
Changes:
- Adjust `Weight` alias for 1.5 chains
- Ensure correct registry is pass through for runtime TS generation
## 9.13.4 Feb 1, 2023
Changes:
- None from 9.13.3 (The previous version had npm registry publishing issues)
## 9.13.3 Feb 1, 2023
Changes:
- Adjust `Weight` alias detection to cater for `WeightV0/u32` overrides (e.g. early Kusama blocks)
## 9.13.2 Jan 29, 2023
Changes:
- Allow null as valid param to Int/UInt
## 9.13.1 Jan 29, 2023 ## 9.13.1 Jan 29, 2023
Contributed: Contributed:
+5 -3
View File
@@ -1,4 +1,4 @@
3349 Jaco 9.13.1 (#5456) 3395 Jaco Bump metadata (#5534)
83 Amaury Martiny StatementKind: Regular and Saft (#2303) 83 Amaury Martiny StatementKind: Regular and Saft (#2303)
37 Keith Ingram Update contract types and rpc (#4541) 37 Keith Ingram Update contract types and rpc (#4541)
35 Stefanie Doll Updated child storage parameters (#1709) 35 Stefanie Doll Updated child storage parameters (#1709)
@@ -10,16 +10,16 @@
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954) 10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
5 Chevdor Fix metadata package link (#3458) 5 Chevdor Fix metadata package link (#3458)
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250) 5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
5 Julien Eluard General WsProvider extensibility improvements (#5467)
4 Alex D Use derive customAccount and customLocks for balance overrides (#3248) 4 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
4 Alex Wang fix issue that creates duplicate providers (#983) 4 Alex Wang fix issue that creates duplicate providers (#983)
4 Alexander Popiak Add asset id in signing (#4009) 4 Alexander Popiak Add asset id in signing (#4009)
4 Andreea Eftene add type overrides (#5506)
4 Joshy Orndorff spelling; efect -> effect (#2295) 4 Joshy Orndorff spelling; efect -> effect (#2295)
4 Julien Eluard Clarified WsProvider constructor parameters documentation (#5404)
4 Nantian fix bigint type (#3869) 4 Nantian fix bigint type (#3869)
4 Scott Twiname Add support for historical BlockNumber rpc methods (#4574) 4 Scott Twiname Add support for historical BlockNumber rpc methods (#4574)
4 Thibaut Sardan no subscription for http (#3127) 4 Thibaut Sardan no subscription for http (#3127)
3 André Silva add support for ValidationCodeHash (#3640) 3 André Silva add support for ValidationCodeHash (#3640)
3 Andreea Eftene Fix code source type (#5236)
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)
@@ -46,6 +46,7 @@
2 Zannis Kalampoukis fix: Typegen handles structs and vectors of structs without erroring (#4743) 2 Zannis Kalampoukis fix: Typegen handles structs and vectors of structs without erroring (#4743)
2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594) 2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594)
1 Alan Sapede Adds Eth feeHistory & maxPriorityFeePerGas rpc (#4956) 1 Alan Sapede Adds Eth feeHistory & maxPriorityFeePerGas rpc (#4956)
1 Aleš Ferlan fix: use H160 for address in getTransactionCount (#5472)
1 Brad Larson [NEW] Support for custom headers with providers (#2423) 1 Brad Larson [NEW] Support for custom headers with providers (#2423)
1 Btwiuse Arch Add side effect check workaround (#4994) (#5009) 1 Btwiuse Arch Add side effect check workaround (#4994) (#5009)
1 chriswmercer little readme tweak (#279) 1 chriswmercer little readme tweak (#279)
@@ -69,6 +70,7 @@
1 Hyungsuk Kang Update fees.ts (#1014) 1 Hyungsuk Kang Update fees.ts (#1014)
1 icodezjb Update SessionKeys (#3035) 1 icodezjb Update SessionKeys (#3035)
1 iiiiiiii Make unknownTypes externally accessible (#3263) 1 iiiiiiii Make unknownTypes externally accessible (#3263)
1 Jeeyong Um Fix inaccessible yargs instance error (#5531)
1 JesseAbram added 07 Example showing how to make a transfer with allowed block permissions folder in docs (#1062) 1 JesseAbram added 07 Example showing how to make a transfer with allowed block permissions folder in docs (#1062)
1 Joey don't throw error at `onSocketClose` (#4363) 1 Joey don't throw error at `onSocketClose` (#4363)
1 Jordan Allow typegen for custom RPCs (#2876) 1 Jordan Allow typegen for custom RPCs (#2876)
-4
View File
@@ -1,4 +0,0 @@
// Copyright 2017-2023 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
module.exports = require('@polkadot/dev/config/babel-config-cjs.cjs');
-19
View File
@@ -1,19 +0,0 @@
// Copyright 2017-2023 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
const config = require('@polkadot/dev/config/jest.cjs');
module.exports = {
...config,
moduleNameMapper: {
'@polkadot/api-(augment|base|contract|derive)(.*)$': '<rootDir>/packages/api-$1/src/$2',
// eslint-disable-next-line sort-keys
'@polkadot/api(.*)$': '<rootDir>/packages/api/src/$1',
'@polkadot/rpc-(augment|core|provider)(.*)$': '<rootDir>/packages/rpc-$1/src/$2',
'@polkadot/typegen(.*)$': '<rootDir>/packages/typegen/src/$1',
'@polkadot/types-(augment|codec|create|known|support)(.*)$': '<rootDir>/packages/types-$1/src/$2',
// eslint-disable-next-line sort-keys
'@polkadot/types(.*)$': '<rootDir>/packages/types/src/$1'
},
testTimeout: 30000
};
+13 -16
View File
@@ -11,40 +11,37 @@
}, },
"sideEffects": false, "sideEffects": false,
"type": "module", "type": "module",
"version": "9.13.1", "version": "10.1.1",
"versions": { "versions": {
"git": "9.13.1", "git": "10.1.1",
"npm": "9.13.1" "npm": "10.1.1"
}, },
"workspaces": [ "workspaces": [
"packages/*" "packages/*"
], ],
"scripts": { "scripts": {
"build": "yarn build:interfaces && polkadot-dev-build-ts", "build": "yarn build:interfaces && polkadot-dev-build-ts",
"build:extra": "(cd packages/typegen && copyfiles scripts/* build)", "build:before": "(cd packages/typegen && polkadot-dev-copy-dir scripts build/scripts)",
"build:interfaces": "polkadot-types-internal-interfaces", "build:interfaces": "node --loader @polkadot/dev/node/ts packages/typegen/scripts/polkadot-types-internal-interfaces.mjs",
"build:metadata": "yarn build:interfaces && yarn test:one packages/types/src/metadata/v14", "build:metadata": "yarn build:interfaces && polkadot-dev-run-test packages/types/src/metadata/v14",
"build:release": "polkadot-ci-ghact-build", "build:release": "polkadot-ci-ghact-build",
"build:rollup": "polkadot-exec-rollup --config", "build:rollup": "polkadot-exec-rollup --config",
"build:upgrades": "yarn test:one packages/types-known/src/upgrades/e2e", "build:upgrades": "polkadot-dev-run-test upgrades/e2e",
"chain:info": "polkadot-types-chain-info", "chain:info": "polkadot-types-chain-info",
"clean": "polkadot-dev-clean-build", "clean": "polkadot-dev-clean-build",
"deno": "yarn polkadot-dev-deno-map && yarn build && deno check --import-map=import_map.json mod.ts", "deno": "yarn polkadot-dev-deno-map && yarn build && deno check --import-map=import_map.json mod.ts",
"lint": "polkadot-dev-run-lint", "lint": "polkadot-dev-run-lint",
"postinstall": "polkadot-dev-yarn-only", "postinstall": "polkadot-dev-yarn-only",
"test": "NODE_OPTIONS=--experimental-vm-modules polkadot-dev-run-test --coverage --forceExit --runInBand --testPathIgnorePatterns e2e", "test": "polkadot-dev-run-test --env node ^e2e",
"test:one": "NODE_OPTIONS=--experimental-vm-modules polkadot-dev-run-test --detectOpenHandles --forceExit" "test:node": "polkadot-dev-run-test --env node ^e2e",
"test:one": "polkadot-dev-run-test --env node"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.20.12", "@polkadot/dev": "^0.71.4",
"@babel/register": "^7.18.9",
"@babel/runtime": "^7.20.13",
"@polkadot/dev": "^0.68.2",
"@polkadot/typegen": "workspace:packages/typegen", "@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^29.4.0", "@types/node": "^18.15.0"
"copyfiles": "^2.4.1"
}, },
"resolutions": { "resolutions": {
"typescript": "^4.9.4" "typescript": "^4.9.5"
} }
} }
+8 -8
View File
@@ -20,15 +20,15 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "9.13.1", "version": "10.1.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.20.13", "@polkadot/api-base": "10.1.1",
"@polkadot/api-base": "9.13.1", "@polkadot/rpc-augment": "10.1.1",
"@polkadot/rpc-augment": "9.13.1", "@polkadot/types": "10.1.1",
"@polkadot/types": "9.13.1", "@polkadot/types-augment": "10.1.1",
"@polkadot/types-augment": "9.13.1", "@polkadot/types-codec": "10.1.1",
"@polkadot/types-codec": "9.13.1", "@polkadot/util": "^11.0.2",
"@polkadot/util": "^10.3.1" "tslib": "^2.5.0"
} }
} }
+2 -2
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2023 @polkadot/api-augment authors & contributors // Copyright 2017-2023 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import './substrate'; import './substrate/index.js';
export { packageInfo } from './packageInfo'; export { packageInfo } from './packageInfo.js';
+2 -2
View File
@@ -5,7 +5,7 @@
import { detectPackage } from '@polkadot/util'; import { detectPackage } from '@polkadot/util';
import others from './detectOther'; import others from './detectOther.js';
import { packageInfo } from './packageInfo'; import { packageInfo } from './packageInfo.js';
detectPackage(packageInfo, null, others); detectPackage(packageInfo, null, others);
+2 -2
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2023 @polkadot/api-augment authors & contributors // Copyright 2017-2023 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import './detectPackage'; import './detectPackage.js';
export * from './bundle'; export * from './bundle.js';
+23 -16
View File
@@ -33,18 +33,6 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
authorship: {
/**
* The number of blocks back we should accept uncles.
* This means that we will deal with uncle-parents that are
* `UncleGenerations + 1` before `now`.
**/
uncleGenerations: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
babe: { babe: {
/** /**
* The amount of time, in slots, that each epoch should last. * The amount of time, in slots, that each epoch should last.
@@ -399,6 +387,15 @@ declare module '@polkadot/api-base/types/consts' {
* Max Authorities in use * Max Authorities in use
**/ **/
maxAuthorities: u32 & AugmentedConst<ApiType>; maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of entries to keep in the set id to session index mapping.
*
* Since the `SetIdSession` map is only used for validating equivocations this
* value should relate to the bonding duration of whatever staking system is
* being used (if any). If equivocation handling is not enabled then this value
* can be zero.
**/
maxSetIdSessionEntries: u64 & AugmentedConst<ApiType>;
/** /**
* Generic const * Generic const
**/ **/
@@ -620,18 +617,28 @@ declare module '@polkadot/api-base/types/consts' {
/** /**
* The maximum number of candidates in a phragmen election. * The maximum number of candidates in a phragmen election.
* *
* Warning: The election happens onchain, and this value will determine * Warning: This impacts the size of the election which is run onchain. Chose wisely, and
* the size of the election. When this limit is reached no more * consider how it will impact `T::WeightInfo::election_phragmen`.
* candidates are accepted in the election. *
* When this limit is reached no more candidates are accepted in the election.
**/ **/
maxCandidates: u32 & AugmentedConst<ApiType>; maxCandidates: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum number of voters to allow in a phragmen election. * The maximum number of voters to allow in a phragmen election.
* *
* Warning: This impacts the size of the election which is run onchain. * Warning: This impacts the size of the election which is run onchain. Chose wisely, and
* consider how it will impact `T::WeightInfo::election_phragmen`.
*
* When the limit is reached the new voters are ignored. * When the limit is reached the new voters are ignored.
**/ **/
maxVoters: u32 & AugmentedConst<ApiType>; maxVoters: u32 & AugmentedConst<ApiType>;
/**
* Maximum numbers of votes per voter.
*
* Warning: This impacts the size of the election which is run onchain. Chose wisely, and
* consider how it will impact `T::WeightInfo::election_phragmen`.
**/
maxVotesPerVoter: u32 & AugmentedConst<ApiType>;
/** /**
* Identifier for the elections-phragmen pallet's lock * Identifier for the elections-phragmen pallet's lock
**/ **/
+25 -35
View File
@@ -45,40 +45,6 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
authorship: {
/**
* The uncle is genesis.
**/
GenesisUncle: AugmentedError<ApiType>;
/**
* The uncle parent not in the chain.
**/
InvalidUncleParent: AugmentedError<ApiType>;
/**
* The uncle isn't recent enough to be included.
**/
OldUncle: AugmentedError<ApiType>;
/**
* The uncle is too high in chain.
**/
TooHighUncle: AugmentedError<ApiType>;
/**
* Too many uncles.
**/
TooManyUncles: AugmentedError<ApiType>;
/**
* The uncle is already included.
**/
UncleAlreadyIncluded: AugmentedError<ApiType>;
/**
* Uncles already set in the block.
**/
UnclesAlreadySet: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
babe: { babe: {
/** /**
* A given equivocation report is valid but already previously reported. * A given equivocation report is valid but already previously reported.
@@ -509,6 +475,10 @@ declare module '@polkadot/api-base/types/errors' {
* The given account did not vote on the referendum. * The given account did not vote on the referendum.
**/ **/
NotVoter: AugmentedError<ApiType>; NotVoter: AugmentedError<ApiType>;
/**
* The preimage does not exist.
**/
PreimageNotExist: AugmentedError<ApiType>;
/** /**
* Proposal still blacklisted * Proposal still blacklisted
**/ **/
@@ -724,6 +694,10 @@ declare module '@polkadot/api-base/types/errors' {
* No track exists for the proposal origin. * No track exists for the proposal origin.
**/ **/
NoTrack: AugmentedError<ApiType>; NoTrack: AugmentedError<ApiType>;
/**
* The preimage does not exist.
**/
PreimageNotExist: AugmentedError<ApiType>;
/** /**
* The queue of the track is empty. * The queue of the track is empty.
**/ **/
@@ -1146,6 +1120,10 @@ declare module '@polkadot/api-base/types/errors' {
* pool at a time. * pool at a time.
**/ **/
AccountBelongsToOtherPool: AugmentedError<ApiType>; AccountBelongsToOtherPool: AugmentedError<ApiType>;
/**
* Bonding extra is restricted to the exact pending reward amount.
**/
BondExtraRestricted: AugmentedError<ApiType>;
/** /**
* The pools state cannot be changed. * The pools state cannot be changed.
**/ **/
@@ -1478,12 +1456,20 @@ declare module '@polkadot/api-base/types/errors' {
* Invalid signature on statement. * Invalid signature on statement.
**/ **/
InvalidSignature: AugmentedError<ApiType>; InvalidSignature: AugmentedError<ApiType>;
/**
* A dispute vote from a malicious backer.
**/
MaliciousBacker: AugmentedError<ApiType>;
/**
* No backing votes were provides along dispute statements.
**/
MissingBackingVotes: AugmentedError<ApiType>;
/** /**
* A dispute where there are only votes on one side. * A dispute where there are only votes on one side.
**/ **/
SingleSidedDispute: AugmentedError<ApiType>; SingleSidedDispute: AugmentedError<ApiType>;
/** /**
* Unconfirmed dispute statement sets provided * Unconfirmed dispute statement sets provided.
**/ **/
UnconfirmedDispute: AugmentedError<ApiType>; UnconfirmedDispute: AugmentedError<ApiType>;
/** /**
@@ -1748,6 +1734,10 @@ declare module '@polkadot/api-base/types/errors' {
* No track exists for the proposal origin. * No track exists for the proposal origin.
**/ **/
NoTrack: AugmentedError<ApiType>; NoTrack: AugmentedError<ApiType>;
/**
* The preimage does not exist.
**/
PreimageNotExist: AugmentedError<ApiType>;
/** /**
* The queue of the track is empty. * The queue of the track is empty.
**/ **/
+35 -3
View File
@@ -10,7 +10,7 @@ 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, Perbill, Perquintill } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, H256, Perbill, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, KusamaRuntimeProxyType, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, SpFinalityGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3MultiassetMultiAssets, XcmV3Response, XcmV3TraitsError, XcmV3TraitsOutcome, XcmV3Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup'; import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, KusamaRuntimeProxyType, PalletConvictionVotingTally, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3MultiassetMultiAssets, XcmV3Response, XcmV3TraitsError, XcmV3TraitsOutcome, XcmV3Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>; export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
@@ -281,6 +281,18 @@ declare module '@polkadot/api-base/types/events' {
* An external proposal has been tabled. * An external proposal has been tabled.
**/ **/
ExternalTabled: AugmentedEvent<ApiType, []>; ExternalTabled: AugmentedEvent<ApiType, []>;
/**
* Metadata for a proposal or a referendum has been cleared.
**/
MetadataCleared: AugmentedEvent<ApiType, [owner: PalletDemocracyMetadataOwner, hash_: H256], { owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
/**
* Metadata for a proposal or a referendum has been set.
**/
MetadataSet: AugmentedEvent<ApiType, [owner: PalletDemocracyMetadataOwner, hash_: H256], { owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
/**
* Metadata has been transferred to new owner.
**/
MetadataTransferred: AugmentedEvent<ApiType, [prevOwner: PalletDemocracyMetadataOwner, owner: PalletDemocracyMetadataOwner, hash_: H256], { prevOwner: PalletDemocracyMetadataOwner, owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
/** /**
* A proposal has been rejected by referendum. * A proposal has been rejected by referendum.
**/ **/
@@ -451,6 +463,14 @@ declare module '@polkadot/api-base/types/events' {
* A referendum has been killed. * A referendum has been killed.
**/ **/
Killed: AugmentedEvent<ApiType, [index: u32, tally: PalletRankedCollectiveTally], { index: u32, tally: PalletRankedCollectiveTally }>; Killed: AugmentedEvent<ApiType, [index: u32, tally: PalletRankedCollectiveTally], { index: u32, tally: PalletRankedCollectiveTally }>;
/**
* Metadata for a referendum has been cleared.
**/
MetadataCleared: AugmentedEvent<ApiType, [index: u32, hash_: H256], { index: u32, hash_: H256 }>;
/**
* Metadata for a referendum has been set.
**/
MetadataSet: AugmentedEvent<ApiType, [index: u32, hash_: H256], { index: u32, hash_: H256 }>;
/** /**
* A proposal has been rejected by referendum. * A proposal has been rejected by referendum.
**/ **/
@@ -476,7 +496,7 @@ declare module '@polkadot/api-base/types/events' {
/** /**
* New authority set has been applied. * New authority set has been applied.
**/ **/
NewAuthorities: AugmentedEvent<ApiType, [authoritySet: Vec<ITuple<[SpFinalityGrandpaAppPublic, u64]>>], { authoritySet: Vec<ITuple<[SpFinalityGrandpaAppPublic, u64]>> }>; NewAuthorities: AugmentedEvent<ApiType, [authoritySet: Vec<ITuple<[SpConsensusGrandpaAppPublic, u64]>>], { authoritySet: Vec<ITuple<[SpConsensusGrandpaAppPublic, u64]>> }>;
/** /**
* Current authority set has been paused. * Current authority set has been paused.
**/ **/
@@ -737,7 +757,7 @@ declare module '@polkadot/api-base/types/events' {
* The roles of a pool have been updated to the given new roles. Note that the depositor * The roles of a pool have been updated to the given new roles. Note that the depositor
* can never change. * can never change.
**/ **/
RolesUpdated: AugmentedEvent<ApiType, [root: Option<AccountId32>, stateToggler: Option<AccountId32>, nominator: Option<AccountId32>], { root: Option<AccountId32>, stateToggler: Option<AccountId32>, nominator: Option<AccountId32> }>; RolesUpdated: AugmentedEvent<ApiType, [root: Option<AccountId32>, bouncer: Option<AccountId32>, nominator: Option<AccountId32>], { root: Option<AccountId32>, bouncer: Option<AccountId32>, nominator: Option<AccountId32> }>;
/** /**
* The state of a pool has changed * The state of a pool has changed
**/ **/
@@ -1025,6 +1045,14 @@ declare module '@polkadot/api-base/types/events' {
* A referendum has been killed. * A referendum has been killed.
**/ **/
Killed: AugmentedEvent<ApiType, [index: u32, tally: PalletConvictionVotingTally], { index: u32, tally: PalletConvictionVotingTally }>; Killed: AugmentedEvent<ApiType, [index: u32, tally: PalletConvictionVotingTally], { index: u32, tally: PalletConvictionVotingTally }>;
/**
* Metadata for a referendum has been cleared.
**/
MetadataCleared: AugmentedEvent<ApiType, [index: u32, hash_: H256], { index: u32, hash_: H256 }>;
/**
* Metadata for a referendum has been set.
**/
MetadataSet: AugmentedEvent<ApiType, [index: u32, hash_: H256], { index: u32, hash_: H256 }>;
/** /**
* A proposal has been rejected by referendum. * A proposal has been rejected by referendum.
**/ **/
@@ -1155,6 +1183,10 @@ declare module '@polkadot/api-base/types/events' {
* A new \[max\] member count has been set * A new \[max\] member count has been set
**/ **/
NewMaxMembers: AugmentedEvent<ApiType, [max: u32], { max: u32 }>; NewMaxMembers: AugmentedEvent<ApiType, [max: u32], { max: u32 }>;
/**
* A group of members has been choosen as Skeptics
**/
SkepticsChosen: AugmentedEvent<ApiType, [skeptics: Vec<AccountId32>], { skeptics: Vec<AccountId32> }>;
/** /**
* A suspended member has been judged. * A suspended member has been judged.
**/ **/
+8 -8
View File
@@ -1,11 +1,11 @@
// Copyright 2017-2023 @polkadot/api-augment authors & contributors // Copyright 2017-2023 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import '../base'; import '../base.js';
import './consts'; import './consts.js';
import './errors'; import './errors.js';
import './events'; import './events.js';
import './query'; import './query.js';
import './registry'; import './registry.js';
import './runtime'; import './runtime.js';
import './tx'; import './tx.js';
+59 -10
View File
@@ -7,11 +7,11 @@ import '@polkadot/api-base/types/storage';
import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types'; import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';
import type { Data } from '@polkadot/types'; import type { Data } from '@polkadot/types';
import type { Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u16, u32, u64 } from '@polkadot/types-codec'; import type { BTreeSet, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';
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 { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletConvictionVotingVoteVoting, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, 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, SpWeightsWeightV2Weight, XcmVersionedAssetId, XcmVersionedMultiLocation } from '@polkadot/types/lookup'; import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletConvictionVotingVoteVoting, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotPrimitivesVstagingExecutorParams, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, SpWeightsWeightV2Weight, XcmVersionedAssetId, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
import type { Observable } from '@polkadot/types/types'; import type { Observable } from '@polkadot/types/types';
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>; export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
@@ -53,14 +53,6 @@ declare module '@polkadot/api-base/types/storage' {
* Author of current block. * Author of current block.
**/ **/
author: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>; author: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Whether uncles were already set in this block.
**/
didSetUncles: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Uncles
**/
uncles: AugmentedQuery<ApiType, () => Observable<Vec<PalletAuthorshipUncleEntryItem>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Generic query * Generic query
**/ **/
@@ -159,6 +151,17 @@ declare module '@polkadot/api-base/types/storage' {
* epoch. * epoch.
**/ **/
segmentIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>; segmentIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* A list of the last 100 skipped epochs and the corresponding session index
* when the epoch was skipped.
*
* This is only used for validating equivocation proofs. An equivocation proof
* must contains a key-ownership proof for a given session, therefore we need a
* way to tie together sessions and epoch indices, i.e. we need to validate that
* a validator was the owner of a given key on a given session, and what the
* active epoch index was during that session.
**/
skippedEpochs: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u64, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay. * TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay.
**/ **/
@@ -411,6 +414,15 @@ declare module '@polkadot/api-base/types/storage' {
* `ReferendumCount` if there isn't a unbaked referendum. * `ReferendumCount` if there isn't a unbaked referendum.
**/ **/
lowestUnbaked: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>; lowestUnbaked: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* General information concerning any proposal or referendum.
* The `PreimageHash` refers to the preimage of the `Preimages` provider which can be a JSON
* dump or IPFS hash of a JSON file.
*
* Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)
* large preimages.
**/
metadataOf: AugmentedQuery<ApiType, (arg: PalletDemocracyMetadataOwner | { External: any } | { Proposal: any } | { Referendum: any } | string | Uint8Array) => Observable<Option<H256>>, [PalletDemocracyMetadataOwner]> & QueryableStorageEntry<ApiType, [PalletDemocracyMetadataOwner]>;
/** /**
* The referendum to be tabled whenever it would be valid to table an external proposal. * The referendum to be tabled whenever it would be valid to table an external proposal.
* This happens when a referendum needs to be tabled and one of two conditions are met: * This happens when a referendum needs to be tabled and one of two conditions are met:
@@ -612,6 +624,15 @@ declare module '@polkadot/api-base/types/storage' {
* The number of referenda being decided currently. * The number of referenda being decided currently.
**/ **/
decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>; decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
/**
* The metadata is a general information concerning the referendum.
* The `PreimageHash` refers to the preimage of the `Preimages` provider which can be a JSON
* dump or IPFS hash of a JSON file.
*
* Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)
* large preimages.
**/
metadataOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<H256>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* The next free referendum index, aka the number of referenda started so far. * The next free referendum index, aka the number of referenda started so far.
**/ **/
@@ -650,6 +671,12 @@ declare module '@polkadot/api-base/types/storage' {
* A mapping from grandpa set ID to the index of the *most recent* session for which its * A mapping from grandpa set ID to the index of the *most recent* session for which its
* members were responsible. * members were responsible.
* *
* This is only used for validating equivocation proofs. An equivocation proof must
* contains a key-ownership proof for a given session, therefore we need a way to tie
* together sessions and GRANDPA set ids, i.e. we need to validate that a validator
* was the owner of a given key on a given session, and what the active set ID was
* during that session.
*
* TWOX-NOTE: `SetId` is not under user control. * TWOX-NOTE: `SetId` is not under user control.
**/ **/
setIdSession: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>; setIdSession: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
@@ -942,6 +969,10 @@ declare module '@polkadot/api-base/types/storage' {
* Storage for bonded pools. * Storage for bonded pools.
**/ **/
bondedPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsBondedPoolInner>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; bondedPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsBondedPoolInner>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Map from a pool member account to their opted claim permission.
**/
claimPermissions: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletNominationPoolsClaimPermission>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
* Counter for the related counted storage map * Counter for the related counted storage map
**/ **/
@@ -1280,6 +1311,11 @@ declare module '@polkadot/api-base/types/storage' {
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
parasDisputes: { parasDisputes: {
/**
* Backing votes stored for each dispute.
* This storage is used for slashing.
**/
backersOnDisputes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<BTreeSet<u32>>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
/** /**
* All ongoing or concluded disputes for the last several sessions. * All ongoing or concluded disputes for the last several sessions.
**/ **/
@@ -1321,6 +1357,10 @@ declare module '@polkadot/api-base/types/storage' {
* The earliest session for which previous session info is stored. * The earliest session for which previous session info is stored.
**/ **/
earliestStoredSession: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>; earliestStoredSession: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Executor parameter set for a given session index
**/
sessionExecutorParams: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesVstagingExecutorParams>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Session information in a rolling window. * Session information in a rolling window.
* Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`. * Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`.
@@ -1444,6 +1484,15 @@ declare module '@polkadot/api-base/types/storage' {
* The number of referenda being decided currently. * The number of referenda being decided currently.
**/ **/
decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>; decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
/**
* The metadata is a general information concerning the referendum.
* The `PreimageHash` refers to the preimage of the `Preimages` provider which can be a JSON
* dump or IPFS hash of a JSON file.
*
* Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)
* large preimages.
**/
metadataOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<H256>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* The next free referendum index, aka the number of referenda started so far. * The next free referendum index, aka the number of referenda started so far.
**/ **/
+36 -4
View File
@@ -9,7 +9,7 @@ import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-b
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec'; import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types'; import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe'; import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
import type { ValidatorSet } from '@polkadot/types/interfaces/beefy'; import type { BeefyEquivocationProof, ValidatorSet, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder'; import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
import type { BlockHash } from '@polkadot/types/interfaces/chain'; import type { BlockHash } from '@polkadot/types/interfaces/chain';
import type { AuthorityId } from '@polkadot/types/interfaces/consensus'; import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
@@ -17,9 +17,10 @@ import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa'; import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata'; import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr'; import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
import type { NpPoolId } from '@polkadot/types/interfaces/nompools';
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains'; import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment'; import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime'; import type { AccountId, Balance, Block, BlockNumber, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
import type { SessionIndex } from '@polkadot/types/interfaces/session'; import type { SessionIndex } from '@polkadot/types/interfaces/session';
import type { RuntimeVersion } from '@polkadot/types/interfaces/state'; import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system'; import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
@@ -84,8 +85,20 @@ declare module '@polkadot/api-base/types/calls' {
**/ **/
[key: string]: DecoratedCallBase<ApiType>; [key: string]: DecoratedCallBase<ApiType>;
}; };
/** 0x49eaaf1b548a0cb0/1 */ /** 0x49eaaf1b548a0cb0/2 */
beefyApi: { beefyApi: {
/**
* Return the block number where BEEFY consensus is enabled/started
**/
beefyGenesis: AugmentedCall<ApiType, () => Observable<Option<BlockNumber>>>;
/**
* Generates a proof of key ownership for the given authority in the given set.
**/
generateKeyOwnershipProof: AugmentedCall<ApiType, (setId: ValidatorSetId | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
/**
* Submits an unsigned extrinsic to report an equivocation.
**/
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: BeefyEquivocationProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
/** /**
* Return the current active BEEFY validator set * Return the current active BEEFY validator set
**/ **/
@@ -171,7 +184,7 @@ declare module '@polkadot/api-base/types/calls' {
**/ **/
[key: string]: DecoratedCallBase<ApiType>; [key: string]: DecoratedCallBase<ApiType>;
}; };
/** 0x91d5df18b0d2cf58/1 */ /** 0x91d5df18b0d2cf58/2 */
mmrApi: { mmrApi: {
/** /**
* Generate MMR proof for a series of leaves under given indices. * Generate MMR proof for a series of leaves under given indices.
@@ -208,10 +221,18 @@ declare module '@polkadot/api-base/types/calls' {
}; };
/** 0x17a6bc0d0062aeb3/1 */ /** 0x17a6bc0d0062aeb3/1 */
nominationPoolsApi: { nominationPoolsApi: {
/**
* Returns the equivalent points of `new_funds` for a given pool.
**/
balanceToPoints: AugmentedCall<ApiType, (poolId: NpPoolId | AnyNumber | Uint8Array, newFunds: Balance | AnyNumber | Uint8Array) => Observable<Balance>>;
/** /**
* Returns the pending rewards for the given member. * Returns the pending rewards for the given member.
**/ **/
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>; pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
/**
* Returns the equivalent balance of `points` for a given pool.
**/
pointsToBalance: AugmentedCall<ApiType, (poolId: NpPoolId | AnyNumber | Uint8Array, points: Balance | AnyNumber | Uint8Array) => Observable<Balance>>;
/** /**
* Generic call * Generic call
**/ **/
@@ -322,6 +343,17 @@ declare module '@polkadot/api-base/types/calls' {
**/ **/
[key: string]: DecoratedCallBase<ApiType>; [key: string]: DecoratedCallBase<ApiType>;
}; };
/** 0x18ef58a3b67ba770/1 */
stakingApi: {
/**
* Returns the nominations quota for a nominator with a given balance.
**/
nominationsQuota: AugmentedCall<ApiType, (balance: Balance | AnyNumber | Uint8Array) => Observable<u32>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xd2bc9897eed08f15/3 */ /** 0xd2bc9897eed08f15/3 */
taggedTransactionQueue: { taggedTransactionQueue: {
/** /**
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2023 @polkadot/api-augment authors & contributors // Copyright 2017-2023 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
export * from './index'; export * from './index.js';
+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: '9.13.1' }; export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '10.1.1' };
+23 -16
View File
@@ -33,18 +33,6 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
authorship: {
/**
* The number of blocks back we should accept uncles.
* This means that we will deal with uncle-parents that are
* `UncleGenerations + 1` before `now`.
**/
uncleGenerations: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
babe: { babe: {
/** /**
* The amount of time, in slots, that each epoch should last. * The amount of time, in slots, that each epoch should last.
@@ -350,6 +338,15 @@ declare module '@polkadot/api-base/types/consts' {
* Max Authorities in use * Max Authorities in use
**/ **/
maxAuthorities: u32 & AugmentedConst<ApiType>; maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of entries to keep in the set id to session index mapping.
*
* Since the `SetIdSession` map is only used for validating equivocations this
* value should relate to the bonding duration of whatever staking system is
* being used (if any). If equivocation handling is not enabled then this value
* can be zero.
**/
maxSetIdSessionEntries: u64 & AugmentedConst<ApiType>;
/** /**
* Generic const * Generic const
**/ **/
@@ -485,18 +482,28 @@ declare module '@polkadot/api-base/types/consts' {
/** /**
* The maximum number of candidates in a phragmen election. * The maximum number of candidates in a phragmen election.
* *
* Warning: The election happens onchain, and this value will determine * Warning: This impacts the size of the election which is run onchain. Chose wisely, and
* the size of the election. When this limit is reached no more * consider how it will impact `T::WeightInfo::election_phragmen`.
* candidates are accepted in the election. *
* When this limit is reached no more candidates are accepted in the election.
**/ **/
maxCandidates: u32 & AugmentedConst<ApiType>; maxCandidates: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum number of voters to allow in a phragmen election. * The maximum number of voters to allow in a phragmen election.
* *
* Warning: This impacts the size of the election which is run onchain. * Warning: This impacts the size of the election which is run onchain. Chose wisely, and
* consider how it will impact `T::WeightInfo::election_phragmen`.
*
* When the limit is reached the new voters are ignored. * When the limit is reached the new voters are ignored.
**/ **/
maxVoters: u32 & AugmentedConst<ApiType>; maxVoters: u32 & AugmentedConst<ApiType>;
/**
* Maximum numbers of votes per voter.
*
* Warning: This impacts the size of the election which is run onchain. Chose wisely, and
* consider how it will impact `T::WeightInfo::election_phragmen`.
**/
maxVotesPerVoter: u32 & AugmentedConst<ApiType>;
/** /**
* Identifier for the elections-phragmen pallet's lock * Identifier for the elections-phragmen pallet's lock
**/ **/
+17 -35
View File
@@ -45,40 +45,6 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
authorship: {
/**
* The uncle is genesis.
**/
GenesisUncle: AugmentedError<ApiType>;
/**
* The uncle parent not in the chain.
**/
InvalidUncleParent: AugmentedError<ApiType>;
/**
* The uncle isn't recent enough to be included.
**/
OldUncle: AugmentedError<ApiType>;
/**
* The uncle is too high in chain.
**/
TooHighUncle: AugmentedError<ApiType>;
/**
* Too many uncles.
**/
TooManyUncles: AugmentedError<ApiType>;
/**
* The uncle is already included.
**/
UncleAlreadyIncluded: AugmentedError<ApiType>;
/**
* Uncles already set in the block.
**/
UnclesAlreadySet: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
babe: { babe: {
/** /**
* A given equivocation report is valid but already previously reported. * A given equivocation report is valid but already previously reported.
@@ -454,6 +420,10 @@ declare module '@polkadot/api-base/types/errors' {
* The given account did not vote on the referendum. * The given account did not vote on the referendum.
**/ **/
NotVoter: AugmentedError<ApiType>; NotVoter: AugmentedError<ApiType>;
/**
* The preimage does not exist.
**/
PreimageNotExist: AugmentedError<ApiType>;
/** /**
* Proposal still blacklisted * Proposal still blacklisted
**/ **/
@@ -890,6 +860,10 @@ declare module '@polkadot/api-base/types/errors' {
* pool at a time. * pool at a time.
**/ **/
AccountBelongsToOtherPool: AugmentedError<ApiType>; AccountBelongsToOtherPool: AugmentedError<ApiType>;
/**
* Bonding extra is restricted to the exact pending reward amount.
**/
BondExtraRestricted: AugmentedError<ApiType>;
/** /**
* The pools state cannot be changed. * The pools state cannot be changed.
**/ **/
@@ -1222,12 +1196,20 @@ declare module '@polkadot/api-base/types/errors' {
* Invalid signature on statement. * Invalid signature on statement.
**/ **/
InvalidSignature: AugmentedError<ApiType>; InvalidSignature: AugmentedError<ApiType>;
/**
* A dispute vote from a malicious backer.
**/
MaliciousBacker: AugmentedError<ApiType>;
/**
* No backing votes were provides along dispute statements.
**/
MissingBackingVotes: AugmentedError<ApiType>;
/** /**
* A dispute where there are only votes on one side. * A dispute where there are only votes on one side.
**/ **/
SingleSidedDispute: AugmentedError<ApiType>; SingleSidedDispute: AugmentedError<ApiType>;
/** /**
* Unconfirmed dispute statement sets provided * Unconfirmed dispute statement sets provided.
**/ **/
UnconfirmedDispute: AugmentedError<ApiType>; UnconfirmedDispute: AugmentedError<ApiType>;
/** /**
+15 -3
View File
@@ -10,7 +10,7 @@ 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, Perbill } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, H256, Perbill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportDispatchDispatchInfo, FrameSupportTokensMiscBalanceStatus, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeProxyType, SpFinalityGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3MultiassetMultiAssets, XcmV3Response, XcmV3TraitsError, XcmV3TraitsOutcome, XcmV3Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup'; import type { FrameSupportDispatchDispatchInfo, FrameSupportTokensMiscBalanceStatus, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeProxyType, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3MultiassetMultiAssets, XcmV3Response, XcmV3TraitsError, XcmV3TraitsOutcome, XcmV3Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>; export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
@@ -267,6 +267,18 @@ declare module '@polkadot/api-base/types/events' {
* An external proposal has been tabled. * An external proposal has been tabled.
**/ **/
ExternalTabled: AugmentedEvent<ApiType, []>; ExternalTabled: AugmentedEvent<ApiType, []>;
/**
* Metadata for a proposal or a referendum has been cleared.
**/
MetadataCleared: AugmentedEvent<ApiType, [owner: PalletDemocracyMetadataOwner, hash_: H256], { owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
/**
* Metadata for a proposal or a referendum has been set.
**/
MetadataSet: AugmentedEvent<ApiType, [owner: PalletDemocracyMetadataOwner, hash_: H256], { owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
/**
* Metadata has been transferred to new owner.
**/
MetadataTransferred: AugmentedEvent<ApiType, [prevOwner: PalletDemocracyMetadataOwner, owner: PalletDemocracyMetadataOwner, hash_: H256], { prevOwner: PalletDemocracyMetadataOwner, owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
/** /**
* A proposal has been rejected by referendum. * A proposal has been rejected by referendum.
**/ **/
@@ -383,7 +395,7 @@ declare module '@polkadot/api-base/types/events' {
/** /**
* New authority set has been applied. * New authority set has been applied.
**/ **/
NewAuthorities: AugmentedEvent<ApiType, [authoritySet: Vec<ITuple<[SpFinalityGrandpaAppPublic, u64]>>], { authoritySet: Vec<ITuple<[SpFinalityGrandpaAppPublic, u64]>> }>; NewAuthorities: AugmentedEvent<ApiType, [authoritySet: Vec<ITuple<[SpConsensusGrandpaAppPublic, u64]>>], { authoritySet: Vec<ITuple<[SpConsensusGrandpaAppPublic, u64]>> }>;
/** /**
* Current authority set has been paused. * Current authority set has been paused.
**/ **/
@@ -562,7 +574,7 @@ declare module '@polkadot/api-base/types/events' {
* The roles of a pool have been updated to the given new roles. Note that the depositor * The roles of a pool have been updated to the given new roles. Note that the depositor
* can never change. * can never change.
**/ **/
RolesUpdated: AugmentedEvent<ApiType, [root: Option<AccountId32>, stateToggler: Option<AccountId32>, nominator: Option<AccountId32>], { root: Option<AccountId32>, stateToggler: Option<AccountId32>, nominator: Option<AccountId32> }>; RolesUpdated: AugmentedEvent<ApiType, [root: Option<AccountId32>, bouncer: Option<AccountId32>, nominator: Option<AccountId32>], { root: Option<AccountId32>, bouncer: Option<AccountId32>, nominator: Option<AccountId32> }>;
/** /**
* The state of a pool has changed * The state of a pool has changed
**/ **/
+8 -8
View File
@@ -1,11 +1,11 @@
// Copyright 2017-2023 @polkadot/api-augment authors & contributors // Copyright 2017-2023 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import '../base'; import '../base.js';
import './consts'; import './consts.js';
import './errors'; import './errors.js';
import './events'; import './events.js';
import './query'; import './query.js';
import './registry'; import './registry.js';
import './runtime'; import './runtime.js';
import './tx'; import './tx.js';
+41 -10
View File
@@ -7,11 +7,11 @@ import '@polkadot/api-base/types/storage';
import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types'; import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';
import type { Data } from '@polkadot/types'; import type { Data } from '@polkadot/types';
import type { Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u32, u64 } from '@polkadot/types-codec'; import type { BTreeSet, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u32, u64 } from '@polkadot/types-codec';
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 { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerScheduled, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, 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, SpWeightsWeightV2Weight, XcmVersionedAssetId, XcmVersionedMultiLocation } from '@polkadot/types/lookup'; import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerScheduled, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotPrimitivesVstagingExecutorParams, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, SpWeightsWeightV2Weight, XcmVersionedAssetId, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
import type { Observable } from '@polkadot/types/types'; import type { Observable } from '@polkadot/types/types';
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>; export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
@@ -53,14 +53,6 @@ declare module '@polkadot/api-base/types/storage' {
* Author of current block. * Author of current block.
**/ **/
author: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>; author: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Whether uncles were already set in this block.
**/
didSetUncles: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Uncles
**/
uncles: AugmentedQuery<ApiType, () => Observable<Vec<PalletAuthorshipUncleEntryItem>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Generic query * Generic query
**/ **/
@@ -159,6 +151,17 @@ declare module '@polkadot/api-base/types/storage' {
* epoch. * epoch.
**/ **/
segmentIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>; segmentIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* A list of the last 100 skipped epochs and the corresponding session index
* when the epoch was skipped.
*
* This is only used for validating equivocation proofs. An equivocation proof
* must contains a key-ownership proof for a given session, therefore we need a
* way to tie together sessions and epoch indices, i.e. we need to validate that
* a validator was the owner of a given key on a given session, and what the
* active epoch index was during that session.
**/
skippedEpochs: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u64, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay. * TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay.
**/ **/
@@ -394,6 +397,15 @@ declare module '@polkadot/api-base/types/storage' {
* `ReferendumCount` if there isn't a unbaked referendum. * `ReferendumCount` if there isn't a unbaked referendum.
**/ **/
lowestUnbaked: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>; lowestUnbaked: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* General information concerning any proposal or referendum.
* The `PreimageHash` refers to the preimage of the `Preimages` provider which can be a JSON
* dump or IPFS hash of a JSON file.
*
* Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)
* large preimages.
**/
metadataOf: AugmentedQuery<ApiType, (arg: PalletDemocracyMetadataOwner | { External: any } | { Proposal: any } | { Referendum: any } | string | Uint8Array) => Observable<Option<H256>>, [PalletDemocracyMetadataOwner]> & QueryableStorageEntry<ApiType, [PalletDemocracyMetadataOwner]>;
/** /**
* The referendum to be tabled whenever it would be valid to table an external proposal. * The referendum to be tabled whenever it would be valid to table an external proposal.
* This happens when a referendum needs to be tabled and one of two conditions are met: * This happens when a referendum needs to be tabled and one of two conditions are met:
@@ -579,6 +591,12 @@ declare module '@polkadot/api-base/types/storage' {
* A mapping from grandpa set ID to the index of the *most recent* session for which its * A mapping from grandpa set ID to the index of the *most recent* session for which its
* members were responsible. * members were responsible.
* *
* This is only used for validating equivocation proofs. An equivocation proof must
* contains a key-ownership proof for a given session, therefore we need a way to tie
* together sessions and GRANDPA set ids, i.e. we need to validate that a validator
* was the owner of a given key on a given session, and what the active set ID was
* during that session.
*
* TWOX-NOTE: `SetId` is not under user control. * TWOX-NOTE: `SetId` is not under user control.
**/ **/
setIdSession: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>; setIdSession: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
@@ -795,6 +813,10 @@ declare module '@polkadot/api-base/types/storage' {
* Storage for bonded pools. * Storage for bonded pools.
**/ **/
bondedPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsBondedPoolInner>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; bondedPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsBondedPoolInner>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Map from a pool member account to their opted claim permission.
**/
claimPermissions: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletNominationPoolsClaimPermission>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
* Counter for the related counted storage map * Counter for the related counted storage map
**/ **/
@@ -1133,6 +1155,11 @@ declare module '@polkadot/api-base/types/storage' {
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
parasDisputes: { parasDisputes: {
/**
* Backing votes stored for each dispute.
* This storage is used for slashing.
**/
backersOnDisputes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<BTreeSet<u32>>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
/** /**
* All ongoing or concluded disputes for the last several sessions. * All ongoing or concluded disputes for the last several sessions.
**/ **/
@@ -1174,6 +1201,10 @@ declare module '@polkadot/api-base/types/storage' {
* The earliest session for which previous session info is stored. * The earliest session for which previous session info is stored.
**/ **/
earliestStoredSession: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>; earliestStoredSession: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Executor parameter set for a given session index
**/
sessionExecutorParams: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesVstagingExecutorParams>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Session information in a rolling window. * Session information in a rolling window.
* Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`. * Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`.
+36 -4
View File
@@ -9,7 +9,7 @@ import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-b
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec'; import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types'; import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe'; import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
import type { ValidatorSet } from '@polkadot/types/interfaces/beefy'; import type { BeefyEquivocationProof, ValidatorSet, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder'; import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
import type { BlockHash } from '@polkadot/types/interfaces/chain'; import type { BlockHash } from '@polkadot/types/interfaces/chain';
import type { AuthorityId } from '@polkadot/types/interfaces/consensus'; import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
@@ -17,9 +17,10 @@ import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa'; import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata'; import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr'; import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
import type { NpPoolId } from '@polkadot/types/interfaces/nompools';
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains'; import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment'; import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime'; import type { AccountId, Balance, Block, BlockNumber, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
import type { SessionIndex } from '@polkadot/types/interfaces/session'; import type { SessionIndex } from '@polkadot/types/interfaces/session';
import type { RuntimeVersion } from '@polkadot/types/interfaces/state'; import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system'; import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
@@ -84,8 +85,20 @@ declare module '@polkadot/api-base/types/calls' {
**/ **/
[key: string]: DecoratedCallBase<ApiType>; [key: string]: DecoratedCallBase<ApiType>;
}; };
/** 0x49eaaf1b548a0cb0/1 */ /** 0x49eaaf1b548a0cb0/2 */
beefyApi: { beefyApi: {
/**
* Return the block number where BEEFY consensus is enabled/started
**/
beefyGenesis: AugmentedCall<ApiType, () => Observable<Option<BlockNumber>>>;
/**
* Generates a proof of key ownership for the given authority in the given set.
**/
generateKeyOwnershipProof: AugmentedCall<ApiType, (setId: ValidatorSetId | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
/**
* Submits an unsigned extrinsic to report an equivocation.
**/
submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: BeefyEquivocationProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
/** /**
* Return the current active BEEFY validator set * Return the current active BEEFY validator set
**/ **/
@@ -171,7 +184,7 @@ declare module '@polkadot/api-base/types/calls' {
**/ **/
[key: string]: DecoratedCallBase<ApiType>; [key: string]: DecoratedCallBase<ApiType>;
}; };
/** 0x91d5df18b0d2cf58/1 */ /** 0x91d5df18b0d2cf58/2 */
mmrApi: { mmrApi: {
/** /**
* Generate MMR proof for a series of leaves under given indices. * Generate MMR proof for a series of leaves under given indices.
@@ -208,10 +221,18 @@ declare module '@polkadot/api-base/types/calls' {
}; };
/** 0x17a6bc0d0062aeb3/1 */ /** 0x17a6bc0d0062aeb3/1 */
nominationPoolsApi: { nominationPoolsApi: {
/**
* Returns the equivalent points of `new_funds` for a given pool.
**/
balanceToPoints: AugmentedCall<ApiType, (poolId: NpPoolId | AnyNumber | Uint8Array, newFunds: Balance | AnyNumber | Uint8Array) => Observable<Balance>>;
/** /**
* Returns the pending rewards for the given member. * Returns the pending rewards for the given member.
**/ **/
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>; pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
/**
* Returns the equivalent balance of `points` for a given pool.
**/
pointsToBalance: AugmentedCall<ApiType, (poolId: NpPoolId | AnyNumber | Uint8Array, points: Balance | AnyNumber | Uint8Array) => Observable<Balance>>;
/** /**
* Generic call * Generic call
**/ **/
@@ -322,6 +343,17 @@ declare module '@polkadot/api-base/types/calls' {
**/ **/
[key: string]: DecoratedCallBase<ApiType>; [key: string]: DecoratedCallBase<ApiType>;
}; };
/** 0x18ef58a3b67ba770/1 */
stakingApi: {
/**
* Returns the nominations quota for a nominator with a given balance.
**/
nominationsQuota: AugmentedCall<ApiType, (balance: Balance | AnyNumber | Uint8Array) => Observable<u32>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xd2bc9897eed08f15/3 */ /** 0xd2bc9897eed08f15/3 */
taggedTransactionQueue: { taggedTransactionQueue: {
/** /**
File diff suppressed because it is too large Load Diff
+54 -16
View File
@@ -79,18 +79,6 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
authorship: {
/**
* The number of blocks back we should accept uncles.
* This means that we will deal with uncle-parents that are
* `UncleGenerations + 1` before `now`.
**/
uncleGenerations: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
babe: { babe: {
/** /**
* The amount of time, in slots, that each epoch should last. * The amount of time, in slots, that each epoch should last.
@@ -473,18 +461,28 @@ declare module '@polkadot/api-base/types/consts' {
/** /**
* The maximum number of candidates in a phragmen election. * The maximum number of candidates in a phragmen election.
* *
* Warning: The election happens onchain, and this value will determine * Warning: This impacts the size of the election which is run onchain. Chose wisely, and
* the size of the election. When this limit is reached no more * consider how it will impact `T::WeightInfo::election_phragmen`.
* candidates are accepted in the election. *
* When this limit is reached no more candidates are accepted in the election.
**/ **/
maxCandidates: u32 & AugmentedConst<ApiType>; maxCandidates: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum number of voters to allow in a phragmen election. * The maximum number of voters to allow in a phragmen election.
* *
* Warning: This impacts the size of the election which is run onchain. * Warning: This impacts the size of the election which is run onchain. Chose wisely, and
* consider how it will impact `T::WeightInfo::election_phragmen`.
*
* When the limit is reached the new voters are ignored. * When the limit is reached the new voters are ignored.
**/ **/
maxVoters: u32 & AugmentedConst<ApiType>; maxVoters: u32 & AugmentedConst<ApiType>;
/**
* Maximum numbers of votes per voter.
*
* Warning: This impacts the size of the election which is run onchain. Chose wisely, and
* consider how it will impact `T::WeightInfo::election_phragmen`.
**/
maxVotesPerVoter: u32 & AugmentedConst<ApiType>;
/** /**
* Identifier for the elections-phragmen pallet's lock * Identifier for the elections-phragmen pallet's lock
**/ **/
@@ -527,6 +525,15 @@ declare module '@polkadot/api-base/types/consts' {
* Max Authorities in use * Max Authorities in use
**/ **/
maxAuthorities: u32 & AugmentedConst<ApiType>; maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of entries to keep in the set id to session index mapping.
*
* Since the `SetIdSession` map is only used for validating equivocations this
* value should relate to the bonding duration of whatever staking system is
* being used (if any). If equivocation handling is not enabled then this value
* can be zero.
**/
maxSetIdSessionEntries: u64 & AugmentedConst<ApiType>;
/** /**
* Generic const * Generic const
**/ **/
@@ -696,6 +703,10 @@ declare module '@polkadot/api-base/types/consts' {
* The maximum length of an attribute key. * The maximum length of an attribute key.
**/ **/
keyLimit: u32 & AugmentedConst<ApiType>; keyLimit: u32 & AugmentedConst<ApiType>;
/**
* The max number of attributes a user could set per call.
**/
maxAttributesPerCall: u32 & AugmentedConst<ApiType>;
/** /**
* The max duration in blocks for deadlines. * The max duration in blocks for deadlines.
**/ **/
@@ -954,6 +965,33 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
salary: {
/**
* The total budget per cycle.
*
* This may change over the course of a cycle without any problem.
**/
budget: u128 & AugmentedConst<ApiType>;
/**
* The number of blocks within a cycle which accounts have to claim the payout.
*
* The number of blocks between sequential payout cycles is the sum of this and
* `RegistrationPeriod`.
**/
payoutPeriod: u32 & AugmentedConst<ApiType>;
/**
* The number of blocks within a cycle which accounts have to register their intent to
* claim.
*
* The number of blocks between sequential payout cycles is the sum of this and
* `PayoutPeriod`.
**/
registrationPeriod: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
scheduler: { scheduler: {
/** /**
* The maximum weight that may be scheduled per block for any dispatchables. * The maximum weight that may be scheduled per block for any dispatchables.
+117 -38
View File
@@ -245,40 +245,6 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
authorship: {
/**
* The uncle is genesis.
**/
GenesisUncle: AugmentedError<ApiType>;
/**
* The uncle parent not in the chain.
**/
InvalidUncleParent: AugmentedError<ApiType>;
/**
* The uncle isn't recent enough to be included.
**/
OldUncle: AugmentedError<ApiType>;
/**
* The uncle is too high in chain.
**/
TooHighUncle: AugmentedError<ApiType>;
/**
* Too many uncles.
**/
TooManyUncles: AugmentedError<ApiType>;
/**
* The uncle is already included.
**/
UncleAlreadyIncluded: AugmentedError<ApiType>;
/**
* Uncles already set in the block.
**/
UnclesAlreadySet: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
babe: { babe: {
/** /**
* A given equivocation report is valid but already previously reported. * A given equivocation report is valid but already previously reported.
@@ -448,10 +414,6 @@ declare module '@polkadot/api-base/types/errors' {
* Contract trapped during execution. * Contract trapped during execution.
**/ **/
ContractTrapped: AugmentedError<ApiType>; ContractTrapped: AugmentedError<ApiType>;
/**
* The debug message specified to `seal_debug_message` does contain invalid UTF-8.
**/
DebugMessageInvalidUTF8: AugmentedError<ApiType>;
/** /**
* Input passed to a contract API function failed to decode as expected type. * Input passed to a contract API function failed to decode as expected type.
**/ **/
@@ -513,6 +475,9 @@ declare module '@polkadot/api-base/types/errors' {
RandomSubjectTooLong: AugmentedError<ApiType>; RandomSubjectTooLong: AugmentedError<ApiType>;
/** /**
* A call tried to invoke a contract that is flagged as non-reentrant. * A call tried to invoke a contract that is flagged as non-reentrant.
* The only other cause is that a call from a contract into the runtime tried to call back
* into `pallet-contracts`. This would make the whole pallet reentrant with regard to
* contract code execution which is not supported.
**/ **/
ReentranceDenied: AugmentedError<ApiType>; ReentranceDenied: AugmentedError<ApiType>;
/** /**
@@ -714,6 +679,10 @@ declare module '@polkadot/api-base/types/errors' {
* The given account did not vote on the referendum. * The given account did not vote on the referendum.
**/ **/
NotVoter: AugmentedError<ApiType>; NotVoter: AugmentedError<ApiType>;
/**
* The preimage does not exist.
**/
PreimageNotExist: AugmentedError<ApiType>;
/** /**
* Proposal still blacklisted * Proposal still blacklisted
**/ **/
@@ -920,6 +889,18 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
glutton: {
/**
* The pallet was already initialized.
*
* Set `witness_count` to `Some` to bypass this error.
**/
AlreadyInitialized: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
grandpa: { grandpa: {
/** /**
* Attempt to signal GRANDPA change with one already pending. * Attempt to signal GRANDPA change with one already pending.
@@ -1134,6 +1115,13 @@ declare module '@polkadot/api-base/types/errors' {
* The message is queued for future execution. * The message is queued for future execution.
**/ **/
Queued: AugmentedError<ApiType>; Queued: AugmentedError<ApiType>;
/**
* This message is temporarily unprocessable.
*
* Such errors are expected, but not guaranteed, to resolve themselves eventually through
* retrying.
**/
TemporarilyUnprocessable: AugmentedError<ApiType>;
/** /**
* Generic error * Generic error
**/ **/
@@ -1242,6 +1230,10 @@ declare module '@polkadot/api-base/types/errors' {
* The provided data is incorrect. * The provided data is incorrect.
**/ **/
IncorrectData: AugmentedError<ApiType>; IncorrectData: AugmentedError<ApiType>;
/**
* The provided metadata might be too long.
**/
IncorrectMetadata: AugmentedError<ApiType>;
/** /**
* The item is locked (non-transferable). * The item is locked (non-transferable).
**/ **/
@@ -1266,6 +1258,10 @@ declare module '@polkadot/api-base/types/errors' {
* Item's metadata is locked. * Item's metadata is locked.
**/ **/
LockedItemMetadata: AugmentedError<ApiType>; LockedItemMetadata: AugmentedError<ApiType>;
/**
* Can't set more attributes per one call.
**/
MaxAttributesLimitReached: AugmentedError<ApiType>;
/** /**
* The max supply is locked and can't be changed. * The max supply is locked and can't be changed.
**/ **/
@@ -1346,6 +1342,14 @@ declare module '@polkadot/api-base/types/errors' {
* The duration provided should be less than or equal to `MaxDeadlineDuration`. * The duration provided should be less than or equal to `MaxDeadlineDuration`.
**/ **/
WrongDuration: AugmentedError<ApiType>; WrongDuration: AugmentedError<ApiType>;
/**
* The provided namespace isn't supported in this call.
**/
WrongNamespace: AugmentedError<ApiType>;
/**
* The extrinsic was sent by the wrong origin.
**/
WrongOrigin: AugmentedError<ApiType>;
/** /**
* The owner turned out to be different to what was expected. * The owner turned out to be different to what was expected.
**/ **/
@@ -1354,6 +1358,10 @@ declare module '@polkadot/api-base/types/errors' {
* The provided setting can't be set. * The provided setting can't be set.
**/ **/
WrongSetting: AugmentedError<ApiType>; WrongSetting: AugmentedError<ApiType>;
/**
* The provided signature is incorrect.
**/
WrongSignature: AugmentedError<ApiType>;
/** /**
* Generic error * Generic error
**/ **/
@@ -1432,6 +1440,10 @@ declare module '@polkadot/api-base/types/errors' {
* pool at a time. * pool at a time.
**/ **/
AccountBelongsToOtherPool: AugmentedError<ApiType>; AccountBelongsToOtherPool: AugmentedError<ApiType>;
/**
* Bonding extra is restricted to the exact pending reward amount.
**/
BondExtraRestricted: AugmentedError<ApiType>;
/** /**
* The pools state cannot be changed. * The pools state cannot be changed.
**/ **/
@@ -1683,6 +1695,10 @@ declare module '@polkadot/api-base/types/errors' {
* No track exists for the proposal origin. * No track exists for the proposal origin.
**/ **/
NoTrack: AugmentedError<ApiType>; NoTrack: AugmentedError<ApiType>;
/**
* The preimage does not exist.
**/
PreimageNotExist: AugmentedError<ApiType>;
/** /**
* The queue of the track is empty. * The queue of the track is empty.
**/ **/
@@ -1807,6 +1823,10 @@ declare module '@polkadot/api-base/types/errors' {
* No track exists for the proposal origin. * No track exists for the proposal origin.
**/ **/
NoTrack: AugmentedError<ApiType>; NoTrack: AugmentedError<ApiType>;
/**
* The preimage does not exist.
**/
PreimageNotExist: AugmentedError<ApiType>;
/** /**
* The queue of the track is empty. * The queue of the track is empty.
**/ **/
@@ -1834,6 +1854,65 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
salary: {
/**
* The account is already inducted.
**/
AlreadyInducted: AugmentedError<ApiType>;
/**
* The salary system has already been started.
**/
AlreadyStarted: AugmentedError<ApiType>;
/**
* There is no budget left for the payout.
**/
Bankrupt: AugmentedError<ApiType>;
/**
* The member's claim is zero.
**/
ClaimZero: AugmentedError<ApiType>;
/**
* The payment has neither failed nor succeeded yet.
**/
Inconclusive: AugmentedError<ApiType>;
/**
* The member does not have a current valid claim.
**/
NoClaim: AugmentedError<ApiType>;
/**
* The cycle is after that in which the payment was made.
**/
NotCurrent: AugmentedError<ApiType>;
NotInducted: AugmentedError<ApiType>;
/**
* The account is not a ranked member.
**/
NotMember: AugmentedError<ApiType>;
/**
* The payout cycles have not yet started.
**/
NotStarted: AugmentedError<ApiType>;
/**
* Cycle is not yet over.
**/
NotYet: AugmentedError<ApiType>;
/**
* There was some issue with the mechanism of payment.
**/
PayError: AugmentedError<ApiType>;
/**
* Current cycle's payment period is not yet begun.
**/
TooEarly: AugmentedError<ApiType>;
/**
* Current cycle's registration period is over.
**/
TooLate: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
scheduler: { scheduler: {
/** /**
* Failed to schedule a call * Failed to schedule a call
+94 -9
View File
@@ -9,7 +9,7 @@ import type { ApiTypes, AugmentedEvent } 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, Perbill, Perquintill } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, H256, Perbill, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscAttributeNamespace, FrameSupportTokensMiscBalanceStatus, KitchensinkRuntimeProxyType, PalletAllianceCid, PalletAllianceUnscrupulousItem, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMessageQueueMockHelpersMessageOrigin, PalletMultisigTimepoint, PalletNftsPriceWithDirection, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PalletStateTrieMigrationError, PalletStateTrieMigrationMigrationCompute, SpFinalityGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight } from '@polkadot/types/lookup'; import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, KitchensinkRuntimeProxyType, PalletAllianceCid, PalletAllianceUnscrupulousItem, PalletConvictionVotingTally, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNftsAttributeNamespace, PalletNftsPalletAttributes, PalletNftsPriceWithDirection, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PalletStateTrieMigrationError, PalletStateTrieMigrationMigrationCompute, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>; export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
@@ -130,6 +130,10 @@ declare module '@polkadot/api-base/types/events' {
* Some asset `asset_id` was frozen. * Some asset `asset_id` was frozen.
**/ **/
AssetFrozen: AugmentedEvent<ApiType, [assetId: u32], { assetId: u32 }>; AssetFrozen: AugmentedEvent<ApiType, [assetId: u32], { assetId: u32 }>;
/**
* The min_balance of an asset has been updated by the asset owner.
**/
AssetMinBalanceChanged: AugmentedEvent<ApiType, [assetId: u32, newMinBalance: u128], { assetId: u32, newMinBalance: u128 }>;
/** /**
* An asset has had its attributes changed by the `Force` origin. * An asset has had its attributes changed by the `Force` origin.
**/ **/
@@ -437,6 +441,18 @@ declare module '@polkadot/api-base/types/events' {
* An external proposal has been tabled. * An external proposal has been tabled.
**/ **/
ExternalTabled: AugmentedEvent<ApiType, []>; ExternalTabled: AugmentedEvent<ApiType, []>;
/**
* Metadata for a proposal or a referendum has been cleared.
**/
MetadataCleared: AugmentedEvent<ApiType, [owner: PalletDemocracyMetadataOwner, hash_: H256], { owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
/**
* Metadata for a proposal or a referendum has been set.
**/
MetadataSet: AugmentedEvent<ApiType, [owner: PalletDemocracyMetadataOwner, hash_: H256], { owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
/**
* Metadata has been transferred to new owner.
**/
MetadataTransferred: AugmentedEvent<ApiType, [prevOwner: PalletDemocracyMetadataOwner, owner: PalletDemocracyMetadataOwner, hash_: H256], { prevOwner: PalletDemocracyMetadataOwner, owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
/** /**
* A proposal has been rejected by referendum. * A proposal has been rejected by referendum.
**/ **/
@@ -592,11 +608,29 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
glutton: {
/**
* The computation limit has been updated by root.
**/
ComputationLimitSet: AugmentedEvent<ApiType, [compute: Perbill], { compute: Perbill }>;
/**
* The pallet has been (re)initialized by root.
**/
PalletInitialized: AugmentedEvent<ApiType, [reinit: bool], { reinit: bool }>;
/**
* The storage limit has been updated by root.
**/
StorageLimitSet: AugmentedEvent<ApiType, [storage: Perbill], { storage: Perbill }>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
grandpa: { grandpa: {
/** /**
* New authority set has been applied. * New authority set has been applied.
**/ **/
NewAuthorities: AugmentedEvent<ApiType, [authoritySet: Vec<ITuple<[SpFinalityGrandpaAppPublic, u64]>>], { authoritySet: Vec<ITuple<[SpFinalityGrandpaAppPublic, u64]>> }>; NewAuthorities: AugmentedEvent<ApiType, [authoritySet: Vec<ITuple<[SpConsensusGrandpaAppPublic, u64]>>], { authoritySet: Vec<ITuple<[SpConsensusGrandpaAppPublic, u64]>> }>;
/** /**
* Current authority set has been paused. * Current authority set has been paused.
**/ **/
@@ -724,19 +758,19 @@ declare module '@polkadot/api-base/types/events' {
/** /**
* Message placed in overweight queue. * Message placed in overweight queue.
**/ **/
OverweightEnqueued: AugmentedEvent<ApiType, [hash_: H256, origin: PalletMessageQueueMockHelpersMessageOrigin, pageIndex: u32, messageIndex: u32], { hash_: H256, origin: PalletMessageQueueMockHelpersMessageOrigin, pageIndex: u32, messageIndex: u32 }>; OverweightEnqueued: AugmentedEvent<ApiType, [hash_: H256, origin: u32, pageIndex: u32, messageIndex: u32], { hash_: H256, origin: u32, pageIndex: u32, messageIndex: u32 }>;
/** /**
* This page was reaped. * This page was reaped.
**/ **/
PageReaped: AugmentedEvent<ApiType, [origin: PalletMessageQueueMockHelpersMessageOrigin, index: u32], { origin: PalletMessageQueueMockHelpersMessageOrigin, index: u32 }>; PageReaped: AugmentedEvent<ApiType, [origin: u32, index: u32], { origin: u32, index: u32 }>;
/** /**
* Message is processed. * Message is processed.
**/ **/
Processed: AugmentedEvent<ApiType, [hash_: H256, origin: PalletMessageQueueMockHelpersMessageOrigin, weightUsed: SpWeightsWeightV2Weight, success: bool], { hash_: H256, origin: PalletMessageQueueMockHelpersMessageOrigin, weightUsed: SpWeightsWeightV2Weight, success: bool }>; Processed: AugmentedEvent<ApiType, [hash_: H256, origin: u32, weightUsed: SpWeightsWeightV2Weight, success: bool], { hash_: H256, origin: u32, weightUsed: SpWeightsWeightV2Weight, success: bool }>;
/** /**
* Message discarded due to an error in the `MessageProcessor` (usually a format error). * Message discarded due to an error in the `MessageProcessor` (usually a format error).
**/ **/
ProcessingFailed: AugmentedEvent<ApiType, [hash_: H256, origin: PalletMessageQueueMockHelpersMessageOrigin, error: FrameSupportMessagesProcessMessageError], { hash_: H256, origin: PalletMessageQueueMockHelpersMessageOrigin, error: FrameSupportMessagesProcessMessageError }>; ProcessingFailed: AugmentedEvent<ApiType, [hash_: H256, origin: u32, error: FrameSupportMessagesProcessMessageError], { hash_: H256, origin: u32, error: FrameSupportMessagesProcessMessageError }>;
/** /**
* Generic event * Generic event
**/ **/
@@ -777,11 +811,11 @@ declare module '@polkadot/api-base/types/events' {
/** /**
* Attribute metadata has been cleared for a `collection` or `item`. * Attribute metadata has been cleared for a `collection` or `item`.
**/ **/
AttributeCleared: AugmentedEvent<ApiType, [collection: u32, maybeItem: Option<u32>, key: Bytes, namespace: FrameSupportTokensMiscAttributeNamespace], { collection: u32, maybeItem: Option<u32>, key: Bytes, namespace: FrameSupportTokensMiscAttributeNamespace }>; AttributeCleared: AugmentedEvent<ApiType, [collection: u32, maybeItem: Option<u32>, key: Bytes, namespace: PalletNftsAttributeNamespace], { collection: u32, maybeItem: Option<u32>, key: Bytes, namespace: PalletNftsAttributeNamespace }>;
/** /**
* New attribute metadata has been set for a `collection` or `item`. * New attribute metadata has been set for a `collection` or `item`.
**/ **/
AttributeSet: AugmentedEvent<ApiType, [collection: u32, maybeItem: Option<u32>, key: Bytes, value: Bytes, namespace: FrameSupportTokensMiscAttributeNamespace], { collection: u32, maybeItem: Option<u32>, key: Bytes, value: Bytes, namespace: FrameSupportTokensMiscAttributeNamespace }>; AttributeSet: AugmentedEvent<ApiType, [collection: u32, maybeItem: Option<u32>, key: Bytes, value: Bytes, namespace: PalletNftsAttributeNamespace], { collection: u32, maybeItem: Option<u32>, key: Bytes, value: Bytes, namespace: PalletNftsAttributeNamespace }>;
/** /**
* An `item` was destroyed. * An `item` was destroyed.
**/ **/
@@ -878,6 +912,15 @@ declare module '@polkadot/api-base/types/events' {
* Ownership acceptance has changed for an account. * Ownership acceptance has changed for an account.
**/ **/
OwnershipAcceptanceChanged: AugmentedEvent<ApiType, [who: AccountId32, maybeCollection: Option<u32>], { who: AccountId32, maybeCollection: Option<u32> }>; OwnershipAcceptanceChanged: AugmentedEvent<ApiType, [who: AccountId32, maybeCollection: Option<u32>], { who: AccountId32, maybeCollection: Option<u32> }>;
/**
* A new attribute in the `Pallet` namespace was set for the `collection` or an `item`
* within that `collection`.
**/
PalletAttributeSet: AugmentedEvent<ApiType, [collection: u32, item: Option<u32>, attribute: PalletNftsPalletAttributes, value: Bytes], { collection: u32, item: Option<u32>, attribute: PalletNftsPalletAttributes, value: Bytes }>;
/**
* New attributes have been set for an `item` of the `collection`.
**/
PreSignedAttributesSet: AugmentedEvent<ApiType, [collection: u32, item: u32, namespace: PalletNftsAttributeNamespace], { collection: u32, item: u32, namespace: PalletNftsAttributeNamespace }>;
/** /**
* The deposit for a set of `item`s within a `collection` has been updated. * The deposit for a set of `item`s within a `collection` has been updated.
**/ **/
@@ -981,7 +1024,7 @@ declare module '@polkadot/api-base/types/events' {
* The roles of a pool have been updated to the given new roles. Note that the depositor * The roles of a pool have been updated to the given new roles. Note that the depositor
* can never change. * can never change.
**/ **/
RolesUpdated: AugmentedEvent<ApiType, [root: Option<AccountId32>, stateToggler: Option<AccountId32>, nominator: Option<AccountId32>], { root: Option<AccountId32>, stateToggler: Option<AccountId32>, nominator: Option<AccountId32> }>; RolesUpdated: AugmentedEvent<ApiType, [root: Option<AccountId32>, bouncer: Option<AccountId32>, nominator: Option<AccountId32>], { root: Option<AccountId32>, bouncer: Option<AccountId32>, nominator: Option<AccountId32> }>;
/** /**
* The state of a pool has changed * The state of a pool has changed
**/ **/
@@ -1140,6 +1183,14 @@ declare module '@polkadot/api-base/types/events' {
* A referendum has been killed. * A referendum has been killed.
**/ **/
Killed: AugmentedEvent<ApiType, [index: u32, tally: PalletRankedCollectiveTally], { index: u32, tally: PalletRankedCollectiveTally }>; Killed: AugmentedEvent<ApiType, [index: u32, tally: PalletRankedCollectiveTally], { index: u32, tally: PalletRankedCollectiveTally }>;
/**
* Metadata for a referendum has been cleared.
**/
MetadataCleared: AugmentedEvent<ApiType, [index: u32, hash_: H256], { index: u32, hash_: H256 }>;
/**
* Metadata for a referendum has been set.
**/
MetadataSet: AugmentedEvent<ApiType, [index: u32, hash_: H256], { index: u32, hash_: H256 }>;
/** /**
* A proposal has been rejected by referendum. * A proposal has been rejected by referendum.
**/ **/
@@ -1226,6 +1277,14 @@ declare module '@polkadot/api-base/types/events' {
* A referendum has been killed. * A referendum has been killed.
**/ **/
Killed: AugmentedEvent<ApiType, [index: u32, tally: PalletConvictionVotingTally], { index: u32, tally: PalletConvictionVotingTally }>; Killed: AugmentedEvent<ApiType, [index: u32, tally: PalletConvictionVotingTally], { index: u32, tally: PalletConvictionVotingTally }>;
/**
* Metadata for a referendum has been cleared.
**/
MetadataCleared: AugmentedEvent<ApiType, [index: u32, hash_: H256], { index: u32, hash_: H256 }>;
/**
* Metadata for a referendum has been set.
**/
MetadataSet: AugmentedEvent<ApiType, [index: u32, hash_: H256], { index: u32, hash_: H256 }>;
/** /**
* A proposal has been rejected by referendum. * A proposal has been rejected by referendum.
**/ **/
@@ -1257,6 +1316,28 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
salary: {
/**
* The next cycle begins.
**/
CycleStarted: AugmentedEvent<ApiType, [index: u32], { index: u32 }>;
/**
* A member is inducted into the payroll.
**/
Inducted: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;
/**
* A payment happened.
**/
Paid: AugmentedEvent<ApiType, [who: AccountId32, beneficiary: AccountId32, amount: u128, id: Null], { who: AccountId32, beneficiary: AccountId32, amount: u128, id: Null }>;
/**
* A member registered for a payout.
**/
Registered: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
/**
* 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.
@@ -1341,6 +1422,10 @@ declare module '@polkadot/api-base/types/events' {
* A new \[max\] member count has been set * A new \[max\] member count has been set
**/ **/
NewMaxMembers: AugmentedEvent<ApiType, [max: u32], { max: u32 }>; NewMaxMembers: AugmentedEvent<ApiType, [max: u32], { max: u32 }>;
/**
* A group of members has been choosen as Skeptics
**/
SkepticsChosen: AugmentedEvent<ApiType, [skeptics: Vec<AccountId32>], { skeptics: Vec<AccountId32> }>;
/** /**
* A suspended member has been judged. * A suspended member has been judged.
**/ **/
+8 -8
View File
@@ -1,11 +1,11 @@
// Copyright 2017-2023 @polkadot/api-augment authors & contributors // Copyright 2017-2023 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import '../base'; import '../base.js';
import './consts'; import './consts.js';
import './errors'; import './errors.js';
import './events'; import './events.js';
import './query'; import './query.js';
import './registry'; import './registry.js';
import './runtime'; import './runtime.js';
import './tx'; import './tx.js';
+99 -13
View File
@@ -10,7 +10,7 @@ import type { Data } from '@polkadot/types';
import type { BTreeSet, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { BTreeSet, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSupportTokensMiscAttributeNamespace, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceMemberRole, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletedContract, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMessageQueueBookState, PalletMessageQueueMockHelpersMessageOrigin, PalletMessageQueuePage, PalletMultisigMultisig, PalletNftsAttributeDeposit, PalletNftsCollectionConfig, PalletNftsCollectionDetails, PalletNftsCollectionMetadata, PalletNftsItemConfig, PalletNftsItemDetails, PalletNftsItemMetadata, PalletNftsPendingSwap, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, 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 { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceMemberRole, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletedContract, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMultisigMultisig, PalletNftsAttributeDeposit, PalletNftsAttributeNamespace, PalletNftsCollectionConfig, PalletNftsCollectionDetails, PalletNftsCollectionMetadata, PalletNftsItemConfig, PalletNftsItemDetails, PalletNftsItemMetadata, PalletNftsPendingSwap, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSalaryClaimantStatus, PalletSalaryStatusType, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, 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';
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>; export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
@@ -128,14 +128,6 @@ declare module '@polkadot/api-base/types/storage' {
* Author of current block. * Author of current block.
**/ **/
author: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>; author: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Whether uncles were already set in this block.
**/
didSetUncles: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Uncles
**/
uncles: AugmentedQuery<ApiType, () => Observable<Vec<PalletAuthorshipUncleEntryItem>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Generic query * Generic query
**/ **/
@@ -234,6 +226,17 @@ declare module '@polkadot/api-base/types/storage' {
* epoch. * epoch.
**/ **/
segmentIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>; segmentIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* A list of the last 100 skipped epochs and the corresponding session index
* when the epoch was skipped.
*
* This is only used for validating equivocation proofs. An equivocation proof
* must contains a key-ownership proof for a given session, therefore we need a
* way to tie together sessions and epoch indices, i.e. we need to validate that
* a validator was the owner of a given key on a given session, and what the
* active epoch index was during that session.
**/
skippedEpochs: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u64, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay. * TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay.
**/ **/
@@ -471,6 +474,15 @@ declare module '@polkadot/api-base/types/storage' {
* `ReferendumCount` if there isn't a unbaked referendum. * `ReferendumCount` if there isn't a unbaked referendum.
**/ **/
lowestUnbaked: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>; lowestUnbaked: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* General information concerning any proposal or referendum.
* The `PreimageHash` refers to the preimage of the `Preimages` provider which can be a JSON
* dump or IPFS hash of a JSON file.
*
* Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)
* large preimages.
**/
metadataOf: AugmentedQuery<ApiType, (arg: PalletDemocracyMetadataOwner | { External: any } | { Proposal: any } | { Referendum: any } | string | Uint8Array) => Observable<Option<H256>>, [PalletDemocracyMetadataOwner]> & QueryableStorageEntry<ApiType, [PalletDemocracyMetadataOwner]>;
/** /**
* The referendum to be tabled whenever it would be valid to table an external proposal. * The referendum to be tabled whenever it would be valid to table an external proposal.
* This happens when a referendum needs to be tabled and one of two conditions are met: * This happens when a referendum needs to be tabled and one of two conditions are met:
@@ -656,6 +668,37 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
glutton: {
/**
* Storage value used to specify what percentage of the left over `ref_time`
* to consume during `on_idle`.
**/
compute: AugmentedQuery<ApiType, () => Observable<Perbill>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Storage value used the specify what percentage of left over `proof_size`
* to consume during `on_idle`.
**/
storage: AugmentedQuery<ApiType, () => Observable<Perbill>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Storage map used for wasting proof size.
*
* It contains no meaningful data - hence the name "Trash". The maximal number of entries is
* set to 65k, which is just below the next jump at 16^4. This is important to reduce the proof
* size benchmarking overestimate. The assumption here is that we won't have more than 65k *
* 1KiB = 65MiB of proof size wasting in practice. However, this limit is not enforced, so the
* pallet would also work out of the box with more entries, but its benchmarked proof weight
* would possibly be underestimated in that case.
**/
trashData: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<U8aFixed>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* The current number of entries in `TrashData`.
**/
trashDataCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
grandpa: { grandpa: {
/** /**
* The number of changes (both in terms of keys and underlying economic responsibilities) * The number of changes (both in terms of keys and underlying economic responsibilities)
@@ -674,6 +717,12 @@ declare module '@polkadot/api-base/types/storage' {
* A mapping from grandpa set ID to the index of the *most recent* session for which its * A mapping from grandpa set ID to the index of the *most recent* session for which its
* members were responsible. * members were responsible.
* *
* This is only used for validating equivocation proofs. An equivocation proof must
* contains a key-ownership proof for a given session, therefore we need a way to tie
* together sessions and GRANDPA set ids, i.e. we need to validate that a validator
* was the owner of a given key on a given session, and what the active set ID was
* during that session.
*
* TWOX-NOTE: `SetId` is not under user control. * TWOX-NOTE: `SetId` is not under user control.
**/ **/
setIdSession: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>; setIdSession: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
@@ -801,15 +850,15 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* The index of the first and last (non-empty) pages. * The index of the first and last (non-empty) pages.
**/ **/
bookStateFor: AugmentedQuery<ApiType, (arg: PalletMessageQueueMockHelpersMessageOrigin | { Here: any } | { There: any } | { Everywhere: any } | string | Uint8Array) => Observable<PalletMessageQueueBookState>, [PalletMessageQueueMockHelpersMessageOrigin]> & QueryableStorageEntry<ApiType, [PalletMessageQueueMockHelpersMessageOrigin]>; bookStateFor: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<PalletMessageQueueBookState>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* The map of page indices to pages. * The map of page indices to pages.
**/ **/
pages: AugmentedQuery<ApiType, (arg1: PalletMessageQueueMockHelpersMessageOrigin | { Here: any } | { There: any } | { Everywhere: any } | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletMessageQueuePage>>, [PalletMessageQueueMockHelpersMessageOrigin, u32]> & QueryableStorageEntry<ApiType, [PalletMessageQueueMockHelpersMessageOrigin, u32]>; pages: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletMessageQueuePage>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
/** /**
* The origin at which we should begin servicing. * The origin at which we should begin servicing.
**/ **/
serviceHead: AugmentedQuery<ApiType, () => Observable<Option<PalletMessageQueueMockHelpersMessageOrigin>>, []> & QueryableStorageEntry<ApiType, []>; serviceHead: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Generic query * Generic query
**/ **/
@@ -855,7 +904,7 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* Attributes of a collection. * Attributes of a collection.
**/ **/
attribute: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: Option<u32> | null | Uint8Array | u32 | AnyNumber, arg3: FrameSupportTokensMiscAttributeNamespace | { Pallet: any } | { CollectionOwner: any } | { ItemOwner: any } | { Account: any } | string | Uint8Array, arg4: Bytes | string | Uint8Array) => Observable<Option<ITuple<[Bytes, PalletNftsAttributeDeposit]>>>, [u32, Option<u32>, FrameSupportTokensMiscAttributeNamespace, Bytes]> & QueryableStorageEntry<ApiType, [u32, Option<u32>, FrameSupportTokensMiscAttributeNamespace, Bytes]>; attribute: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: Option<u32> | null | Uint8Array | u32 | AnyNumber, arg3: PalletNftsAttributeNamespace | { Pallet: any } | { CollectionOwner: any } | { ItemOwner: any } | { Account: any } | string | Uint8Array, arg4: Bytes | string | Uint8Array) => Observable<Option<ITuple<[Bytes, PalletNftsAttributeDeposit]>>>, [u32, Option<u32>, PalletNftsAttributeNamespace, Bytes]> & QueryableStorageEntry<ApiType, [u32, Option<u32>, PalletNftsAttributeNamespace, Bytes]>;
/** /**
* Details of a collection. * Details of a collection.
**/ **/
@@ -947,6 +996,10 @@ declare module '@polkadot/api-base/types/storage' {
* Storage for bonded pools. * Storage for bonded pools.
**/ **/
bondedPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsBondedPoolInner>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; bondedPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsBondedPoolInner>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Map from a pool member account to their opted claim permission.
**/
claimPermissions: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletNominationPoolsClaimPermission>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
* Counter for the related counted storage map * Counter for the related counted storage map
**/ **/
@@ -1080,6 +1133,7 @@ declare module '@polkadot/api-base/types/storage' {
map1M: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; map1M: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
unboundedMap: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Vec<u32>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; unboundedMap: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Vec<u32>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
unboundedMap2: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Vec<u32>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; unboundedMap2: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Vec<u32>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
unboundedMapTwox: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Vec<u32>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* A value without a MEL bound. * A value without a MEL bound.
**/ **/
@@ -1163,6 +1217,15 @@ declare module '@polkadot/api-base/types/storage' {
* The number of referenda being decided currently. * The number of referenda being decided currently.
**/ **/
decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>; decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
/**
* The metadata is a general information concerning the referendum.
* The `PreimageHash` refers to the preimage of the `Preimages` provider which can be a JSON
* dump or IPFS hash of a JSON file.
*
* Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)
* large preimages.
**/
metadataOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<H256>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* The next free referendum index, aka the number of referenda started so far. * The next free referendum index, aka the number of referenda started so far.
**/ **/
@@ -1211,6 +1274,15 @@ declare module '@polkadot/api-base/types/storage' {
* The number of referenda being decided currently. * The number of referenda being decided currently.
**/ **/
decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>; decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
/**
* The metadata is a general information concerning the referendum.
* The `PreimageHash` refers to the preimage of the `Preimages` provider which can be a JSON
* dump or IPFS hash of a JSON file.
*
* Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)
* large preimages.
**/
metadataOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<H256>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* The next free referendum index, aka the number of referenda started so far. * The next free referendum index, aka the number of referenda started so far.
**/ **/
@@ -1231,6 +1303,20 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
salary: {
/**
* The status of a claimant.
**/
claimant: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletSalaryClaimantStatus>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* The overall status of the system.
**/
status: AugmentedQuery<ApiType, () => Observable<Option<PalletSalaryStatusType>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* 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.
+65 -1
View File
@@ -8,6 +8,7 @@ import '@polkadot/api-base/types/calls';
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types'; import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, Vec, u32 } from '@polkadot/types-codec'; import type { Bytes, Null, Option, Result, Vec, u32 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types'; import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { TAssetBalance } from '@polkadot/types/interfaces/assets';
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe'; import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder'; import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
import type { BlockHash } from '@polkadot/types/interfaces/chain'; import type { BlockHash } from '@polkadot/types/interfaces/chain';
@@ -17,6 +18,8 @@ import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa'; import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata'; import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr'; import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
import type { NftCollectionId, NftItemId } from '@polkadot/types/interfaces/nfts';
import type { NpPoolId } from '@polkadot/types/interfaces/nompools';
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment'; import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, Weight, WeightV2 } from '@polkadot/types/interfaces/runtime'; import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, Weight, WeightV2 } from '@polkadot/types/interfaces/runtime';
import type { RuntimeVersion } from '@polkadot/types/interfaces/state'; import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
@@ -40,6 +43,17 @@ declare module '@polkadot/api-base/types/calls' {
**/ **/
[key: string]: DecoratedCallBase<ApiType>; [key: string]: DecoratedCallBase<ApiType>;
}; };
/** 0x8453b50b22293977/1 */
assetsApi: {
/**
* Return the current set of authorities.
**/
accountBalances: AugmentedCall<ApiType, (account: AccountId | string | Uint8Array) => Observable<Vec<ITuple<[u32, TAssetBalance]>>>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x687ad44ad37f03c2/1 */ /** 0x687ad44ad37f03c2/1 */
authorityDiscoveryApi: { authorityDiscoveryApi: {
/** /**
@@ -181,7 +195,7 @@ declare module '@polkadot/api-base/types/calls' {
**/ **/
[key: string]: DecoratedCallBase<ApiType>; [key: string]: DecoratedCallBase<ApiType>;
}; };
/** 0x91d5df18b0d2cf58/1 */ /** 0x91d5df18b0d2cf58/2 */
mmrApi: { mmrApi: {
/** /**
* Generate MMR proof for a series of leaves under given indices. * Generate MMR proof for a series of leaves under given indices.
@@ -216,12 +230,51 @@ declare module '@polkadot/api-base/types/calls' {
**/ **/
[key: string]: DecoratedCallBase<ApiType>; [key: string]: DecoratedCallBase<ApiType>;
}; };
/** 0x899a250cbe84f250/1 */
nftsApi: {
/**
* An attribute
**/
attribute: AugmentedCall<ApiType, (collection: NftCollectionId | AnyNumber | Uint8Array, item: NftItemId | AnyNumber | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;
/**
* A collection attribute
**/
collectionAttribute: AugmentedCall<ApiType, (collection: NftCollectionId | AnyNumber | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;
/**
* A collection owner
**/
collectionOwner: AugmentedCall<ApiType, (collection: NftCollectionId | AnyNumber | Uint8Array) => Observable<Option<AccountId>>>;
/**
* A custom attribute
**/
customAttribute: AugmentedCall<ApiType, (account: AccountId | string | Uint8Array, collection: NftCollectionId | AnyNumber | Uint8Array, item: NftItemId | AnyNumber | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;
/**
* Collection owner
**/
owner: AugmentedCall<ApiType, (collection: NftCollectionId | AnyNumber | Uint8Array, item: NftItemId | AnyNumber | Uint8Array) => Observable<Option<AccountId>>>;
/**
* System attribute
**/
systemAttribute: AugmentedCall<ApiType, (collection: NftCollectionId | AnyNumber | Uint8Array, item: NftItemId | AnyNumber | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x17a6bc0d0062aeb3/1 */ /** 0x17a6bc0d0062aeb3/1 */
nominationPoolsApi: { nominationPoolsApi: {
/**
* Returns the equivalent points of `new_funds` for a given pool.
**/
balanceToPoints: AugmentedCall<ApiType, (poolId: NpPoolId | AnyNumber | Uint8Array, newFunds: Balance | AnyNumber | Uint8Array) => Observable<Balance>>;
/** /**
* Returns the pending rewards for the given member. * Returns the pending rewards for the given member.
**/ **/
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>; pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
/**
* Returns the equivalent balance of `points` for a given pool.
**/
pointsToBalance: AugmentedCall<ApiType, (poolId: NpPoolId | AnyNumber | Uint8Array, points: Balance | AnyNumber | Uint8Array) => Observable<Balance>>;
/** /**
* Generic call * Generic call
**/ **/
@@ -253,6 +306,17 @@ declare module '@polkadot/api-base/types/calls' {
**/ **/
[key: string]: DecoratedCallBase<ApiType>; [key: string]: DecoratedCallBase<ApiType>;
}; };
/** 0x18ef58a3b67ba770/1 */
stakingApi: {
/**
* Returns the nominations quota for a nominator with a given balance.
**/
nominationsQuota: AugmentedCall<ApiType, (balance: Balance | AnyNumber | Uint8Array) => Observable<u32>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xd2bc9897eed08f15/3 */ /** 0xd2bc9897eed08f15/3 */
taggedTransactionQueue: { taggedTransactionQueue: {
/** /**
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "9.13.1", "version": "10.1.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.20.13", "@polkadot/rpc-core": "10.1.1",
"@polkadot/rpc-core": "9.13.1", "@polkadot/types": "10.1.1",
"@polkadot/types": "9.13.1", "@polkadot/util": "^11.0.2",
"@polkadot/util": "^10.3.1", "rxjs": "^7.8.0",
"rxjs": "^7.8.0" "tslib": "^2.5.0"
} }
} }
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2023 @polkadot/api-base authors & contributors // Copyright 2017-2023 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
export { packageInfo } from './packageInfo'; export { packageInfo } from './packageInfo.js';
+2 -2
View File
@@ -5,7 +5,7 @@
import { detectPackage } from '@polkadot/util'; import { detectPackage } from '@polkadot/util';
import others from './detectOther'; import others from './detectOther.js';
import { packageInfo } from './packageInfo'; import { packageInfo } from './packageInfo.js';
detectPackage(packageInfo, null, others); detectPackage(packageInfo, null, others);
+2 -2
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2023 @polkadot/api-base authors & contributors // Copyright 2017-2023 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import './detectPackage'; import './detectPackage.js';
export * from './bundle'; export * from './bundle.js';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2023 @polkadot/api-base authors & contributors // Copyright 2017-2023 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
export * from './index'; export * from './index.js';
+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: '9.13.1' }; export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '10.1.1' };
+1 -1
View File
@@ -3,7 +3,7 @@
import type { Observable } from 'rxjs'; import type { Observable } from 'rxjs';
import type { AnyFunction, Codec, DefinitionCallNamed } from '@polkadot/types/types'; import type { AnyFunction, Codec, DefinitionCallNamed } from '@polkadot/types/types';
import type { ApiTypes, ReturnCodec } from './base'; import type { ApiTypes, ReturnCodec } from './base.js';
export type DecoratedCallBase<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> = export type DecoratedCallBase<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> =
ApiType extends 'rxjs' ApiType extends 'rxjs'
+1 -1
View File
@@ -3,7 +3,7 @@
import type { PalletConstantMetadataLatest } from '@polkadot/types/interfaces'; import type { PalletConstantMetadataLatest } from '@polkadot/types/interfaces';
import type { Codec } from '@polkadot/types/types'; import type { Codec } from '@polkadot/types/types';
import type { ApiTypes } from './base'; import type { ApiTypes } from './base.js';
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
export interface AugmentedConst<ApiType extends ApiTypes> { export interface AugmentedConst<ApiType extends ApiTypes> {
+1 -1
View File
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import type { IsError } from '@polkadot/types/metadata/decorate/types'; import type { IsError } from '@polkadot/types/metadata/decorate/types';
import type { ApiTypes } from './base'; import type { ApiTypes } from './base.js';
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
export type AugmentedError<ApiType extends ApiTypes> = IsError; export type AugmentedError<ApiType extends ApiTypes> = IsError;
+1 -1
View File
@@ -3,7 +3,7 @@
import type { IsEvent } from '@polkadot/types/metadata/decorate/types'; import type { IsEvent } from '@polkadot/types/metadata/decorate/types';
import type { AnyTuple } from '@polkadot/types/types'; import type { AnyTuple } from '@polkadot/types/types';
import type { ApiTypes } from './base'; import type { ApiTypes } from './base.js';
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
export type AugmentedEvent<ApiType extends ApiTypes, T extends AnyTuple = AnyTuple, N = unknown> = IsEvent<T, N>; export type AugmentedEvent<ApiType extends ApiTypes, T extends AnyTuple = AnyTuple, N = unknown> = IsEvent<T, N>;
+4 -4
View File
@@ -10,7 +10,7 @@ export * from '@polkadot/api-base/types/storage';
export * from '@polkadot/api-base/types/submittable'; export * from '@polkadot/api-base/types/submittable';
// normal exports // normal exports
export * from './api'; export * from './api.js';
export * from './base'; export * from './base.js';
export * from './derive'; export * from './derive.js';
export * from './rpc'; export * from './rpc.js';
+1 -1
View File
@@ -4,7 +4,7 @@
import type { Observable } from 'rxjs'; import type { Observable } from 'rxjs';
import type { AnyFunction, AnyJson, Callback, DefinitionRpc } from '@polkadot/types/types'; import type { AnyFunction, AnyJson, Callback, DefinitionRpc } from '@polkadot/types/types';
import { ApiTypes, PromiseResult, Push, RxResult, UnsubscribePromise } from './base'; import { ApiTypes, PromiseResult, Push, RxResult, UnsubscribePromise } from './base.js';
export type { AugmentedRpc } from '@polkadot/rpc-core/types'; export type { AugmentedRpc } from '@polkadot/rpc-core/types';
+1 -1
View File
@@ -6,7 +6,7 @@ import type { StorageKey, u64 } from '@polkadot/types';
import type { Hash } from '@polkadot/types/interfaces'; import type { Hash } from '@polkadot/types/interfaces';
import type { StorageEntry } from '@polkadot/types/primitive/types'; import type { StorageEntry } from '@polkadot/types/primitive/types';
import type { AnyFunction, AnyTuple, Callback, Codec, IStorageKey } from '@polkadot/types/types'; import type { AnyFunction, AnyTuple, Callback, Codec, IStorageKey } from '@polkadot/types/types';
import type { ApiTypes, DropLast, MethodResult, PaginationOptions, PromiseOrObs, ReturnCodec, UnsubscribePromise } from './base'; import type { ApiTypes, DropLast, MethodResult, PaginationOptions, PromiseOrObs, ReturnCodec, UnsubscribePromise } from './base.js';
interface StorageEntryObservableMulti<R extends Codec = Codec> { interface StorageEntryObservableMulti<R extends Codec = Codec> {
<T extends Codec = R>(args: (unknown[] | unknown)[]): Observable<T[]>; <T extends Codec = R>(args: (unknown[] | unknown)[]): Observable<T[]>;
+1 -1
View File
@@ -4,7 +4,7 @@
import type { Observable } from 'rxjs'; import type { Observable } from 'rxjs';
import type { AccountId, Address, ApplyExtrinsicResult, BlockNumber, Call, DispatchError, DispatchInfo, EventRecord, Extrinsic, ExtrinsicStatus, Hash, RuntimeDispatchInfo } from '@polkadot/types/interfaces'; import type { AccountId, Address, ApplyExtrinsicResult, BlockNumber, Call, DispatchError, DispatchInfo, EventRecord, Extrinsic, ExtrinsicStatus, Hash, RuntimeDispatchInfo } from '@polkadot/types/interfaces';
import type { AnyFunction, AnyNumber, AnyTuple, Callback, CallBase, Codec, IExtrinsicEra, IKeyringPair, ISubmittableResult, Signer } from '@polkadot/types/types'; import type { AnyFunction, AnyNumber, AnyTuple, Callback, CallBase, Codec, IExtrinsicEra, IKeyringPair, ISubmittableResult, Signer } from '@polkadot/types/types';
import type { ApiTypes, PromiseOrObs } from './base'; import type { ApiTypes, PromiseOrObs } from './base.js';
export type AugmentedSubmittable<T extends AnyFunction, A extends AnyTuple = AnyTuple> = T & CallBase<A>; export type AugmentedSubmittable<T extends AnyFunction, A extends AnyTuple = AnyTuple> = T & CallBase<A>;
+11 -11
View File
@@ -20,20 +20,20 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "9.13.1", "version": "10.1.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.20.13", "@polkadot/api": "10.1.1",
"@polkadot/api": "9.13.1", "@polkadot/types": "10.1.1",
"@polkadot/types": "9.13.1", "@polkadot/types-codec": "10.1.1",
"@polkadot/types-codec": "9.13.1", "@polkadot/types-create": "10.1.1",
"@polkadot/types-create": "9.13.1", "@polkadot/util": "^11.0.2",
"@polkadot/util": "^10.3.1", "@polkadot/util-crypto": "^11.0.2",
"@polkadot/util-crypto": "^10.3.1", "rxjs": "^7.8.0",
"rxjs": "^7.8.0" "tslib": "^2.5.0"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/api-augment": "9.13.1", "@polkadot/api-augment": "10.1.1",
"@polkadot/keyring": "^10.3.1" "@polkadot/keyring": "^11.0.2"
} }
} }
+20 -14
View File
@@ -1,16 +1,19 @@
// Copyright 2017-2023 @polkadot/api-contract authors & contributors // Copyright 2017-2023 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node" />
import type { Registry } from '@polkadot/types/types'; import type { Registry } from '@polkadot/types/types';
import fs from 'fs'; import fs from 'node:fs';
import path from 'path'; import path from 'node:path';
import process from 'node:process';
import { TypeDefInfo } from '@polkadot/types/types'; import { TypeDefInfo } from '@polkadot/types/types';
import { blake2AsHex } from '@polkadot/util-crypto'; import { blake2AsHex } from '@polkadot/util-crypto';
import abis from '../test/contracts'; import abis from '../test/contracts/index.js';
import { Abi } from '.'; import { Abi } from './index.js';
interface SpecDef { interface SpecDef {
messages: { messages: {
@@ -41,6 +44,9 @@ interface JSONAbi {
} }
} }
// FIXME When Jest is removed with ESM tests, this should be converted to use import.meta.url
const cmpPath = path.join(process.cwd(), 'packages/api-contract/src/test/compare');
function stringifyInfo (key: string, value: unknown): unknown { function stringifyInfo (key: string, value: unknown): unknown {
return key === 'info' return key === 'info'
? TypeDefInfo[value as number] ? TypeDefInfo[value as number]
@@ -82,26 +88,26 @@ describe('Abi', (): void => {
}); });
describe('TypeDef', (): void => { describe('TypeDef', (): void => {
Object.keys(abis).forEach((abiName) => { for (const [abiName, abiJson] of Object.entries(abis)) {
it(`initializes from a contract ABI (${abiName})`, (): void => { it(`initializes from a contract ABI: ${abiName}`, (): void => {
const abi = new Abi(abis[abiName]); const abi = new Abi(abiJson);
const json = stringifyJson(abi.registry); const registryJson = stringifyJson(abi.registry);
const cmpPath = path.join(__dirname, `../test/compare/${abiName}.test.json`); const cmpFile = path.join(cmpPath, `${abiName}.test.json`);
const cmpText = fs.readFileSync(cmpFile, 'utf-8');
try { try {
// eslint-disable-next-line @typescript-eslint/no-var-requires expect(JSON.parse(registryJson)).toEqual(JSON.parse(cmpText));
expect(JSON.parse(json)).toEqual(require(cmpPath));
} catch (error) { } catch (error) {
if (process.env.GITHUB_REPOSITORY) { if (process.env.GITHUB_REPOSITORY) {
console.error(json); console.error(registryJson);
throw error; throw error;
} }
fs.writeFileSync(cmpPath, json, { flag: 'w' }); fs.writeFileSync(cmpFile, registryJson, { flag: 'w' });
} }
}); });
}); }
}); });
it('has the correct hash for the source', (): void => { it('has the correct hash for the source', (): void => {
+2 -2
View File
@@ -4,13 +4,13 @@
import type { Bytes } from '@polkadot/types'; import type { Bytes } from '@polkadot/types';
import type { ChainProperties, ContractConstructorSpecLatest, ContractEventSpecLatest, ContractMessageParamSpecLatest, ContractMessageSpecLatest, ContractMetadata, ContractMetadataLatest, ContractProjectInfo } from '@polkadot/types/interfaces'; import type { ChainProperties, ContractConstructorSpecLatest, ContractEventSpecLatest, ContractMessageParamSpecLatest, ContractMessageSpecLatest, ContractMetadata, ContractMetadataLatest, ContractProjectInfo } from '@polkadot/types/interfaces';
import type { Codec, Registry } from '@polkadot/types/types'; import type { Codec, Registry } from '@polkadot/types/types';
import type { AbiConstructor, AbiEvent, AbiMessage, AbiParam, DecodedEvent, DecodedMessage } from '../types'; import type { AbiConstructor, AbiEvent, AbiMessage, AbiParam, DecodedEvent, DecodedMessage } from '../types.js';
import { TypeRegistry } from '@polkadot/types'; import { TypeRegistry } from '@polkadot/types';
import { TypeDefInfo } from '@polkadot/types-create'; import { TypeDefInfo } from '@polkadot/types-create';
import { assertReturn, compactAddLength, compactStripLength, isNumber, isObject, isString, logger, stringCamelCase, stringify, u8aConcat, u8aToHex } from '@polkadot/util'; import { assertReturn, compactAddLength, compactStripLength, isNumber, isObject, isString, logger, stringCamelCase, stringify, u8aConcat, u8aToHex } from '@polkadot/util';
import { convertVersions, enumVersions } from './toLatest'; import { convertVersions, enumVersions } from './toLatest.js';
const l = logger('Abi'); const l = logger('Abi');
@@ -1,10 +1,12 @@
// Copyright 2017-2023 @polkadot/api-contract authors & contributors // Copyright 2017-2023 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node" />
import { TypeRegistry } from '@polkadot/types'; import { TypeRegistry } from '@polkadot/types';
import abis from '../test/contracts'; import abis from '../test/contracts/index.js';
import { v0ToLatest, v1ToLatest, v2ToLatest, v3ToLatest, v4ToLatest } from './toLatest'; import { v0ToLatest, v1ToLatest, v2ToLatest, v3ToLatest, v4ToLatest } from './toLatest.js';
describe('v0ToLatest', (): void => { describe('v0ToLatest', (): void => {
const registry = new TypeRegistry(); const registry = new TypeRegistry();
+5 -5
View File
@@ -4,14 +4,14 @@
import type { ContractMetadataLatest, ContractMetadataV4 } from '@polkadot/types/interfaces'; import type { ContractMetadataLatest, ContractMetadataV4 } from '@polkadot/types/interfaces';
import type { Registry } from '@polkadot/types/types'; import type { Registry } from '@polkadot/types/types';
import { v0ToV1 } from './toV1'; import { v0ToV1 } from './toV1.js';
import { v1ToV2 } from './toV2'; import { v1ToV2 } from './toV2.js';
import { v2ToV3 } from './toV3'; import { v2ToV3 } from './toV3.js';
import { v3ToV4 } from './toV4'; import { v3ToV4 } from './toV4.js';
// The versions where an enum is used, aka V0 is missing // The versions where an enum is used, aka V0 is missing
// (Order from newest, i.e. we expect more on newest vs oldest) // (Order from newest, i.e. we expect more on newest vs oldest)
export const enumVersions = <const> ['V4', 'V3', 'V2', 'V1']; export const enumVersions = ['V4', 'V3', 'V2', 'V1'] as const;
type Versions = typeof enumVersions[number] | 'V0'; type Versions = typeof enumVersions[number] | 'V0';
+2 -2
View File
@@ -23,11 +23,11 @@ interface ArgsEntry <T extends WithArgs> extends NamedEntry {
args: GetArgsType<T>['args'][0][]; args: GetArgsType<T>['args'][0][];
} }
const ARG_TYPES = <const> { const ARG_TYPES = {
ContractConstructorSpec: 'ContractMessageParamSpecV2', ContractConstructorSpec: 'ContractMessageParamSpecV2',
ContractEventSpec: 'ContractEventParamSpecV2', ContractEventSpec: 'ContractEventParamSpecV2',
ContractMessageSpec: 'ContractMessageParamSpecV2' ContractMessageSpec: 'ContractMessageParamSpecV2'
}; } as const;
function v1ToV2Label (entry: NamedEntry): { label: Text } { function v1ToV2Label (entry: NamedEntry): { label: Text } {
return objectSpread({}, entry, { return objectSpread({}, entry, {
+1 -1
View File
@@ -8,7 +8,7 @@ import type { Registry } from '@polkadot/types/types';
import { ApiBase } from '@polkadot/api/base'; import { ApiBase } from '@polkadot/api/base';
import { isFunction } from '@polkadot/util'; import { isFunction } from '@polkadot/util';
import { Abi } from '../Abi'; import { Abi } from '../Abi/index.js';
export abstract class Base<ApiType extends ApiTypes> { export abstract class Base<ApiType extends ApiTypes> {
readonly abi: Abi; readonly abi: Abi;
+7 -7
View File
@@ -5,18 +5,18 @@ import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types'; import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
import type { AccountId, EventRecord, Hash } from '@polkadot/types/interfaces'; import type { AccountId, EventRecord, Hash } from '@polkadot/types/interfaces';
import type { ISubmittableResult } from '@polkadot/types/types'; import type { ISubmittableResult } from '@polkadot/types/types';
import type { AbiConstructor, BlueprintOptions } from '../types'; import type { AbiConstructor, BlueprintOptions } from '../types.js';
import type { MapConstructorExec } from './types'; import type { MapConstructorExec } from './types.js';
import { SubmittableResult } from '@polkadot/api'; import { SubmittableResult } from '@polkadot/api';
import { ApiBase } from '@polkadot/api/base'; import { ApiBase } from '@polkadot/api/base';
import { BN_ZERO, isUndefined } from '@polkadot/util'; import { BN_ZERO, isUndefined } from '@polkadot/util';
import { Abi } from '../Abi'; import { Abi } from '../Abi/index.js';
import { applyOnEvent } from '../util'; import { applyOnEvent } from '../util.js';
import { Base } from './Base'; import { Base } from './Base.js';
import { Contract } from './Contract'; import { Contract } from './Contract.js';
import { convertWeight, createBluePrintTx, encodeSalt } from './util'; import { convertWeight, createBluePrintTx, encodeSalt } from './util.js';
export interface BlueprintConstructor<ApiType extends ApiTypes> { export interface BlueprintConstructor<ApiType extends ApiTypes> {
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash | Uint8Array): Blueprint<ApiType>; new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash | Uint8Array): Blueprint<ApiType>;
+9 -5
View File
@@ -1,18 +1,22 @@
// Copyright 2017-2023 @polkadot/api-contract authors & contributors // Copyright 2017-2023 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import fs from 'fs'; /// <reference types="@polkadot/dev/node/test/node" />
import path from 'path';
import fs from 'node:fs';
import path from 'node:path';
import process from 'node:process';
import { toPromiseMethod } from '@polkadot/api'; import { toPromiseMethod } from '@polkadot/api';
import v0contractFlipper from '../test/contracts/ink/v0/flipper.contract.json' assert { type: 'json' }; import v0contractFlipper from '../test/contracts/ink/v0/flipper.contract.json' assert { type: 'json' };
import v0abiFlipper from '../test/contracts/ink/v0/flipper.json' assert { type: 'json' }; import v0abiFlipper from '../test/contracts/ink/v0/flipper.json' assert { type: 'json' };
import v1contractFlipper from '../test/contracts/ink/v1/flipper.contract.json' assert { type: 'json' }; import v1contractFlipper from '../test/contracts/ink/v1/flipper.contract.json' assert { type: 'json' };
import { Code } from './Code'; import { Code } from './Code.js';
import { mockApi } from './mock'; import { mockApi } from './mock.js';
const v0wasmFlipper = fs.readFileSync(path.join(__dirname, '../test/contracts/ink/v0/flipper.wasm')); // FIXME When Jest is removed with ESM tests, this should be converted to use import.meta.url
const v0wasmFlipper = fs.readFileSync(path.join(process.cwd(), 'packages/api-contract/src/test/contracts/ink/v0/flipper.wasm'), 'utf-8');
describe('Code', (): void => { describe('Code', (): void => {
it('can construct with an individual ABI/WASM combo', (): void => { it('can construct with an individual ABI/WASM combo', (): void => {
+8 -8
View File
@@ -6,19 +6,19 @@ import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
import type { AccountId, EventRecord } from '@polkadot/types/interfaces'; import type { AccountId, EventRecord } from '@polkadot/types/interfaces';
import type { ISubmittableResult } from '@polkadot/types/types'; import type { ISubmittableResult } from '@polkadot/types/types';
import type { Codec } from '@polkadot/types-codec/types'; import type { Codec } from '@polkadot/types-codec/types';
import type { AbiConstructor, BlueprintOptions } from '../types'; import type { AbiConstructor, BlueprintOptions } from '../types.js';
import type { MapConstructorExec } from './types'; import type { MapConstructorExec } from './types.js';
import { SubmittableResult } from '@polkadot/api'; import { SubmittableResult } from '@polkadot/api';
import { ApiBase } from '@polkadot/api/base'; import { ApiBase } from '@polkadot/api/base';
import { BN_ZERO, compactAddLength, isUndefined, isWasm, u8aToU8a } from '@polkadot/util'; import { BN_ZERO, compactAddLength, isUndefined, isWasm, u8aToU8a } from '@polkadot/util';
import { Abi } from '../Abi'; import { Abi } from '../Abi/index.js';
import { applyOnEvent } from '../util'; import { applyOnEvent } from '../util.js';
import { Base } from './Base'; import { Base } from './Base.js';
import { Blueprint } from './Blueprint'; import { Blueprint } from './Blueprint.js';
import { Contract } from './Contract'; import { Contract } from './Contract.js';
import { convertWeight, createBluePrintTx, encodeSalt } from './util'; import { convertWeight, createBluePrintTx, encodeSalt } from './util.js';
export interface CodeConstructor<ApiType extends ApiTypes> { export interface CodeConstructor<ApiType extends ApiTypes> {
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined): Code<ApiType>; new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined): Code<ApiType>;
+6 -6
View File
@@ -6,8 +6,8 @@ import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
import type { Bytes } from '@polkadot/types'; import type { Bytes } from '@polkadot/types';
import type { AccountId, ContractExecResult, EventRecord, Weight, WeightV2 } from '@polkadot/types/interfaces'; import type { AccountId, ContractExecResult, EventRecord, Weight, WeightV2 } from '@polkadot/types/interfaces';
import type { ISubmittableResult } from '@polkadot/types/types'; import type { ISubmittableResult } from '@polkadot/types/types';
import type { AbiMessage, ContractCallOutcome, ContractOptions, DecodedEvent, WeightAll } from '../types'; import type { AbiMessage, ContractCallOutcome, ContractOptions, DecodedEvent, WeightAll } from '../types.js';
import type { ContractCallResult, ContractCallSend, ContractQuery, ContractTx, MapMessageQuery, MapMessageTx } from './types'; import type { ContractCallResult, ContractCallSend, ContractQuery, ContractTx, MapMessageQuery, MapMessageTx } from './types.js';
import { map } from 'rxjs'; import { map } from 'rxjs';
@@ -15,10 +15,10 @@ import { SubmittableResult } from '@polkadot/api';
import { ApiBase } from '@polkadot/api/base'; import { ApiBase } from '@polkadot/api/base';
import { BN, BN_HUNDRED, BN_ONE, BN_ZERO, isUndefined, logger } from '@polkadot/util'; import { BN, BN_HUNDRED, BN_ONE, BN_ZERO, isUndefined, logger } from '@polkadot/util';
import { Abi } from '../Abi'; import { Abi } from '../Abi/index.js';
import { applyOnEvent } from '../util'; import { applyOnEvent } from '../util.js';
import { Base } from './Base'; import { Base } from './Base.js';
import { convertWeight, withMeta } from './util'; import { convertWeight, withMeta } from './util.js';
export interface ContractConstructor<ApiType extends ApiTypes> { export interface ContractConstructor<ApiType extends ApiTypes> {
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId): Contract<ApiType>; new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId): Contract<ApiType>;
+3 -3
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2023 @polkadot/api authors & contributors // Copyright 2017-2023 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
export { Blueprint, BlueprintSubmittableResult, extendBlueprint } from './Blueprint'; export { Blueprint, BlueprintSubmittableResult, extendBlueprint } from './Blueprint.js';
export { Code, CodeSubmittableResult, extendCode } from './Code'; export { Code, CodeSubmittableResult, extendCode } from './Code.js';
export { Contract, extendContract } from './Contract'; export { Contract, extendContract } from './Contract.js';
+1 -1
View File
@@ -5,7 +5,7 @@ import type { Observable } from 'rxjs';
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types'; import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
import type { ApiTypes, ObsInnerType } from '@polkadot/api/types'; import type { ApiTypes, ObsInnerType } from '@polkadot/api/types';
import type { AccountId } from '@polkadot/types/interfaces'; import type { AccountId } from '@polkadot/types/interfaces';
import type { AbiMessage, BlueprintOptions, ContractCallOutcome, ContractOptions } from '../types'; import type { AbiMessage, BlueprintOptions, ContractCallOutcome, ContractOptions } from '../types.js';
export interface MessageMeta { export interface MessageMeta {
readonly meta: AbiMessage; readonly meta: AbiMessage;
+2 -2
View File
@@ -6,8 +6,8 @@ import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
import type { ApiTypes } from '@polkadot/api/types'; import type { ApiTypes } from '@polkadot/api/types';
import type { WeightV1, WeightV2 } from '@polkadot/types/interfaces'; import type { WeightV1, WeightV2 } from '@polkadot/types/interfaces';
import type { BN } from '@polkadot/util'; import type { BN } from '@polkadot/util';
import type { AbiConstructor, AbiMessage, BlueprintOptions, WeightAll } from '../types'; import type { AbiConstructor, AbiMessage, BlueprintOptions, WeightAll } from '../types.js';
import type { BlueprintDeploy, ContractGeneric } from './types'; import type { BlueprintDeploy, ContractGeneric } from './types.js';
import { Bytes } from '@polkadot/types'; import { Bytes } from '@polkadot/types';
import { bnToBn, compactAddLength, u8aToU8a } from '@polkadot/util'; import { bnToBn, compactAddLength, u8aToU8a } from '@polkadot/util';
+4 -4
View File
@@ -1,8 +1,8 @@
// Copyright 2017-2023 @polkadot/api-contract authors & contributors // Copyright 2017-2023 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
export { Abi } from './Abi'; export { Abi } from './Abi/index.js';
export { packageInfo } from './packageInfo'; export { packageInfo } from './packageInfo.js';
export * from './promise'; export * from './promise/index.js';
export * from './rx'; export * from './rx/index.js';
+2 -2
View File
@@ -5,7 +5,7 @@
import { detectPackage } from '@polkadot/util'; import { detectPackage } from '@polkadot/util';
import others from './detectOther'; import others from './detectOther.js';
import { packageInfo } from './packageInfo'; import { packageInfo } from './packageInfo.js';
detectPackage(packageInfo, null, others); detectPackage(packageInfo, null, others);
+2 -2
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2023 @polkadot/api-contract authors & contributors // Copyright 2017-2023 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import './detectPackage'; import './detectPackage.js';
export * from './bundle'; export * from './bundle.js';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2023 @polkadot/api-contract authors & contributors // Copyright 2017-2023 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
export * from './index'; export * from './index.js';
+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: '9.13.1' }; export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '10.1.1' };
+2 -2
View File
@@ -5,8 +5,8 @@ import type { AccountId, Hash } from '@polkadot/types/interfaces';
import { ApiPromise, toPromiseMethod } from '@polkadot/api'; import { ApiPromise, toPromiseMethod } from '@polkadot/api';
import { Abi } from '../Abi'; import { Abi } from '../Abi/index.js';
import { Blueprint, Code, Contract } from '../base'; import { Blueprint, Code, Contract } from '../base/index.js';
export class BlueprintPromise extends Blueprint<'promise'> { export class BlueprintPromise extends Blueprint<'promise'> {
constructor (api: ApiPromise, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash) { constructor (api: ApiPromise, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash) {
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/api-contract authors & contributors // Copyright 2017-2023 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import type { BlueprintSubmittableResult as BaseBlueprintSubmittableResult, CodeSubmittableResult as BaseCodeSubmittableResult } from '../base'; import type { BlueprintSubmittableResult as BaseBlueprintSubmittableResult, CodeSubmittableResult as BaseCodeSubmittableResult } from '../base/index.js';
export type BlueprintSubmittableResult = BaseBlueprintSubmittableResult<'promise'>; export type BlueprintSubmittableResult = BaseBlueprintSubmittableResult<'promise'>;
export type CodeSubmittableResult = BaseCodeSubmittableResult<'promise'>; export type CodeSubmittableResult = BaseCodeSubmittableResult<'promise'>;
+2 -2
View File
@@ -5,8 +5,8 @@ import type { AccountId, Hash } from '@polkadot/types/interfaces';
import { ApiRx, toRxMethod } from '@polkadot/api'; import { ApiRx, toRxMethod } from '@polkadot/api';
import { Abi } from '../Abi'; import { Abi } from '../Abi/index.js';
import { Blueprint, Code, Contract } from '../base'; import { Blueprint, Code, Contract } from '../base/index.js';
export class BlueprintRx extends Blueprint<'rxjs'> { export class BlueprintRx extends Blueprint<'rxjs'> {
constructor (api: ApiRx, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash) { constructor (api: ApiRx, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash) {
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/api-contract authors & contributors // Copyright 2017-2023 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import type { BlueprintSubmittableResult as BaseBlueprintSubmittableResult, CodeSubmittableResult as BaseCodeSubmittableResult } from '../base'; import type { BlueprintSubmittableResult as BaseBlueprintSubmittableResult, CodeSubmittableResult as BaseCodeSubmittableResult } from '../base/index.js';
export type BlueprintSubmittableResult = BaseBlueprintSubmittableResult<'promise'>; export type BlueprintSubmittableResult = BaseBlueprintSubmittableResult<'promise'>;
export type CodeSubmittableResult = BaseCodeSubmittableResult<'promise'>; export type CodeSubmittableResult = BaseCodeSubmittableResult<'promise'>;
@@ -1,9 +1,9 @@
// Copyright 2017-2023 @polkadot/api-contract authors & contributors // Copyright 2017-2023 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import ink from './ink'; import ink from './ink/index.js';
import solang from './solang'; import solang from './solang/index.js';
import user from './user'; import user from './user/index.js';
const all: Record<string, Record<string, unknown>> = {}; const all: Record<string, Record<string, unknown>> = {};
@@ -1,11 +1,11 @@
// Copyright 2017-2023 @polkadot/api-contract authors & contributors // Copyright 2017-2023 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import { createVersionedExport } from '../util'; import { createVersionedExport } from '../util.js';
import * as v0 from './v0'; import * as v0 from './v0/index.js';
import * as v1 from './v1'; import * as v1 from './v1/index.js';
import * as v2 from './v2'; import * as v2 from './v2/index.js';
import * as v3 from './v3'; import * as v3 from './v3/index.js';
import * as v4 from './v4'; import * as v4 from './v4/index.js';
export default createVersionedExport({ v0, v1, v2, v3, v4 }); export default createVersionedExport({ v0, v1, v2, v3, v4 });
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/api-contract authors & contributors // Copyright 2017-2023 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import { createVersionedExport } from '../util'; import { createVersionedExport } from '../util.js';
import * as v0 from './v0'; import * as v0 from './v0/index.js';
export default createVersionedExport({ v0 }); export default createVersionedExport({ v0 });
@@ -1,8 +1,8 @@
// Copyright 2017-2023 @polkadot/api-contract authors & contributors // Copyright 2017-2023 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import { createVersionedExport } from '../util'; import { createVersionedExport } from '../util.js';
import * as v0 from './v0'; import * as v0 from './v0/index.js';
import * as v3 from './v3'; import * as v3 from './v3/index.js';
export default createVersionedExport({ v0, v3 }); export default createVersionedExport({ v0, v3 });
+1 -1
View File
@@ -7,7 +7,7 @@ import type { Text } from '@polkadot/types';
import type { ContractExecResultResult, ContractSelector, StorageDeposit, Weight, WeightV2 } from '@polkadot/types/interfaces'; import type { ContractExecResultResult, ContractSelector, StorageDeposit, Weight, WeightV2 } from '@polkadot/types/interfaces';
import type { Codec, TypeDef } from '@polkadot/types/types'; import type { Codec, TypeDef } from '@polkadot/types/types';
import type { BN } from '@polkadot/util'; import type { BN } from '@polkadot/util';
import type { Abi } from '.'; import type { Abi } from './index.js';
export interface ContractBase<ApiType extends ApiTypes> { export interface ContractBase<ApiType extends ApiTypes> {
readonly abi: Abi; readonly abi: Abi;
+16 -16
View File
@@ -20,25 +20,25 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "9.13.1", "version": "10.1.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.20.13", "@polkadot/api": "10.1.1",
"@polkadot/api": "9.13.1", "@polkadot/api-augment": "10.1.1",
"@polkadot/api-augment": "9.13.1", "@polkadot/api-base": "10.1.1",
"@polkadot/api-base": "9.13.1", "@polkadot/rpc-core": "10.1.1",
"@polkadot/rpc-core": "9.13.1", "@polkadot/types": "10.1.1",
"@polkadot/types": "9.13.1", "@polkadot/types-codec": "10.1.1",
"@polkadot/types-codec": "9.13.1", "@polkadot/util": "^11.0.2",
"@polkadot/util": "^10.3.1", "@polkadot/util-crypto": "^11.0.2",
"@polkadot/util-crypto": "^10.3.1", "rxjs": "^7.8.0",
"rxjs": "^7.8.0" "tslib": "^2.5.0"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/api": "9.13.1", "@polkadot/api": "10.1.1",
"@polkadot/api-augment": "9.13.1", "@polkadot/api-augment": "10.1.1",
"@polkadot/rpc-augment": "9.13.1", "@polkadot/rpc-augment": "10.1.1",
"@polkadot/rpc-provider": "9.13.1", "@polkadot/rpc-provider": "10.1.1",
"@polkadot/types-support": "9.13.1" "@polkadot/types-support": "10.1.1"
} }
} }
@@ -3,14 +3,14 @@
import type { Observable } from 'rxjs'; import type { Observable } from 'rxjs';
import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces';
import type { DeriveApi } from '../types'; import type { DeriveApi } from '../types.js';
import { map, of } from 'rxjs'; import { map, of } from 'rxjs';
import { assertReturn, isU8a } from '@polkadot/util'; import { assertReturn, isU8a } from '@polkadot/util';
import { decodeAddress } from '@polkadot/util-crypto'; import { decodeAddress } from '@polkadot/util-crypto';
import { memo } from '../util'; import { memo } from '../util/index.js';
/** /**
* @name accountId * @name accountId
+2 -2
View File
@@ -6,13 +6,13 @@ import type { AccountId, Address, Balance } from '@polkadot/types/interfaces';
import type{ PalletElectionsPhragmenSeatHolder } from '@polkadot/types/lookup'; import type{ PalletElectionsPhragmenSeatHolder } from '@polkadot/types/lookup';
import type { Codec } from '@polkadot/types/types'; import type { Codec } from '@polkadot/types/types';
import type { Option } from '@polkadot/types-codec'; import type { Option } from '@polkadot/types-codec';
import type { DeriveAccountFlags, DeriveApi } from '../types'; import type { DeriveAccountFlags, DeriveApi } from '../types.js';
import { map, of } from 'rxjs'; import { map, of } from 'rxjs';
import { isFunction } from '@polkadot/util'; import { isFunction } from '@polkadot/util';
import { memo } from '../util'; import { memo } from '../util/index.js';
type FlagsIntermediate = [ type FlagsIntermediate = [
PalletElectionsPhragmenSeatHolder[] | [AccountId, Balance][] | undefined, PalletElectionsPhragmenSeatHolder[] | [AccountId, Balance][] | undefined,
@@ -3,14 +3,14 @@
import type { Observable } from 'rxjs'; import type { Observable } from 'rxjs';
import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces';
import type { AccountIdAndIndex, DeriveApi } from '../types'; import type { AccountIdAndIndex, DeriveApi } from '../types.js';
import { map, of } from 'rxjs'; import { map, of } from 'rxjs';
import { isU8a } from '@polkadot/util'; import { isU8a } from '@polkadot/util';
import { decodeAddress } from '@polkadot/util-crypto'; import { decodeAddress } from '@polkadot/util-crypto';
import { memo } from '../util'; import { memo } from '../util/index.js';
/** /**
* @name idAndIndex * @name idAndIndex
@@ -3,11 +3,11 @@
import type { Observable } from 'rxjs'; import type { Observable } from 'rxjs';
import type { AccountId, AccountIndex } from '@polkadot/types/interfaces'; import type { AccountId, AccountIndex } from '@polkadot/types/interfaces';
import type { AccountIndexes, DeriveApi } from '../types'; import type { AccountIndexes, DeriveApi } from '../types.js';
import { map } from 'rxjs'; import { map } from 'rxjs';
import { memo } from '../util'; import { memo } from '../util/index.js';
/** /**
* @name idToIndex * @name idToIndex
+2 -2
View File
@@ -7,13 +7,13 @@ import type { AccountId } from '@polkadot/types/interfaces';
import type { PalletIdentityIdentityInfo, PalletIdentityRegistration } from '@polkadot/types/lookup'; import type { PalletIdentityIdentityInfo, PalletIdentityRegistration } from '@polkadot/types/lookup';
import type { Option } from '@polkadot/types-codec'; import type { Option } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types'; import type { ITuple } from '@polkadot/types-codec/types';
import type { DeriveAccountRegistration, DeriveApi, DeriveHasIdentity } from '../types'; import type { DeriveAccountRegistration, DeriveApi, DeriveHasIdentity } from '../types.js';
import { combineLatest, map, of, switchMap } from 'rxjs'; import { combineLatest, map, of, switchMap } from 'rxjs';
import { isHex, u8aToString } from '@polkadot/util'; import { isHex, u8aToString } from '@polkadot/util';
import { firstMemo, memo } from '../util'; import { firstMemo, memo } from '../util/index.js';
type IdentityInfoAdditional = PalletIdentityIdentityInfo['additional'][0]; type IdentityInfoAdditional = PalletIdentityIdentityInfo['additional'][0];
+8 -8
View File
@@ -1,11 +1,11 @@
// Copyright 2017-2023 @polkadot/api-derive authors & contributors // Copyright 2017-2023 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
export * from './accountId'; export * from './accountId.js';
export * from './flags'; export * from './flags.js';
export * from './idAndIndex'; export * from './idAndIndex.js';
export * from './idToIndex'; export * from './idToIndex.js';
export * from './identity'; export * from './identity.js';
export * from './indexToId'; export * from './indexToId.js';
export * from './indexes'; export * from './indexes.js';
export * from './info'; export * from './info.js';
@@ -3,11 +3,11 @@
import type { Observable } from 'rxjs'; import type { Observable } from 'rxjs';
import type { AccountId, AccountIndex } from '@polkadot/types/interfaces'; import type { AccountId, AccountIndex } from '@polkadot/types/interfaces';
import type { DeriveApi } from '../types'; import type { DeriveApi } from '../types.js';
import { map, of } from 'rxjs'; import { map, of } from 'rxjs';
import { memo } from '../util'; import { memo } from '../util/index.js';
/** /**
* @name indexToId * @name indexToId
+2 -2
View File
@@ -2,11 +2,11 @@
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs'; import type { Observable } from 'rxjs';
import type { AccountIndexes, DeriveApi } from '../types'; import type { AccountIndexes, DeriveApi } from '../types.js';
import { map, of, startWith } from 'rxjs'; import { map, of, startWith } from 'rxjs';
import { memo } from '../util'; import { memo } from '../util/index.js';
let indicesCache: AccountIndexes | null = null; let indicesCache: AccountIndexes | null = null;
+2 -2
View File
@@ -5,13 +5,13 @@ import type { Observable } from 'rxjs';
import type { Bytes, Option, u32 } from '@polkadot/types'; import type { Bytes, Option, u32 } from '@polkadot/types';
import type { AccountId, AccountIndex, Address, Balance } from '@polkadot/types/interfaces'; import type { AccountId, AccountIndex, Address, Balance } from '@polkadot/types/interfaces';
import type { ITuple } from '@polkadot/types/types'; import type { ITuple } from '@polkadot/types/types';
import type { DeriveAccountInfo, DeriveAccountRegistration, DeriveApi } from '../types'; import type { DeriveAccountInfo, DeriveAccountRegistration, DeriveApi } from '../types.js';
import { combineLatest, map, of, switchMap } from 'rxjs'; import { combineLatest, map, of, switchMap } from 'rxjs';
import { u8aToString } from '@polkadot/util'; import { u8aToString } from '@polkadot/util';
import { memo } from '../util'; import { memo } from '../util/index.js';
function retrieveNick (api: DeriveApi, accountId?: AccountId): Observable<string | undefined> { function retrieveNick (api: DeriveApi, accountId?: AccountId): Observable<string | undefined> {
return (( return ((
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/api-derive authors & contributors // Copyright 2017-2023 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import { hasProposals as collectiveHasProposals, members as collectiveMembers, prime as collectivePrime, proposal as collectiveProposal, proposalCount as collectiveProposalCount, proposalHashes as collectiveProposalHashes, proposals as collectiveProposals } from '../collective'; import { hasProposals as collectiveHasProposals, members as collectiveMembers, prime as collectivePrime, proposal as collectiveProposal, proposalCount as collectiveProposalCount, proposalHashes as collectiveProposalHashes, proposals as collectiveProposals } from '../collective/index.js';
export const members = collectiveMembers('allianceMotion'); export const members = collectiveMembers('allianceMotion');
+4 -4
View File
@@ -5,15 +5,15 @@ import type { Observable } from 'rxjs';
import type { Option, u64 } from '@polkadot/types'; import type { Option, u64 } from '@polkadot/types';
import type { PalletBagsListListBag } from '@polkadot/types/lookup'; import type { PalletBagsListListBag } from '@polkadot/types/lookup';
import type { BN } from '@polkadot/util'; import type { BN } from '@polkadot/util';
import type { DeriveApi } from '../types'; import type { DeriveApi } from '../types.js';
import type { Bag } from './types'; import type { Bag } from './types.js';
import { map, of, switchMap } from 'rxjs'; import { map, of, switchMap } from 'rxjs';
import { BN_ZERO, bnToBn, objectSpread } from '@polkadot/util'; import { BN_ZERO, bnToBn, objectSpread } from '@polkadot/util';
import { memo } from '../util'; import { memo } from '../util/index.js';
import { getQueryInterface } from './util'; import { getQueryInterface } from './util.js';
function orderBags (ids: BN[], bags: Option<PalletBagsListListBag>[]): Bag[] { function orderBags (ids: BN[], bags: Option<PalletBagsListListBag>[]): Bag[] {
const sorted = ids const sorted = ids
@@ -3,14 +3,14 @@
import type { Observable } from 'rxjs'; import type { Observable } from 'rxjs';
import type { BN } from '@polkadot/util'; import type { BN } from '@polkadot/util';
import type { DeriveApi } from '../types'; import type { DeriveApi } from '../types.js';
import type { Bag, BagExpanded } from './types'; import type { Bag, BagExpanded } from './types.js';
import { map, switchMap } from 'rxjs'; import { map, switchMap } from 'rxjs';
import { objectSpread } from '@polkadot/util'; import { objectSpread } from '@polkadot/util';
import { memo } from '../util'; import { memo } from '../util/index.js';
export function expand (instanceId: string, api: DeriveApi): (bag: Bag) => Observable<BagExpanded> { export function expand (instanceId: string, api: DeriveApi): (bag: Bag) => Observable<BagExpanded> {
return memo(instanceId, (bag: Bag): Observable<BagExpanded> => return memo(instanceId, (bag: Bag): Observable<BagExpanded> =>
+3 -3
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2023 @polkadot/api-derive authors & contributors // Copyright 2017-2023 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
export * from './get'; export * from './get.js';
export * from './getExpanded'; export * from './getExpanded.js';
export * from './listNodes'; export * from './listNodes.js';
@@ -5,14 +5,14 @@ import type { Observable } from 'rxjs';
import type { Option } from '@polkadot/types'; import type { Option } from '@polkadot/types';
import type { AccountId32 } from '@polkadot/types/interfaces'; import type { AccountId32 } from '@polkadot/types/interfaces';
import type { PalletBagsListListBag, PalletBagsListListNode } from '@polkadot/types/lookup'; import type { PalletBagsListListBag, PalletBagsListListNode } from '@polkadot/types/lookup';
import type { DeriveApi } from '../types'; import type { DeriveApi } from '../types.js';
import { BehaviorSubject, map, of, switchMap, tap, toArray } from 'rxjs'; import { BehaviorSubject, map, of, switchMap, tap, toArray } from 'rxjs';
import { nextTick } from '@polkadot/util'; import { nextTick } from '@polkadot/util';
import { memo } from '../util'; import { memo } from '../util/index.js';
import { getQueryInterface } from './util'; import { getQueryInterface } from './util.js';
function traverseLinks (api: DeriveApi, head: AccountId32 | string): Observable<PalletBagsListListNode[]> { function traverseLinks (api: DeriveApi, head: AccountId32 | string): Observable<PalletBagsListListNode[]> {
const subject = new BehaviorSubject<AccountId32 | string>(head); const subject = new BehaviorSubject<AccountId32 | string>(head);
+1 -1
View File
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import type { QueryableStorage } from '@polkadot/api-base/types'; import type { QueryableStorage } from '@polkadot/api-base/types';
import type { DeriveApi } from '../types'; import type { DeriveApi } from '../types.js';
export function getQueryInterface (api: DeriveApi): QueryableStorage<'rxjs'>['voterBagsList'] { export function getQueryInterface (api: DeriveApi): QueryableStorage<'rxjs'>['voterBagsList'] {
return ( return (
+2 -2
View File
@@ -5,13 +5,13 @@ import type { Observable } from 'rxjs';
import type { QueryableStorageEntry } from '@polkadot/api-base/types'; import type { QueryableStorageEntry } from '@polkadot/api-base/types';
import type { AccountData, AccountId, AccountIndex, AccountInfo, Address, Balance, Index } from '@polkadot/types/interfaces'; import type { AccountData, AccountId, AccountIndex, AccountInfo, Address, Balance, Index } from '@polkadot/types/interfaces';
import type { ITuple } from '@polkadot/types/types'; import type { ITuple } from '@polkadot/types/types';
import type { DeriveApi, DeriveBalancesAccount, DeriveBalancesAccountData } from '../types'; import type { DeriveApi, DeriveBalancesAccount, DeriveBalancesAccountData } from '../types.js';
import { combineLatest, map, of, switchMap } from 'rxjs'; import { combineLatest, map, of, switchMap } from 'rxjs';
import { isFunction, objectSpread } from '@polkadot/util'; import { isFunction, objectSpread } from '@polkadot/util';
import { memo } from '../util'; import { memo } from '../util/index.js';
type BalanceResult = [Balance, Balance, Balance, Balance]; type BalanceResult = [Balance, Balance, Balance, Balance];
+2 -2
View File
@@ -5,13 +5,13 @@ import type { Observable } from 'rxjs';
import type { Option, Vec } from '@polkadot/types'; import type { Option, Vec } from '@polkadot/types';
import type { AccountId, Balance, BalanceLockTo212, BlockNumber, VestingSchedule } from '@polkadot/types/interfaces'; import type { AccountId, Balance, BalanceLockTo212, BlockNumber, VestingSchedule } from '@polkadot/types/interfaces';
import type { PalletBalancesBalanceLock, PalletBalancesReserveData, PalletVestingVestingInfo } from '@polkadot/types/lookup'; import type { PalletBalancesBalanceLock, PalletBalancesReserveData, PalletVestingVestingInfo } from '@polkadot/types/lookup';
import type { DeriveApi, DeriveBalancesAccount, DeriveBalancesAccountData, DeriveBalancesAll, DeriveBalancesAllAccountData, DeriveBalancesAllVesting } from '../types'; import type { DeriveApi, DeriveBalancesAccount, DeriveBalancesAccountData, DeriveBalancesAll, DeriveBalancesAllAccountData, DeriveBalancesAllVesting } from '../types.js';
import { combineLatest, map, of, switchMap } from 'rxjs'; import { combineLatest, map, of, switchMap } from 'rxjs';
import { BN, BN_ZERO, bnMax, bnMin, isFunction, objectSpread } from '@polkadot/util'; import { BN, BN_ZERO, bnMax, bnMin, isFunction, objectSpread } from '@polkadot/util';
import { memo } from '../util'; import { memo } from '../util/index.js';
type ResultBalance = [PalletVestingVestingInfo[] | null, ((PalletBalancesBalanceLock | BalanceLockTo212)[])[], PalletBalancesReserveData[][]]; type ResultBalance = [PalletVestingVestingInfo[] | null, ((PalletBalancesBalanceLock | BalanceLockTo212)[])[], PalletBalancesReserveData[][]];
type Result = [DeriveBalancesAccount, ResultBalance, BlockNumber]; type Result = [DeriveBalancesAccount, ResultBalance, BlockNumber];
+3 -3
View File
@@ -1,10 +1,10 @@
// Copyright 2017-2023 @polkadot/api-derive authors & contributors // Copyright 2017-2023 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import { all } from './all'; import { all } from './all.js';
export * from './account'; export * from './account.js';
export * from './votingBalances'; export * from './votingBalances.js';
const votingBalance = all; const votingBalance = all;
@@ -3,11 +3,11 @@
import type { Observable } from 'rxjs'; import type { Observable } from 'rxjs';
import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces';
import type { DeriveApi, DeriveBalancesAccount } from '../types'; import type { DeriveApi, DeriveBalancesAccount } from '../types.js';
import { combineLatest, of } from 'rxjs'; import { combineLatest, of } from 'rxjs';
import { memo } from '../util'; import { memo } from '../util/index.js';
export function votingBalances (instanceId: string, api: DeriveApi): (addresses?: (AccountId | AccountIndex | Address | string)[]) => Observable<DeriveBalancesAccount[]> { export function votingBalances (instanceId: string, api: DeriveApi): (addresses?: (AccountId | AccountIndex | Address | string)[]) => Observable<DeriveBalancesAccount[]> {
return memo(instanceId, (addresses?: (AccountId | AccountIndex | Address | string)[]): Observable<DeriveBalancesAccount[]> => return memo(instanceId, (addresses?: (AccountId | AccountIndex | Address | string)[]): Observable<DeriveBalancesAccount[]> =>

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