Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1db2136a3d | ||
|
|
466485d5aa | ||
|
|
c9ea333add | ||
|
|
dca62cf3ba | ||
|
|
2d9e667d01 | ||
|
|
67679f34e9 | ||
|
|
d646fa03af | ||
|
|
6c33e98553 | ||
|
|
e8cdbf9e80 | ||
|
|
5016e12ae4 | ||
|
|
ac09179768 | ||
|
|
8cc1663bd8 | ||
|
|
34d090c9b3 | ||
|
|
cb1d13e04c | ||
|
|
022d79c4cd | ||
|
|
ed079a6acb | ||
|
|
01d023d141 | ||
|
|
0b03f73975 | ||
|
|
e4cae64187 | ||
|
|
f13989d712 | ||
|
|
05c3f12cd7 | ||
|
|
9f6f33844a | ||
|
|
895f82920d | ||
|
|
06fa4aa6eb | ||
|
|
1e5002fb5e | ||
|
|
8be52dec13 | ||
|
|
8fcda8cd54 | ||
|
|
d08c306887 | ||
|
|
eb6b0232c3 | ||
|
|
e5fbaeb7cd | ||
|
|
8e61ea1b8b | ||
|
|
9fe202a4d3 | ||
|
|
6e62d03652 | ||
|
|
49dc66f7d4 | ||
|
|
22320f9995 | ||
|
|
7603bad434 | ||
|
|
e82f0f35ad | ||
|
|
ae0aa14eb8 | ||
|
|
4875bb9990 | ||
|
|
a0308dd25a | ||
|
|
edb06d971a | ||
|
|
271a4d8fd7 | ||
|
|
a71e5ad95c | ||
|
|
edcdb70e8a | ||
|
|
17357f6b99 | ||
|
|
c596a8cb51 | ||
|
|
bdf13b10e5 | ||
|
|
519a12f19a | ||
|
|
beffc7b754 | ||
|
|
d5ae7031cd | ||
|
|
8aff13b827 | ||
|
|
a23b3f953b | ||
|
|
1249c46019 | ||
|
|
2aaf52bb92 | ||
|
|
3372898f82 | ||
|
|
ed2f512cfc | ||
|
|
00147df500 | ||
|
|
3b0c8887d7 | ||
|
|
16452233b2 | ||
|
|
5bf87262bc | ||
|
|
b8e01fd674 | ||
|
|
f8378ba0f7 | ||
|
|
afc105400c | ||
|
|
cca1f10563 | ||
|
|
6cdbbf5372 | ||
|
|
8c89732eb7 | ||
|
|
ab3ad6b2ca | ||
|
|
72f427a250 | ||
|
|
5b0bd9d4b7 | ||
|
|
cd9662ab4c | ||
|
|
13751b6fdf | ||
|
|
652f8c28a4 | ||
|
|
0bae9138b8 | ||
|
|
98e8cac424 | ||
|
|
dca7f208bc | ||
|
|
67ff12885a | ||
|
|
08c53032eb | ||
|
|
5da8f21947 | ||
|
|
5080b266a0 | ||
|
|
0186848936 | ||
|
|
d0de35b05b | ||
|
|
3ded30a0f3 | ||
|
|
9fef78c5e1 | ||
|
|
b2a7c453c4 | ||
|
|
030258a671 | ||
|
|
0a85b4839d | ||
|
|
ad363bac09 | ||
|
|
e0c0a8c583 | ||
|
|
f923a31758 | ||
|
|
416229d976 | ||
|
|
4380c45f17 | ||
|
|
d481aed8cb | ||
|
|
ca25983e3e | ||
|
|
f7caa496e4 | ||
|
|
3f8e4ce133 | ||
|
|
39c99083bc | ||
|
|
46aa427f98 | ||
|
|
6336fc0787 | ||
|
|
b0532be7df | ||
|
|
e7a5b015e9 | ||
|
|
2f07f18a5a | ||
|
|
c92d5b7eb0 | ||
|
|
e340a99eda | ||
|
|
f169ca08a8 | ||
|
|
898d1593f3 | ||
|
|
2c8d9563c4 | ||
|
|
804c0c4887 | ||
|
|
3b991ce8c7 | ||
|
|
e66cc0fb45 | ||
|
|
61daa0f2c8 | ||
|
|
7af315f278 | ||
|
|
e55661ca34 | ||
|
|
097a1748fd | ||
|
|
9c587d378e | ||
|
|
02f99356aa | ||
|
|
cacacec130 | ||
|
|
6d095a042f | ||
|
|
b022ad3154 | ||
|
|
e0129aa02e | ||
|
|
dfc200a25a | ||
|
|
85fdbed227 | ||
|
|
04a23c0f60 | ||
|
|
0bf9eb2f3a | ||
|
|
f13462f7cf | ||
|
|
0754bc45d3 | ||
|
|
e314f51813 | ||
|
|
5148bc42ae | ||
|
|
b43c848817 | ||
|
|
abd2b58b52 | ||
|
|
2ce1decd99 | ||
|
|
f8112735af | ||
|
|
455a8d2a91 | ||
|
|
ca692cc7c0 | ||
|
|
f5f5b540af | ||
|
|
8b3b1b4611 | ||
|
|
21cb76e517 | ||
|
|
d774a3c2ab | ||
|
|
0c08e8ba9e | ||
|
|
c2549ec166 | ||
|
|
d27fce3b29 | ||
|
|
849588e305 | ||
|
|
4f3fedc27e | ||
|
|
57a5892f99 | ||
|
|
f5499ca4ed | ||
|
|
37ae595f03 | ||
|
|
868a4a2964 | ||
|
|
3656480cff | ||
|
|
37cf4b5e88 | ||
|
|
75a4e7b5d7 | ||
|
|
12d6cf8a5b | ||
|
|
aa7e5ea601 | ||
|
|
9f5232019e | ||
|
|
3063763a18 | ||
|
|
b76f9e7e21 |
@@ -0,0 +1,16 @@
|
|||||||
|
name: bot
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [labeled]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
approve:
|
||||||
|
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository)"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: jacogr/action-approve@master
|
||||||
|
with:
|
||||||
|
authors: jacogr
|
||||||
|
labels: -auto
|
||||||
|
token: ${{ secrets.GH_PAT_BOT }}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
name: bot
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [labeled]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
merge:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: jacogr/action-merge@master
|
||||||
|
with:
|
||||||
|
checks: build,lint,test
|
||||||
|
labels: -auto
|
||||||
|
strategy: squash
|
||||||
|
token: ${{ secrets.GH_PAT_BOT }}
|
||||||
@@ -7,6 +7,8 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
lock:
|
lock:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
YARN_ENABLE_SCRIPTS: false
|
||||||
steps:
|
steps:
|
||||||
- uses: dessant/lock-threads@v2
|
- uses: dessant/lock-threads@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ jobs:
|
|||||||
step: ['lint', 'test', 'build']
|
step: ['lint', 'test', 'build']
|
||||||
name: ${{ matrix.step }}
|
name: ${{ matrix.step }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
YARN_ENABLE_SCRIPTS: false
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: ${{ matrix.step }}
|
- name: ${{ matrix.step }}
|
||||||
|
|||||||
@@ -12,17 +12,18 @@ jobs:
|
|||||||
step: ['build:release']
|
step: ['build:release']
|
||||||
name: ${{ matrix.step }}
|
name: ${{ matrix.step }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
YARN_ENABLE_SCRIPTS: false
|
||||||
|
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
||||||
|
GH_PAT: ${{ secrets.GH_PAT }}
|
||||||
|
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.GH_PAT }}
|
token: ${{ secrets.GH_PAT }}
|
||||||
- name: ${{ matrix.step }}
|
- name: ${{ matrix.step }}
|
||||||
env:
|
|
||||||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
|
||||||
GH_PAT: ${{ secrets.GH_PAT }}
|
|
||||||
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
|
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
||||||
run: |
|
run: |
|
||||||
yarn install --immutable | grep -v 'YN0013'
|
yarn install --immutable | grep -v 'YN0013'
|
||||||
yarn ${{ matrix.step }}
|
yarn ${{ matrix.step }}
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ jobs:
|
|||||||
check:
|
check:
|
||||||
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository)"
|
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository)"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
YARN_ENABLE_SCRIPTS: false
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: returntocorp/semgrep-action@v1
|
- uses: returntocorp/semgrep-action@v1
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
YARN_ENABLE_SCRIPTS: false
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v3
|
- uses: actions/stale@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
Vendored
-768
File diff suppressed because one or more lines are too long
+785
File diff suppressed because one or more lines are too long
+1
-1
@@ -10,4 +10,4 @@ plugins:
|
|||||||
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
|
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
|
||||||
spec: "@yarnpkg/plugin-version"
|
spec: "@yarnpkg/plugin-version"
|
||||||
|
|
||||||
yarnPath: .yarn/releases/yarn-3.1.1.cjs
|
yarnPath: .yarn/releases/yarn-3.2.0.cjs
|
||||||
|
|||||||
@@ -1,5 +1,90 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## 7.12.1 Mar 13, 2022
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Allow for correct handling of `Option<Null>` types
|
||||||
|
- Adjust for bundlers where `import.meta.url` is undefined
|
||||||
|
- Update to `@polkadot/util` 8.5.1
|
||||||
|
|
||||||
|
|
||||||
|
## 7.11.1 Mar 6, 2022
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Chunk derive retrieval of `era{Exposure, Prefs, Slashes}`
|
||||||
|
- Ensure that signer (passed via options) do get updated
|
||||||
|
- Kusama & Polkadot 9170 upgrade blocks
|
||||||
|
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||||
|
- Adjustments for TypeScript 7.6.2
|
||||||
|
|
||||||
|
|
||||||
|
## 7.10.1 Feb 27, 2022
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Ensure `updateId` is correct in signer callbacks (Thanks to https://github.com/coolcorexix)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Ensure `BTreeSet` has the correct decoded length
|
||||||
|
- Attach `PortableRegistry` at point of metadata set
|
||||||
|
- Add `derive.chain.getBlockByNumber`
|
||||||
|
- Retrieve named reserves in `derive.balances.all`
|
||||||
|
- Ensure `v13 -> v14` metadata conversion attaches primitives
|
||||||
|
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 7.9.1 Feb 20, 2022
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Support historic queries via blockNumber (Thanks to https://github.com/stwiname)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Align `grandpa_proveFinality` with Substrate
|
||||||
|
- Allow for derive augmentation (swap base type to interfaces)
|
||||||
|
- Kusama 9160 upgrade block
|
||||||
|
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 7.8.1 Feb 14, 2022
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Add `isHistoric` flag to ETH RPCs (Thanks to https://github.com/stwiname)
|
||||||
|
- Align contract instantiate types with Substrate (Thanks to https://github.com/kwingram25)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Adjust map header output type with lookup id
|
||||||
|
- Re-enable all `BitVec` tests for `toU8a`
|
||||||
|
- Expose `txIndex` as event index on extrinsic results
|
||||||
|
- Allow inspection of Codec encoding (experimental)
|
||||||
|
- Allow inspection of storage key encoding (experimental)
|
||||||
|
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||||
|
- Update `@polkadot/util` to 8.4.1
|
||||||
|
|
||||||
|
|
||||||
|
## 7.7.1 Feb 6, 2022
|
||||||
|
|
||||||
|
Upgrade priority: Low. Recommended for users with long-running scripts.
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Fix rpc-provider LRU memory leak (Thanks to https://github.com/gdethier)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Don't warn on `Lookup*` types missing (these are resolvable)
|
||||||
|
- Don't clear injected `PortableRegistry` types on runtime upgrade
|
||||||
|
- Clear warning for `Call`/`Event` on non-meta v14 runtimes
|
||||||
|
- Add `beefy_getFinalizedHead` RPC support
|
||||||
|
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||||
|
|
||||||
|
|
||||||
## 7.6.1 Jan 30, 2022
|
## 7.6.1 Jan 30, 2022
|
||||||
|
|
||||||
Upgdare priority: Low. Recommended for users with long-running scripts and those chains based around the latest Substrate master versions.
|
Upgdare priority: Low. Recommended for users with long-running scripts and those chains based around the latest Substrate master versions.
|
||||||
|
|||||||
+5
-2
@@ -1,6 +1,6 @@
|
|||||||
2795 Jaco 7.6.1 (#4515)
|
2865 Jaco 7.12.1 (#4653)
|
||||||
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
|
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
|
||||||
36 Keith Ingram Storage deposit limit changes (#4370)
|
37 Keith Ingram Update contract types and rpc (#4541)
|
||||||
35 Stefanie Doll Updated child storage parameters (#1709)
|
35 Stefanie Doll Updated child storage parameters (#1709)
|
||||||
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
|
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
|
||||||
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
|
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
4 Alexander Popiak Add asset id in signing (#4009)
|
4 Alexander Popiak Add asset id in signing (#4009)
|
||||||
4 Joshy Orndorff spelling; efect -> effect (#2295)
|
4 Joshy Orndorff spelling; efect -> effect (#2295)
|
||||||
4 Nantian fix bigint type (#3869)
|
4 Nantian fix bigint type (#3869)
|
||||||
|
4 Scott Twiname Add support for historical BlockNumber rpc methods (#4574)
|
||||||
4 Thibaut Sardan no subscription for http (#3127)
|
4 Thibaut Sardan no subscription for http (#3127)
|
||||||
3 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
|
3 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
|
||||||
3 André Silva add support for ValidationCodeHash (#3640)
|
3 André Silva add support for ValidationCodeHash (#3640)
|
||||||
@@ -42,6 +43,7 @@
|
|||||||
1 Brad Larson [NEW] Support for custom headers with providers (#2423)
|
1 Brad Larson [NEW] Support for custom headers with providers (#2423)
|
||||||
1 chriswmercer little readme tweak (#279)
|
1 chriswmercer little readme tweak (#279)
|
||||||
1 codingsh #2182 - add: search for docs (#2232)
|
1 codingsh #2182 - add: search for docs (#2232)
|
||||||
|
1 coolcorexix Investigate 4559 v2 (#4608)
|
||||||
1 Dan Forbes Add WeightToFeeCoefficient type (#2296)
|
1 Dan Forbes Add WeightToFeeCoefficient type (#2296)
|
||||||
1 Daniel Maricic Fixed typo in README (#2402)
|
1 Daniel Maricic Fixed typo in README (#2402)
|
||||||
1 Daniel Savu fix: Generate custom type definitions (#4224)
|
1 Daniel Savu fix: Generate custom type definitions (#4224)
|
||||||
@@ -52,6 +54,7 @@
|
|||||||
1 Dylan Galea Updated users of the polkadot-js/api (#2027)
|
1 Dylan Galea Updated users of the polkadot-js/api (#2027)
|
||||||
1 flex Change BeefySignedCommitment signatures type to EcdsaSignature (#4204)
|
1 flex Change BeefySignedCommitment signatures type to EcdsaSignature (#4204)
|
||||||
1 Furqan A fix: fixed 404 to the docs from the api readme (#3985)
|
1 Furqan A fix: fixed 404 to the docs from the api readme (#3985)
|
||||||
|
1 Gérard Dethier Fix LRUCache memory leak. (#4520)
|
||||||
1 Gerben van de Wiel Adding some extra notes on changes in the specname (#2329)
|
1 Gerben van de Wiel Adding some extra notes on changes in the specname (#2329)
|
||||||
1 HackFisher fix OutboundLaneData types (#3992)
|
1 HackFisher fix OutboundLaneData types (#3992)
|
||||||
1 Hoani Bryson Multiple Endpoint support for WsProvider (#2234)
|
1 Hoani Bryson Multiple Endpoint support for WsProvider (#2234)
|
||||||
|
|||||||
+8
-8
@@ -3,7 +3,7 @@
|
|||||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||||
"homepage": "https://github.com/polkadot-js/api#readme",
|
"homepage": "https://github.com/polkadot-js/api#readme",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"packageManager": "yarn@3.0.1",
|
"packageManager": "yarn@3.2.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"version": "7.6.1",
|
"version": "7.12.1",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
],
|
],
|
||||||
@@ -31,15 +31,15 @@
|
|||||||
"test:watch": "polkadot-dev-run-test --watch"
|
"test:watch": "polkadot-dev-run-test --watch"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.16.12",
|
"@babel/core": "^7.17.5",
|
||||||
"@babel/register": "^7.16.9",
|
"@babel/register": "^7.17.0",
|
||||||
"@babel/runtime": "^7.16.7",
|
"@babel/runtime": "^7.17.2",
|
||||||
"@polkadot/dev": "^0.65.46",
|
"@polkadot/dev": "^0.65.88",
|
||||||
"@polkadot/typegen": "workspace:packages/typegen",
|
"@polkadot/typegen": "workspace:packages/typegen",
|
||||||
"@types/jest": "^27.4.0",
|
"@types/jest": "^27.4.1",
|
||||||
"copyfiles": "^2.4.1"
|
"copyfiles": "^2.4.1"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"typescript": "^4.5.5"
|
"typescript": "^4.6.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,15 +20,18 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.6.1",
|
"version": "7.12.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.16.7",
|
"@babel/runtime": "^7.17.2",
|
||||||
"@polkadot/api-base": "7.6.1",
|
"@polkadot/api-base": "7.12.1",
|
||||||
"@polkadot/rpc-augment": "7.6.1",
|
"@polkadot/rpc-augment": "7.12.1",
|
||||||
"@polkadot/types": "7.6.1",
|
"@polkadot/types": "7.12.1",
|
||||||
"@polkadot/types-augment": "7.6.1",
|
"@polkadot/types-augment": "7.12.1",
|
||||||
"@polkadot/types-codec": "7.6.1",
|
"@polkadot/types-codec": "7.12.1",
|
||||||
"@polkadot/util": "^8.3.3"
|
"@polkadot/util": "^8.5.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@polkadot/types-support": "7.12.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -592,8 +592,13 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
friendDepositFactor: u128 & AugmentedConst<ApiType>;
|
friendDepositFactor: u128 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum amount of friends allowed in a recovery configuration.
|
* The maximum amount of friends allowed in a recovery configuration.
|
||||||
|
*
|
||||||
|
* NOTE: The threshold programmed in this Pallet uses u16, so it does
|
||||||
|
* not really make sense to have a limit here greater than u16::MAX.
|
||||||
|
* But also, that is a lot more than you should probably set this value
|
||||||
|
* to anyway...
|
||||||
**/
|
**/
|
||||||
maxFriends: u16 & AugmentedConst<ApiType>;
|
maxFriends: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The base amount of currency needed to reserve for starting a recovery.
|
* The base amount of currency needed to reserve for starting a recovery.
|
||||||
*
|
*
|
||||||
@@ -703,6 +708,9 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* Number of eras that staked funds must remain bonded for.
|
* Number of eras that staked funds must remain bonded for.
|
||||||
**/
|
**/
|
||||||
bondingDuration: u32 & AugmentedConst<ApiType>;
|
bondingDuration: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Maximum number of nominations per nominator.
|
||||||
|
**/
|
||||||
maxNominations: u32 & AugmentedConst<ApiType>;
|
maxNominations: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum number of nominators rewarded for each validator.
|
* The maximum number of nominators rewarded for each validator.
|
||||||
@@ -711,6 +719,11 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* claim their reward. This used to limit the i/o cost for the nominator payout.
|
* claim their reward. This used to limit the i/o cost for the nominator payout.
|
||||||
**/
|
**/
|
||||||
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
|
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively
|
||||||
|
* determines how many unique eras a staker may be unbonding in.
|
||||||
|
**/
|
||||||
|
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Number of sessions per era.
|
* Number of sessions per era.
|
||||||
**/
|
**/
|
||||||
@@ -847,6 +860,8 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
burn: Permill & AugmentedConst<ApiType>;
|
burn: Permill & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum number of approvals that can wait in the spending queue.
|
* The maximum number of approvals that can wait in the spending queue.
|
||||||
|
*
|
||||||
|
* NOTE: This parameter is also used within the Bounties Pallet extension if enabled.
|
||||||
**/
|
**/
|
||||||
maxApprovals: u32 & AugmentedConst<ApiType>;
|
maxApprovals: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -185,6 +185,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Require bounty curator.
|
* Require bounty curator.
|
||||||
**/
|
**/
|
||||||
RequireCurator: AugmentedError<ApiType>;
|
RequireCurator: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Too many approvals are already queued.
|
||||||
|
**/
|
||||||
|
TooManyQueued: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The bounty status is unexpected.
|
* The bounty status is unexpected.
|
||||||
**/
|
**/
|
||||||
@@ -503,6 +507,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* The call is not allowed at this point.
|
* The call is not allowed at this point.
|
||||||
**/
|
**/
|
||||||
CallNotAllowed: AugmentedError<ApiType>;
|
CallNotAllowed: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The fallback failed
|
||||||
|
**/
|
||||||
|
FallbackFailed: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* `Self::insert_submission` returned an invalid index.
|
* `Self::insert_submission` returned an invalid index.
|
||||||
**/
|
**/
|
||||||
@@ -1347,6 +1355,11 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Cannot schedule downgrade of parachain to parathread
|
* Cannot schedule downgrade of parachain to parathread
|
||||||
**/
|
**/
|
||||||
CannotDowngrade: AugmentedError<ApiType>;
|
CannotDowngrade: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Cannot perform a parachain slot / lifecycle swap. Check that the state of both paras are
|
||||||
|
* correct for the swap to work.
|
||||||
|
**/
|
||||||
|
CannotSwap: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Cannot schedule upgrade of parathread to parachain
|
* Cannot schedule upgrade of parathread to parachain
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import '@polkadot/api-augment/kusama';
|
||||||
|
|
||||||
|
import type { PolkadotRuntimeParachainsUmpPalletEvent, XcmV2TraitsOutcome } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
|
import { Metadata, TypeRegistry } from '@polkadot/types';
|
||||||
|
import metadataStatic from '@polkadot/types-support/metadata/static-kusama';
|
||||||
|
|
||||||
|
const registry = new TypeRegistry();
|
||||||
|
const metadata = new Metadata(registry, metadataStatic);
|
||||||
|
|
||||||
|
registry.setMetadata(metadata);
|
||||||
|
|
||||||
|
describe('correct types', (): void => {
|
||||||
|
it('correctly creates XcmV2TraitsOutcome', (): void => {
|
||||||
|
const test = registry.createType<XcmV2TraitsOutcome>('XcmV2TraitsOutcome', {
|
||||||
|
Incomplete: [3_000_000_000, 'BadOrigin']
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(test.toHuman()).toEqual({
|
||||||
|
Incomplete: [
|
||||||
|
'3,000,000,000',
|
||||||
|
'BadOrigin'
|
||||||
|
]
|
||||||
|
});
|
||||||
|
expect(test.isIncomplete).toEqual(true);
|
||||||
|
expect(test.asIncomplete.toHuman()).toEqual([
|
||||||
|
'3,000,000,000',
|
||||||
|
'BadOrigin'
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('correctly creates PolkadotRuntimeParachainsUmpPalletEvent', (): void => {
|
||||||
|
const test = registry.createType<PolkadotRuntimeParachainsUmpPalletEvent>('PolkadotRuntimeParachainsUmpPalletEvent', '0x02112233445566778811223344556677881122334455667788112233445566778801005ed0b20000000006');
|
||||||
|
|
||||||
|
expect(test.asExecutedUpward[1].asIncomplete.toHuman()).toEqual([
|
||||||
|
'3,000,000,000',
|
||||||
|
'BadOrigin'
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -575,12 +575,12 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
NewHeadNoted: AugmentedEvent<ApiType, [u32]>;
|
NewHeadNoted: AugmentedEvent<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* The given validation code was rejected by the PVF pre-checking vote.
|
* The given validation code was accepted by the PVF pre-checking vote.
|
||||||
* `code_hash` `para_id`
|
* `code_hash` `para_id`
|
||||||
**/
|
**/
|
||||||
PvfCheckAccepted: AugmentedEvent<ApiType, [H256, u32]>;
|
PvfCheckAccepted: AugmentedEvent<ApiType, [H256, u32]>;
|
||||||
/**
|
/**
|
||||||
* The given validation code was accepted by the PVF pre-checking vote.
|
* The given validation code was rejected by the PVF pre-checking vote.
|
||||||
* `code_hash` `para_id`
|
* `code_hash` `para_id`
|
||||||
**/
|
**/
|
||||||
PvfCheckRejected: AugmentedEvent<ApiType, [H256, u32]>;
|
PvfCheckRejected: AugmentedEvent<ApiType, [H256, u32]>;
|
||||||
|
|||||||
@@ -6,4 +6,5 @@ import './consts';
|
|||||||
import './errors';
|
import './errors';
|
||||||
import './events';
|
import './events';
|
||||||
import './query';
|
import './query';
|
||||||
|
import './registry';
|
||||||
import './tx';
|
import './tx';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, W
|
|||||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppPublic, PolkadotPrimitivesV1AssignmentAppPublic, PolkadotPrimitivesV1CandidateCommitments, PolkadotPrimitivesV1CoreOccupied, PolkadotPrimitivesV1DisputeState, PolkadotPrimitivesV1ScrapedOnChainVotes, PolkadotPrimitivesV1UpgradeGoAhead, PolkadotPrimitivesV1UpgradeRestriction, PolkadotPrimitivesV2SessionInfo, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppPublic, PolkadotPrimitivesV1AssignmentAppPublic, PolkadotPrimitivesV1CandidateCommitments, PolkadotPrimitivesV1CoreOccupied, PolkadotPrimitivesV1DisputeState, PolkadotPrimitivesV1ScrapedOnChainVotes, PolkadotPrimitivesV1UpgradeGoAhead, PolkadotPrimitivesV1UpgradeRestriction, PolkadotPrimitivesV2SessionInfo, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||||
import type { Observable } from '@polkadot/types/types';
|
import type { Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/storage' {
|
declare module '@polkadot/api-base/types/storage' {
|
||||||
@@ -185,8 +185,29 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
};
|
};
|
||||||
balances: {
|
balances: {
|
||||||
/**
|
/**
|
||||||
* The balance of an account.
|
* The Balances pallet example of storing the balance of an account.
|
||||||
*
|
*
|
||||||
|
* # Example
|
||||||
|
*
|
||||||
|
* ```nocompile
|
||||||
|
* impl pallet_balances::Config for Runtime {
|
||||||
|
* type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* You can also store the balance of an account in the `System` pallet.
|
||||||
|
*
|
||||||
|
* # Example
|
||||||
|
*
|
||||||
|
* ```nocompile
|
||||||
|
* impl pallet_balances::Config for Runtime {
|
||||||
|
* type AccountStore = System
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* But this comes with tradeoffs, storing account balances in the system pallet stores
|
||||||
|
* `frame_system` data alongside the account data contrary to storing account balances in the
|
||||||
|
* `Balances` pallet, which uses a `StorageMap` to store balances data only.
|
||||||
* NOTE: This is only used in the case that this pallet is used to store balances.
|
* NOTE: This is only used in the case that this pallet is used to store balances.
|
||||||
**/
|
**/
|
||||||
account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
@@ -335,9 +356,9 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
newRaise: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
newRaise: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Tracker for the next available trie index
|
* Tracker for the next available fund index
|
||||||
**/
|
**/
|
||||||
nextTrieIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
nextFundIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Generic query
|
* Generic query
|
||||||
**/
|
**/
|
||||||
@@ -364,13 +385,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* proposal.
|
* proposal.
|
||||||
**/
|
**/
|
||||||
lastTabledWasExternal: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
lastTabledWasExternal: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
|
||||||
* Accounts for which there are locks in action which may be removed at some point in the
|
|
||||||
* future. The value is the block number at which the lock expires and may be removed.
|
|
||||||
*
|
|
||||||
* TWOX-NOTE: OK ― `AccountId` is a secure hash.
|
|
||||||
**/
|
|
||||||
locks: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
|
||||||
/**
|
/**
|
||||||
* The lowest referendum index representing an unbaked referendum. Equal to
|
* The lowest referendum index representing an unbaked referendum. Equal to
|
||||||
* `ReferendumCount` if there isn't a unbaked referendum.
|
* `ReferendumCount` if there isn't a unbaked referendum.
|
||||||
@@ -461,7 +475,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
*
|
*
|
||||||
* Can be set via `set_minimum_untrusted_score`.
|
* Can be set via `set_minimum_untrusted_score`.
|
||||||
**/
|
**/
|
||||||
minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<Vec<u128>>>, []> & QueryableStorageEntry<ApiType, []>;
|
minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<SpNposElectionsElectionScore>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Current best solution, signed or unsigned, queued to be returned upon `elect`.
|
* Current best solution, signed or unsigned, queued to be returned upon `elect`.
|
||||||
**/
|
**/
|
||||||
@@ -483,7 +497,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* can be quite large, so we're willing to pay the cost of multiple database accesses to access
|
* can be quite large, so we're willing to pay the cost of multiple database accesses to access
|
||||||
* them one at a time instead of reading and decoding all of them at once.
|
* them one at a time instead of reading and decoding all of them at once.
|
||||||
**/
|
**/
|
||||||
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<Vec<u128>, u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<SpNposElectionsElectionScore, u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* The next index to be assigned to an incoming signed submission.
|
* The next index to be assigned to an incoming signed submission.
|
||||||
*
|
*
|
||||||
@@ -879,6 +893,8 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
heads: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
heads: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* All parachains. Ordered ascending by `ParaId`. Parathreads are not included.
|
* All parachains. Ordered ascending by `ParaId`. Parathreads are not included.
|
||||||
|
*
|
||||||
|
* Consider using the [`ParachainsCache`] type of modifying.
|
||||||
**/
|
**/
|
||||||
parachains: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
parachains: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
@@ -1222,12 +1238,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* Lookup from identity to the block number and index of the task.
|
* Lookup from identity to the block number and index of the task.
|
||||||
**/
|
**/
|
||||||
lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
|
lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
|
||||||
/**
|
|
||||||
* Storage version of the pallet.
|
|
||||||
*
|
|
||||||
* New networks start with last version.
|
|
||||||
**/
|
|
||||||
storageVersion: AugmentedQuery<ApiType, () => Observable<PalletSchedulerReleases>, []> & QueryableStorageEntry<ApiType, []>;
|
|
||||||
/**
|
/**
|
||||||
* Generic query
|
* Generic query
|
||||||
**/
|
**/
|
||||||
@@ -1533,7 +1543,22 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
minValidatorBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
minValidatorBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* The map from nominator stash key to the set of stash keys of all validators to nominate.
|
* The map from nominator stash key to their nomination preferences, namely the validators that
|
||||||
|
* they wish to support.
|
||||||
|
*
|
||||||
|
* Note that the keys of this storage map might become non-decodable in case the
|
||||||
|
* [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators
|
||||||
|
* are still existent in storage, their key is correct and retrievable (i.e. `contains_key`
|
||||||
|
* indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable
|
||||||
|
* nominators will effectively not-exist, until they re-submit their preferences such that it
|
||||||
|
* is within the bounds of the newly set `Config::MaxNominations`.
|
||||||
|
*
|
||||||
|
* This implies that `::iter_keys().count()` and `::iter().count()` might return different
|
||||||
|
* values for this map. Moreover, the main `::count()` is aligned with the former, namely the
|
||||||
|
* number of keys that exist.
|
||||||
|
*
|
||||||
|
* Lastly, if any of the nominators become non-decodable, they can be chilled immediately via
|
||||||
|
* [`Call::chill_other`] dispatchable by anyone.
|
||||||
**/
|
**/
|
||||||
nominators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletStakingNominations>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
nominators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletStakingNominations>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import '@polkadot/types-augment/registry/substrate';
|
||||||
|
import '@polkadot/types-augment/registry/polkadot';
|
||||||
|
import '@polkadot/types-augment/registry/kusama';
|
||||||
@@ -7,7 +7,7 @@ import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u1
|
|||||||
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, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportScheduleMaybeHashed, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppSignature, PolkadotPrimitivesV1InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
import type { FrameSupportScheduleMaybeHashed, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppSignature, PolkadotPrimitivesV1InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/submittable' {
|
declare module '@polkadot/api-base/types/submittable' {
|
||||||
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
|
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
|
||||||
@@ -1198,6 +1198,13 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
electionProviderMultiPhase: {
|
electionProviderMultiPhase: {
|
||||||
|
/**
|
||||||
|
* Trigger the governance fallback.
|
||||||
|
*
|
||||||
|
* This can only be called when [`Phase::Emergency`] is enabled, as an alternative to
|
||||||
|
* calling [`Call::set_emergency_election_result`].
|
||||||
|
**/
|
||||||
|
governanceFallback: AugmentedSubmittable<(maybeMaxVoters: Option<u32> | null | object | string | Uint8Array, maybeMaxTargets: Option<u32> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<u32>, Option<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Set a solution in the queue, to be handed out to the client of this pallet in the next
|
* Set a solution in the queue, to be handed out to the client of this pallet in the next
|
||||||
* call to `ElectionProvider::elect`.
|
* call to `ElectionProvider::elect`.
|
||||||
@@ -1216,7 +1223,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* This check can be turned off by setting the value to `None`.
|
* This check can be turned off by setting the value to `None`.
|
||||||
**/
|
**/
|
||||||
setMinimumUntrustedScore: AugmentedSubmittable<(maybeNextScore: Option<Vec<u128>> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<Vec<u128>>]>;
|
setMinimumUntrustedScore: AugmentedSubmittable<(maybeNextScore: Option<SpNposElectionsElectionScore> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<SpNposElectionsElectionScore>]>;
|
||||||
/**
|
/**
|
||||||
* Submit a solution for the signed phase.
|
* Submit a solution for the signed phase.
|
||||||
*
|
*
|
||||||
@@ -1227,12 +1234,8 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* A deposit is reserved and recorded for the solution. Based on the outcome, the solution
|
* A deposit is reserved and recorded for the solution. Based on the outcome, the solution
|
||||||
* might be rewarded, slashed, or get all or a part of the deposit back.
|
* might be rewarded, slashed, or get all or a part of the deposit back.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Queue size must be provided as witness data.
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
submit: AugmentedSubmittable<(rawSolution: PalletElectionProviderMultiPhaseRawSolution | { solution?: any; score?: any; round?: any } | string | Uint8Array, numSignedSubmissions: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletElectionProviderMultiPhaseRawSolution, u32]>;
|
submit: AugmentedSubmittable<(rawSolution: PalletElectionProviderMultiPhaseRawSolution | { solution?: any; score?: any; round?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletElectionProviderMultiPhaseRawSolution]>;
|
||||||
/**
|
/**
|
||||||
* Submit a solution for the unsigned phase.
|
* Submit a solution for the unsigned phase.
|
||||||
*
|
*
|
||||||
@@ -2206,7 +2209,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Weight is a function of the number of proxies the user has (P).
|
* Weight is a function of the number of proxies the user has (P).
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
addProxy: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, KusamaRuntimeProxyType, u32]>;
|
addProxy: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, KusamaRuntimeProxyType, u32]>;
|
||||||
/**
|
/**
|
||||||
* Publish the hash of a proxy-call that will be made in the future.
|
* Publish the hash of a proxy-call that will be made in the future.
|
||||||
*
|
*
|
||||||
@@ -2256,7 +2259,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* # </weight>
|
* # </weight>
|
||||||
* TODO: Might be over counting 1 read
|
* TODO: Might be over counting 1 read
|
||||||
**/
|
**/
|
||||||
anonymous: AugmentedSubmittable<(proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array, index: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [KusamaRuntimeProxyType, u32, u16]>;
|
anonymous: AugmentedSubmittable<(proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array, index: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [KusamaRuntimeProxyType, u32, u16]>;
|
||||||
/**
|
/**
|
||||||
* Removes a previously spawned anonymous proxy.
|
* Removes a previously spawned anonymous proxy.
|
||||||
*
|
*
|
||||||
@@ -2279,7 +2282,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Weight is a function of the number of proxies the user has (P).
|
* Weight is a function of the number of proxies the user has (P).
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
killAnonymous: AugmentedSubmittable<(spawner: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, index: u16 | AnyNumber | Uint8Array, height: Compact<u32> | AnyNumber | Uint8Array, extIndex: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, KusamaRuntimeProxyType, u16, Compact<u32>, Compact<u32>]>;
|
killAnonymous: AugmentedSubmittable<(spawner: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number | Uint8Array, index: u16 | AnyNumber | Uint8Array, height: Compact<u32> | AnyNumber | Uint8Array, extIndex: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, KusamaRuntimeProxyType, u16, Compact<u32>, Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Dispatch the given `call` from an account that the sender is authorised for through
|
* Dispatch the given `call` from an account that the sender is authorised for through
|
||||||
* `add_proxy`.
|
* `add_proxy`.
|
||||||
@@ -2382,7 +2385,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Weight is a function of the number of proxies the user has (P).
|
* Weight is a function of the number of proxies the user has (P).
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
removeProxy: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, KusamaRuntimeProxyType, u32]>;
|
removeProxy: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, KusamaRuntimeProxyType, u32]>;
|
||||||
/**
|
/**
|
||||||
* Generic tx
|
* Generic tx
|
||||||
**/
|
**/
|
||||||
@@ -3149,14 +3152,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Can be called by the `T::SlashCancelOrigin`.
|
* Can be called by the `T::SlashCancelOrigin`.
|
||||||
*
|
*
|
||||||
* Parameters: era and indices of the slashes for that era to kill.
|
* Parameters: era and indices of the slashes for that era to kill.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Complexity: O(U + S)
|
|
||||||
* with U unapplied slashes weighted with U=1000
|
|
||||||
* and S is the number of slash indices to be canceled.
|
|
||||||
* - Read: Unapplied Slashes
|
|
||||||
* - Write: Unapplied Slashes
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
cancelDeferredSlash: AugmentedSubmittable<(era: u32 | AnyNumber | Uint8Array, slashIndices: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<u32>]>;
|
cancelDeferredSlash: AugmentedSubmittable<(era: u32 | AnyNumber | Uint8Array, slashIndices: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<u32>]>;
|
||||||
/**
|
/**
|
||||||
@@ -3185,6 +3180,11 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* If the caller is different than the controller being targeted, the following conditions
|
* If the caller is different than the controller being targeted, the following conditions
|
||||||
* must be met:
|
* must be met:
|
||||||
|
*
|
||||||
|
* * `controller` must belong to a nominator who has become non-decodable,
|
||||||
|
*
|
||||||
|
* Or:
|
||||||
|
*
|
||||||
* * A `ChillThreshold` must be set and checked which defines how close to the max
|
* * A `ChillThreshold` must be set and checked which defines how close to the max
|
||||||
* nominators or validators we must reach before users can start chilling one-another.
|
* nominators or validators we must reach before users can start chilling one-another.
|
||||||
* * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine
|
* * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine
|
||||||
@@ -3197,6 +3197,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* who do not satisfy these requirements.
|
* who do not satisfy these requirements.
|
||||||
**/
|
**/
|
||||||
chillOther: AugmentedSubmittable<(controller: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
chillOther: AugmentedSubmittable<(controller: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Force a validator to have at least the minimum commission. This will not affect a
|
||||||
|
* validator who already has a commission greater than or equal to the minimum. Any account
|
||||||
|
* can call this.
|
||||||
|
**/
|
||||||
|
forceApplyMinCommission: AugmentedSubmittable<(validatorStash: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
* Force there to be a new era at the end of the next session. After this, it will be
|
* Force there to be a new era at the end of the next session. After this, it will be
|
||||||
* reset to normal (non-forced) behaviour.
|
* reset to normal (non-forced) behaviour.
|
||||||
@@ -3226,11 +3232,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* The election process starts multiple blocks before the end of the era.
|
* The election process starts multiple blocks before the end of the era.
|
||||||
* If this is called just before a new era is triggered, the election process may not
|
* If this is called just before a new era is triggered, the election process may not
|
||||||
* have enough blocks to get a result.
|
* have enough blocks to get a result.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* - Weight: O(1)
|
|
||||||
* - Write: ForceEra
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
forceNewEraAlways: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
forceNewEraAlways: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||||
/**
|
/**
|
||||||
@@ -3255,13 +3256,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Force a current staker to become completely unstaked, immediately.
|
* Force a current staker to become completely unstaked, immediately.
|
||||||
*
|
*
|
||||||
* The dispatch origin must be Root.
|
* The dispatch origin must be Root.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* O(S) where S is the number of slashing spans to be removed
|
|
||||||
* Reads: Bonded, Slashing Spans, Account, Locks
|
|
||||||
* Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators,
|
|
||||||
* Account, Locks Writes Each: SpanSlash * S
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
forceUnstake: AugmentedSubmittable<(stash: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
|
forceUnstake: AugmentedSubmittable<(stash: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
|
||||||
/**
|
/**
|
||||||
@@ -3297,7 +3291,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* # <weight>
|
* # <weight>
|
||||||
* - The transaction's complexity is proportional to the size of `targets` (N)
|
* - The transaction's complexity is proportional to the size of `targets` (N)
|
||||||
* which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS).
|
* which is capped at CompactAssignments::LIMIT (T::MaxNominations).
|
||||||
* - Both the reads and writes follow a similar pattern.
|
* - Both the reads and writes follow a similar pattern.
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
@@ -3348,7 +3342,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* # <weight>
|
* # <weight>
|
||||||
* - Time complexity: O(L), where L is unlocking chunks
|
* - Time complexity: O(L), where L is unlocking chunks
|
||||||
* - Bounded by `MAX_UNLOCKING_CHUNKS`.
|
* - Bounded by `MaxUnlockingChunks`.
|
||||||
* - Storage changes: Can't increase storage, only decrease it.
|
* - Storage changes: Can't increase storage, only decrease it.
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
@@ -3411,11 +3405,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Set the validators who cannot be slashed (if any).
|
* Set the validators who cannot be slashed (if any).
|
||||||
*
|
*
|
||||||
* The dispatch origin must be Root.
|
* The dispatch origin must be Root.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* - O(V)
|
|
||||||
* - Write: Invulnerables
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
setInvulnerables: AugmentedSubmittable<(invulnerables: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>]>;
|
setInvulnerables: AugmentedSubmittable<(invulnerables: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>]>;
|
||||||
/**
|
/**
|
||||||
@@ -3456,7 +3445,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* NOTE: Existing nominators and validators will not be affected by this update.
|
* NOTE: Existing nominators and validators will not be affected by this update.
|
||||||
* to kick people under the new limits, `chill_other` should be called.
|
* to kick people under the new limits, `chill_other` should be called.
|
||||||
**/
|
**/
|
||||||
setStakingConfigs: AugmentedSubmittable<(minNominatorBond: u128 | AnyNumber | Uint8Array, minValidatorBond: u128 | AnyNumber | Uint8Array, maxNominatorCount: Option<u32> | null | object | string | Uint8Array, maxValidatorCount: Option<u32> | null | object | string | Uint8Array, chillThreshold: Option<Percent> | null | object | string | Uint8Array, minCommission: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128, u128, Option<u32>, Option<u32>, Option<Percent>, Perbill]>;
|
setStakingConfigs: AugmentedSubmittable<(minNominatorBond: PalletStakingPalletConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minValidatorBond: PalletStakingPalletConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxNominatorCount: PalletStakingPalletConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxValidatorCount: PalletStakingPalletConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, chillThreshold: PalletStakingPalletConfigOpPercent | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minCommission: PalletStakingPalletConfigOpPerbill | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpPerbill]>;
|
||||||
/**
|
/**
|
||||||
* Sets the ideal number of validators.
|
* Sets the ideal number of validators.
|
||||||
*
|
*
|
||||||
@@ -3478,7 +3467,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Once the unlock period is done, you can call `withdraw_unbonded` to actually move
|
* Once the unlock period is done, you can call `withdraw_unbonded` to actually move
|
||||||
* the funds out of management ready for transfer.
|
* the funds out of management ready for transfer.
|
||||||
*
|
*
|
||||||
* No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`)
|
* No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)
|
||||||
* can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need
|
* can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need
|
||||||
* to be called first to remove some of the chunks (if possible).
|
* to be called first to remove some of the chunks (if possible).
|
||||||
*
|
*
|
||||||
@@ -3547,11 +3536,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
||||||
/**
|
/**
|
||||||
* Make some on-chain remark and emit event.
|
* Make some on-chain remark and emit event.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* - `O(b)` where b is the length of the remark.
|
|
||||||
* - 1 event.
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '7.6.1' };
|
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '7.12.1' };
|
||||||
|
|||||||
@@ -575,6 +575,9 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* Number of eras that staked funds must remain bonded for.
|
* Number of eras that staked funds must remain bonded for.
|
||||||
**/
|
**/
|
||||||
bondingDuration: u32 & AugmentedConst<ApiType>;
|
bondingDuration: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Maximum number of nominations per nominator.
|
||||||
|
**/
|
||||||
maxNominations: u32 & AugmentedConst<ApiType>;
|
maxNominations: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum number of nominators rewarded for each validator.
|
* The maximum number of nominators rewarded for each validator.
|
||||||
@@ -583,6 +586,11 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* claim their reward. This used to limit the i/o cost for the nominator payout.
|
* claim their reward. This used to limit the i/o cost for the nominator payout.
|
||||||
**/
|
**/
|
||||||
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
|
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively
|
||||||
|
* determines how many unique eras a staker may be unbonding in.
|
||||||
|
**/
|
||||||
|
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Number of sessions per era.
|
* Number of sessions per era.
|
||||||
**/
|
**/
|
||||||
@@ -719,6 +727,8 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
burn: Permill & AugmentedConst<ApiType>;
|
burn: Permill & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum number of approvals that can wait in the spending queue.
|
* The maximum number of approvals that can wait in the spending queue.
|
||||||
|
*
|
||||||
|
* NOTE: This parameter is also used within the Bounties Pallet extension if enabled.
|
||||||
**/
|
**/
|
||||||
maxApprovals: u32 & AugmentedConst<ApiType>;
|
maxApprovals: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -185,6 +185,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Require bounty curator.
|
* Require bounty curator.
|
||||||
**/
|
**/
|
||||||
RequireCurator: AugmentedError<ApiType>;
|
RequireCurator: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Too many approvals are already queued.
|
||||||
|
**/
|
||||||
|
TooManyQueued: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The bounty status is unexpected.
|
* The bounty status is unexpected.
|
||||||
**/
|
**/
|
||||||
@@ -503,6 +507,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* The call is not allowed at this point.
|
* The call is not allowed at this point.
|
||||||
**/
|
**/
|
||||||
CallNotAllowed: AugmentedError<ApiType>;
|
CallNotAllowed: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The fallback failed
|
||||||
|
**/
|
||||||
|
FallbackFailed: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* `Self::insert_submission` returned an invalid index.
|
* `Self::insert_submission` returned an invalid index.
|
||||||
**/
|
**/
|
||||||
@@ -1049,6 +1057,40 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
|
parasDisputes: {
|
||||||
|
/**
|
||||||
|
* Ancient dispute statement provided.
|
||||||
|
**/
|
||||||
|
AncientDisputeStatement: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Duplicate dispute statement sets provided.
|
||||||
|
**/
|
||||||
|
DuplicateDisputeStatementSets: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Validator vote submitted more than once to dispute.
|
||||||
|
**/
|
||||||
|
DuplicateStatement: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Invalid signature on statement.
|
||||||
|
**/
|
||||||
|
InvalidSignature: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Too many spam slots used by some specific validator.
|
||||||
|
**/
|
||||||
|
PotentialSpam: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* A dispute where there are only votes on one side.
|
||||||
|
**/
|
||||||
|
SingleSidedDispute: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Validator index on statement is out of bounds for session.
|
||||||
|
**/
|
||||||
|
ValidatorIndexOutOfBounds: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic error
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedError<ApiType>;
|
||||||
|
};
|
||||||
phragmenElection: {
|
phragmenElection: {
|
||||||
/**
|
/**
|
||||||
* Duplicated candidate submission.
|
* Duplicated candidate submission.
|
||||||
@@ -1204,6 +1246,11 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Cannot schedule downgrade of parachain to parathread
|
* Cannot schedule downgrade of parachain to parathread
|
||||||
**/
|
**/
|
||||||
CannotDowngrade: AugmentedError<ApiType>;
|
CannotDowngrade: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Cannot perform a parachain slot / lifecycle swap. Check that the state of both paras are
|
||||||
|
* correct for the swap to work.
|
||||||
|
**/
|
||||||
|
CannotSwap: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Cannot schedule upgrade of parathread to parachain
|
* Cannot schedule upgrade of parathread to parachain
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -6,7 +6,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 } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV1CandidateReceipt, PolkadotRuntimeProxyType, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV1CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeProxyType, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/events' {
|
declare module '@polkadot/api-base/types/events' {
|
||||||
export interface AugmentedEvents<ApiType extends ApiTypes> {
|
export interface AugmentedEvents<ApiType extends ApiTypes> {
|
||||||
@@ -553,12 +553,12 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
NewHeadNoted: AugmentedEvent<ApiType, [u32]>;
|
NewHeadNoted: AugmentedEvent<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* The given validation code was rejected by the PVF pre-checking vote.
|
* The given validation code was accepted by the PVF pre-checking vote.
|
||||||
* `code_hash` `para_id`
|
* `code_hash` `para_id`
|
||||||
**/
|
**/
|
||||||
PvfCheckAccepted: AugmentedEvent<ApiType, [H256, u32]>;
|
PvfCheckAccepted: AugmentedEvent<ApiType, [H256, u32]>;
|
||||||
/**
|
/**
|
||||||
* The given validation code was accepted by the PVF pre-checking vote.
|
* The given validation code was rejected by the PVF pre-checking vote.
|
||||||
* `code_hash` `para_id`
|
* `code_hash` `para_id`
|
||||||
**/
|
**/
|
||||||
PvfCheckRejected: AugmentedEvent<ApiType, [H256, u32]>;
|
PvfCheckRejected: AugmentedEvent<ApiType, [H256, u32]>;
|
||||||
@@ -572,6 +572,33 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
|
parasDisputes: {
|
||||||
|
/**
|
||||||
|
* A dispute has concluded for or against a candidate.
|
||||||
|
* `\[para id, candidate hash, dispute result\]`
|
||||||
|
**/
|
||||||
|
DisputeConcluded: AugmentedEvent<ApiType, [H256, PolkadotRuntimeParachainsDisputesDisputeResult]>;
|
||||||
|
/**
|
||||||
|
* A dispute has been initiated. \[candidate hash, dispute location\]
|
||||||
|
**/
|
||||||
|
DisputeInitiated: AugmentedEvent<ApiType, [H256, PolkadotRuntimeParachainsDisputesDisputeLocation]>;
|
||||||
|
/**
|
||||||
|
* A dispute has timed out due to insufficient participation.
|
||||||
|
* `\[para id, candidate hash\]`
|
||||||
|
**/
|
||||||
|
DisputeTimedOut: AugmentedEvent<ApiType, [H256]>;
|
||||||
|
/**
|
||||||
|
* A dispute has concluded with supermajority against a candidate.
|
||||||
|
* Block authors should no longer build on top of this head and should
|
||||||
|
* instead revert the block at the given height. This should be the
|
||||||
|
* number of the child of the last known valid block in the chain.
|
||||||
|
**/
|
||||||
|
Revert: AugmentedEvent<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* Generic event
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
|
};
|
||||||
phragmenElection: {
|
phragmenElection: {
|
||||||
/**
|
/**
|
||||||
* A candidate was slashed by amount due to failing to obtain a seat as member or
|
* A candidate was slashed by amount due to failing to obtain a seat as member or
|
||||||
|
|||||||
@@ -6,4 +6,5 @@ import './consts';
|
|||||||
import './errors';
|
import './errors';
|
||||||
import './events';
|
import './events';
|
||||||
import './query';
|
import './query';
|
||||||
|
import './registry';
|
||||||
import './tx';
|
import './tx';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, W
|
|||||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppPublic, PolkadotPrimitivesV1AssignmentAppPublic, PolkadotPrimitivesV1CandidateCommitments, PolkadotPrimitivesV1CoreOccupied, PolkadotPrimitivesV1ScrapedOnChainVotes, PolkadotPrimitivesV1UpgradeGoAhead, PolkadotPrimitivesV1UpgradeRestriction, PolkadotPrimitivesV2SessionInfo, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerScheduledV3, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppPublic, PolkadotPrimitivesV1AssignmentAppPublic, PolkadotPrimitivesV1CandidateCommitments, PolkadotPrimitivesV1CoreOccupied, PolkadotPrimitivesV1DisputeState, PolkadotPrimitivesV1ScrapedOnChainVotes, PolkadotPrimitivesV1UpgradeGoAhead, PolkadotPrimitivesV1UpgradeRestriction, PolkadotPrimitivesV2SessionInfo, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||||
import type { Observable } from '@polkadot/types/types';
|
import type { Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/storage' {
|
declare module '@polkadot/api-base/types/storage' {
|
||||||
@@ -185,8 +185,29 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
};
|
};
|
||||||
balances: {
|
balances: {
|
||||||
/**
|
/**
|
||||||
* The balance of an account.
|
* The Balances pallet example of storing the balance of an account.
|
||||||
*
|
*
|
||||||
|
* # Example
|
||||||
|
*
|
||||||
|
* ```nocompile
|
||||||
|
* impl pallet_balances::Config for Runtime {
|
||||||
|
* type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* You can also store the balance of an account in the `System` pallet.
|
||||||
|
*
|
||||||
|
* # Example
|
||||||
|
*
|
||||||
|
* ```nocompile
|
||||||
|
* impl pallet_balances::Config for Runtime {
|
||||||
|
* type AccountStore = System
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* But this comes with tradeoffs, storing account balances in the system pallet stores
|
||||||
|
* `frame_system` data alongside the account data contrary to storing account balances in the
|
||||||
|
* `Balances` pallet, which uses a `StorageMap` to store balances data only.
|
||||||
* NOTE: This is only used in the case that this pallet is used to store balances.
|
* NOTE: This is only used in the case that this pallet is used to store balances.
|
||||||
**/
|
**/
|
||||||
account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
@@ -335,9 +356,9 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
newRaise: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
newRaise: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Tracker for the next available trie index
|
* Tracker for the next available fund index
|
||||||
**/
|
**/
|
||||||
nextTrieIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
nextFundIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Generic query
|
* Generic query
|
||||||
**/
|
**/
|
||||||
@@ -364,13 +385,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* proposal.
|
* proposal.
|
||||||
**/
|
**/
|
||||||
lastTabledWasExternal: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
lastTabledWasExternal: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
|
||||||
* Accounts for which there are locks in action which may be removed at some point in the
|
|
||||||
* future. The value is the block number at which the lock expires and may be removed.
|
|
||||||
*
|
|
||||||
* TWOX-NOTE: OK ― `AccountId` is a secure hash.
|
|
||||||
**/
|
|
||||||
locks: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
|
||||||
/**
|
/**
|
||||||
* The lowest referendum index representing an unbaked referendum. Equal to
|
* The lowest referendum index representing an unbaked referendum. Equal to
|
||||||
* `ReferendumCount` if there isn't a unbaked referendum.
|
* `ReferendumCount` if there isn't a unbaked referendum.
|
||||||
@@ -461,7 +475,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
*
|
*
|
||||||
* Can be set via `set_minimum_untrusted_score`.
|
* Can be set via `set_minimum_untrusted_score`.
|
||||||
**/
|
**/
|
||||||
minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<Vec<u128>>>, []> & QueryableStorageEntry<ApiType, []>;
|
minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<SpNposElectionsElectionScore>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Current best solution, signed or unsigned, queued to be returned upon `elect`.
|
* Current best solution, signed or unsigned, queued to be returned upon `elect`.
|
||||||
**/
|
**/
|
||||||
@@ -483,7 +497,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* can be quite large, so we're willing to pay the cost of multiple database accesses to access
|
* can be quite large, so we're willing to pay the cost of multiple database accesses to access
|
||||||
* them one at a time instead of reading and decoding all of them at once.
|
* them one at a time instead of reading and decoding all of them at once.
|
||||||
**/
|
**/
|
||||||
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<Vec<u128>, u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<SpNposElectionsElectionScore, u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* The next index to be assigned to an incoming signed submission.
|
* The next index to be assigned to an incoming signed submission.
|
||||||
*
|
*
|
||||||
@@ -853,6 +867,8 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
heads: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
heads: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
/**
|
/**
|
||||||
* All parachains. Ordered ascending by `ParaId`. Parathreads are not included.
|
* All parachains. Ordered ascending by `ParaId`. Parathreads are not included.
|
||||||
|
*
|
||||||
|
* Consider using the [`ParachainsCache`] type of modifying.
|
||||||
**/
|
**/
|
||||||
parachains: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
parachains: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
@@ -999,6 +1015,41 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
|
parasDisputes: {
|
||||||
|
/**
|
||||||
|
* All ongoing or concluded disputes for the last several sessions.
|
||||||
|
**/
|
||||||
|
disputes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV1DisputeState>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||||
|
/**
|
||||||
|
* Whether the chain is frozen. Starts as `None`. When this is `Some`,
|
||||||
|
* the chain will not accept any new parachain blocks for backing or inclusion,
|
||||||
|
* and its value indicates the last valid block number in the chain.
|
||||||
|
* It can only be set back to `None` by governance intervention.
|
||||||
|
**/
|
||||||
|
frozen: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* All included blocks on the chain, as well as the block number in this chain that
|
||||||
|
* should be reverted back to if the candidate is disputed and determined to be invalid.
|
||||||
|
**/
|
||||||
|
included: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<u32>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||||
|
/**
|
||||||
|
* The last pruned session, if any. All data stored by this module
|
||||||
|
* references sessions.
|
||||||
|
**/
|
||||||
|
lastPrunedSession: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Maps session indices to a vector indicating the number of potentially-spam disputes
|
||||||
|
* each validator is participating in. Potentially-spam disputes are remote disputes which have
|
||||||
|
* fewer than `byzantine_threshold + 1` validators.
|
||||||
|
*
|
||||||
|
* The i'th entry of the vector corresponds to the i'th validator in the session.
|
||||||
|
**/
|
||||||
|
spamSlots: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Vec<u32>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
paraSessionInfo: {
|
paraSessionInfo: {
|
||||||
/**
|
/**
|
||||||
* Assignment keys for the current session.
|
* Assignment keys for the current session.
|
||||||
@@ -1138,12 +1189,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* Lookup from identity to the block number and index of the task.
|
* Lookup from identity to the block number and index of the task.
|
||||||
**/
|
**/
|
||||||
lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
|
lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
|
||||||
/**
|
|
||||||
* Storage version of the pallet.
|
|
||||||
*
|
|
||||||
* New networks start with last version.
|
|
||||||
**/
|
|
||||||
storageVersion: AugmentedQuery<ApiType, () => Observable<PalletSchedulerReleases>, []> & QueryableStorageEntry<ApiType, []>;
|
|
||||||
/**
|
/**
|
||||||
* Generic query
|
* Generic query
|
||||||
**/
|
**/
|
||||||
@@ -1378,7 +1423,22 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
minValidatorBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
minValidatorBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* The map from nominator stash key to the set of stash keys of all validators to nominate.
|
* The map from nominator stash key to their nomination preferences, namely the validators that
|
||||||
|
* they wish to support.
|
||||||
|
*
|
||||||
|
* Note that the keys of this storage map might become non-decodable in case the
|
||||||
|
* [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators
|
||||||
|
* are still existent in storage, their key is correct and retrievable (i.e. `contains_key`
|
||||||
|
* indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable
|
||||||
|
* nominators will effectively not-exist, until they re-submit their preferences such that it
|
||||||
|
* is within the bounds of the newly set `Config::MaxNominations`.
|
||||||
|
*
|
||||||
|
* This implies that `::iter_keys().count()` and `::iter().count()` might return different
|
||||||
|
* values for this map. Moreover, the main `::count()` is aligned with the former, namely the
|
||||||
|
* number of keys that exist.
|
||||||
|
*
|
||||||
|
* Lastly, if any of the nominators become non-decodable, they can be chilled immediately via
|
||||||
|
* [`Call::chill_other`] dispatchable by anyone.
|
||||||
**/
|
**/
|
||||||
nominators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletStakingNominations>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
nominators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletStakingNominations>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import '@polkadot/types-augment/registry/substrate';
|
||||||
|
import '@polkadot/types-augment/registry/polkadot';
|
||||||
@@ -7,7 +7,7 @@ import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u1
|
|||||||
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, MultiAddress, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportScheduleMaybeHashed, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppSignature, PolkadotPrimitivesV1InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeOriginCaller, PolkadotRuntimeProxyType, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
import type { FrameSupportScheduleMaybeHashed, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppSignature, PolkadotPrimitivesV1InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeOriginCaller, PolkadotRuntimeProxyType, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/submittable' {
|
declare module '@polkadot/api-base/types/submittable' {
|
||||||
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
|
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
|
||||||
@@ -1198,6 +1198,13 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
electionProviderMultiPhase: {
|
electionProviderMultiPhase: {
|
||||||
|
/**
|
||||||
|
* Trigger the governance fallback.
|
||||||
|
*
|
||||||
|
* This can only be called when [`Phase::Emergency`] is enabled, as an alternative to
|
||||||
|
* calling [`Call::set_emergency_election_result`].
|
||||||
|
**/
|
||||||
|
governanceFallback: AugmentedSubmittable<(maybeMaxVoters: Option<u32> | null | object | string | Uint8Array, maybeMaxTargets: Option<u32> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<u32>, Option<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Set a solution in the queue, to be handed out to the client of this pallet in the next
|
* Set a solution in the queue, to be handed out to the client of this pallet in the next
|
||||||
* call to `ElectionProvider::elect`.
|
* call to `ElectionProvider::elect`.
|
||||||
@@ -1216,7 +1223,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* This check can be turned off by setting the value to `None`.
|
* This check can be turned off by setting the value to `None`.
|
||||||
**/
|
**/
|
||||||
setMinimumUntrustedScore: AugmentedSubmittable<(maybeNextScore: Option<Vec<u128>> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<Vec<u128>>]>;
|
setMinimumUntrustedScore: AugmentedSubmittable<(maybeNextScore: Option<SpNposElectionsElectionScore> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<SpNposElectionsElectionScore>]>;
|
||||||
/**
|
/**
|
||||||
* Submit a solution for the signed phase.
|
* Submit a solution for the signed phase.
|
||||||
*
|
*
|
||||||
@@ -1227,12 +1234,8 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* A deposit is reserved and recorded for the solution. Based on the outcome, the solution
|
* A deposit is reserved and recorded for the solution. Based on the outcome, the solution
|
||||||
* might be rewarded, slashed, or get all or a part of the deposit back.
|
* might be rewarded, slashed, or get all or a part of the deposit back.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Queue size must be provided as witness data.
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
submit: AugmentedSubmittable<(rawSolution: PalletElectionProviderMultiPhaseRawSolution | { solution?: any; score?: any; round?: any } | string | Uint8Array, numSignedSubmissions: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletElectionProviderMultiPhaseRawSolution, u32]>;
|
submit: AugmentedSubmittable<(rawSolution: PalletElectionProviderMultiPhaseRawSolution | { solution?: any; score?: any; round?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletElectionProviderMultiPhaseRawSolution]>;
|
||||||
/**
|
/**
|
||||||
* Submit a solution for the unsigned phase.
|
* Submit a solution for the unsigned phase.
|
||||||
*
|
*
|
||||||
@@ -1987,6 +1990,13 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
|
parasDisputes: {
|
||||||
|
forceUnfreeze: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||||
|
/**
|
||||||
|
* Generic tx
|
||||||
|
**/
|
||||||
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
|
};
|
||||||
parasShared: {
|
parasShared: {
|
||||||
/**
|
/**
|
||||||
* Generic tx
|
* Generic tx
|
||||||
@@ -2560,14 +2570,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Can be called by the `T::SlashCancelOrigin`.
|
* Can be called by the `T::SlashCancelOrigin`.
|
||||||
*
|
*
|
||||||
* Parameters: era and indices of the slashes for that era to kill.
|
* Parameters: era and indices of the slashes for that era to kill.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Complexity: O(U + S)
|
|
||||||
* with U unapplied slashes weighted with U=1000
|
|
||||||
* and S is the number of slash indices to be canceled.
|
|
||||||
* - Read: Unapplied Slashes
|
|
||||||
* - Write: Unapplied Slashes
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
cancelDeferredSlash: AugmentedSubmittable<(era: u32 | AnyNumber | Uint8Array, slashIndices: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<u32>]>;
|
cancelDeferredSlash: AugmentedSubmittable<(era: u32 | AnyNumber | Uint8Array, slashIndices: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<u32>]>;
|
||||||
/**
|
/**
|
||||||
@@ -2596,6 +2598,11 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* If the caller is different than the controller being targeted, the following conditions
|
* If the caller is different than the controller being targeted, the following conditions
|
||||||
* must be met:
|
* must be met:
|
||||||
|
*
|
||||||
|
* * `controller` must belong to a nominator who has become non-decodable,
|
||||||
|
*
|
||||||
|
* Or:
|
||||||
|
*
|
||||||
* * A `ChillThreshold` must be set and checked which defines how close to the max
|
* * A `ChillThreshold` must be set and checked which defines how close to the max
|
||||||
* nominators or validators we must reach before users can start chilling one-another.
|
* nominators or validators we must reach before users can start chilling one-another.
|
||||||
* * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine
|
* * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine
|
||||||
@@ -2608,6 +2615,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* who do not satisfy these requirements.
|
* who do not satisfy these requirements.
|
||||||
**/
|
**/
|
||||||
chillOther: AugmentedSubmittable<(controller: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
chillOther: AugmentedSubmittable<(controller: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Force a validator to have at least the minimum commission. This will not affect a
|
||||||
|
* validator who already has a commission greater than or equal to the minimum. Any account
|
||||||
|
* can call this.
|
||||||
|
**/
|
||||||
|
forceApplyMinCommission: AugmentedSubmittable<(validatorStash: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
* Force there to be a new era at the end of the next session. After this, it will be
|
* Force there to be a new era at the end of the next session. After this, it will be
|
||||||
* reset to normal (non-forced) behaviour.
|
* reset to normal (non-forced) behaviour.
|
||||||
@@ -2637,11 +2650,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* The election process starts multiple blocks before the end of the era.
|
* The election process starts multiple blocks before the end of the era.
|
||||||
* If this is called just before a new era is triggered, the election process may not
|
* If this is called just before a new era is triggered, the election process may not
|
||||||
* have enough blocks to get a result.
|
* have enough blocks to get a result.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* - Weight: O(1)
|
|
||||||
* - Write: ForceEra
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
forceNewEraAlways: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
forceNewEraAlways: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||||
/**
|
/**
|
||||||
@@ -2666,13 +2674,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Force a current staker to become completely unstaked, immediately.
|
* Force a current staker to become completely unstaked, immediately.
|
||||||
*
|
*
|
||||||
* The dispatch origin must be Root.
|
* The dispatch origin must be Root.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* O(S) where S is the number of slashing spans to be removed
|
|
||||||
* Reads: Bonded, Slashing Spans, Account, Locks
|
|
||||||
* Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators,
|
|
||||||
* Account, Locks Writes Each: SpanSlash * S
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
forceUnstake: AugmentedSubmittable<(stash: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
|
forceUnstake: AugmentedSubmittable<(stash: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
|
||||||
/**
|
/**
|
||||||
@@ -2708,7 +2709,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* # <weight>
|
* # <weight>
|
||||||
* - The transaction's complexity is proportional to the size of `targets` (N)
|
* - The transaction's complexity is proportional to the size of `targets` (N)
|
||||||
* which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS).
|
* which is capped at CompactAssignments::LIMIT (T::MaxNominations).
|
||||||
* - Both the reads and writes follow a similar pattern.
|
* - Both the reads and writes follow a similar pattern.
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
@@ -2759,7 +2760,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* # <weight>
|
* # <weight>
|
||||||
* - Time complexity: O(L), where L is unlocking chunks
|
* - Time complexity: O(L), where L is unlocking chunks
|
||||||
* - Bounded by `MAX_UNLOCKING_CHUNKS`.
|
* - Bounded by `MaxUnlockingChunks`.
|
||||||
* - Storage changes: Can't increase storage, only decrease it.
|
* - Storage changes: Can't increase storage, only decrease it.
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
@@ -2822,11 +2823,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Set the validators who cannot be slashed (if any).
|
* Set the validators who cannot be slashed (if any).
|
||||||
*
|
*
|
||||||
* The dispatch origin must be Root.
|
* The dispatch origin must be Root.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* - O(V)
|
|
||||||
* - Write: Invulnerables
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
setInvulnerables: AugmentedSubmittable<(invulnerables: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>]>;
|
setInvulnerables: AugmentedSubmittable<(invulnerables: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>]>;
|
||||||
/**
|
/**
|
||||||
@@ -2867,7 +2863,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* NOTE: Existing nominators and validators will not be affected by this update.
|
* NOTE: Existing nominators and validators will not be affected by this update.
|
||||||
* to kick people under the new limits, `chill_other` should be called.
|
* to kick people under the new limits, `chill_other` should be called.
|
||||||
**/
|
**/
|
||||||
setStakingConfigs: AugmentedSubmittable<(minNominatorBond: u128 | AnyNumber | Uint8Array, minValidatorBond: u128 | AnyNumber | Uint8Array, maxNominatorCount: Option<u32> | null | object | string | Uint8Array, maxValidatorCount: Option<u32> | null | object | string | Uint8Array, chillThreshold: Option<Percent> | null | object | string | Uint8Array, minCommission: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128, u128, Option<u32>, Option<u32>, Option<Percent>, Perbill]>;
|
setStakingConfigs: AugmentedSubmittable<(minNominatorBond: PalletStakingPalletConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minValidatorBond: PalletStakingPalletConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxNominatorCount: PalletStakingPalletConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxValidatorCount: PalletStakingPalletConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, chillThreshold: PalletStakingPalletConfigOpPercent | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minCommission: PalletStakingPalletConfigOpPerbill | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpPerbill]>;
|
||||||
/**
|
/**
|
||||||
* Sets the ideal number of validators.
|
* Sets the ideal number of validators.
|
||||||
*
|
*
|
||||||
@@ -2889,7 +2885,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Once the unlock period is done, you can call `withdraw_unbonded` to actually move
|
* Once the unlock period is done, you can call `withdraw_unbonded` to actually move
|
||||||
* the funds out of management ready for transfer.
|
* the funds out of management ready for transfer.
|
||||||
*
|
*
|
||||||
* No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`)
|
* No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)
|
||||||
* can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need
|
* can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need
|
||||||
* to be called first to remove some of the chunks (if possible).
|
* to be called first to remove some of the chunks (if possible).
|
||||||
*
|
*
|
||||||
@@ -2958,11 +2954,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
||||||
/**
|
/**
|
||||||
* Make some on-chain remark and emit event.
|
* Make some on-chain remark and emit event.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* - `O(b)` where b is the length of the remark.
|
|
||||||
* - 1 event.
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type { ApiTypes } from '@polkadot/api-base/types';
|
|||||||
import type { Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
import type { Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { Codec } from '@polkadot/types-codec/types';
|
import type { Codec } from '@polkadot/types-codec/types';
|
||||||
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
|
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsSchedule, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
|
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsSchedule, PalletStateTrieMigrationMigrationLimits, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/consts' {
|
declare module '@polkadot/api-base/types/consts' {
|
||||||
export interface AugmentedConsts<ApiType extends ApiTypes> {
|
export interface AugmentedConsts<ApiType extends ApiTypes> {
|
||||||
@@ -257,6 +257,26 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
|
convictionVoting: {
|
||||||
|
/**
|
||||||
|
* The maximum number of concurrent votes an account may have.
|
||||||
|
*
|
||||||
|
* Also used to compute weight, an overly large value can
|
||||||
|
* lead to extrinsic with large weight estimation: see `delegate` for instance.
|
||||||
|
**/
|
||||||
|
maxVotes: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The minimum period of vote locking.
|
||||||
|
*
|
||||||
|
* It should be no shorter than enactment period to ensure that in the case of an approval,
|
||||||
|
* those successful voters are locked into the consequences that their votes entail.
|
||||||
|
**/
|
||||||
|
voteLockingPeriod: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic const
|
||||||
|
**/
|
||||||
|
[key: string]: Codec;
|
||||||
|
};
|
||||||
democracy: {
|
democracy: {
|
||||||
/**
|
/**
|
||||||
* Period in blocks where an external proposal may not be re-submitted after being vetoed.
|
* Period in blocks where an external proposal may not be re-submitted after being vetoed.
|
||||||
@@ -665,8 +685,13 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
friendDepositFactor: u128 & AugmentedConst<ApiType>;
|
friendDepositFactor: u128 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum amount of friends allowed in a recovery configuration.
|
* The maximum amount of friends allowed in a recovery configuration.
|
||||||
|
*
|
||||||
|
* NOTE: The threshold programmed in this Pallet uses u16, so it does
|
||||||
|
* not really make sense to have a limit here greater than u16::MAX.
|
||||||
|
* But also, that is a lot more than you should probably set this value
|
||||||
|
* to anyway...
|
||||||
**/
|
**/
|
||||||
maxFriends: u16 & AugmentedConst<ApiType>;
|
maxFriends: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The base amount of currency needed to reserve for starting a recovery.
|
* The base amount of currency needed to reserve for starting a recovery.
|
||||||
*
|
*
|
||||||
@@ -682,6 +707,31 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
|
referenda: {
|
||||||
|
/**
|
||||||
|
* Quantization level for the referendum wakeup scheduler. A higher number will result in
|
||||||
|
* fewer storage reads/writes needed for smaller voters, but also result in delays to the
|
||||||
|
* automatic referendum status changes. Explicit servicing instructions are unaffected.
|
||||||
|
**/
|
||||||
|
alarmInterval: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Maximum size of the referendum queue for a single track.
|
||||||
|
**/
|
||||||
|
maxQueued: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The minimum amount to be used as a deposit for a public referendum proposal.
|
||||||
|
**/
|
||||||
|
submissionDeposit: u128 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The number of blocks after submission that a referendum must begin being decided by.
|
||||||
|
* Once this passes, then anyone may cancel the referendum.
|
||||||
|
**/
|
||||||
|
undecidingTimeout: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic const
|
||||||
|
**/
|
||||||
|
[key: string]: Codec;
|
||||||
|
};
|
||||||
scheduler: {
|
scheduler: {
|
||||||
/**
|
/**
|
||||||
* The maximum weight that may be scheduled per block for any dispatchables of less
|
* The maximum weight that may be scheduled per block for any dispatchables of less
|
||||||
@@ -747,6 +797,9 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* Number of eras that staked funds must remain bonded for.
|
* Number of eras that staked funds must remain bonded for.
|
||||||
**/
|
**/
|
||||||
bondingDuration: u32 & AugmentedConst<ApiType>;
|
bondingDuration: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Maximum number of nominations per nominator.
|
||||||
|
**/
|
||||||
maxNominations: u32 & AugmentedConst<ApiType>;
|
maxNominations: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum number of nominators rewarded for each validator.
|
* The maximum number of nominators rewarded for each validator.
|
||||||
@@ -755,6 +808,11 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* claim their reward. This used to limit the i/o cost for the nominator payout.
|
* claim their reward. This used to limit the i/o cost for the nominator payout.
|
||||||
**/
|
**/
|
||||||
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
|
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively
|
||||||
|
* determines how many unique eras a staker may be unbonding in.
|
||||||
|
**/
|
||||||
|
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Number of sessions per era.
|
* Number of sessions per era.
|
||||||
**/
|
**/
|
||||||
@@ -771,6 +829,16 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
|
stateTrieMigration: {
|
||||||
|
/**
|
||||||
|
* The maximum limits that the signed migration could use.
|
||||||
|
**/
|
||||||
|
signedMigrationMaxLimits: PalletStateTrieMigrationMigrationLimits & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic const
|
||||||
|
**/
|
||||||
|
[key: string]: Codec;
|
||||||
|
};
|
||||||
system: {
|
system: {
|
||||||
/**
|
/**
|
||||||
* Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
* Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
||||||
@@ -891,6 +959,8 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
burn: Permill & AugmentedConst<ApiType>;
|
burn: Permill & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum number of approvals that can wait in the spending queue.
|
* The maximum number of approvals that can wait in the spending queue.
|
||||||
|
*
|
||||||
|
* NOTE: This parameter is also used within the Bounties Pallet extension if enabled.
|
||||||
**/
|
**/
|
||||||
maxApprovals: u32 & AugmentedConst<ApiType>;
|
maxApprovals: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -219,6 +219,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Require bounty curator.
|
* Require bounty curator.
|
||||||
**/
|
**/
|
||||||
RequireCurator: AugmentedError<ApiType>;
|
RequireCurator: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Too many approvals are already queued.
|
||||||
|
**/
|
||||||
|
TooManyQueued: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The bounty status is unexpected.
|
* The bounty status is unexpected.
|
||||||
**/
|
**/
|
||||||
@@ -309,6 +313,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* `seal_call` forwarded this contracts input. It therefore is no longer available.
|
* `seal_call` forwarded this contracts input. It therefore is no longer available.
|
||||||
**/
|
**/
|
||||||
InputForwarded: AugmentedError<ApiType>;
|
InputForwarded: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Invalid combination of flags supplied to `seal_call` or `seal_delegate_call`.
|
||||||
|
**/
|
||||||
|
InvalidCallFlags: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* A new schedule must have a greater version than the current one.
|
* A new schedule must have a greater version than the current one.
|
||||||
**/
|
**/
|
||||||
@@ -381,6 +389,61 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
|
convictionVoting: {
|
||||||
|
/**
|
||||||
|
* The account is already delegating.
|
||||||
|
**/
|
||||||
|
AlreadyDelegating: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The account currently has votes attached to it and the operation cannot succeed until
|
||||||
|
* these are removed, either through `unvote` or `reap_vote`.
|
||||||
|
**/
|
||||||
|
AlreadyVoting: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The class ID supplied is invalid.
|
||||||
|
**/
|
||||||
|
BadClass: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The class must be supplied since it is not easily determinable from the state.
|
||||||
|
**/
|
||||||
|
ClassNeeded: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Too high a balance was provided that the account cannot afford.
|
||||||
|
**/
|
||||||
|
InsufficientFunds: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Maximum number of votes reached.
|
||||||
|
**/
|
||||||
|
MaxVotesReached: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Delegation to oneself makes no sense.
|
||||||
|
**/
|
||||||
|
Nonsense: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The actor has no permission to conduct the action.
|
||||||
|
**/
|
||||||
|
NoPermission: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The actor has no permission to conduct the action right now but will do in the future.
|
||||||
|
**/
|
||||||
|
NoPermissionYet: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The account is not currently delegating.
|
||||||
|
**/
|
||||||
|
NotDelegating: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Poll is not ongoing.
|
||||||
|
**/
|
||||||
|
NotOngoing: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The given account did not vote on the poll.
|
||||||
|
**/
|
||||||
|
NotVoter: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic error
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedError<ApiType>;
|
||||||
|
};
|
||||||
council: {
|
council: {
|
||||||
/**
|
/**
|
||||||
* Members are already initialized!
|
* Members are already initialized!
|
||||||
@@ -551,6 +614,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* The call is not allowed at this point.
|
* The call is not allowed at this point.
|
||||||
**/
|
**/
|
||||||
CallNotAllowed: AugmentedError<ApiType>;
|
CallNotAllowed: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The fallback failed
|
||||||
|
**/
|
||||||
|
FallbackFailed: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* `Self::insert_submission` returned an invalid index.
|
* `Self::insert_submission` returned an invalid index.
|
||||||
**/
|
**/
|
||||||
@@ -1089,6 +1156,56 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
|
referenda: {
|
||||||
|
/**
|
||||||
|
* The referendum index provided is invalid in this context.
|
||||||
|
**/
|
||||||
|
BadReferendum: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The track identifier given was invalid.
|
||||||
|
**/
|
||||||
|
BadTrack: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* There are already a full complement of referendums in progress for this track.
|
||||||
|
**/
|
||||||
|
Full: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Referendum's decision deposit is already paid.
|
||||||
|
**/
|
||||||
|
HaveDeposit: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The deposit cannot be refunded since none was made.
|
||||||
|
**/
|
||||||
|
NoDeposit: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The deposit refunder is not the depositor.
|
||||||
|
**/
|
||||||
|
NoPermission: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* There was nothing to do in the advancement.
|
||||||
|
**/
|
||||||
|
NothingToDo: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Referendum is not ongoing.
|
||||||
|
**/
|
||||||
|
NotOngoing: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* No track exists for the proposal origin.
|
||||||
|
**/
|
||||||
|
NoTrack: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The queue of the track is empty.
|
||||||
|
**/
|
||||||
|
QueueEmpty: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Any deposit cannot be refunded until after the decision is over.
|
||||||
|
**/
|
||||||
|
Unfinished: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic error
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedError<ApiType>;
|
||||||
|
};
|
||||||
scheduler: {
|
scheduler: {
|
||||||
/**
|
/**
|
||||||
* Failed to schedule a call
|
* Failed to schedule a call
|
||||||
@@ -1321,6 +1438,28 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
|
stateTrieMigration: {
|
||||||
|
/**
|
||||||
|
* bad witness data provided.
|
||||||
|
**/
|
||||||
|
BadWitness: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* max signed limits not respected.
|
||||||
|
**/
|
||||||
|
MaxSignedLimits: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* submitter does not have enough funds.
|
||||||
|
**/
|
||||||
|
NotEnoughFunds: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* upper bound of size is exceeded,
|
||||||
|
**/
|
||||||
|
SizeUpperBoundExceeded: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic error
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedError<ApiType>;
|
||||||
|
};
|
||||||
sudo: {
|
sudo: {
|
||||||
/**
|
/**
|
||||||
* Sender must be the Sudo account
|
* Sender must be the Sudo account
|
||||||
@@ -1563,7 +1702,7 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
/**
|
/**
|
||||||
* The given asset ID is unknown.
|
* The given asset ID is unknown.
|
||||||
**/
|
**/
|
||||||
Unknown: AugmentedError<ApiType>;
|
UnknownClass: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The delegate turned out to be different to what was expected.
|
* The delegate turned out to be different to what was expected.
|
||||||
**/
|
**/
|
||||||
@@ -1614,5 +1753,31 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
|
whitelist: {
|
||||||
|
/**
|
||||||
|
* The call was already whitelisted; No-Op.
|
||||||
|
**/
|
||||||
|
CallAlreadyWhitelisted: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The call was not whitelisted.
|
||||||
|
**/
|
||||||
|
CallIsNotWhitelisted: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The weight of the decoded call was higher than the witness.
|
||||||
|
**/
|
||||||
|
InvalidCallWeightWitness: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The preimage of the call hash could not be loaded.
|
||||||
|
**/
|
||||||
|
UnavailablePreImage: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The call could not be decoded.
|
||||||
|
**/
|
||||||
|
UndecodableCall: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic error
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedError<ApiType>;
|
||||||
|
};
|
||||||
} // AugmentedErrors
|
} // AugmentedErrors
|
||||||
} // declare module
|
} // declare module
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type { ApiTypes } from '@polkadot/api-base/types';
|
|||||||
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { ITuple } from '@polkadot/types-codec/types';
|
import type { ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, NodeRuntimeProxyType, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError } from '@polkadot/types/lookup';
|
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPostDispatchInfo, NodeRuntimeProxyType, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, PalletStateTrieMigrationMigrationCompute, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/events' {
|
declare module '@polkadot/api-base/types/events' {
|
||||||
export interface AugmentedEvents<ApiType extends ApiTypes> {
|
export interface AugmentedEvents<ApiType extends ApiTypes> {
|
||||||
@@ -211,6 +211,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* Code with the specified hash has been stored.
|
* Code with the specified hash has been stored.
|
||||||
**/
|
**/
|
||||||
CodeStored: AugmentedEvent<ApiType, [H256]>;
|
CodeStored: AugmentedEvent<ApiType, [H256]>;
|
||||||
|
/**
|
||||||
|
* A contract's code was updated.
|
||||||
|
**/
|
||||||
|
ContractCodeUpdated: AugmentedEvent<ApiType, [AccountId32, H256, H256]>;
|
||||||
/**
|
/**
|
||||||
* A custom event emitted by the contract.
|
* A custom event emitted by the contract.
|
||||||
**/
|
**/
|
||||||
@@ -233,6 +237,20 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
|
convictionVoting: {
|
||||||
|
/**
|
||||||
|
* An account has delegated their vote to another account. \[who, target\]
|
||||||
|
**/
|
||||||
|
Delegated: AugmentedEvent<ApiType, [AccountId32, AccountId32]>;
|
||||||
|
/**
|
||||||
|
* An \[account\] has cancelled a previous delegation operation.
|
||||||
|
**/
|
||||||
|
Undelegated: AugmentedEvent<ApiType, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Generic event
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
|
};
|
||||||
council: {
|
council: {
|
||||||
/**
|
/**
|
||||||
* A motion was approved by the required threshold.
|
* A motion was approved by the required threshold.
|
||||||
@@ -680,6 +698,58 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
|
referenda: {
|
||||||
|
/**
|
||||||
|
* A referendum has been approved and its proposal has been scheduled.
|
||||||
|
**/
|
||||||
|
Approved: AugmentedEvent<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* A referendum has been cancelled.
|
||||||
|
**/
|
||||||
|
Cancelled: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
|
||||||
|
ConfirmAborted: AugmentedEvent<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* A referendum has ended its confirmation phase and is ready for approval.
|
||||||
|
**/
|
||||||
|
Confirmed: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
|
||||||
|
ConfirmStarted: AugmentedEvent<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* The decision deposit has been placed.
|
||||||
|
**/
|
||||||
|
DecisionDepositPlaced: AugmentedEvent<ApiType, [u32, AccountId32, u128]>;
|
||||||
|
/**
|
||||||
|
* The decision deposit has been refunded.
|
||||||
|
**/
|
||||||
|
DecisionDepositRefunded: AugmentedEvent<ApiType, [u32, AccountId32, u128]>;
|
||||||
|
/**
|
||||||
|
* A referendum has moved into the deciding phase.
|
||||||
|
**/
|
||||||
|
DecisionStarted: AugmentedEvent<ApiType, [u32, u8, H256, PalletConvictionVotingTally]>;
|
||||||
|
/**
|
||||||
|
* A deposit has been slashaed.
|
||||||
|
**/
|
||||||
|
DepositSlashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||||
|
/**
|
||||||
|
* A referendum has been killed.
|
||||||
|
**/
|
||||||
|
Killed: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
|
||||||
|
/**
|
||||||
|
* A proposal has been rejected by referendum.
|
||||||
|
**/
|
||||||
|
Rejected: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
|
||||||
|
/**
|
||||||
|
* A referendum has being submitted.
|
||||||
|
**/
|
||||||
|
Submitted: AugmentedEvent<ApiType, [u32, u8, H256]>;
|
||||||
|
/**
|
||||||
|
* A referendum has been timed out without being decided.
|
||||||
|
**/
|
||||||
|
TimedOut: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
|
||||||
|
/**
|
||||||
|
* Generic event
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
|
};
|
||||||
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.
|
||||||
@@ -849,6 +919,29 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
|
stateTrieMigration: {
|
||||||
|
/**
|
||||||
|
* The auto migration task finished.
|
||||||
|
**/
|
||||||
|
AutoMigrationFinished: AugmentedEvent<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Migration got halted.
|
||||||
|
**/
|
||||||
|
Halted: AugmentedEvent<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Given number of `(top, child)` keys were migrated respectively, with the given
|
||||||
|
* `compute`.
|
||||||
|
**/
|
||||||
|
Migrated: AugmentedEvent<ApiType, [u32, u32, PalletStateTrieMigrationMigrationCompute]>;
|
||||||
|
/**
|
||||||
|
* Some account got slashed by the given amount.
|
||||||
|
**/
|
||||||
|
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||||
|
/**
|
||||||
|
* Generic event
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
|
};
|
||||||
sudo: {
|
sudo: {
|
||||||
/**
|
/**
|
||||||
* The \[sudoer\] just switched identity; the old key is supplied if one existed.
|
* The \[sudoer\] just switched identity; the old key is supplied if one existed.
|
||||||
@@ -1175,5 +1268,14 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
|
whitelist: {
|
||||||
|
CallWhitelisted: AugmentedEvent<ApiType, [H256]>;
|
||||||
|
WhitelistedCallDispatched: AugmentedEvent<ApiType, [H256, Result<FrameSupportWeightsPostDispatchInfo, SpRuntimeDispatchErrorWithPostInfo>]>;
|
||||||
|
WhitelistedCallRemoved: AugmentedEvent<ApiType, [H256]>;
|
||||||
|
/**
|
||||||
|
* Generic event
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
|
};
|
||||||
} // AugmentedEvents
|
} // AugmentedEvents
|
||||||
} // declare module
|
} // declare module
|
||||||
|
|||||||
@@ -6,4 +6,5 @@ import './consts';
|
|||||||
import './errors';
|
import './errors';
|
||||||
import './events';
|
import './events';
|
||||||
import './query';
|
import './query';
|
||||||
|
import './registry';
|
||||||
import './tx';
|
import './tx';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import type { Data } from '@polkadot/types';
|
|||||||
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, u32, u64, u8 } from '@polkadot/types-codec';
|
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesClassDetails, PalletUniquesClassMetadata, PalletUniquesInstanceDetails, PalletUniquesInstanceMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
|
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfo, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesClassDetails, PalletUniquesClassMetadata, PalletUniquesInstanceDetails, PalletUniquesInstanceMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
|
||||||
import type { Observable } from '@polkadot/types/types';
|
import type { Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/storage' {
|
declare module '@polkadot/api-base/types/storage' {
|
||||||
@@ -327,6 +327,23 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
|
convictionVoting: {
|
||||||
|
/**
|
||||||
|
* The voting classes which have a non-zero lock requirement and the lock amounts which they
|
||||||
|
* require. The actual amount locked on behalf of this pallet should always be the maximum of
|
||||||
|
* this list.
|
||||||
|
**/
|
||||||
|
classLocksFor: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<ITuple<[u8, u128]>>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* All voting for a particular voter in a particular voting class. We store the balance for the
|
||||||
|
* number of votes that we have recorded.
|
||||||
|
**/
|
||||||
|
votingFor: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u8 | AnyNumber | Uint8Array) => Observable<PalletConvictionVotingVoteVoting>, [AccountId32, u8]> & QueryableStorageEntry<ApiType, [AccountId32, u8]>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
council: {
|
council: {
|
||||||
/**
|
/**
|
||||||
* The current members of the collective. This is stored sorted (just by value).
|
* The current members of the collective. This is stored sorted (just by value).
|
||||||
@@ -378,13 +395,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* proposal.
|
* proposal.
|
||||||
**/
|
**/
|
||||||
lastTabledWasExternal: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
lastTabledWasExternal: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
|
||||||
* Accounts for which there are locks in action which may be removed at some point in the
|
|
||||||
* future. The value is the block number at which the lock expires and may be removed.
|
|
||||||
*
|
|
||||||
* TWOX-NOTE: OK ― `AccountId` is a secure hash.
|
|
||||||
**/
|
|
||||||
locks: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
|
||||||
/**
|
/**
|
||||||
* The lowest referendum index representing an unbaked referendum. Equal to
|
* The lowest referendum index representing an unbaked referendum. Equal to
|
||||||
* `ReferendumCount` if there isn't a unbaked referendum.
|
* `ReferendumCount` if there isn't a unbaked referendum.
|
||||||
@@ -455,7 +465,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
*
|
*
|
||||||
* Can be set via `set_minimum_untrusted_score`.
|
* Can be set via `set_minimum_untrusted_score`.
|
||||||
**/
|
**/
|
||||||
minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<Vec<u128>>>, []> & QueryableStorageEntry<ApiType, []>;
|
minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<SpNposElectionsElectionScore>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Current best solution, signed or unsigned, queued to be returned upon `elect`.
|
* Current best solution, signed or unsigned, queued to be returned upon `elect`.
|
||||||
**/
|
**/
|
||||||
@@ -477,7 +487,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* can be quite large, so we're willing to pay the cost of multiple database accesses to access
|
* can be quite large, so we're willing to pay the cost of multiple database accesses to access
|
||||||
* them one at a time instead of reading and decoding all of them at once.
|
* them one at a time instead of reading and decoding all of them at once.
|
||||||
**/
|
**/
|
||||||
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<Vec<u128>, u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<SpNposElectionsElectionScore, u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* The next index to be assigned to an incoming signed submission.
|
* The next index to be assigned to an incoming signed submission.
|
||||||
*
|
*
|
||||||
@@ -841,6 +851,33 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
|
referenda: {
|
||||||
|
/**
|
||||||
|
* The number of referenda being decided currently.
|
||||||
|
**/
|
||||||
|
decidingCount: AugmentedQuery<ApiType, (arg: u8 | AnyNumber | Uint8Array) => Observable<u32>, [u8]> & QueryableStorageEntry<ApiType, [u8]>;
|
||||||
|
/**
|
||||||
|
* The next free referendum index, aka the number of referenda started so far.
|
||||||
|
**/
|
||||||
|
referendumCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Information concerning any given referendum.
|
||||||
|
*
|
||||||
|
* TWOX-NOTE: SAFE as indexes are not under an attacker’s control.
|
||||||
|
**/
|
||||||
|
referendumInfoFor: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletReferendaReferendumInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||||
|
/**
|
||||||
|
* The sorted list of referenda ready to be decided but not yet being decided, ordered by
|
||||||
|
* conviction-weighted approvals.
|
||||||
|
*
|
||||||
|
* This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`.
|
||||||
|
**/
|
||||||
|
trackQueue: AugmentedQuery<ApiType, (arg: u8 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, u128]>>>, [u8]> & QueryableStorageEntry<ApiType, [u8]>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
scheduler: {
|
scheduler: {
|
||||||
/**
|
/**
|
||||||
* Items to be executed, indexed by the block number that they should be executed on.
|
* Items to be executed, indexed by the block number that they should be executed on.
|
||||||
@@ -850,12 +887,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* Lookup from identity to the block number and index of the task.
|
* Lookup from identity to the block number and index of the task.
|
||||||
**/
|
**/
|
||||||
lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
|
lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
|
||||||
/**
|
|
||||||
* Storage version of the pallet.
|
|
||||||
*
|
|
||||||
* New networks start with last version.
|
|
||||||
**/
|
|
||||||
storageVersion: AugmentedQuery<ApiType, () => Observable<PalletSchedulerReleases>, []> & QueryableStorageEntry<ApiType, []>;
|
|
||||||
/**
|
/**
|
||||||
* Generic query
|
* Generic query
|
||||||
**/
|
**/
|
||||||
@@ -1136,7 +1167,22 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
minValidatorBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
minValidatorBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* The map from nominator stash key to the set of stash keys of all validators to nominate.
|
* The map from nominator stash key to their nomination preferences, namely the validators that
|
||||||
|
* they wish to support.
|
||||||
|
*
|
||||||
|
* Note that the keys of this storage map might become non-decodable in case the
|
||||||
|
* [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators
|
||||||
|
* are still existent in storage, their key is correct and retrievable (i.e. `contains_key`
|
||||||
|
* indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable
|
||||||
|
* nominators will effectively not-exist, until they re-submit their preferences such that it
|
||||||
|
* is within the bounds of the newly set `Config::MaxNominations`.
|
||||||
|
*
|
||||||
|
* This implies that `::iter_keys().count()` and `::iter().count()` might return different
|
||||||
|
* values for this map. Moreover, the main `::count()` is aligned with the former, namely the
|
||||||
|
* number of keys that exist.
|
||||||
|
*
|
||||||
|
* Lastly, if any of the nominators become non-decodable, they can be chilled immediately via
|
||||||
|
* [`Call::chill_other`] dispatchable by anyone.
|
||||||
**/
|
**/
|
||||||
nominators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletStakingNominations>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
nominators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletStakingNominations>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
@@ -1203,6 +1249,25 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
|
stateTrieMigration: {
|
||||||
|
/**
|
||||||
|
* The limits that are imposed on automatic migrations.
|
||||||
|
*
|
||||||
|
* If set to None, then no automatic migration happens.
|
||||||
|
**/
|
||||||
|
autoLimits: AugmentedQuery<ApiType, () => Observable<Option<PalletStateTrieMigrationMigrationLimits>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Migration progress.
|
||||||
|
*
|
||||||
|
* This stores the snapshot of the last migrated keys. It can be set into motion and move
|
||||||
|
* forward by any of the means provided by this pallet.
|
||||||
|
**/
|
||||||
|
migrationProcess: AugmentedQuery<ApiType, () => Observable<PalletStateTrieMigrationMigrationTask>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
sudo: {
|
sudo: {
|
||||||
/**
|
/**
|
||||||
* The `AccountId` of the sudo key.
|
* The `AccountId` of the sudo key.
|
||||||
@@ -1489,5 +1554,12 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
|
whitelist: {
|
||||||
|
whitelistedCall: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Null>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
} // AugmentedQueries
|
} // AugmentedQueries
|
||||||
} // declare module
|
} // declare module
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import '@polkadot/types-augment/registry/substrate';
|
||||||
@@ -6,7 +6,7 @@ import type { Data } from '@polkadot/types';
|
|||||||
import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportScheduleMaybeHashed, NodeRuntimeOriginCaller, NodeRuntimeProxyType, NodeRuntimeSessionKeys, PalletAssetsDestroyWitness, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof } from '@polkadot/types/lookup';
|
import type { FrameSupportScheduleMaybeHashed, NodeRuntimeOriginCaller, NodeRuntimeProxyType, NodeRuntimeSessionKeys, PalletAssetsDestroyWitness, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletReferendaAtOrAfter, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/submittable' {
|
declare module '@polkadot/api-base/types/submittable' {
|
||||||
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
|
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
|
||||||
@@ -985,6 +985,130 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
|
convictionVoting: {
|
||||||
|
/**
|
||||||
|
* Delegate the voting power (with some given conviction) of the sending account for a
|
||||||
|
* particular class of polls.
|
||||||
|
*
|
||||||
|
* The balance delegated is locked for as long as it's delegated, and thereafter for the
|
||||||
|
* time appropriate for the conviction's lock period.
|
||||||
|
*
|
||||||
|
* The dispatch origin of this call must be _Signed_, and the signing account must either:
|
||||||
|
* - be delegating already; or
|
||||||
|
* - have no voting activity (if there is, then it will need to be removed/consolidated
|
||||||
|
* through `reap_vote` or `unvote`).
|
||||||
|
*
|
||||||
|
* - `to`: The account whose voting the `target` account's voting power will follow.
|
||||||
|
* - `class`: The class of polls to delegate. To delegate multiple classes, multiple calls
|
||||||
|
* to this function are required.
|
||||||
|
* - `conviction`: The conviction that will be attached to the delegated votes. When the
|
||||||
|
* account is undelegated, the funds will be locked for the corresponding period.
|
||||||
|
* - `balance`: The amount of the account's balance to be used in delegating. This must not
|
||||||
|
* be more than the account's current balance.
|
||||||
|
*
|
||||||
|
* Emits `Delegated`.
|
||||||
|
*
|
||||||
|
* Weight: `O(R)` where R is the number of polls the voter delegating to has
|
||||||
|
* voted on. Weight is initially charged as if maximum votes, but is refunded later.
|
||||||
|
**/
|
||||||
|
delegate: AugmentedSubmittable<(clazz: u8 | AnyNumber | Uint8Array, to: AccountId32 | string | Uint8Array, conviction: PalletConvictionVotingConviction | 'None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x' | number | Uint8Array, balance: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u8, AccountId32, PalletConvictionVotingConviction, u128]>;
|
||||||
|
/**
|
||||||
|
* Remove a vote for a poll.
|
||||||
|
*
|
||||||
|
* If the `target` is equal to the signer, then this function is exactly equivalent to
|
||||||
|
* `remove_vote`. If not equal to the signer, then the vote must have expired,
|
||||||
|
* either because the poll was cancelled, because the voter lost the poll or
|
||||||
|
* because the conviction period is over.
|
||||||
|
*
|
||||||
|
* The dispatch origin of this call must be _Signed_.
|
||||||
|
*
|
||||||
|
* - `target`: The account of the vote to be removed; this account must have voted for poll
|
||||||
|
* `index`.
|
||||||
|
* - `index`: The index of poll of the vote to be removed.
|
||||||
|
* - `class`: The class of the poll.
|
||||||
|
*
|
||||||
|
* Weight: `O(R + log R)` where R is the number of polls that `target` has voted on.
|
||||||
|
* Weight is calculated for the maximum number of vote.
|
||||||
|
**/
|
||||||
|
removeOtherVote: AugmentedSubmittable<(target: AccountId32 | string | Uint8Array, clazz: u8 | AnyNumber | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u8, u32]>;
|
||||||
|
/**
|
||||||
|
* Remove a vote for a poll.
|
||||||
|
*
|
||||||
|
* If:
|
||||||
|
* - the poll was cancelled, or
|
||||||
|
* - the poll is ongoing, or
|
||||||
|
* - the poll has ended such that
|
||||||
|
* - the vote of the account was in opposition to the result; or
|
||||||
|
* - there was no conviction to the account's vote; or
|
||||||
|
* - the account made a split vote
|
||||||
|
* ...then the vote is removed cleanly and a following call to `unlock` may result in more
|
||||||
|
* funds being available.
|
||||||
|
*
|
||||||
|
* If, however, the poll has ended and:
|
||||||
|
* - it finished corresponding to the vote of the account, and
|
||||||
|
* - the account made a standard vote with conviction, and
|
||||||
|
* - the lock period of the conviction is not over
|
||||||
|
* ...then the lock will be aggregated into the overall account's lock, which may involve
|
||||||
|
* *overlocking* (where the two locks are combined into a single lock that is the maximum
|
||||||
|
* of both the amount locked and the time is it locked for).
|
||||||
|
*
|
||||||
|
* The dispatch origin of this call must be _Signed_, and the signer must have a vote
|
||||||
|
* registered for poll `index`.
|
||||||
|
*
|
||||||
|
* - `index`: The index of poll of the vote to be removed.
|
||||||
|
* - `class`: Optional parameter, if given it indicates the class of the poll. For polls
|
||||||
|
* which have finished or are cancelled, this must be `Some`.
|
||||||
|
*
|
||||||
|
* Weight: `O(R + log R)` where R is the number of polls that `target` has voted on.
|
||||||
|
* Weight is calculated for the maximum number of vote.
|
||||||
|
**/
|
||||||
|
removeVote: AugmentedSubmittable<(clazz: Option<u8> | null | object | string | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<u8>, u32]>;
|
||||||
|
/**
|
||||||
|
* Undelegate the voting power of the sending account for a particular class of polls.
|
||||||
|
*
|
||||||
|
* Tokens may be unlocked following once an amount of time consistent with the lock period
|
||||||
|
* of the conviction with which the delegation was issued.
|
||||||
|
*
|
||||||
|
* The dispatch origin of this call must be _Signed_ and the signing account must be
|
||||||
|
* currently delegating.
|
||||||
|
*
|
||||||
|
* - `class`: The class of polls to remove the delegation from.
|
||||||
|
*
|
||||||
|
* Emits `Undelegated`.
|
||||||
|
*
|
||||||
|
* Weight: `O(R)` where R is the number of polls the voter delegating to has
|
||||||
|
* voted on. Weight is initially charged as if maximum votes, but is refunded later.
|
||||||
|
**/
|
||||||
|
undelegate: AugmentedSubmittable<(clazz: u8 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u8]>;
|
||||||
|
/**
|
||||||
|
* Remove the lock caused prior voting/delegating which has expired within a particluar
|
||||||
|
* class.
|
||||||
|
*
|
||||||
|
* The dispatch origin of this call must be _Signed_.
|
||||||
|
*
|
||||||
|
* - `class`: The class of polls to unlock.
|
||||||
|
* - `target`: The account to remove the lock on.
|
||||||
|
*
|
||||||
|
* Weight: `O(R)` with R number of vote of target.
|
||||||
|
**/
|
||||||
|
unlock: AugmentedSubmittable<(clazz: u8 | AnyNumber | Uint8Array, target: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u8, AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal;
|
||||||
|
* otherwise it is a vote to keep the status quo.
|
||||||
|
*
|
||||||
|
* The dispatch origin of this call must be _Signed_.
|
||||||
|
*
|
||||||
|
* - `poll_index`: The index of the poll to vote for.
|
||||||
|
* - `vote`: The vote configuration.
|
||||||
|
*
|
||||||
|
* Weight: `O(R)` where R is the number of polls the voter has voted on.
|
||||||
|
**/
|
||||||
|
vote: AugmentedSubmittable<(pollIndex: Compact<u32> | AnyNumber | Uint8Array, vote: PalletConvictionVotingVoteAccountVote | { Standard: any } | { Split: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, PalletConvictionVotingVoteAccountVote]>;
|
||||||
|
/**
|
||||||
|
* Generic tx
|
||||||
|
**/
|
||||||
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
|
};
|
||||||
council: {
|
council: {
|
||||||
/**
|
/**
|
||||||
* Close a vote that is either approved, disapproved or whose voting period has ended.
|
* Close a vote that is either approved, disapproved or whose voting period has ended.
|
||||||
@@ -1477,6 +1601,13 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
electionProviderMultiPhase: {
|
electionProviderMultiPhase: {
|
||||||
|
/**
|
||||||
|
* Trigger the governance fallback.
|
||||||
|
*
|
||||||
|
* This can only be called when [`Phase::Emergency`] is enabled, as an alternative to
|
||||||
|
* calling [`Call::set_emergency_election_result`].
|
||||||
|
**/
|
||||||
|
governanceFallback: AugmentedSubmittable<(maybeMaxVoters: Option<u32> | null | object | string | Uint8Array, maybeMaxTargets: Option<u32> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<u32>, Option<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Set a solution in the queue, to be handed out to the client of this pallet in the next
|
* Set a solution in the queue, to be handed out to the client of this pallet in the next
|
||||||
* call to `ElectionProvider::elect`.
|
* call to `ElectionProvider::elect`.
|
||||||
@@ -1495,7 +1626,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* This check can be turned off by setting the value to `None`.
|
* This check can be turned off by setting the value to `None`.
|
||||||
**/
|
**/
|
||||||
setMinimumUntrustedScore: AugmentedSubmittable<(maybeNextScore: Option<Vec<u128>> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<Vec<u128>>]>;
|
setMinimumUntrustedScore: AugmentedSubmittable<(maybeNextScore: Option<SpNposElectionsElectionScore> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<SpNposElectionsElectionScore>]>;
|
||||||
/**
|
/**
|
||||||
* Submit a solution for the signed phase.
|
* Submit a solution for the signed phase.
|
||||||
*
|
*
|
||||||
@@ -1506,12 +1637,8 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* A deposit is reserved and recorded for the solution. Based on the outcome, the solution
|
* A deposit is reserved and recorded for the solution. Based on the outcome, the solution
|
||||||
* might be rewarded, slashed, or get all or a part of the deposit back.
|
* might be rewarded, slashed, or get all or a part of the deposit back.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Queue size must be provided as witness data.
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
submit: AugmentedSubmittable<(rawSolution: PalletElectionProviderMultiPhaseRawSolution | { solution?: any; score?: any; round?: any } | string | Uint8Array, numSignedSubmissions: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletElectionProviderMultiPhaseRawSolution, u32]>;
|
submit: AugmentedSubmittable<(rawSolution: PalletElectionProviderMultiPhaseRawSolution | { solution?: any; score?: any; round?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletElectionProviderMultiPhaseRawSolution]>;
|
||||||
/**
|
/**
|
||||||
* Submit a solution for the unsigned phase.
|
* Submit a solution for the unsigned phase.
|
||||||
*
|
*
|
||||||
@@ -2751,6 +2878,82 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
|
referenda: {
|
||||||
|
/**
|
||||||
|
* Cancel an ongoing referendum.
|
||||||
|
*
|
||||||
|
* - `origin`: must be the `CancelOrigin`.
|
||||||
|
* - `index`: The index of the referendum to be cancelled.
|
||||||
|
*
|
||||||
|
* Emits `Cancelled`.
|
||||||
|
**/
|
||||||
|
cancel: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||||
|
/**
|
||||||
|
* Cancel an ongoing referendum and slash the deposits.
|
||||||
|
*
|
||||||
|
* - `origin`: must be the `KillOrigin`.
|
||||||
|
* - `index`: The index of the referendum to be cancelled.
|
||||||
|
*
|
||||||
|
* Emits `Killed` and `DepositSlashed`.
|
||||||
|
**/
|
||||||
|
kill: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||||
|
/**
|
||||||
|
* Advance a referendum onto its next logical state. Only used internally.
|
||||||
|
*
|
||||||
|
* - `origin`: must be `Root`.
|
||||||
|
* - `index`: the referendum to be advanced.
|
||||||
|
**/
|
||||||
|
nudgeReferendum: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||||
|
/**
|
||||||
|
* Advance a track onto its next logical state. Only used internally.
|
||||||
|
*
|
||||||
|
* - `origin`: must be `Root`.
|
||||||
|
* - `track`: the track to be advanced.
|
||||||
|
*
|
||||||
|
* Action item for when there is now one fewer referendum in the deciding phase and the
|
||||||
|
* `DecidingCount` is not yet updated. This means that we should either:
|
||||||
|
* - begin deciding another referendum (and leave `DecidingCount` alone); or
|
||||||
|
* - decrement `DecidingCount`.
|
||||||
|
**/
|
||||||
|
oneFewerDeciding: AugmentedSubmittable<(track: u8 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u8]>;
|
||||||
|
/**
|
||||||
|
* Post the Decision Deposit for a referendum.
|
||||||
|
*
|
||||||
|
* - `origin`: must be `Signed` and the account must have funds available for the
|
||||||
|
* referendum's track's Decision Deposit.
|
||||||
|
* - `index`: The index of the submitted referendum whose Decision Deposit is yet to be
|
||||||
|
* posted.
|
||||||
|
*
|
||||||
|
* Emits `DecisionDepositPlaced`.
|
||||||
|
**/
|
||||||
|
placeDecisionDeposit: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||||
|
/**
|
||||||
|
* Refund the Decision Deposit for a closed referendum back to the depositor.
|
||||||
|
*
|
||||||
|
* - `origin`: must be `Signed` or `Root`.
|
||||||
|
* - `index`: The index of a closed referendum whose Decision Deposit has not yet been
|
||||||
|
* refunded.
|
||||||
|
*
|
||||||
|
* Emits `DecisionDepositRefunded`.
|
||||||
|
**/
|
||||||
|
refundDecisionDeposit: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||||
|
/**
|
||||||
|
* Propose a referendum on a privileged action.
|
||||||
|
*
|
||||||
|
* - `origin`: must be `Signed` and the account must have `SubmissionDeposit` funds
|
||||||
|
* available.
|
||||||
|
* - `proposal_origin`: The origin from which the proposal should be executed.
|
||||||
|
* - `proposal_hash`: The hash of the proposal preimage.
|
||||||
|
* - `enactment_moment`: The moment that the proposal should be enacted.
|
||||||
|
*
|
||||||
|
* Emits `Submitted`.
|
||||||
|
**/
|
||||||
|
submit: AugmentedSubmittable<(proposalOrigin: NodeRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | string | Uint8Array, proposalHash: H256 | string | Uint8Array, enactmentMoment: PalletReferendaAtOrAfter | { At: any } | { After: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [NodeRuntimeOriginCaller, H256, PalletReferendaAtOrAfter]>;
|
||||||
|
/**
|
||||||
|
* Generic tx
|
||||||
|
**/
|
||||||
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
|
};
|
||||||
scheduler: {
|
scheduler: {
|
||||||
/**
|
/**
|
||||||
* Cancel an anonymously scheduled task.
|
* Cancel an anonymously scheduled task.
|
||||||
@@ -3203,14 +3406,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Can be called by the `T::SlashCancelOrigin`.
|
* Can be called by the `T::SlashCancelOrigin`.
|
||||||
*
|
*
|
||||||
* Parameters: era and indices of the slashes for that era to kill.
|
* Parameters: era and indices of the slashes for that era to kill.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Complexity: O(U + S)
|
|
||||||
* with U unapplied slashes weighted with U=1000
|
|
||||||
* and S is the number of slash indices to be canceled.
|
|
||||||
* - Read: Unapplied Slashes
|
|
||||||
* - Write: Unapplied Slashes
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
cancelDeferredSlash: AugmentedSubmittable<(era: u32 | AnyNumber | Uint8Array, slashIndices: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<u32>]>;
|
cancelDeferredSlash: AugmentedSubmittable<(era: u32 | AnyNumber | Uint8Array, slashIndices: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<u32>]>;
|
||||||
/**
|
/**
|
||||||
@@ -3239,6 +3434,11 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* If the caller is different than the controller being targeted, the following conditions
|
* If the caller is different than the controller being targeted, the following conditions
|
||||||
* must be met:
|
* must be met:
|
||||||
|
*
|
||||||
|
* * `controller` must belong to a nominator who has become non-decodable,
|
||||||
|
*
|
||||||
|
* Or:
|
||||||
|
*
|
||||||
* * A `ChillThreshold` must be set and checked which defines how close to the max
|
* * A `ChillThreshold` must be set and checked which defines how close to the max
|
||||||
* nominators or validators we must reach before users can start chilling one-another.
|
* nominators or validators we must reach before users can start chilling one-another.
|
||||||
* * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine
|
* * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine
|
||||||
@@ -3251,6 +3451,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* who do not satisfy these requirements.
|
* who do not satisfy these requirements.
|
||||||
**/
|
**/
|
||||||
chillOther: AugmentedSubmittable<(controller: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
chillOther: AugmentedSubmittable<(controller: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Force a validator to have at least the minimum commission. This will not affect a
|
||||||
|
* validator who already has a commission greater than or equal to the minimum. Any account
|
||||||
|
* can call this.
|
||||||
|
**/
|
||||||
|
forceApplyMinCommission: AugmentedSubmittable<(validatorStash: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
* Force there to be a new era at the end of the next session. After this, it will be
|
* Force there to be a new era at the end of the next session. After this, it will be
|
||||||
* reset to normal (non-forced) behaviour.
|
* reset to normal (non-forced) behaviour.
|
||||||
@@ -3280,11 +3486,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* The election process starts multiple blocks before the end of the era.
|
* The election process starts multiple blocks before the end of the era.
|
||||||
* If this is called just before a new era is triggered, the election process may not
|
* If this is called just before a new era is triggered, the election process may not
|
||||||
* have enough blocks to get a result.
|
* have enough blocks to get a result.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* - Weight: O(1)
|
|
||||||
* - Write: ForceEra
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
forceNewEraAlways: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
forceNewEraAlways: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||||
/**
|
/**
|
||||||
@@ -3309,13 +3510,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Force a current staker to become completely unstaked, immediately.
|
* Force a current staker to become completely unstaked, immediately.
|
||||||
*
|
*
|
||||||
* The dispatch origin must be Root.
|
* The dispatch origin must be Root.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* O(S) where S is the number of slashing spans to be removed
|
|
||||||
* Reads: Bonded, Slashing Spans, Account, Locks
|
|
||||||
* Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators,
|
|
||||||
* Account, Locks Writes Each: SpanSlash * S
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
forceUnstake: AugmentedSubmittable<(stash: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
|
forceUnstake: AugmentedSubmittable<(stash: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
|
||||||
/**
|
/**
|
||||||
@@ -3351,7 +3545,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* # <weight>
|
* # <weight>
|
||||||
* - The transaction's complexity is proportional to the size of `targets` (N)
|
* - The transaction's complexity is proportional to the size of `targets` (N)
|
||||||
* which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS).
|
* which is capped at CompactAssignments::LIMIT (T::MaxNominations).
|
||||||
* - Both the reads and writes follow a similar pattern.
|
* - Both the reads and writes follow a similar pattern.
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
@@ -3402,7 +3596,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* # <weight>
|
* # <weight>
|
||||||
* - Time complexity: O(L), where L is unlocking chunks
|
* - Time complexity: O(L), where L is unlocking chunks
|
||||||
* - Bounded by `MAX_UNLOCKING_CHUNKS`.
|
* - Bounded by `MaxUnlockingChunks`.
|
||||||
* - Storage changes: Can't increase storage, only decrease it.
|
* - Storage changes: Can't increase storage, only decrease it.
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
@@ -3465,11 +3659,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Set the validators who cannot be slashed (if any).
|
* Set the validators who cannot be slashed (if any).
|
||||||
*
|
*
|
||||||
* The dispatch origin must be Root.
|
* The dispatch origin must be Root.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* - O(V)
|
|
||||||
* - Write: Invulnerables
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
setInvulnerables: AugmentedSubmittable<(invulnerables: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>]>;
|
setInvulnerables: AugmentedSubmittable<(invulnerables: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>]>;
|
||||||
/**
|
/**
|
||||||
@@ -3510,7 +3699,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* NOTE: Existing nominators and validators will not be affected by this update.
|
* NOTE: Existing nominators and validators will not be affected by this update.
|
||||||
* to kick people under the new limits, `chill_other` should be called.
|
* to kick people under the new limits, `chill_other` should be called.
|
||||||
**/
|
**/
|
||||||
setStakingConfigs: AugmentedSubmittable<(minNominatorBond: u128 | AnyNumber | Uint8Array, minValidatorBond: u128 | AnyNumber | Uint8Array, maxNominatorCount: Option<u32> | null | object | string | Uint8Array, maxValidatorCount: Option<u32> | null | object | string | Uint8Array, chillThreshold: Option<Percent> | null | object | string | Uint8Array, minCommission: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128, u128, Option<u32>, Option<u32>, Option<Percent>, Perbill]>;
|
setStakingConfigs: AugmentedSubmittable<(minNominatorBond: PalletStakingPalletConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minValidatorBond: PalletStakingPalletConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxNominatorCount: PalletStakingPalletConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxValidatorCount: PalletStakingPalletConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, chillThreshold: PalletStakingPalletConfigOpPercent | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minCommission: PalletStakingPalletConfigOpPerbill | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpPerbill]>;
|
||||||
/**
|
/**
|
||||||
* Sets the ideal number of validators.
|
* Sets the ideal number of validators.
|
||||||
*
|
*
|
||||||
@@ -3532,7 +3721,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Once the unlock period is done, you can call `withdraw_unbonded` to actually move
|
* Once the unlock period is done, you can call `withdraw_unbonded` to actually move
|
||||||
* the funds out of management ready for transfer.
|
* the funds out of management ready for transfer.
|
||||||
*
|
*
|
||||||
* No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`)
|
* No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)
|
||||||
* can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need
|
* can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need
|
||||||
* to be called first to remove some of the chunks (if possible).
|
* to be called first to remove some of the chunks (if possible).
|
||||||
*
|
*
|
||||||
@@ -3575,6 +3764,58 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
|
stateTrieMigration: {
|
||||||
|
/**
|
||||||
|
* Continue the migration for the given `limits`.
|
||||||
|
*
|
||||||
|
* The dispatch origin of this call can be any signed account.
|
||||||
|
*
|
||||||
|
* This transaction has NO MONETARY INCENTIVES. calling it will not reward anyone. Albeit,
|
||||||
|
* Upon successful execution, the transaction fee is returned.
|
||||||
|
*
|
||||||
|
* The (potentially over-estimated) of the byte length of all the data read must be
|
||||||
|
* provided for up-front fee-payment and weighing. In essence, the caller is guaranteeing
|
||||||
|
* that executing the current `MigrationTask` with the given `limits` will not exceed
|
||||||
|
* `real_size_upper` bytes of read data.
|
||||||
|
*
|
||||||
|
* The `witness_task` is merely a helper to prevent the caller from being slashed or
|
||||||
|
* generally trigger a migration that they do not intend. This parameter is just a message
|
||||||
|
* from caller, saying that they believed `witness_task` was the last state of the
|
||||||
|
* migration, and they only wish for their transaction to do anything, if this assumption
|
||||||
|
* holds. In case `witness_task` does not match, the transaction fails.
|
||||||
|
*
|
||||||
|
* Based on the documentation of [`MigrationTask::migrate_until_exhaustion`], the
|
||||||
|
* recommended way of doing this is to pass a `limit` that only bounds `count`, as the
|
||||||
|
* `size` limit can always be overwritten.
|
||||||
|
**/
|
||||||
|
continueMigrate: AugmentedSubmittable<(limits: PalletStateTrieMigrationMigrationLimits | { size_?: any; item?: any } | string | Uint8Array, realSizeUpper: u32 | AnyNumber | Uint8Array, witnessTask: PalletStateTrieMigrationMigrationTask | { lastTop?: any; lastChild?: any; prevTickChild?: any; size_?: any; topItems?: any; childItems?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletStateTrieMigrationMigrationLimits, u32, PalletStateTrieMigrationMigrationTask]>;
|
||||||
|
/**
|
||||||
|
* Control the automatic migration.
|
||||||
|
*
|
||||||
|
* The dispatch origin of this call must be [`Config::ControlOrigin`].
|
||||||
|
**/
|
||||||
|
controlAutoMigration: AugmentedSubmittable<(maybeConfig: Option<PalletStateTrieMigrationMigrationLimits> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<PalletStateTrieMigrationMigrationLimits>]>;
|
||||||
|
/**
|
||||||
|
* Migrate the list of child keys by iterating each of them one by one.
|
||||||
|
*
|
||||||
|
* All of the given child keys must be present under one `child_root`.
|
||||||
|
*
|
||||||
|
* This does not affect the global migration process tracker ([`MigrationProcess`]), and
|
||||||
|
* should only be used in case any keys are leftover due to a bug.
|
||||||
|
**/
|
||||||
|
migrateCustomChild: AugmentedSubmittable<(root: Bytes | string | Uint8Array, childKeys: Vec<Bytes> | (Bytes | string | Uint8Array)[], totalSize: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, Vec<Bytes>, u32]>;
|
||||||
|
/**
|
||||||
|
* Migrate the list of top keys by iterating each of them one by one.
|
||||||
|
*
|
||||||
|
* This does not affect the global migration process tracker ([`MigrationProcess`]), and
|
||||||
|
* should only be used in case any keys are leftover due to a bug.
|
||||||
|
**/
|
||||||
|
migrateCustomTop: AugmentedSubmittable<(keys: Vec<Bytes> | (Bytes | string | Uint8Array)[], witnessSize: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<Bytes>, u32]>;
|
||||||
|
/**
|
||||||
|
* Generic tx
|
||||||
|
**/
|
||||||
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
|
};
|
||||||
sudo: {
|
sudo: {
|
||||||
/**
|
/**
|
||||||
* Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo
|
* Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo
|
||||||
@@ -3660,11 +3901,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
||||||
/**
|
/**
|
||||||
* Make some on-chain remark and emit event.
|
* Make some on-chain remark and emit event.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* - `O(b)` where b is the length of the remark.
|
|
||||||
* - 1 event.
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
||||||
/**
|
/**
|
||||||
@@ -4206,21 +4442,18 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
cancelApproval: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array, maybeCheckDelegate: Option<MultiAddress> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, Option<MultiAddress>]>;
|
cancelApproval: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array, maybeCheckDelegate: Option<MultiAddress> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, Option<MultiAddress>]>;
|
||||||
/**
|
/**
|
||||||
* Set an attribute for an asset class or instance.
|
* Clear an attribute for an asset class or instance.
|
||||||
*
|
*
|
||||||
* Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the
|
* Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the
|
||||||
* asset `class`.
|
* asset `class`.
|
||||||
*
|
*
|
||||||
* If the origin is Signed, then funds of signer are reserved according to the formula:
|
* Any deposit is freed for the asset class owner.
|
||||||
* `MetadataDepositBase + DepositPerByte * (key.len + value.len)` taking into
|
|
||||||
* account any already reserved funds.
|
|
||||||
*
|
*
|
||||||
* - `class`: The identifier of the asset class whose instance's metadata to set.
|
* - `class`: The identifier of the asset class whose instance's metadata to clear.
|
||||||
* - `instance`: The identifier of the asset instance whose metadata to set.
|
* - `maybe_instance`: The identifier of the asset instance whose metadata to clear.
|
||||||
* - `key`: The key of the attribute.
|
* - `key`: The key of the attribute.
|
||||||
* - `value`: The value to which to set the attribute.
|
|
||||||
*
|
*
|
||||||
* Emits `AttributeSet`.
|
* Emits `AttributeCleared`.
|
||||||
*
|
*
|
||||||
* Weight: `O(1)`
|
* Weight: `O(1)`
|
||||||
**/
|
**/
|
||||||
@@ -4705,5 +4938,15 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
|
whitelist: {
|
||||||
|
dispatchWhitelistedCall: AugmentedSubmittable<(callHash: H256 | string | Uint8Array, callWeightWitness: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, u64]>;
|
||||||
|
dispatchWhitelistedCallWithPreimage: AugmentedSubmittable<(call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call]>;
|
||||||
|
removeWhitelistedCall: AugmentedSubmittable<(callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
|
||||||
|
whitelistCall: AugmentedSubmittable<(callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
|
||||||
|
/**
|
||||||
|
* Generic tx
|
||||||
|
**/
|
||||||
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
|
};
|
||||||
} // AugmentedSubmittables
|
} // AugmentedSubmittables
|
||||||
} // declare module
|
} // declare module
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"rootDir": "./src"
|
"rootDir": "./src"
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
|
"**/*.spec.ts",
|
||||||
"**/kusama/*.ts",
|
"**/kusama/*.ts",
|
||||||
"**/polkadot/*.ts"
|
"**/polkadot/*.ts"
|
||||||
],
|
],
|
||||||
@@ -14,6 +15,7 @@
|
|||||||
{ "path": "../rpc-augment/tsconfig.build.json" },
|
{ "path": "../rpc-augment/tsconfig.build.json" },
|
||||||
{ "path": "../types/tsconfig.build.json" },
|
{ "path": "../types/tsconfig.build.json" },
|
||||||
{ "path": "../types-codec/tsconfig.build.json" },
|
{ "path": "../types-codec/tsconfig.build.json" },
|
||||||
{ "path": "../types-augment/tsconfig.build.json" }
|
{ "path": "../types-augment/tsconfig.build.json" },
|
||||||
|
{ "path": "../types-support/tsconfig.build.json" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
"**/base.ts",
|
"**/base.ts",
|
||||||
"**/kusama/*.ts"
|
"**/kusama/*.ts"
|
||||||
],
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/kusama/*.spec.ts"
|
||||||
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{ "path": "../api-base/tsconfig.build.json" },
|
{ "path": "../api-base/tsconfig.build.json" },
|
||||||
{ "path": "../rpc-augment/tsconfig.build.json" },
|
{ "path": "../rpc-augment/tsconfig.build.json" },
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tsconfig.base.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": "..",
|
||||||
|
"outDir": "./build",
|
||||||
|
"rootDir": "./src",
|
||||||
|
"emitDeclarationOnly": false,
|
||||||
|
"noEmit": true
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"**/kusama/*.spec.ts"
|
||||||
|
],
|
||||||
|
"references": [
|
||||||
|
{ "path": "../api-augment/tsconfig.build.json" },
|
||||||
|
{ "path": "../api-augment/tsconfig.kusama.json" },
|
||||||
|
{ "path": "../api-base/tsconfig.build.json" },
|
||||||
|
{ "path": "../rpc-augment/tsconfig.build.json" },
|
||||||
|
{ "path": "../types/tsconfig.build.json" },
|
||||||
|
{ "path": "../types-augment/tsconfig.build.json" },
|
||||||
|
{ "path": "../types-support/tsconfig.build.json" }
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -9,6 +9,9 @@
|
|||||||
"**/base.ts",
|
"**/base.ts",
|
||||||
"**/polkadot/*.ts"
|
"**/polkadot/*.ts"
|
||||||
],
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/polkadot/*.spec.ts"
|
||||||
|
],
|
||||||
"references": [
|
"references": [
|
||||||
{ "path": "../api-base/tsconfig.build.json" },
|
{ "path": "../api-base/tsconfig.build.json" },
|
||||||
{ "path": "../rpc-augment/tsconfig.build.json" },
|
{ "path": "../rpc-augment/tsconfig.build.json" },
|
||||||
|
|||||||
@@ -20,13 +20,13 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.6.1",
|
"version": "7.12.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.16.7",
|
"@babel/runtime": "^7.17.2",
|
||||||
"@polkadot/rpc-core": "7.6.1",
|
"@polkadot/rpc-core": "7.12.1",
|
||||||
"@polkadot/types": "7.6.1",
|
"@polkadot/types": "7.12.1",
|
||||||
"@polkadot/util": "^8.3.3",
|
"@polkadot/util": "^8.5.1",
|
||||||
"rxjs": "^7.5.2"
|
"rxjs": "^7.5.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '7.6.1' };
|
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '7.12.1' };
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ export interface SubmittableResultValue {
|
|||||||
internalError?: Error;
|
internalError?: Error;
|
||||||
status: ExtrinsicStatus;
|
status: ExtrinsicStatus;
|
||||||
txHash: Hash;
|
txHash: Hash;
|
||||||
|
txIndex?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SubmittableExtrinsic<ApiType extends ApiTypes, R extends ISubmittableResult = ISubmittableResult> extends Extrinsic {
|
export interface SubmittableExtrinsic<ApiType extends ApiTypes, R extends ISubmittableResult = ISubmittableResult> extends Extrinsic {
|
||||||
|
|||||||
@@ -20,20 +20,20 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.6.1",
|
"version": "7.12.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.16.7",
|
"@babel/runtime": "^7.17.2",
|
||||||
"@polkadot/api": "7.6.1",
|
"@polkadot/api": "7.12.1",
|
||||||
"@polkadot/types": "7.6.1",
|
"@polkadot/types": "7.12.1",
|
||||||
"@polkadot/types-codec": "7.6.1",
|
"@polkadot/types-codec": "7.12.1",
|
||||||
"@polkadot/types-create": "7.6.1",
|
"@polkadot/types-create": "7.12.1",
|
||||||
"@polkadot/util": "^8.3.3",
|
"@polkadot/util": "^8.5.1",
|
||||||
"@polkadot/util-crypto": "^8.3.3",
|
"@polkadot/util-crypto": "^8.5.1",
|
||||||
"rxjs": "^7.5.2"
|
"rxjs": "^7.5.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/api-augment": "7.6.1",
|
"@polkadot/api-augment": "7.12.1",
|
||||||
"@polkadot/keyring": "^8.3.3"
|
"@polkadot/keyring": "^8.5.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '7.6.1' };
|
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '7.12.1' };
|
||||||
|
|||||||
@@ -20,25 +20,25 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.6.1",
|
"version": "7.12.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.16.7",
|
"@babel/runtime": "^7.17.2",
|
||||||
"@polkadot/api": "7.6.1",
|
"@polkadot/api": "7.12.1",
|
||||||
"@polkadot/api-augment": "7.6.1",
|
"@polkadot/api-augment": "7.12.1",
|
||||||
"@polkadot/api-base": "7.6.1",
|
"@polkadot/api-base": "7.12.1",
|
||||||
"@polkadot/rpc-core": "7.6.1",
|
"@polkadot/rpc-core": "7.12.1",
|
||||||
"@polkadot/types": "7.6.1",
|
"@polkadot/types": "7.12.1",
|
||||||
"@polkadot/types-codec": "7.6.1",
|
"@polkadot/types-codec": "7.12.1",
|
||||||
"@polkadot/util": "^8.3.3",
|
"@polkadot/util": "^8.5.1",
|
||||||
"@polkadot/util-crypto": "^8.3.3",
|
"@polkadot/util-crypto": "^8.5.1",
|
||||||
"rxjs": "^7.5.2"
|
"rxjs": "^7.5.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/api": "7.6.1",
|
"@polkadot/api": "7.12.1",
|
||||||
"@polkadot/api-augment": "7.6.1",
|
"@polkadot/api-augment": "7.12.1",
|
||||||
"@polkadot/rpc-augment": "7.6.1",
|
"@polkadot/rpc-augment": "7.12.1",
|
||||||
"@polkadot/rpc-provider": "7.6.1",
|
"@polkadot/rpc-provider": "7.12.1",
|
||||||
"@polkadot/types-support": "7.6.1"
|
"@polkadot/types-support": "7.12.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type { Observable } from 'rxjs';
|
|||||||
import type { QueryableStorageMultiArg } from '@polkadot/api-base/types';
|
import type { QueryableStorageMultiArg } from '@polkadot/api-base/types';
|
||||||
import type { Option, Vec } from '@polkadot/types';
|
import type { Option, Vec } from '@polkadot/types';
|
||||||
import type { AccountId, AccountIndex, Address, Balance, BalanceLockTo212, BlockNumber, VestingSchedule } from '@polkadot/types/interfaces';
|
import type { AccountId, AccountIndex, Address, Balance, BalanceLockTo212, BlockNumber, VestingSchedule } from '@polkadot/types/interfaces';
|
||||||
import type { PalletBalancesBalanceLock, PalletVestingVestingInfo } from '@polkadot/types/lookup';
|
import type { PalletBalancesBalanceLock, PalletBalancesReserveData, PalletVestingVestingInfo } from '@polkadot/types/lookup';
|
||||||
import type { DeriveApi, DeriveBalancesAccount, DeriveBalancesAccountData, DeriveBalancesAll, DeriveBalancesAllAccountData, DeriveBalancesAllVesting } from '../types';
|
import type { DeriveApi, DeriveBalancesAccount, DeriveBalancesAccountData, DeriveBalancesAll, DeriveBalancesAllAccountData, DeriveBalancesAllVesting } from '../types';
|
||||||
|
|
||||||
import { combineLatest, map, of, switchMap } from 'rxjs';
|
import { combineLatest, map, of, switchMap } from 'rxjs';
|
||||||
@@ -14,9 +14,7 @@ import { BN, BN_ZERO, bnMax, bnMin, isFunction } from '@polkadot/util';
|
|||||||
|
|
||||||
import { memo } from '../util';
|
import { memo } from '../util';
|
||||||
|
|
||||||
type BalanceLocksEntry = Vec<PalletBalancesBalanceLock | BalanceLockTo212>;
|
type ResultBalance = [PalletVestingVestingInfo[] | null, ((PalletBalancesBalanceLock | BalanceLockTo212)[])[], PalletBalancesReserveData[][]];
|
||||||
type BalanceLocks = BalanceLocksEntry[];
|
|
||||||
type ResultBalance = [PalletVestingVestingInfo[] | null, ((PalletBalancesBalanceLock | BalanceLockTo212)[])[]];
|
|
||||||
type Result = [DeriveBalancesAccount, BlockNumber, ResultBalance];
|
type Result = [DeriveBalancesAccount, BlockNumber, ResultBalance];
|
||||||
|
|
||||||
interface AllLocked {
|
interface AllLocked {
|
||||||
@@ -86,7 +84,9 @@ function calcVesting (bestNumber: BlockNumber, shared: DeriveBalancesAllAccountD
|
|||||||
return {
|
return {
|
||||||
isVesting,
|
isVesting,
|
||||||
vestedBalance,
|
vestedBalance,
|
||||||
vestedClaimable: isVesting ? shared.vestingLocked.sub(vestingTotal.sub(vestedBalance)) : BN_ZERO,
|
vestedClaimable: isVesting
|
||||||
|
? shared.vestingLocked.sub(vestingTotal.sub(vestedBalance))
|
||||||
|
: BN_ZERO,
|
||||||
vesting: vesting
|
vesting: vesting
|
||||||
.map(({ locked, perBlock, startingBlock }, index) => ({
|
.map(({ locked, perBlock, startingBlock }, index) => ({
|
||||||
endBlock: locked.div(perBlock).iadd(startingBlock),
|
endBlock: locked.div(perBlock).iadd(startingBlock),
|
||||||
@@ -100,7 +100,7 @@ function calcVesting (bestNumber: BlockNumber, shared: DeriveBalancesAllAccountD
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function calcBalances (api: DeriveApi, [data, bestNumber, [vesting, allLocks]]: Result): DeriveBalancesAll {
|
function calcBalances (api: DeriveApi, [data, bestNumber, [vesting, allLocks, namedReserves]]: Result): DeriveBalancesAll {
|
||||||
const shared = calcShared(api, bestNumber, data, allLocks[0]);
|
const shared = calcShared(api, bestNumber, data, allLocks[0]);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -110,7 +110,8 @@ function calcBalances (api: DeriveApi, [data, bestNumber, [vesting, allLocks]]:
|
|||||||
accountNonce: data.accountNonce,
|
accountNonce: data.accountNonce,
|
||||||
additional: allLocks
|
additional: allLocks
|
||||||
.filter((_, index) => index !== 0)
|
.filter((_, index) => index !== 0)
|
||||||
.map((l, index) => calcShared(api, bestNumber, data.additional[index], l))
|
.map((l, index) => calcShared(api, bestNumber, data.additional[index], l)),
|
||||||
|
namedReserves
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,7 +134,8 @@ function queryOld (api: DeriveApi, accountId: AccountId): Observable<ResultBalan
|
|||||||
vestingNew
|
vestingNew
|
||||||
? [vestingNew]
|
? [vestingNew]
|
||||||
: null,
|
: null,
|
||||||
[locks]
|
[locks],
|
||||||
|
[]
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@@ -141,33 +143,58 @@ function queryOld (api: DeriveApi, accountId: AccountId): Observable<ResultBalan
|
|||||||
|
|
||||||
const isNonNullable = <T>(nullable: T): nullable is NonNullable<T> => !!nullable;
|
const isNonNullable = <T>(nullable: T): nullable is NonNullable<T> => !!nullable;
|
||||||
|
|
||||||
|
function createCalls (accountId: AccountId, calls: unknown[]): [boolean[], QueryableStorageMultiArg<'rxjs'>[]] {
|
||||||
|
return [
|
||||||
|
calls.map((c) => !c),
|
||||||
|
calls
|
||||||
|
.filter(isNonNullable)
|
||||||
|
.map((c) => [c, accountId] as unknown as QueryableStorageMultiArg<'rxjs'>)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
// current (balances, vesting)
|
// current (balances, vesting)
|
||||||
function queryCurrent (api: DeriveApi, accountId: AccountId, balanceInstances: string[] = ['balances']): Observable<ResultBalance> {
|
function queryCurrent (api: DeriveApi, accountId: AccountId, balanceInstances: string[] = ['balances']): Observable<ResultBalance> {
|
||||||
const calls = balanceInstances.map((m): DeriveApi['query']['balances']['locks'] | undefined =>
|
const [lockEmpty, lockQueries] = createCalls(
|
||||||
(api.derive as DeriveCustomLocks)[m]?.customLocks || api.query[m as 'balances']?.locks
|
accountId,
|
||||||
|
balanceInstances.map((m): DeriveApi['query']['balances']['locks'] | undefined =>
|
||||||
|
(api.derive as DeriveCustomLocks)[m]?.customLocks || api.query[m as 'balances']?.locks
|
||||||
|
)
|
||||||
|
);
|
||||||
|
const [reserveEmpty, reserveQueries] = createCalls(
|
||||||
|
accountId,
|
||||||
|
balanceInstances.map((m): DeriveApi['query']['balances']['reserves'] | undefined =>
|
||||||
|
api.query[m as 'balances']?.reserves
|
||||||
|
)
|
||||||
);
|
);
|
||||||
const lockEmpty = calls.map((c) => !c);
|
|
||||||
const queries = calls.filter(isNonNullable).map((c): QueryableStorageMultiArg<'rxjs'> => [c, accountId]);
|
|
||||||
|
|
||||||
return (
|
return combineLatest([
|
||||||
api.query.vesting?.vesting
|
api.query.vesting?.vesting
|
||||||
? api.queryMulti<[Option<PalletVestingVestingInfo> | Option<Vec<PalletVestingVestingInfo>>, ...BalanceLocks]>([[api.query.vesting.vesting, accountId], ...queries])
|
? api.query.vesting.vesting(accountId)
|
||||||
// TODO We need to check module instances here as well, not only the balances module
|
: of(api.registry.createType('Option<VestingInfo>')),
|
||||||
: queries.length
|
lockQueries.length
|
||||||
? api.queryMulti<[...(Vec<PalletBalancesBalanceLock>)[]]>(queries).pipe(
|
? api.queryMulti<[...(Vec<PalletBalancesBalanceLock>)[]]>(lockQueries)
|
||||||
map((r): [Option<PalletVestingVestingInfo>, ...BalanceLocks] => [api.registry.createType('Option<VestingInfo>'), ...r])
|
: of([] as Vec<PalletBalancesBalanceLock>[]),
|
||||||
)
|
reserveQueries.length
|
||||||
: of([api.registry.createType('Option<VestingInfo>')] as [Option<PalletVestingVestingInfo>])
|
? api.queryMulti<[...(Vec<PalletBalancesReserveData>)[]]>(reserveQueries)
|
||||||
).pipe(
|
: of([] as Vec<PalletBalancesReserveData>[])
|
||||||
map(([opt, ...locks]): ResultBalance => {
|
]).pipe(
|
||||||
let offset = -1;
|
map(([opt, locks, reserves]): ResultBalance => {
|
||||||
|
let offsetLock = -1;
|
||||||
|
let offsetReserve = -1;
|
||||||
const vesting = opt.unwrapOr(null);
|
const vesting = opt.unwrapOr(null);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
vesting
|
vesting
|
||||||
? Array.isArray(vesting) ? vesting : [vesting]
|
? Array.isArray(vesting)
|
||||||
|
? vesting
|
||||||
|
: [vesting as PalletVestingVestingInfo]
|
||||||
: null,
|
: null,
|
||||||
lockEmpty.map((e) => e ? api.registry.createType<Vec<PalletBalancesBalanceLock>>('Vec<BalanceLock>') : locks[++offset])
|
lockEmpty.map((e) =>
|
||||||
|
e ? api.registry.createType<Vec<PalletBalancesBalanceLock>>('Vec<BalanceLock>') : locks[++offsetLock]
|
||||||
|
),
|
||||||
|
reserveEmpty.map((e) =>
|
||||||
|
e ? api.registry.createType<Vec<PalletBalancesReserveData>>('Vec<PalletBalancesReserveData>') : reserves[++offsetReserve]
|
||||||
|
)
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@@ -202,7 +229,7 @@ export function all (instanceId: string, api: DeriveApi): (address: AccountIndex
|
|||||||
? queryCurrent(api, account.accountId, balanceInstances)
|
? queryCurrent(api, account.accountId, balanceInstances)
|
||||||
: queryOld(api, account.accountId)
|
: queryOld(api, account.accountId)
|
||||||
])
|
])
|
||||||
: of([account, api.registry.createType('BlockNumber'), [null, []]])
|
: of([account, api.registry.createType('BlockNumber'), [null, [], []]])
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
map((result): DeriveBalancesAll => calcBalances(api, result))
|
map((result): DeriveBalancesAll => calcBalances(api, result))
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { AccountId, Balance, BalanceLockTo212, Index } from '@polkadot/types/interfaces';
|
import type { AccountId, Balance, BalanceLockTo212, Index } from '@polkadot/types/interfaces';
|
||||||
import type { PalletBalancesBalanceLock } from '@polkadot/types/lookup';
|
import type { PalletBalancesBalanceLock, PalletBalancesReserveData } from '@polkadot/types/lookup';
|
||||||
import type { BN } from '@polkadot/util';
|
import type { BN } from '@polkadot/util';
|
||||||
|
|
||||||
export interface DeriveBalancesAccountData {
|
export interface DeriveBalancesAccountData {
|
||||||
@@ -44,6 +44,7 @@ export interface DeriveBalancesAllVesting {
|
|||||||
|
|
||||||
export interface DeriveBalancesAll extends DeriveBalancesAccount, DeriveBalancesAllAccountData, DeriveBalancesAllVesting {
|
export interface DeriveBalancesAll extends DeriveBalancesAccount, DeriveBalancesAllAccountData, DeriveBalancesAllVesting {
|
||||||
additional: DeriveBalancesAllAccountData[];
|
additional: DeriveBalancesAllAccountData[];
|
||||||
|
namedReserves: PalletBalancesReserveData[][];
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DeriveBalancesMap = Record<string, DeriveBalancesAll>;
|
export type DeriveBalancesMap = Record<string, DeriveBalancesAll>;
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import type { Observable } from 'rxjs';
|
||||||
|
import type { AnyNumber } from '@polkadot/types/types';
|
||||||
|
import type { SignedBlockExtended } from '../type/types';
|
||||||
|
import type { DeriveApi } from '../types';
|
||||||
|
|
||||||
|
import { switchMap } from 'rxjs';
|
||||||
|
|
||||||
|
import { memo } from '../util';
|
||||||
|
|
||||||
|
export function getBlockByNumber (instanceId: string, api: DeriveApi): (blockNumber: AnyNumber) => Observable<SignedBlockExtended | undefined> {
|
||||||
|
return memo(instanceId, (blockNumber: AnyNumber): Observable<SignedBlockExtended | undefined> =>
|
||||||
|
api.rpc.chain.getBlockHash(blockNumber).pipe(
|
||||||
|
switchMap((h) => api.derive.chain.getBlock(h))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -6,5 +6,6 @@ export * from './bestNumberFinalized';
|
|||||||
export * from './bestNumberLag';
|
export * from './bestNumberLag';
|
||||||
export * from './getHeader';
|
export * from './getHeader';
|
||||||
export * from './getBlock';
|
export * from './getBlock';
|
||||||
|
export * from './getBlockByNumber';
|
||||||
export * from './subscribeNewBlocks';
|
export * from './subscribeNewBlocks';
|
||||||
export * from './subscribeNewHeads';
|
export * from './subscribeNewHeads';
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { Observable } from 'rxjs';
|
import type { Observable } from 'rxjs';
|
||||||
import type { Option } from '@polkadot/types';
|
import type { Option, u32 } from '@polkadot/types';
|
||||||
import type { PolkadotRuntimeCommonCrowdloanFundInfo } from '@polkadot/types/lookup';
|
import type { PolkadotRuntimeCommonCrowdloanFundInfo } from '@polkadot/types/lookup';
|
||||||
import type { BN } from '@polkadot/util';
|
import type { BN } from '@polkadot/util';
|
||||||
import type { DeriveApi } from '../types';
|
import type { DeriveApi } from '../types';
|
||||||
@@ -14,12 +14,20 @@ import { blake2AsU8a } from '@polkadot/util-crypto';
|
|||||||
|
|
||||||
import { memo } from '../util';
|
import { memo } from '../util';
|
||||||
|
|
||||||
function createChildKey ({ trieIndex }: PolkadotRuntimeCommonCrowdloanFundInfo): string {
|
interface AllInfo extends PolkadotRuntimeCommonCrowdloanFundInfo {
|
||||||
|
// previously it was named trieIndex
|
||||||
|
trieIndex?: u32;
|
||||||
|
}
|
||||||
|
|
||||||
|
function createChildKey (info: AllInfo): string {
|
||||||
return u8aToHex(
|
return u8aToHex(
|
||||||
u8aConcat(
|
u8aConcat(
|
||||||
':child_storage:default:',
|
':child_storage:default:',
|
||||||
blake2AsU8a(
|
blake2AsU8a(
|
||||||
u8aConcat('crowdloan', trieIndex.toU8a())
|
u8aConcat(
|
||||||
|
'crowdloan',
|
||||||
|
(info.fundIndex || info.trieIndex).toU8a()
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -33,4 +33,7 @@ type DeriveAllSections<AllSections> = {
|
|||||||
[S in keyof AllSections]: DeriveSection<AllSections[S]>
|
[S in keyof AllSections]: DeriveSection<AllSections[S]>
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ExactDerive = DeriveAllSections<typeof derive>;
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||||
|
export interface ExactDerive extends DeriveAllSections<typeof derive> {
|
||||||
|
// keep empty, allows for augmentation
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '7.6.1' };
|
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '7.12.1' };
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type { Observable } from 'rxjs';
|
|||||||
import type { AccountId, EraIndex } from '@polkadot/types/interfaces';
|
import type { AccountId, EraIndex } from '@polkadot/types/interfaces';
|
||||||
import type { PalletStakingStakingLedger } from '@polkadot/types/lookup';
|
import type { PalletStakingStakingLedger } from '@polkadot/types/lookup';
|
||||||
import type { BN } from '@polkadot/util';
|
import type { BN } from '@polkadot/util';
|
||||||
import type { DeriveApi, DeriveEraPoints, DeriveEraPrefs, DeriveEraRewards, DeriveEraValPrefs, DeriveStakerExposure, DeriveStakerReward, DeriveStakerRewardValidator } from '../types';
|
import type { DeriveApi, DeriveEraPoints, DeriveEraPrefs, DeriveEraRewards, DeriveEraValPoints, DeriveEraValPrefs, DeriveStakerExposure, DeriveStakerReward, DeriveStakerRewardValidator } from '../types';
|
||||||
import type { DeriveStakingQuery } from './types';
|
import type { DeriveStakingQuery } from './types';
|
||||||
|
|
||||||
import { combineLatest, map, of, switchMap } from 'rxjs';
|
import { combineLatest, map, of, switchMap } from 'rxjs';
|
||||||
@@ -18,7 +18,7 @@ type ErasResult = [DeriveEraPoints[], DeriveEraPrefs[], DeriveEraRewards[]];
|
|||||||
|
|
||||||
function parseRewards (api: DeriveApi, stashId: AccountId, [erasPoints, erasPrefs, erasRewards]: ErasResult, exposures: DeriveStakerExposure[]): DeriveStakerReward[] {
|
function parseRewards (api: DeriveApi, stashId: AccountId, [erasPoints, erasPrefs, erasRewards]: ErasResult, exposures: DeriveStakerExposure[]): DeriveStakerReward[] {
|
||||||
return exposures.map(({ era, isEmpty, isValidator, nominating, validators: eraValidators }): DeriveStakerReward => {
|
return exposures.map(({ era, isEmpty, isValidator, nominating, validators: eraValidators }): DeriveStakerReward => {
|
||||||
const { eraPoints, validators: allValPoints } = erasPoints.find((p) => p.era.eq(era)) || { eraPoints: BN_ZERO, validators: {} };
|
const { eraPoints, validators: allValPoints } = erasPoints.find((p) => p.era.eq(era)) || { eraPoints: BN_ZERO, validators: {} as DeriveEraValPoints };
|
||||||
const { eraReward } = erasRewards.find((r) => r.era.eq(era)) || { eraReward: api.registry.createType('Balance') };
|
const { eraReward } = erasRewards.find((r) => r.era.eq(era)) || { eraReward: api.registry.createType('Balance') };
|
||||||
const { validators: allValPrefs } = erasPrefs.find((p) => p.era.eq(era)) || { validators: {} as DeriveEraValPrefs };
|
const { validators: allValPrefs } = erasPrefs.find((p) => p.era.eq(era)) || { validators: {} as DeriveEraValPrefs };
|
||||||
const validators: Record<string, DeriveStakerRewardValidator> = {};
|
const validators: Record<string, DeriveStakerRewardValidator> = {};
|
||||||
|
|||||||
@@ -7,12 +7,40 @@ import type { EraIndex } from '@polkadot/types/interfaces';
|
|||||||
import type { ExactDerive } from '../derive';
|
import type { ExactDerive } from '../derive';
|
||||||
import type { DeriveApi } from '../types';
|
import type { DeriveApi } from '../types';
|
||||||
|
|
||||||
import { combineLatest, of, switchMap } from 'rxjs';
|
import { BehaviorSubject, combineLatest, map, of, switchMap, tap, toArray } from 'rxjs';
|
||||||
|
|
||||||
|
import { arrayChunk, arrayFlatten } from '@polkadot/util';
|
||||||
|
|
||||||
import { memo } from '../util';
|
import { memo } from '../util';
|
||||||
|
|
||||||
type ApplyReturn<T extends keyof ExactDerive['staking']> = ReturnType<ExactDerive['staking'][T]>;
|
type ApplyReturn<T extends keyof ExactDerive['staking']> = ReturnType<ExactDerive['staking'][T]>;
|
||||||
|
|
||||||
|
// only retrieve a maximum of 14 eras (84 / 6) at a time
|
||||||
|
// (This is not empirically calculated. Rather smaller sizes take longer
|
||||||
|
// time due to the serial nature, large sizes may tie up the RPCs)
|
||||||
|
const ERA_CHUNK_SIZE = 14;
|
||||||
|
|
||||||
|
function chunkEras <T> (eras: EraIndex[], fn: (eras: EraIndex[]) => Observable<T[]>): Observable<T[]> {
|
||||||
|
const chunked = arrayChunk(eras, ERA_CHUNK_SIZE);
|
||||||
|
let index = 0;
|
||||||
|
const startSubject = new BehaviorSubject<EraIndex[]>(chunked[index]);
|
||||||
|
|
||||||
|
return startSubject.pipe(
|
||||||
|
switchMap(fn),
|
||||||
|
tap((): void => {
|
||||||
|
setTimeout((): void => {
|
||||||
|
index++;
|
||||||
|
|
||||||
|
index === chunked.length
|
||||||
|
? startSubject.complete()
|
||||||
|
: startSubject.next(chunked[index]);
|
||||||
|
}, 0);
|
||||||
|
}),
|
||||||
|
toArray(),
|
||||||
|
map(arrayFlatten)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
export function filterEras <T extends { era: EraIndex }> (eras: EraIndex[], list: T[]): EraIndex[] {
|
export function filterEras <T extends { era: EraIndex }> (eras: EraIndex[], list: T[]): EraIndex[] {
|
||||||
return eras.filter((e) => !list.some(({ era }) => e.eq(era)));
|
return eras.filter((e) => !list.some(({ era }) => e.eq(era)));
|
||||||
}
|
}
|
||||||
@@ -53,9 +81,12 @@ export function combineEras <F extends '_eraExposure' | '_eraPrefs' | '_eraSlash
|
|||||||
// Cannot quite get the typing right, but it is right in the code
|
// Cannot quite get the typing right, but it is right in the code
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||||
memo(instanceId, (eras: EraIndex[], withActive: boolean) =>
|
memo(instanceId, (eras: EraIndex[], withActive: boolean) =>
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
!eras.length
|
||||||
eras.length
|
? of([])
|
||||||
? combineLatest(eras.map((e) => api.derive.staking[fn](e, withActive)))
|
: chunkEras(eras, (eras) =>
|
||||||
: of([])
|
combineLatest(
|
||||||
|
eras.map((e) => api.derive.staking[fn](e, withActive))
|
||||||
|
)
|
||||||
|
)
|
||||||
) as any;
|
) as any;
|
||||||
}
|
}
|
||||||
|
|||||||
+19
-19
@@ -20,29 +20,29 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.6.1",
|
"version": "7.12.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.16.7",
|
"@babel/runtime": "^7.17.2",
|
||||||
"@polkadot/api-augment": "7.6.1",
|
"@polkadot/api-augment": "7.12.1",
|
||||||
"@polkadot/api-base": "7.6.1",
|
"@polkadot/api-base": "7.12.1",
|
||||||
"@polkadot/api-derive": "7.6.1",
|
"@polkadot/api-derive": "7.12.1",
|
||||||
"@polkadot/keyring": "^8.3.3",
|
"@polkadot/keyring": "^8.5.1",
|
||||||
"@polkadot/rpc-augment": "7.6.1",
|
"@polkadot/rpc-augment": "7.12.1",
|
||||||
"@polkadot/rpc-core": "7.6.1",
|
"@polkadot/rpc-core": "7.12.1",
|
||||||
"@polkadot/rpc-provider": "7.6.1",
|
"@polkadot/rpc-provider": "7.12.1",
|
||||||
"@polkadot/types": "7.6.1",
|
"@polkadot/types": "7.12.1",
|
||||||
"@polkadot/types-augment": "7.6.1",
|
"@polkadot/types-augment": "7.12.1",
|
||||||
"@polkadot/types-codec": "7.6.1",
|
"@polkadot/types-codec": "7.12.1",
|
||||||
"@polkadot/types-create": "7.6.1",
|
"@polkadot/types-create": "7.12.1",
|
||||||
"@polkadot/types-known": "7.6.1",
|
"@polkadot/types-known": "7.12.1",
|
||||||
"@polkadot/util": "^8.3.3",
|
"@polkadot/util": "^8.5.1",
|
||||||
"@polkadot/util-crypto": "^8.3.3",
|
"@polkadot/util-crypto": "^8.5.1",
|
||||||
"eventemitter3": "^4.0.7",
|
"eventemitter3": "^4.0.7",
|
||||||
"rxjs": "^7.5.2"
|
"rxjs": "^7.5.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/api-augment": "7.6.1",
|
"@polkadot/api-augment": "7.12.1",
|
||||||
"@polkadot/types-support": "7.6.1"
|
"@polkadot/types-support": "7.12.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
} as ApiDecoration<ApiType>;
|
} as ApiDecoration<ApiType>;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!registry.decoratedMeta) {
|
if (fromEmpty || !registry.decoratedMeta) {
|
||||||
registry.decoratedMeta = expandMetadata(registry.registry, registry.metadata);
|
registry.decoratedMeta = expandMetadata(registry.registry, registry.metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
|||||||
|
|
||||||
this._rpcCore.setRegistrySwap((blockHash: Uint8Array) => this.getBlockRegistry(blockHash));
|
this._rpcCore.setRegistrySwap((blockHash: Uint8Array) => this.getBlockRegistry(blockHash));
|
||||||
|
|
||||||
|
this._rpcCore.setResolveBlockHash((blockNumber) => firstValueFrom(this._rpcCore.chain.getBlockHash(blockNumber)));
|
||||||
|
|
||||||
if (this.hasSubscriptions) {
|
if (this.hasSubscriptions) {
|
||||||
this._rpcCore.provider.on('disconnected', () => this.#onProviderDisconnect());
|
this._rpcCore.provider.on('disconnected', () => this.#onProviderDisconnect());
|
||||||
this._rpcCore.provider.on('error', (e: Error) => this.#onProviderError(e));
|
this._rpcCore.provider.on('error', (e: Error) => this.#onProviderError(e));
|
||||||
@@ -85,6 +87,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
|||||||
* @description Decorates a registry based on the runtime version
|
* @description Decorates a registry based on the runtime version
|
||||||
*/
|
*/
|
||||||
private _initRegistry (registry: Registry, chain: Text, version: { specName: Text, specVersion: BN }, metadata: Metadata, chainProps?: ChainProperties): void {
|
private _initRegistry (registry: Registry, chain: Text, version: { specName: Text, specVersion: BN }, metadata: Metadata, chainProps?: ChainProperties): void {
|
||||||
|
registry.clearCache();
|
||||||
registry.setChainProperties(chainProps || this.registry.getChainProperties());
|
registry.setChainProperties(chainProps || this.registry.getChainProperties());
|
||||||
registry.setKnownTypes(this._options);
|
registry.setKnownTypes(this._options);
|
||||||
registry.register(getSpecTypes(registry, chain, version.specName, version.specVersion));
|
registry.register(getSpecTypes(registry, chain, version.specName, version.specVersion));
|
||||||
@@ -284,9 +287,8 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
|||||||
thisRegistry.metadata = metadata;
|
thisRegistry.metadata = metadata;
|
||||||
thisRegistry.specVersion = version.specVersion;
|
thisRegistry.specVersion = version.specVersion;
|
||||||
|
|
||||||
// clear the registry types to ensure that we override correctly
|
this._initRegistry(this.registry, this._runtimeChain as Text, version, metadata);
|
||||||
this._initRegistry(thisRegistry.registry.init(), this._runtimeChain as Text, version, metadata);
|
this._injectMetadata(thisRegistry, true);
|
||||||
this._injectMetadata(thisRegistry, false);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '7.6.1' };
|
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '7.12.1' };
|
||||||
|
|||||||
@@ -14,7 +14,15 @@ interface Tracker<T> {
|
|||||||
resolve: (value: T) => void;
|
resolve: (value: T) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
// a Promise completion tracker, wrapping an isComplete variable that ensures the promise only resolves once
|
type CodecReturnType<T extends (...args: unknown[]) => Observable<Codec>> =
|
||||||
|
T extends (...args: any) => infer R
|
||||||
|
? R extends Observable<Codec>
|
||||||
|
? ObsInnerType<R>
|
||||||
|
: never
|
||||||
|
: never;
|
||||||
|
|
||||||
|
// a Promise completion tracker, wrapping an isComplete variable that ensures
|
||||||
|
// that the promise only resolves once
|
||||||
export function promiseTracker<T> (resolve: (value: T) => void, reject: (value: Error) => void): Tracker<T> {
|
export function promiseTracker<T> (resolve: (value: T) => void, reject: (value: Error) => void): Tracker<T> {
|
||||||
let isCompleted = false;
|
let isCompleted = false;
|
||||||
|
|
||||||
@@ -40,14 +48,13 @@ export function promiseTracker<T> (resolve: (value: T) => void, reject: (value:
|
|||||||
|
|
||||||
// extract the arguments and callback params from a value array possibly containing a callback
|
// extract the arguments and callback params from a value array possibly containing a callback
|
||||||
function extractArgs (args: unknown[], needsCallback: boolean): [unknown[], Callback<Codec> | undefined] {
|
function extractArgs (args: unknown[], needsCallback: boolean): [unknown[], Callback<Codec> | undefined] {
|
||||||
let callback: Callback<Codec> | undefined;
|
|
||||||
const actualArgs = args.slice();
|
const actualArgs = args.slice();
|
||||||
|
|
||||||
// If the last arg is a function, we pop it, put it into callback.
|
// If the last arg is a function, we pop it, put it into callback.
|
||||||
// actualArgs will then hold the actual arguments to be passed to `method`
|
// actualArgs will then hold the actual arguments to be passed to `method`
|
||||||
if (args.length && isFunction(args[args.length - 1])) {
|
const callback = (args.length && isFunction(args[args.length - 1]))
|
||||||
callback = actualArgs.pop() as Callback<Codec>;
|
? actualArgs.pop() as Callback<Codec>
|
||||||
}
|
: undefined;
|
||||||
|
|
||||||
// When we need a subscription, ensure that a valid callback is actually passed
|
// When we need a subscription, ensure that a valid callback is actually passed
|
||||||
assert(!needsCallback || isFunction(callback), 'Expected a callback to be passed with subscriptions');
|
assert(!needsCallback || isFunction(callback), 'Expected a callback to be passed with subscriptions');
|
||||||
@@ -56,7 +63,7 @@ function extractArgs (args: unknown[], needsCallback: boolean): [unknown[], Call
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Decorate a call for a single-shot result - retrieve and then immediate unsubscribe
|
// Decorate a call for a single-shot result - retrieve and then immediate unsubscribe
|
||||||
function decorateCall<M extends DecorateFn<ObsInnerType<ReturnType<M>>>> (method: M, args: unknown[]): Promise<ObsInnerType<ReturnType<M>>> {
|
function decorateCall<M extends DecorateFn<CodecReturnType<M>>> (method: M, args: unknown[]): Promise<CodecReturnType<M>> {
|
||||||
return new Promise((resolve, reject): void => {
|
return new Promise((resolve, reject): void => {
|
||||||
// single result tracker - either reject with Error or resolve with Codec result
|
// single result tracker - either reject with Error or resolve with Codec result
|
||||||
const tracker = promiseTracker(resolve, reject);
|
const tracker = promiseTracker(resolve, reject);
|
||||||
@@ -74,7 +81,7 @@ function decorateCall<M extends DecorateFn<ObsInnerType<ReturnType<M>>>> (method
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Decorate a subscription where we have a result callback specified
|
// Decorate a subscription where we have a result callback specified
|
||||||
function decorateSubscribe<M extends DecorateFn<ObsInnerType<ReturnType<M>>>> (method: M, args: unknown[], resultCb: Callback<Codec>): UnsubscribePromise {
|
function decorateSubscribe<M extends DecorateFn<CodecReturnType<M>>> (method: M, args: unknown[], resultCb: Callback<Codec>): UnsubscribePromise {
|
||||||
return new Promise<VoidFn>((resolve, reject): void => {
|
return new Promise<VoidFn>((resolve, reject): void => {
|
||||||
// either reject with error or resolve with unsubscribe callback
|
// either reject with error or resolve with unsubscribe callback
|
||||||
const tracker = promiseTracker(resolve, reject);
|
const tracker = promiseTracker(resolve, reject);
|
||||||
@@ -95,10 +102,10 @@ function decorateSubscribe<M extends DecorateFn<ObsInnerType<ReturnType<M>>>> (m
|
|||||||
/**
|
/**
|
||||||
* @description Decorate method for ApiPromise, where the results are converted to the Promise equivalent
|
* @description Decorate method for ApiPromise, where the results are converted to the Promise equivalent
|
||||||
*/
|
*/
|
||||||
export function toPromiseMethod<M extends DecorateFn<ObsInnerType<ReturnType<M>>>> (method: M, options?: DecorateMethodOptions): StorageEntryPromiseOverloads {
|
export function toPromiseMethod<M extends DecorateFn<CodecReturnType<M>>> (method: M, options?: DecorateMethodOptions): StorageEntryPromiseOverloads {
|
||||||
const needsCallback = !!(options && options.methodName && options.methodName.includes('subscribe'));
|
const needsCallback = !!(options && options.methodName && options.methodName.includes('subscribe'));
|
||||||
|
|
||||||
return function (...args: unknown[]): Promise<ObsInnerType<ReturnType<M>>> | UnsubscribePromise {
|
return function (...args: unknown[]): Promise<CodecReturnType<M>> | UnsubscribePromise {
|
||||||
const [actualArgs, resultCb] = extractArgs(args, needsCallback);
|
const [actualArgs, resultCb] = extractArgs(args, needsCallback);
|
||||||
|
|
||||||
return resultCb
|
return resultCb
|
||||||
|
|||||||
@@ -47,13 +47,16 @@ export class SubmittableResult implements ISubmittableResult {
|
|||||||
|
|
||||||
public readonly txHash: Hash;
|
public readonly txHash: Hash;
|
||||||
|
|
||||||
constructor ({ dispatchError, dispatchInfo, events, internalError, status, txHash }: SubmittableResultValue) {
|
public readonly txIndex?: number;
|
||||||
|
|
||||||
|
constructor ({ dispatchError, dispatchInfo, events, internalError, status, txHash, txIndex }: SubmittableResultValue) {
|
||||||
this.dispatchError = dispatchError || extractError(events);
|
this.dispatchError = dispatchError || extractError(events);
|
||||||
this.dispatchInfo = dispatchInfo || extractInfo(events);
|
this.dispatchInfo = dispatchInfo || extractInfo(events);
|
||||||
this.events = events || [];
|
this.events = events || [];
|
||||||
this.internalError = internalError;
|
this.internalError = internalError;
|
||||||
this.status = status;
|
this.status = status;
|
||||||
this.txHash = txHash;
|
this.txHash = txHash;
|
||||||
|
this.txIndex = txIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get isCompleted (): boolean {
|
public get isCompleted (): boolean {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
/* eslint-disable no-dupe-class-members */
|
/* eslint-disable no-dupe-class-members */
|
||||||
|
|
||||||
import type { Observable, OperatorFunction } from 'rxjs';
|
import type { Observable } from 'rxjs';
|
||||||
import type { Address, ApplyExtrinsicResult, Call, Extrinsic, ExtrinsicEra, ExtrinsicStatus, Hash, Header, Index, RuntimeDispatchInfo, SignerPayload } from '@polkadot/types/interfaces';
|
import type { Address, ApplyExtrinsicResult, Call, Extrinsic, ExtrinsicEra, ExtrinsicStatus, Hash, Header, Index, RuntimeDispatchInfo, SignerPayload } from '@polkadot/types/interfaces';
|
||||||
import type { Callback, Codec, Constructor, IKeyringPair, ISubmittableResult, SignatureOptions } from '@polkadot/types/types';
|
import type { Callback, Codec, Constructor, IKeyringPair, ISubmittableResult, SignatureOptions } from '@polkadot/types/types';
|
||||||
import type { Registry } from '@polkadot/types-codec/types';
|
import type { Registry } from '@polkadot/types-codec/types';
|
||||||
@@ -24,6 +24,11 @@ interface SubmittableOptions<ApiType extends ApiTypes> {
|
|||||||
decorateMethod: ApiBase<ApiType>['_decorateMethod'];
|
decorateMethod: ApiBase<ApiType>['_decorateMethod'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface UpdateInfo {
|
||||||
|
options: SignatureOptions;
|
||||||
|
updateId: number;
|
||||||
|
}
|
||||||
|
|
||||||
const identity = <T> (input: T): T => input;
|
const identity = <T> (input: T): T => input;
|
||||||
|
|
||||||
function makeEraOptions (api: ApiInterfaceRx, registry: Registry, partialOptions: Partial<SignerOptions>, { header, mortalLength, nonce }: { header: Header | null; mortalLength: number; nonce: Index }): SignatureOptions {
|
function makeEraOptions (api: ApiInterfaceRx, registry: Registry, partialOptions: Partial<SignerOptions>, { header, mortalLength, nonce }: { header: Header | null; mortalLength: number; nonce: Index }): SignatureOptions {
|
||||||
@@ -174,7 +179,7 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
|||||||
return decorateMethod(
|
return decorateMethod(
|
||||||
(): Observable<this> =>
|
(): Observable<this> =>
|
||||||
this.#observeSign(account, partialOptions).pipe(
|
this.#observeSign(account, partialOptions).pipe(
|
||||||
mapTo<number | undefined, this>(this)
|
mapTo(this)
|
||||||
)
|
)
|
||||||
)();
|
)();
|
||||||
}
|
}
|
||||||
@@ -197,10 +202,10 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
|||||||
return decorateMethod(
|
return decorateMethod(
|
||||||
(): Observable<Codec> => (
|
(): Observable<Codec> => (
|
||||||
this.#observeSign(account, options).pipe(
|
this.#observeSign(account, options).pipe(
|
||||||
switchMap((updateId: number | undefined): Observable<ISubmittableResult> | Observable<Hash> =>
|
switchMap((info): Observable<ISubmittableResult> | Observable<Hash> =>
|
||||||
isSubscription
|
isSubscription
|
||||||
? this.#observeSubscribe(updateId)
|
? this.#observeSubscribe(info)
|
||||||
: this.#observeSend(updateId)
|
: this.#observeSend(info)
|
||||||
)
|
)
|
||||||
) as Observable<Codec>) // FIXME This is wrong, SubmittableResult is _not_ a codec
|
) as Observable<Codec>) // FIXME This is wrong, SubmittableResult is _not_ a codec
|
||||||
)(statusCb);
|
)(statusCb);
|
||||||
@@ -213,23 +218,24 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#observeSign = (account: AddressOrPair, partialOptions?: Partial<SignerOptions>): Observable<number | undefined> => {
|
#observeSign = (account: AddressOrPair, partialOptions?: Partial<SignerOptions>): Observable<UpdateInfo> => {
|
||||||
const address = isKeyringPair(account) ? account.address : account.toString();
|
const address = isKeyringPair(account) ? account.address : account.toString();
|
||||||
const options = optionsOrNonce(partialOptions);
|
const options = optionsOrNonce(partialOptions);
|
||||||
let updateId: number | undefined;
|
|
||||||
|
|
||||||
return api.derive.tx.signingInfo(address, options.nonce, options.era).pipe(
|
return api.derive.tx.signingInfo(address, options.nonce, options.era).pipe(
|
||||||
first(),
|
first(),
|
||||||
mergeMap(async (signingInfo): Promise<void> => {
|
mergeMap(async (signingInfo): Promise<UpdateInfo> => {
|
||||||
const eraOptions = makeEraOptions(api, this.registry, options, signingInfo);
|
const eraOptions = makeEraOptions(api, this.registry, options, signingInfo);
|
||||||
|
let updateId = -1;
|
||||||
|
|
||||||
if (isKeyringPair(account)) {
|
if (isKeyringPair(account)) {
|
||||||
this.sign(account, eraOptions);
|
this.sign(account, eraOptions);
|
||||||
} else {
|
} else {
|
||||||
updateId = await this.#signViaSigner(address, eraOptions, signingInfo.header);
|
updateId = await this.#signViaSigner(address, eraOptions, signingInfo.header);
|
||||||
}
|
}
|
||||||
}),
|
|
||||||
mapTo(updateId) as OperatorFunction<void, number | undefined>
|
return { options: eraOptions, updateId };
|
||||||
|
})
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -248,7 +254,7 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
|||||||
return api.derive.tx.events(blockHash).pipe(
|
return api.derive.tx.events(blockHash).pipe(
|
||||||
map(({ block, events }): ISubmittableResult =>
|
map(({ block, events }): ISubmittableResult =>
|
||||||
this.#transformResult(new SubmittableResult({
|
this.#transformResult(new SubmittableResult({
|
||||||
events: filterEvents(txHash, block, events, status),
|
...filterEvents(txHash, block, events, status),
|
||||||
status,
|
status,
|
||||||
txHash
|
txHash
|
||||||
}))
|
}))
|
||||||
@@ -263,15 +269,15 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
#observeSend = (updateId = -1): Observable<Hash> => {
|
#observeSend = (info: UpdateInfo): Observable<Hash> => {
|
||||||
return api.rpc.author.submitExtrinsic(this).pipe(
|
return api.rpc.author.submitExtrinsic(this).pipe(
|
||||||
tap((hash): void => {
|
tap((hash): void => {
|
||||||
this.#updateSigner(updateId, hash);
|
this.#updateSigner(hash, info);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
#observeSubscribe = (updateId = -1): Observable<ISubmittableResult> => {
|
#observeSubscribe = (info: UpdateInfo): Observable<ISubmittableResult> => {
|
||||||
const txHash = this.hash;
|
const txHash = this.hash;
|
||||||
|
|
||||||
return api.rpc.author.submitAndWatchExtrinsic(this).pipe(
|
return api.rpc.author.submitAndWatchExtrinsic(this).pipe(
|
||||||
@@ -279,7 +285,7 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
|||||||
this.#observeStatus(txHash, status)
|
this.#observeStatus(txHash, status)
|
||||||
),
|
),
|
||||||
tap((status): void => {
|
tap((status): void => {
|
||||||
this.#updateSigner(updateId, status);
|
this.#updateSigner(status, info);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -296,9 +302,9 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
|||||||
})]);
|
})]);
|
||||||
let result: SignerResult;
|
let result: SignerResult;
|
||||||
|
|
||||||
if (signer.signPayload) {
|
if (isFunction(signer.signPayload)) {
|
||||||
result = await signer.signPayload(payload.toPayload());
|
result = await signer.signPayload(payload.toPayload());
|
||||||
} else if (signer.signRaw) {
|
} else if (isFunction(signer.signRaw)) {
|
||||||
result = await signer.signRaw(payload.toRaw());
|
result = await signer.signRaw(payload.toRaw());
|
||||||
} else {
|
} else {
|
||||||
throw new Error('Invalid signer interface, it should implement either signPayload or signRaw (or both)');
|
throw new Error('Invalid signer interface, it should implement either signPayload or signRaw (or both)');
|
||||||
@@ -312,9 +318,14 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
|||||||
return result.id;
|
return result.id;
|
||||||
};
|
};
|
||||||
|
|
||||||
#updateSigner = (updateId: number, status: Hash | ISubmittableResult): void => {
|
#updateSigner = (status: Hash | ISubmittableResult, info?: UpdateInfo): void => {
|
||||||
if ((updateId !== -1) && api.signer && api.signer.update) {
|
if (info && (info.updateId !== -1)) {
|
||||||
api.signer.update(updateId, status);
|
const { options, updateId } = info;
|
||||||
|
const signer = options.signer || api.signer;
|
||||||
|
|
||||||
|
if (signer && isFunction(signer.update)) {
|
||||||
|
signer.update(updateId, status);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,14 +5,17 @@ import type { EventRecord, ExtrinsicStatus, H256, SignedBlock } from '@polkadot/
|
|||||||
|
|
||||||
import { l } from './logging';
|
import { l } from './logging';
|
||||||
|
|
||||||
export function filterEvents (txHash: H256, { block: { extrinsics, header } }: SignedBlock, allEvents: EventRecord[], status: ExtrinsicStatus): EventRecord[] | undefined {
|
export function filterEvents (txHash: H256, { block: { extrinsics, header } }: SignedBlock, allEvents: EventRecord[], status: ExtrinsicStatus): { events?: EventRecord[], txIndex?: number } {
|
||||||
// extrinsics to hashes
|
// extrinsics to hashes
|
||||||
for (const [index, x] of extrinsics.entries()) {
|
for (const [txIndex, x] of extrinsics.entries()) {
|
||||||
if (x.hash.eq(txHash)) {
|
if (x.hash.eq(txHash)) {
|
||||||
return allEvents.filter(({ phase }) =>
|
return {
|
||||||
// only ApplyExtrinsic has the extrinsic index
|
events: allEvents.filter(({ phase }) =>
|
||||||
phase.isApplyExtrinsic && phase.asApplyExtrinsic.eqn(index)
|
phase.isApplyExtrinsic &&
|
||||||
);
|
phase.asApplyExtrinsic.eqn(txIndex)
|
||||||
|
),
|
||||||
|
txIndex
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -24,5 +27,5 @@ export function filterEvents (txHash: H256, { block: { extrinsics, header } }: S
|
|||||||
l.warn(`block ${header.hash.toHex()}: Unable to find extrinsic ${txHash.toHex()} inside ${allHashes.join(', ')}`);
|
l.warn(`block ${header.hash.toHex()}: Unable to find extrinsic ${txHash.toHex()} inside ${allHashes.join(', ')}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return undefined;
|
return {};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,13 +20,13 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.6.1",
|
"version": "7.12.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.16.7",
|
"@babel/runtime": "^7.17.2",
|
||||||
"@polkadot/rpc-core": "7.6.1",
|
"@polkadot/rpc-core": "7.12.1",
|
||||||
"@polkadot/types": "7.6.1",
|
"@polkadot/types": "7.12.1",
|
||||||
"@polkadot/types-codec": "7.6.1",
|
"@polkadot/types-codec": "7.12.1",
|
||||||
"@polkadot/util": "^8.3.3"
|
"@polkadot/util": "^8.5.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,6 +68,10 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
|
|||||||
epochAuthorship: AugmentedRpc<() => Observable<HashMap<AuthorityId, EpochAuthorship>>>;
|
epochAuthorship: AugmentedRpc<() => Observable<HashMap<AuthorityId, EpochAuthorship>>>;
|
||||||
};
|
};
|
||||||
beefy: {
|
beefy: {
|
||||||
|
/**
|
||||||
|
* Returns hash of the latest BEEFY finalized block as seen by this client.
|
||||||
|
**/
|
||||||
|
getFinalizedHead: AugmentedRpc<() => Observable<H256>>;
|
||||||
/**
|
/**
|
||||||
* Returns the block most recently finalized by BEEFY, alongside side its justification.
|
* Returns the block most recently finalized by BEEFY, alongside side its justification.
|
||||||
**/
|
**/
|
||||||
@@ -329,9 +333,9 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
|
|||||||
};
|
};
|
||||||
grandpa: {
|
grandpa: {
|
||||||
/**
|
/**
|
||||||
* Prove finality for the range (begin; end] hash.
|
* Prove finality for the given block number, returning the Justification for the last block in the set.
|
||||||
**/
|
**/
|
||||||
proveFinality: AugmentedRpc<(begin: BlockHash | string | Uint8Array, end: BlockHash | string | Uint8Array, authoritiesSetId?: u64 | AnyNumber | Uint8Array) => Observable<Option<EncodedFinalityProofs>>>;
|
proveFinality: AugmentedRpc<(blockNumber: BlockNumber | AnyNumber | Uint8Array) => Observable<Option<EncodedFinalityProofs>>>;
|
||||||
/**
|
/**
|
||||||
* Returns the state of the current best round state as well as the ongoing background rounds
|
* Returns the state of the current best round state as well as the ongoing background rounds
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '7.6.1' };
|
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '7.12.1' };
|
||||||
|
|||||||
@@ -20,18 +20,18 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.6.1",
|
"version": "7.12.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.16.7",
|
"@babel/runtime": "^7.17.2",
|
||||||
"@polkadot/rpc-augment": "7.6.1",
|
"@polkadot/rpc-augment": "7.12.1",
|
||||||
"@polkadot/rpc-provider": "7.6.1",
|
"@polkadot/rpc-provider": "7.12.1",
|
||||||
"@polkadot/types": "7.6.1",
|
"@polkadot/types": "7.12.1",
|
||||||
"@polkadot/util": "^8.3.3",
|
"@polkadot/util": "^8.5.1",
|
||||||
"rxjs": "^7.5.2"
|
"rxjs": "^7.5.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/keyring": "^8.3.3",
|
"@polkadot/keyring": "^8.5.1",
|
||||||
"@polkadot/rpc-augment": "7.6.1"
|
"@polkadot/rpc-augment": "7.12.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type { Observer } from 'rxjs';
|
|||||||
import type { ProviderInterface, ProviderInterfaceCallback } from '@polkadot/rpc-provider/types';
|
import type { ProviderInterface, ProviderInterfaceCallback } from '@polkadot/rpc-provider/types';
|
||||||
import type { StorageKey, Vec } from '@polkadot/types';
|
import type { StorageKey, Vec } from '@polkadot/types';
|
||||||
import type { Hash } from '@polkadot/types/interfaces';
|
import type { Hash } from '@polkadot/types/interfaces';
|
||||||
import type { AnyJson, Codec, DefinitionRpc, DefinitionRpcExt, DefinitionRpcSub, Registry } from '@polkadot/types/types';
|
import type { AnyJson, AnyNumber, Codec, DefinitionRpc, DefinitionRpcExt, DefinitionRpcSub, Registry } from '@polkadot/types/types';
|
||||||
import type { Memoized } from '@polkadot/util/types';
|
import type { Memoized } from '@polkadot/util/types';
|
||||||
import type { RpcInterfaceMethod } from './types';
|
import type { RpcInterfaceMethod } from './types';
|
||||||
|
|
||||||
@@ -85,6 +85,7 @@ export class RpcCore {
|
|||||||
#registryDefault: Registry;
|
#registryDefault: Registry;
|
||||||
|
|
||||||
#getBlockRegistry?: (blockHash: Uint8Array) => Promise<{ registry: Registry }>;
|
#getBlockRegistry?: (blockHash: Uint8Array) => Promise<{ registry: Registry }>;
|
||||||
|
#getBlockHash?: (blockNumber: AnyNumber) => Promise<Uint8Array>;
|
||||||
|
|
||||||
readonly #storageCache = new Map<string, string | null>();
|
readonly #storageCache = new Map<string, string | null>();
|
||||||
|
|
||||||
@@ -146,6 +147,15 @@ export class RpcCore {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Sets a function to resolve block hash from block number
|
||||||
|
*/
|
||||||
|
public setResolveBlockHash (resolveBlockHash: (blockNumber: AnyNumber) => Promise<Uint8Array>): void {
|
||||||
|
this.#getBlockHash = memoize(resolveBlockHash, {
|
||||||
|
getInstanceId: () => this.#instanceId
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public addUserInterfaces (userRpc: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>>): void {
|
public addUserInterfaces (userRpc: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>>): void {
|
||||||
// add any extra user-defined sections
|
// add any extra user-defined sections
|
||||||
this.sections.push(...Object.keys(userRpc).filter((k) => !this.sections.includes(k)));
|
this.sections.push(...Object.keys(userRpc).filter((k) => !this.sections.includes(k)));
|
||||||
@@ -202,12 +212,18 @@ export class RpcCore {
|
|||||||
|
|
||||||
// execute the RPC call, doing a registry swap for historic as applicable
|
// execute the RPC call, doing a registry swap for historic as applicable
|
||||||
const callWithRegistry = async <T> (isScale: boolean, values: unknown[]): Promise<T> => {
|
const callWithRegistry = async <T> (isScale: boolean, values: unknown[]): Promise<T> => {
|
||||||
const blockHash = hashIndex === -1
|
const blockId = hashIndex === -1
|
||||||
? null
|
? null
|
||||||
: values[hashIndex] as (Uint8Array | string | null | undefined);
|
: values[hashIndex];
|
||||||
|
|
||||||
|
const blockHash = blockId && def.params[hashIndex].type === 'BlockNumber'
|
||||||
|
? await this.#getBlockHash?.(blockId as AnyNumber)
|
||||||
|
: blockId as (Uint8Array | string | null | undefined);
|
||||||
|
|
||||||
const { registry } = isScale && blockHash && this.#getBlockRegistry
|
const { registry } = isScale && blockHash && this.#getBlockRegistry
|
||||||
? await this.#getBlockRegistry(u8aToU8a(blockHash))
|
? await this.#getBlockRegistry(u8aToU8a(blockHash))
|
||||||
: { registry: this.#registryDefault };
|
: { registry: this.#registryDefault };
|
||||||
|
|
||||||
const params = this._formatInputs(registry, null, def, values);
|
const params = this._formatInputs(registry, null, def, values);
|
||||||
|
|
||||||
// only cache .at(<blockHash>) queries, e.g. where valid blockHash was supplied
|
// only cache .at(<blockHash>) queries, e.g. where valid blockHash was supplied
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '7.6.1' };
|
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '7.12.1' };
|
||||||
|
|||||||
@@ -20,20 +20,20 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.6.1",
|
"version": "7.12.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.16.7",
|
"@babel/runtime": "^7.17.2",
|
||||||
"@polkadot/keyring": "^8.3.3",
|
"@polkadot/keyring": "^8.5.1",
|
||||||
"@polkadot/types": "7.6.1",
|
"@polkadot/types": "7.12.1",
|
||||||
"@polkadot/types-support": "7.6.1",
|
"@polkadot/types-support": "7.12.1",
|
||||||
"@polkadot/util": "^8.3.3",
|
"@polkadot/util": "^8.5.1",
|
||||||
"@polkadot/util-crypto": "^8.3.3",
|
"@polkadot/util-crypto": "^8.5.1",
|
||||||
"@polkadot/x-fetch": "^8.3.3",
|
"@polkadot/x-fetch": "^8.5.1",
|
||||||
"@polkadot/x-global": "^8.3.3",
|
"@polkadot/x-global": "^8.5.1",
|
||||||
"@polkadot/x-ws": "^8.3.3",
|
"@polkadot/x-ws": "^8.5.1",
|
||||||
"eventemitter3": "^4.0.7",
|
"eventemitter3": "^4.0.7",
|
||||||
"mock-socket": "^9.1.2",
|
"mock-socket": "^9.1.2",
|
||||||
"nock": "^13.2.2"
|
"nock": "^13.2.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ export class LRUCache {
|
|||||||
this.#refs.delete(this.#tail.key);
|
this.#refs.delete(this.#tail.key);
|
||||||
|
|
||||||
this.#tail = this.#tail.prev;
|
this.#tail = this.#tail.prev;
|
||||||
|
this.#tail.next = this.#head;
|
||||||
} else {
|
} else {
|
||||||
this.#length += 1;
|
this.#length += 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '7.6.1' };
|
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '7.12.1' };
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.6.1",
|
"version": "7.12.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
|
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
|
||||||
@@ -30,26 +30,26 @@
|
|||||||
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.cjs"
|
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.cjs"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.16.12",
|
"@babel/core": "^7.17.5",
|
||||||
"@babel/register": "^7.16.9",
|
"@babel/register": "^7.17.0",
|
||||||
"@babel/runtime": "^7.16.7",
|
"@babel/runtime": "^7.17.2",
|
||||||
"@polkadot/api": "7.6.1",
|
"@polkadot/api": "7.12.1",
|
||||||
"@polkadot/api-augment": "7.6.1",
|
"@polkadot/api-augment": "7.12.1",
|
||||||
"@polkadot/rpc-augment": "7.6.1",
|
"@polkadot/rpc-augment": "7.12.1",
|
||||||
"@polkadot/rpc-provider": "7.6.1",
|
"@polkadot/rpc-provider": "7.12.1",
|
||||||
"@polkadot/types": "7.6.1",
|
"@polkadot/types": "7.12.1",
|
||||||
"@polkadot/types-augment": "7.6.1",
|
"@polkadot/types-augment": "7.12.1",
|
||||||
"@polkadot/types-codec": "7.6.1",
|
"@polkadot/types-codec": "7.12.1",
|
||||||
"@polkadot/types-create": "7.6.1",
|
"@polkadot/types-create": "7.12.1",
|
||||||
"@polkadot/types-support": "7.6.1",
|
"@polkadot/types-support": "7.12.1",
|
||||||
"@polkadot/util": "^8.3.3",
|
"@polkadot/util": "^8.5.1",
|
||||||
"@polkadot/x-ws": "^8.3.3",
|
"@polkadot/x-ws": "^8.5.1",
|
||||||
"handlebars": "^4.7.7",
|
"handlebars": "^4.7.7",
|
||||||
"websocket": "^1.0.34",
|
"websocket": "^1.0.34",
|
||||||
"yargs": "^17.3.1"
|
"yargs": "^17.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/websocket": "^1.0.5",
|
"@types/websocket": "^1.0.5",
|
||||||
"@types/yargs": "^17.0.8"
|
"@types/yargs": "^17.0.9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,6 +79,6 @@ export function generateInterfaceTypes (importDefinitions: { [importPath: string
|
|||||||
export function generateDefaultInterface (): void {
|
export function generateDefaultInterface (): void {
|
||||||
generateInterfaceTypes(
|
generateInterfaceTypes(
|
||||||
{ '@polkadot/types/interfaces': defaultDefinitions },
|
{ '@polkadot/types/interfaces': defaultDefinitions },
|
||||||
'packages/types-augment/src/registry.ts'
|
'packages/types-augment/src/registry/interfaces.ts'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ const generateLookupDefsTmpl = Handlebars.compile(readTemplate('lookup/defs'));
|
|||||||
const generateLookupDefsNamedTmpl = Handlebars.compile(readTemplate('lookup/defs-named'));
|
const generateLookupDefsNamedTmpl = Handlebars.compile(readTemplate('lookup/defs-named'));
|
||||||
const generateLookupIndexTmpl = Handlebars.compile(readTemplate('lookup/index'));
|
const generateLookupIndexTmpl = Handlebars.compile(readTemplate('lookup/index'));
|
||||||
const generateLookupTypesTmpl = Handlebars.compile(readTemplate('lookup/types'));
|
const generateLookupTypesTmpl = Handlebars.compile(readTemplate('lookup/types'));
|
||||||
|
const generateRegistryTmpl = Handlebars.compile(readTemplate('interfaceRegistry'));
|
||||||
|
|
||||||
function generateParamType (registry: Registry, { name, type }: SiTypeParameter): string {
|
function generateParamType (registry: Registry, { name, type }: SiTypeParameter): string {
|
||||||
if (type.isSome) {
|
if (type.isSome) {
|
||||||
@@ -214,13 +215,34 @@ function generateLookupTypes (registry: Registry, filtered: [PortableType, TypeD
|
|||||||
writeFile(path.join(destDir, 'index.ts'), () => generateLookupIndexTmpl({ headerType: 'defs' }), true);
|
writeFile(path.join(destDir, 'index.ts'), () => generateLookupIndexTmpl({ headerType: 'defs' }), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateLookup (destDir: string, entries: [string | undefined, HexString][]): void {
|
function generateRegistry (registry: Registry, filtered: [PortableType, TypeDef][], destDir: string, subPath: string): void {
|
||||||
|
writeFile(path.join(destDir, `${subPath}.ts`), (): string => {
|
||||||
|
const items = filtered
|
||||||
|
.map(([, { lookupName }]) => lookupName)
|
||||||
|
.filter((n): n is string => !!n)
|
||||||
|
.sort()
|
||||||
|
.reduce((all: string[], n) => all.includes(n) ? all : all.concat(n), []);
|
||||||
|
const imports = createImports({}, { types: {} });
|
||||||
|
|
||||||
|
imports.lookupTypes = items.reduce((all, n) => ({ ...all, [n]: true }), {});
|
||||||
|
|
||||||
|
return generateRegistryTmpl({
|
||||||
|
headerType: 'defs',
|
||||||
|
imports,
|
||||||
|
items,
|
||||||
|
types: []
|
||||||
|
});
|
||||||
|
}, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
function generateLookup (destDir: string, entries: [string, HexString][]): void {
|
||||||
entries.reduce<string[]>((exclude, [subPath, staticMeta]): string[] => {
|
entries.reduce<string[]>((exclude, [subPath, staticMeta]): string[] => {
|
||||||
const { lookup, registry } = initMeta(staticMeta).metadata.asLatest;
|
const { lookup, registry } = initMeta(staticMeta).metadata.asLatest;
|
||||||
const filtered = getFilteredTypes(lookup, exclude);
|
const filtered = getFilteredTypes(lookup, exclude);
|
||||||
|
|
||||||
generateLookupDefs(registry, filtered, destDir, subPath);
|
generateLookupDefs(registry, filtered, destDir, subPath);
|
||||||
generateLookupTypes(registry, filtered, destDir, subPath);
|
generateLookupTypes(registry, filtered, destDir, subPath);
|
||||||
|
generateRegistry(registry, filtered, destDir, subPath === 'lookup' ? 'registry' : `../registry/${subPath}`);
|
||||||
|
|
||||||
return exclude.concat(
|
return exclude.concat(
|
||||||
...filtered
|
...filtered
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '7.6.1' };
|
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '7.12.1' };
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ describe('getSimilarTypes', (): void => {
|
|||||||
genericTypes: {},
|
genericTypes: {},
|
||||||
ignoredTypes: [],
|
ignoredTypes: [],
|
||||||
localTypes: {},
|
localTypes: {},
|
||||||
|
lookupTypes: {},
|
||||||
metadataTypes: {},
|
metadataTypes: {},
|
||||||
primitiveTypes: {},
|
primitiveTypes: {},
|
||||||
typeToModule: {},
|
typeToModule: {},
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ describe('formatType', (): void => {
|
|||||||
genericTypes: {},
|
genericTypes: {},
|
||||||
ignoredTypes: [],
|
ignoredTypes: [],
|
||||||
localTypes: {},
|
localTypes: {},
|
||||||
|
lookupTypes: {},
|
||||||
metadataTypes: {},
|
metadataTypes: {},
|
||||||
primitiveTypes: {},
|
primitiveTypes: {},
|
||||||
typeToModule: {},
|
typeToModule: {},
|
||||||
|
|||||||
@@ -47,6 +47,10 @@ function extractImports ({ imports, types }: This): string[] {
|
|||||||
!NO_CODEC.includes(n) && !ON_CODEC.includes(n)
|
!NO_CODEC.includes(n) && !ON_CODEC.includes(n)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
file: '@polkadot/types/lookup',
|
||||||
|
types: Object.keys(imports.lookupTypes)
|
||||||
|
},
|
||||||
{
|
{
|
||||||
file: '@polkadot/types/types',
|
file: '@polkadot/types/types',
|
||||||
types: Object.keys(imports.typesTypes).filter((n) =>
|
types: Object.keys(imports.typesTypes).filter((n) =>
|
||||||
@@ -183,7 +187,7 @@ const formatters: Record<TypeDefInfo, (registry: Registry, typeDef: TypeDef, def
|
|||||||
},
|
},
|
||||||
|
|
||||||
[TypeDefInfo.Si]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
[TypeDefInfo.Si]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||||
return formatType(registry, definitions, (registry).lookup.getTypeDef(typeDef.type), imports, withShortcut);
|
return formatType(registry, definitions, registry.lookup.getTypeDef(typeDef.type), imports, withShortcut);
|
||||||
},
|
},
|
||||||
|
|
||||||
[TypeDefInfo.Struct]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
[TypeDefInfo.Struct]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ export interface TypeImports {
|
|||||||
genericTypes: TypeExist; // `import {} from '@polkadot/types/generic`
|
genericTypes: TypeExist; // `import {} from '@polkadot/types/generic`
|
||||||
ignoredTypes: string[]; // No need to import these types
|
ignoredTypes: string[]; // No need to import these types
|
||||||
localTypes: TypeExistMap; // `import {} from '../something'`
|
localTypes: TypeExistMap; // `import {} from '../something'`
|
||||||
|
lookupTypes: TypeExistMap; // `import {} from '@polkadot/types/lookup`
|
||||||
primitiveTypes: TypeExist; // `import {} from '@polkadot/types/primitive`
|
primitiveTypes: TypeExist; // `import {} from '@polkadot/types/primitive`
|
||||||
metadataTypes: TypeExist; // `import {} from '@polkadot/types/metadata`
|
metadataTypes: TypeExist; // `import {} from '@polkadot/types/metadata`
|
||||||
typesTypes: TypeExist; // `import {} from '@polkadot/types/types`
|
typesTypes: TypeExist; // `import {} from '@polkadot/types/types`
|
||||||
@@ -119,6 +120,7 @@ export function createImports (importDefinitions: Record<string, Record<string,
|
|||||||
|
|
||||||
return local;
|
return local;
|
||||||
}, {}),
|
}, {}),
|
||||||
|
lookupTypes: {},
|
||||||
metadataTypes: {},
|
metadataTypes: {},
|
||||||
primitiveTypes: {},
|
primitiveTypes: {},
|
||||||
typeToModule,
|
typeToModule,
|
||||||
|
|||||||
@@ -20,12 +20,12 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.6.1",
|
"version": "7.12.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.16.7",
|
"@babel/runtime": "^7.17.2",
|
||||||
"@polkadot/types": "7.6.1",
|
"@polkadot/types": "7.12.1",
|
||||||
"@polkadot/types-codec": "7.6.1",
|
"@polkadot/types-codec": "7.12.1",
|
||||||
"@polkadot/util": "^8.3.3"
|
"@polkadot/util": "^8.5.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,36 +5,13 @@
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
/**
|
/**
|
||||||
* Lookup74: kusama_runtime::ProxyType
|
* Lookup75: kusama_runtime::ProxyType
|
||||||
**/
|
**/
|
||||||
KusamaRuntimeProxyType: {
|
KusamaRuntimeProxyType: {
|
||||||
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'IdentityJudgement', 'CancelProxy', 'Auction']
|
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'IdentityJudgement', 'CancelProxy', 'Auction', 'Society']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup104: polkadot_runtime_parachains::disputes::pallet::Event<T>
|
* Lookup251: kusama_runtime::SessionKeys
|
||||||
**/
|
|
||||||
PolkadotRuntimeParachainsDisputesPalletEvent: {
|
|
||||||
_enum: {
|
|
||||||
DisputeInitiated: '(H256,PolkadotRuntimeParachainsDisputesDisputeLocation)',
|
|
||||||
DisputeConcluded: '(H256,PolkadotRuntimeParachainsDisputesDisputeResult)',
|
|
||||||
DisputeTimedOut: 'H256',
|
|
||||||
Revert: 'u32'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup106: polkadot_runtime_parachains::disputes::DisputeLocation
|
|
||||||
**/
|
|
||||||
PolkadotRuntimeParachainsDisputesDisputeLocation: {
|
|
||||||
_enum: ['Local', 'Remote']
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup107: polkadot_runtime_parachains::disputes::DisputeResult
|
|
||||||
**/
|
|
||||||
PolkadotRuntimeParachainsDisputesDisputeResult: {
|
|
||||||
_enum: ['Valid', 'Invalid']
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup246: kusama_runtime::SessionKeys
|
|
||||||
**/
|
**/
|
||||||
KusamaRuntimeSessionKeys: {
|
KusamaRuntimeSessionKeys: {
|
||||||
grandpa: 'SpFinalityGrandpaAppPublic',
|
grandpa: 'SpFinalityGrandpaAppPublic',
|
||||||
@@ -45,11 +22,11 @@ export default {
|
|||||||
authorityDiscovery: 'SpAuthorityDiscoveryAppPublic'
|
authorityDiscovery: 'SpAuthorityDiscoveryAppPublic'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup319: kusama_runtime::OriginCaller
|
* Lookup325: kusama_runtime::OriginCaller
|
||||||
**/
|
**/
|
||||||
KusamaRuntimeOriginCaller: {
|
KusamaRuntimeOriginCaller: {
|
||||||
_enum: {
|
_enum: {
|
||||||
system: 'FrameSystemRawOrigin',
|
system: 'FrameSupportDispatchRawOrigin',
|
||||||
__Unused1: 'Null',
|
__Unused1: 'Null',
|
||||||
__Unused2: 'Null',
|
__Unused2: 'Null',
|
||||||
__Unused3: 'Null',
|
__Unused3: 'Null',
|
||||||
@@ -152,7 +129,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup384: kusama_runtime::NposCompactSolution24
|
* Lookup390: kusama_runtime::NposCompactSolution24
|
||||||
**/
|
**/
|
||||||
KusamaRuntimeNposCompactSolution24: {
|
KusamaRuntimeNposCompactSolution24: {
|
||||||
votes1: 'Vec<(Compact<u32>,Compact<u16>)>',
|
votes1: 'Vec<(Compact<u32>,Compact<u16>)>',
|
||||||
@@ -181,28 +158,7 @@ export default {
|
|||||||
votes24: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);23],Compact<u16>)>'
|
votes24: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);23],Compact<u16>)>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup504: polkadot_runtime_parachains::disputes::pallet::Call<T>
|
* Lookup742: kusama_runtime::Runtime
|
||||||
**/
|
|
||||||
PolkadotRuntimeParachainsDisputesPalletCall: {
|
|
||||||
_enum: ['force_unfreeze']
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup697: polkadot_primitives::v1::DisputeState<N>
|
|
||||||
**/
|
|
||||||
PolkadotPrimitivesV1DisputeState: {
|
|
||||||
validatorsFor: 'BitVec',
|
|
||||||
validatorsAgainst: 'BitVec',
|
|
||||||
start: 'u32',
|
|
||||||
concludedAt: 'Option<u32>'
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup698: polkadot_runtime_parachains::disputes::pallet::Error<T>
|
|
||||||
**/
|
|
||||||
PolkadotRuntimeParachainsDisputesPalletError: {
|
|
||||||
_enum: ['DuplicateDisputeStatementSets', 'AncientDisputeStatement', 'ValidatorIndexOutOfBounds', 'InvalidSignature', 'DuplicateStatement', 'PotentialSpam', 'SingleSidedDispute']
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Lookup733: kusama_runtime::Runtime
|
|
||||||
**/
|
**/
|
||||||
KusamaRuntimeRuntime: 'Null'
|
KusamaRuntimeRuntime: 'Null'
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -2,11 +2,11 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
declare module '@polkadot/types/lookup' {
|
declare module '@polkadot/types/lookup' {
|
||||||
import type { BitVec, Compact, Enum, Null, Option, Struct, Vec, u16, u32 } from '@polkadot/types-codec';
|
import type { Compact, Enum, Null, Struct, Vec, u16, u32 } from '@polkadot/types-codec';
|
||||||
import type { ITuple } from '@polkadot/types-codec/types';
|
import type { ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { H256, PerU16 } from '@polkadot/types/interfaces/runtime';
|
import type { PerU16 } from '@polkadot/types/interfaces/runtime';
|
||||||
|
|
||||||
/** @name KusamaRuntimeProxyType (74) */
|
/** @name KusamaRuntimeProxyType (75) */
|
||||||
export interface KusamaRuntimeProxyType extends Enum {
|
export interface KusamaRuntimeProxyType extends Enum {
|
||||||
readonly isAny: boolean;
|
readonly isAny: boolean;
|
||||||
readonly isNonTransfer: boolean;
|
readonly isNonTransfer: boolean;
|
||||||
@@ -15,37 +15,11 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly isIdentityJudgement: boolean;
|
readonly isIdentityJudgement: boolean;
|
||||||
readonly isCancelProxy: boolean;
|
readonly isCancelProxy: boolean;
|
||||||
readonly isAuction: boolean;
|
readonly isAuction: boolean;
|
||||||
readonly type: 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction';
|
readonly isSociety: boolean;
|
||||||
|
readonly type: 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society';
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsDisputesPalletEvent (104) */
|
/** @name KusamaRuntimeSessionKeys (251) */
|
||||||
export interface PolkadotRuntimeParachainsDisputesPalletEvent extends Enum {
|
|
||||||
readonly isDisputeInitiated: boolean;
|
|
||||||
readonly asDisputeInitiated: ITuple<[H256, PolkadotRuntimeParachainsDisputesDisputeLocation]>;
|
|
||||||
readonly isDisputeConcluded: boolean;
|
|
||||||
readonly asDisputeConcluded: ITuple<[H256, PolkadotRuntimeParachainsDisputesDisputeResult]>;
|
|
||||||
readonly isDisputeTimedOut: boolean;
|
|
||||||
readonly asDisputeTimedOut: H256;
|
|
||||||
readonly isRevert: boolean;
|
|
||||||
readonly asRevert: u32;
|
|
||||||
readonly type: 'DisputeInitiated' | 'DisputeConcluded' | 'DisputeTimedOut' | 'Revert';
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsDisputesDisputeLocation (106) */
|
|
||||||
export interface PolkadotRuntimeParachainsDisputesDisputeLocation extends Enum {
|
|
||||||
readonly isLocal: boolean;
|
|
||||||
readonly isRemote: boolean;
|
|
||||||
readonly type: 'Local' | 'Remote';
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsDisputesDisputeResult (107) */
|
|
||||||
export interface PolkadotRuntimeParachainsDisputesDisputeResult extends Enum {
|
|
||||||
readonly isValid: boolean;
|
|
||||||
readonly isInvalid: boolean;
|
|
||||||
readonly type: 'Valid' | 'Invalid';
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @name KusamaRuntimeSessionKeys (246) */
|
|
||||||
export interface KusamaRuntimeSessionKeys extends Struct {
|
export interface KusamaRuntimeSessionKeys extends Struct {
|
||||||
readonly grandpa: SpFinalityGrandpaAppPublic;
|
readonly grandpa: SpFinalityGrandpaAppPublic;
|
||||||
readonly babe: SpConsensusBabeAppPublic;
|
readonly babe: SpConsensusBabeAppPublic;
|
||||||
@@ -55,10 +29,10 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly authorityDiscovery: SpAuthorityDiscoveryAppPublic;
|
readonly authorityDiscovery: SpAuthorityDiscoveryAppPublic;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name KusamaRuntimeOriginCaller (319) */
|
/** @name KusamaRuntimeOriginCaller (325) */
|
||||||
export interface KusamaRuntimeOriginCaller extends Enum {
|
export interface KusamaRuntimeOriginCaller extends Enum {
|
||||||
readonly isSystem: boolean;
|
readonly isSystem: boolean;
|
||||||
readonly asSystem: FrameSystemRawOrigin;
|
readonly asSystem: FrameSupportDispatchRawOrigin;
|
||||||
readonly isVoid: boolean;
|
readonly isVoid: boolean;
|
||||||
readonly isCouncil: boolean;
|
readonly isCouncil: boolean;
|
||||||
readonly asCouncil: PalletCollectiveRawOrigin;
|
readonly asCouncil: PalletCollectiveRawOrigin;
|
||||||
@@ -71,7 +45,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly type: 'System' | 'Void' | 'Council' | 'TechnicalCommittee' | 'ParachainsOrigin' | 'XcmPallet';
|
readonly type: 'System' | 'Void' | 'Council' | 'TechnicalCommittee' | 'ParachainsOrigin' | 'XcmPallet';
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name KusamaRuntimeNposCompactSolution24 (384) */
|
/** @name KusamaRuntimeNposCompactSolution24 (390) */
|
||||||
export interface KusamaRuntimeNposCompactSolution24 extends Struct {
|
export interface KusamaRuntimeNposCompactSolution24 extends Struct {
|
||||||
readonly votes1: Vec<ITuple<[Compact<u32>, Compact<u16>]>>;
|
readonly votes1: Vec<ITuple<[Compact<u32>, Compact<u16>]>>;
|
||||||
readonly votes2: Vec<ITuple<[Compact<u32>, ITuple<[Compact<u16>, Compact<PerU16>]>, Compact<u16>]>>;
|
readonly votes2: Vec<ITuple<[Compact<u32>, ITuple<[Compact<u16>, Compact<PerU16>]>, Compact<u16>]>>;
|
||||||
@@ -99,33 +73,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly votes24: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
readonly votes24: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsDisputesPalletCall (504) */
|
/** @name KusamaRuntimeRuntime (742) */
|
||||||
export interface PolkadotRuntimeParachainsDisputesPalletCall extends Enum {
|
|
||||||
readonly isForceUnfreeze: boolean;
|
|
||||||
readonly type: 'ForceUnfreeze';
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @name PolkadotPrimitivesV1DisputeState (697) */
|
|
||||||
export interface PolkadotPrimitivesV1DisputeState extends Struct {
|
|
||||||
readonly validatorsFor: BitVec;
|
|
||||||
readonly validatorsAgainst: BitVec;
|
|
||||||
readonly start: u32;
|
|
||||||
readonly concludedAt: Option<u32>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @name PolkadotRuntimeParachainsDisputesPalletError (698) */
|
|
||||||
export interface PolkadotRuntimeParachainsDisputesPalletError extends Enum {
|
|
||||||
readonly isDuplicateDisputeStatementSets: boolean;
|
|
||||||
readonly isAncientDisputeStatement: boolean;
|
|
||||||
readonly isValidatorIndexOutOfBounds: boolean;
|
|
||||||
readonly isInvalidSignature: boolean;
|
|
||||||
readonly isDuplicateStatement: boolean;
|
|
||||||
readonly isPotentialSpam: boolean;
|
|
||||||
readonly isSingleSidedDispute: boolean;
|
|
||||||
readonly type: 'DuplicateDisputeStatementSets' | 'AncientDisputeStatement' | 'ValidatorIndexOutOfBounds' | 'InvalidSignature' | 'DuplicateStatement' | 'PotentialSpam' | 'SingleSidedDispute';
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @name KusamaRuntimeRuntime (733) */
|
|
||||||
export type KusamaRuntimeRuntime = Null;
|
export type KusamaRuntimeRuntime = Null;
|
||||||
|
|
||||||
} // declare module
|
} // declare module
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '7.6.1' };
|
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '7.12.1' };
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/types-lookup authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import './interfaces';
|
||||||
+6
-1
@@ -17,7 +17,7 @@ import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
|
|||||||
import type { StatementKind } from '@polkadot/types/interfaces/claims';
|
import type { StatementKind } from '@polkadot/types/interfaces/claims';
|
||||||
import type { CollectiveOrigin, MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective';
|
import type { CollectiveOrigin, MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective';
|
||||||
import type { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';
|
import type { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';
|
||||||
import type { AliveContractInfo, CodeHash, CodeUploadRequest, CodeUploadResult, CodeUploadResultValue, ContractCallFlags, ContractCallRequest, ContractExecResult, ContractExecResultErr, ContractExecResultErrModule, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractReturnFlags, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateReturnValue, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
|
import type { AliveContractInfo, CodeHash, CodeSource, CodeUploadRequest, CodeUploadResult, CodeUploadResultValue, ContractCallFlags, ContractCallRequest, ContractExecResult, ContractExecResultErr, ContractExecResultErrModule, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractInstantiateResultTo299, ContractReturnFlags, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateRequestV1, InstantiateRequestV2, InstantiateReturnValue, InstantiateReturnValueOk, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
|
||||||
import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV1, ContractConstructorSpecV2, ContractConstructorSpecV3, ContractContractSpecV0, ContractContractSpecV1, ContractContractSpecV2, ContractContractSpecV3, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV1, ContractEventSpecV2, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV1, ContractMessageSpecV2, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractMetadataV3, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';
|
import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV1, ContractConstructorSpecV2, ContractConstructorSpecV3, ContractContractSpecV0, ContractContractSpecV1, ContractContractSpecV2, ContractContractSpecV3, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV1, ContractEventSpecV2, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV1, ContractMessageSpecV2, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractMetadataV3, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';
|
||||||
import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan';
|
import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan';
|
||||||
import type { ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus';
|
import type { ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus';
|
||||||
@@ -197,6 +197,7 @@ declare module '@polkadot/types/types/registry' {
|
|||||||
ClassMetadata: ClassMetadata;
|
ClassMetadata: ClassMetadata;
|
||||||
CodecHash: CodecHash;
|
CodecHash: CodecHash;
|
||||||
CodeHash: CodeHash;
|
CodeHash: CodeHash;
|
||||||
|
CodeSource: CodeSource;
|
||||||
CodeUploadRequest: CodeUploadRequest;
|
CodeUploadRequest: CodeUploadRequest;
|
||||||
CodeUploadResult: CodeUploadResult;
|
CodeUploadResult: CodeUploadResult;
|
||||||
CodeUploadResultValue: CodeUploadResultValue;
|
CodeUploadResultValue: CodeUploadResultValue;
|
||||||
@@ -249,6 +250,7 @@ declare module '@polkadot/types/types/registry' {
|
|||||||
ContractInfo: ContractInfo;
|
ContractInfo: ContractInfo;
|
||||||
ContractInstantiateResult: ContractInstantiateResult;
|
ContractInstantiateResult: ContractInstantiateResult;
|
||||||
ContractInstantiateResultTo267: ContractInstantiateResultTo267;
|
ContractInstantiateResultTo267: ContractInstantiateResultTo267;
|
||||||
|
ContractInstantiateResultTo299: ContractInstantiateResultTo299;
|
||||||
ContractLayoutArray: ContractLayoutArray;
|
ContractLayoutArray: ContractLayoutArray;
|
||||||
ContractLayoutCell: ContractLayoutCell;
|
ContractLayoutCell: ContractLayoutCell;
|
||||||
ContractLayoutEnum: ContractLayoutEnum;
|
ContractLayoutEnum: ContractLayoutEnum;
|
||||||
@@ -525,7 +527,10 @@ declare module '@polkadot/types/types/registry' {
|
|||||||
InstanceId: InstanceId;
|
InstanceId: InstanceId;
|
||||||
InstanceMetadata: InstanceMetadata;
|
InstanceMetadata: InstanceMetadata;
|
||||||
InstantiateRequest: InstantiateRequest;
|
InstantiateRequest: InstantiateRequest;
|
||||||
|
InstantiateRequestV1: InstantiateRequestV1;
|
||||||
|
InstantiateRequestV2: InstantiateRequestV2;
|
||||||
InstantiateReturnValue: InstantiateReturnValue;
|
InstantiateReturnValue: InstantiateReturnValue;
|
||||||
|
InstantiateReturnValueOk: InstantiateReturnValueOk;
|
||||||
InstantiateReturnValueTo267: InstantiateReturnValueTo267;
|
InstantiateReturnValueTo267: InstantiateReturnValueTo267;
|
||||||
InstructionV2: InstructionV2;
|
InstructionV2: InstructionV2;
|
||||||
InstructionWeights: InstructionWeights;
|
InstructionWeights: InstructionWeights;
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import type { KusamaRuntimeNposCompactSolution24, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeRuntime, KusamaRuntimeSessionKeys } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
|
declare module '@polkadot/types/types/registry' {
|
||||||
|
export interface InterfaceTypes {
|
||||||
|
KusamaRuntimeNposCompactSolution24: KusamaRuntimeNposCompactSolution24;
|
||||||
|
KusamaRuntimeOriginCaller: KusamaRuntimeOriginCaller;
|
||||||
|
KusamaRuntimeProxyType: KusamaRuntimeProxyType;
|
||||||
|
KusamaRuntimeRuntime: KusamaRuntimeRuntime;
|
||||||
|
KusamaRuntimeSessionKeys: KusamaRuntimeSessionKeys;
|
||||||
|
} // InterfaceTypes
|
||||||
|
} // declare module
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -20,16 +20,16 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.6.1",
|
"version": "7.12.1",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.16.7",
|
"@babel/runtime": "^7.17.2",
|
||||||
"@polkadot/util": "^8.3.3"
|
"@polkadot/util": "^8.5.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/types": "7.6.1",
|
"@polkadot/types": "7.12.1",
|
||||||
"@polkadot/types-augment": "7.6.1",
|
"@polkadot/types-augment": "7.12.1",
|
||||||
"@polkadot/types-support": "7.6.1",
|
"@polkadot/types-support": "7.12.1",
|
||||||
"@polkadot/util-crypto": "^8.3.3"
|
"@polkadot/util-crypto": "^8.5.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { HexString } from '@polkadot/util/types';
|
import type { HexString } from '@polkadot/util/types';
|
||||||
import type { AnyJson, Codec, IU8a, IVec, Registry } from '../types';
|
import type { AnyJson, Codec, Inspect, IU8a, IVec, Registry } from '../types';
|
||||||
|
|
||||||
import { compactToU8a, u8aConcat, u8aToHex } from '@polkadot/util';
|
import { compactToU8a, u8aConcat, u8aToHex } from '@polkadot/util';
|
||||||
|
|
||||||
@@ -78,6 +78,26 @@ export abstract class AbstractArray<T extends Codec> extends Array<T> implements
|
|||||||
return compareArray(this, other);
|
return compareArray(this, other);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Returns a breakdown of the hex encoding for this Codec
|
||||||
|
*/
|
||||||
|
inspect (): Inspect {
|
||||||
|
return {
|
||||||
|
inner: this.inspectInner(),
|
||||||
|
outer: [compactToU8a(this.length)]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
inspectInner (): Inspect[] {
|
||||||
|
const inner = new Array<Inspect>(this.length);
|
||||||
|
|
||||||
|
for (let i = 0; i < this.length; i++) {
|
||||||
|
inner[i] = this[i].inspect();
|
||||||
|
}
|
||||||
|
|
||||||
|
return inner;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Converts the Object to an standard JavaScript Array
|
* @description Converts the Object to an standard JavaScript Array
|
||||||
*/
|
*/
|
||||||
@@ -141,18 +161,21 @@ export abstract class AbstractArray<T extends Codec> extends Array<T> implements
|
|||||||
* @param isBare true when the value has none of the type-specific prefixes (internal)
|
* @param isBare true when the value has none of the type-specific prefixes (internal)
|
||||||
*/
|
*/
|
||||||
public toU8a (isBare?: boolean): Uint8Array {
|
public toU8a (isBare?: boolean): Uint8Array {
|
||||||
|
const encoded = this.toU8aInner();
|
||||||
|
|
||||||
|
return isBare
|
||||||
|
? u8aConcat(...encoded)
|
||||||
|
: u8aConcat(compactToU8a(this.length), ...encoded);
|
||||||
|
}
|
||||||
|
|
||||||
|
public toU8aInner (isBare?: boolean): Uint8Array[] {
|
||||||
const encoded = new Array<Uint8Array>(this.length);
|
const encoded = new Array<Uint8Array>(this.length);
|
||||||
|
|
||||||
for (let i = 0; i < this.length; i++) {
|
for (let i = 0; i < this.length; i++) {
|
||||||
encoded[i] = this[i].toU8a(isBare);
|
encoded[i] = this[i].toU8a(isBare);
|
||||||
}
|
}
|
||||||
|
|
||||||
return isBare
|
return encoded;
|
||||||
? u8aConcat(...encoded)
|
|
||||||
: u8aConcat(
|
|
||||||
compactToU8a(this.length),
|
|
||||||
...encoded
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Below are methods that we override. When we do a `new Vec(...).map()`,
|
// Below are methods that we override. When we do a `new Vec(...).map()`,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { HexString } from '@polkadot/util/types';
|
import type { HexString } from '@polkadot/util/types';
|
||||||
import type { AnyNumber, INumber, IU8a, Registry, UIntBitLength } from '../types';
|
import type { AnyNumber, Inspect, INumber, IU8a, Registry, UIntBitLength } from '../types';
|
||||||
|
|
||||||
import { assert, BN, BN_BILLION, BN_HUNDRED, BN_MILLION, BN_QUINTILL, BN_ZERO, bnToBn, bnToHex, bnToU8a, formatBalance, formatNumber, hexToBn, isBn, isHex, isNumber, isString, isU8a, u8aToBn } from '@polkadot/util';
|
import { assert, BN, BN_BILLION, BN_HUNDRED, BN_MILLION, BN_QUINTILL, BN_ZERO, bnToBn, bnToHex, bnToU8a, formatBalance, formatNumber, hexToBn, isBn, isHex, isNumber, isString, isU8a, u8aToBn } from '@polkadot/util';
|
||||||
|
|
||||||
@@ -122,6 +122,15 @@ export abstract class AbstractInt extends BN implements INumber {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Returns a breakdown of the hex encoding for this Codec
|
||||||
|
*/
|
||||||
|
inspect (): Inspect {
|
||||||
|
return {
|
||||||
|
outer: [this.toU8a()]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description True if this value is the max of the type
|
* @description True if this value is the max of the type
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { HexString } from '@polkadot/util/types';
|
import type { HexString } from '@polkadot/util/types';
|
||||||
import type { AnyJson, BareOpts, Codec, IU8a, Registry } from '../types';
|
import type { AnyJson, BareOpts, Codec, Inspect, IU8a, Registry } from '../types';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Base
|
* @name Base
|
||||||
@@ -59,6 +59,13 @@ export abstract class Base<T extends Codec> implements Codec {
|
|||||||
return this.#raw.eq(other);
|
return this.#raw.eq(other);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Returns a breakdown of the hex encoding for this Codec
|
||||||
|
*/
|
||||||
|
inspect (): Inspect {
|
||||||
|
return this.#raw.inspect();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Returns a hex string representation of the value. isLe returns a LE (number-only) representation
|
* @description Returns a hex string representation of the value. isLe returns a LE (number-only) representation
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -79,5 +79,13 @@ describe('Compact', (): void => {
|
|||||||
(new (Compact.with('u128'))(registry, 12345678987654321n).toBigInt() + 1n) === 12345678987654322n
|
(new (Compact.with('u128'))(registry, 12345678987654321n).toBigInt() + 1n) === 12345678987654322n
|
||||||
).toBe(true);
|
).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('has a sane inspect', (): void => {
|
||||||
|
expect(
|
||||||
|
new (Compact.with(U32))(registry, 0xffff).inspect()
|
||||||
|
).toEqual({
|
||||||
|
outer: [new Uint8Array([254, 255, 3, 0])]
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import type { BN } from '@polkadot/util';
|
import type { BN } from '@polkadot/util';
|
||||||
import type { HexString } from '@polkadot/util/types';
|
import type { HexString } from '@polkadot/util/types';
|
||||||
import type { AnyJson, AnyNumber, CodecClass, ICompact, INumber, IU8a, Registry } from '../types';
|
import type { AnyJson, AnyNumber, CodecClass, ICompact, Inspect, INumber, IU8a, Registry } from '../types';
|
||||||
|
|
||||||
import { compactFromU8a, compactToU8a, isBigInt, isBn, isNumber, isString } from '@polkadot/util';
|
import { compactFromU8a, compactToU8a, isBigInt, isBn, isNumber, isString } from '@polkadot/util';
|
||||||
|
|
||||||
@@ -100,6 +100,15 @@ export class Compact<T extends INumber> implements ICompact<T> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Returns a breakdown of the hex encoding for this Codec
|
||||||
|
*/
|
||||||
|
inspect (): Inspect {
|
||||||
|
return {
|
||||||
|
outer: [this.toU8a()]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Returns a BigInt representation of the number
|
* @description Returns a BigInt representation of the number
|
||||||
*/
|
*/
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user